/* BlipTrail Live — the map is the page; everything else floats on it. */
body.live { overflow: hidden; }
#map { position: fixed; inset: 0; background: var(--bg); }

.glass {
  background: var(--panel);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- Sidebar -------------------------------------------------------- */
.sidebar {
  position: fixed; z-index: 20; top: 12px; left: 12px; bottom: 12px; width: 372px;
  display: flex; flex-direction: column; overflow: hidden;
}
.sheet-handle { display: none; }
.side-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.side-head .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.event-title { margin-top: 12px; font-size: 21px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.15; }
.event-tag { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.event-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.clock { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right; line-height: 1.25; }
.clock b { display: block; color: var(--text); font-size: 13px; font-weight: 650; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.stat { background: var(--panel-solid); padding: 10px 6px 9px; text-align: center; }
.stat b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }

.tabs { display: flex; gap: 2px; padding: 8px 10px 0; }
.tab {
  flex: 1; height: 34px; border: 0; background: transparent; color: var(--muted); font-weight: 650; font-size: 13px;
  border-radius: 9px 9px 0 0; border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent-text); }
.tab .count { margin-left: 5px; font-size: 11px; color: var(--faint); }

.pane { flex: 1; min-height: 0; display: none; flex-direction: column; }
.pane.is-active { display: flex; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }

.search { padding: 10px 12px 8px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-box .input { padding-left: 33px; min-height: 36px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip {
  height: 27px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; flex: none;
}
.chip.is-active { background: var(--text); color: var(--bg); border-color: transparent; }

/* ---- Rider rows ------------------------------------------------------ */
.riders { list-style: none; margin: 0; padding: 0 6px 10px; }
.rider {
  display: grid; grid-template-columns: 22px 34px 1fr auto 26px; align-items: center; gap: 9px;
  padding: 8px 6px 8px 8px; border-radius: 12px; cursor: pointer; position: relative;
  transition: background 0.15s;
}
.rider:hover { background: var(--raise); }
.rider.is-selected { background: color-mix(in srgb, var(--accent-text) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 32%, transparent); }
.rider .rank { font-size: 12px; color: var(--faint); text-align: right; font-weight: 650; }
.bib {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 750; font-size: 13px;
  color: #0a0d12; background: var(--c, var(--accent)); position: relative;
}
.bib::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--panel-solid); background: var(--faint);
}
.is-moving > .bib::after, .bib.is-moving::after { background: var(--ok); }
.is-stopped > .bib::after, .bib.is-stopped::after { background: var(--warn); }
.is-offline > .bib::after, .bib.is-offline::after { background: var(--danger); }
.is-finished > .bib::after, .bib.is-finished::after { background: var(--cyan); }
.rider .who { min-width: 0; }
.rider .name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rider .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rider .fig { text-align: right; }
.rider .fig b { display: block; font-weight: 700; }
.rider .fig span { font-size: 12px; color: var(--muted); }
.star { width: 26px; height: 26px; border: 0; background: transparent; color: var(--faint); border-radius: 8px; display: grid; place-items: center; }
.star:hover { color: var(--text); background: var(--raise-2); }
.star.is-on { color: var(--accent-text); }
.star svg { width: 15px; height: 15px; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }

/* ---- Feed and checkpoints ------------------------------------------- */
.feed { list-style: none; margin: 0; padding: 6px 10px 12px; border-top: 1px solid var(--line); }
.feed li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 9px 4px; border-bottom: 1px solid color-mix(in srgb, var(--text) 5%, transparent); align-items: start; }
.feed li[data-rider] { cursor: pointer; }
.feed li[data-rider]:hover { background: var(--raise); border-radius: 10px; }
.feed .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--raise-2); color: var(--muted); }
.feed .ico svg { width: 15px; height: 15px; }
.feed .k-checkpoint .ico, .feed .k-finish .ico { color: var(--accent-text); background: color-mix(in srgb, var(--accent-text) 12%, transparent); }
.feed .k-off_route .ico, .feed .k-battery .ico { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.feed .k-announcement .ico { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.feed .k-message .ico { color: var(--message); background: color-mix(in srgb, var(--message) 12%, transparent); }
.feed time { font-size: 11.5px; color: var(--faint); white-space: nowrap; padding-top: 2px; }

.cps { list-style: none; margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); }
.cps li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding-bottom: 16px; position: relative; }
.cps li::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.cps li:last-child::before { display: none; }
.cps .node { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); background: var(--panel-solid); z-index: 1; }
.cps .is-reached .node { border-color: var(--accent-text); background: var(--accent-text); }
.cps b { display: block; }
.cps .km { color: var(--muted); font-size: 12.5px; }
.cps .cnt { font-size: 12px; color: var(--muted); text-align: right; }

/* ---- Rider detail ---------------------------------------------------- */
.detail {
  position: fixed; z-index: 21; top: 12px; right: 12px; bottom: 184px; width: 384px;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(calc(100% + 24px)); visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.38s;
}
.detail.is-open { transform: none; visibility: visible; transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
.d-head { padding: 14px 14px 12px; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.d-head .bib { width: 46px; height: 46px; border-radius: 14px; font-size: 17px; }
.d-head h2 { font-size: 18px; letter-spacing: -0.02em; line-height: 1.2; }
.d-head .sub { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; margin-top: 3px; }
.d-actions { display: flex; gap: 2px; }
.d-body { padding: 14px; display: grid; gap: 16px; }
.d-status { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--raise); }
.d-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.d-status.is-moving .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.d-status.is-stopped .dot { background: var(--warn); }
.d-status.is-offline .dot { background: var(--danger); }
.d-status.is-finished .dot { background: var(--cyan); }
.d-status b { display: block; }
.d-status span { font-size: 12.5px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--raise); border-radius: 12px; padding: 10px 11px 9px; min-width: 0; }
.tile label { display: flex; align-items: center; gap: 5px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.tile b { display: block; margin-top: 3px; font-size: 19px; font-weight: 720; letter-spacing: -0.02em; white-space: nowrap; }
.tile b small { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
/* Where a number comes from: measured by the device, calculated by BlipTrail. */
.src { width: 6px; height: 6px; border-radius: 2px; flex: none; }
.src--m { background: var(--cyan); }
.src--c { background: var(--accent-text); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }

.progress { display: grid; gap: 7px; }
.progress .bar { position: relative; height: 8px; border-radius: 999px; background: var(--raise-2); }
.progress .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--bar); width: 0; transition: width 0.8s ease; }
.progress .tick { position: absolute; top: -3px; width: 2px; height: 14px; background: color-mix(in srgb, var(--text) 30%, transparent); border-radius: 2px; }
.progress .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.next { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.next .tile b { font-size: 15px; }
.next .tile em { font-style: normal; display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.timeline .node { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--faint); justify-self: center; }
.timeline .is-passed .node { background: var(--accent-text); border-color: var(--accent-text); }
.timeline .is-passed { color: var(--text); }
.timeline li { color: var(--muted); }
.timeline time { font-size: 12px; color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notes li { padding: 9px 11px; border-radius: 12px; background: var(--raise); font-size: 13px; }
.notes .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.notes .meta b { color: var(--text); font-weight: 650; }
.msg-form { display: grid; gap: 8px; margin-top: 10px; }
.msg-form .row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.msg-form .hint { font-size: 11.5px; color: var(--faint); }

/* ---- Dock: elevation profile + replay -------------------------------- */
.dock { position: fixed; z-index: 19; left: 396px; right: 12px; bottom: 12px; padding: 10px 14px 10px; display: grid; gap: 6px; }
.profile { position: relative; height: 76px; }
.profile svg { width: 100%; height: 100%; display: block; overflow: visible; }
.profile .area { fill: url(#profile-fill); }
.profile .line { fill: none; stroke: var(--course); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.profile .cp-line { stroke: color-mix(in srgb, var(--text) 18%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 3; }
.profile .dots { position: absolute; inset: 0; pointer-events: none; }
.p-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px var(--bg); transition: left 1s linear, top 1s linear; }
.p-dot.is-selected { width: 14px; height: 14px; margin: -7px 0 0 -7px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); z-index: 2; }
.no-anim .p-dot { transition: none; }
.p-cp { position: absolute; top: -2px; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.profile .cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--text) 40%, transparent); pointer-events: none; }
.profile .tip { position: absolute; bottom: 100%; transform: translate(-50%, -6px); padding: 4px 8px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 11.5px; white-space: nowrap; pointer-events: none; }

.replay { display: flex; align-items: center; gap: 10px; }
.replay .mode { display: inline-flex; background: var(--raise); border-radius: 10px; padding: 3px; }
.replay .mode button { height: 28px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; font-weight: 650; font-size: 12.5px; }
.replay .mode button.is-active { background: var(--raise-2); color: var(--text); }
.replay .mode button.is-active[data-mode="live"] { color: var(--accent-text); }
.replay input[type="range"] { flex: 1; min-width: 60px; accent-color: var(--accent-text); height: 22px; }
.replay .time { font-size: 12.5px; color: var(--muted); min-width: 132px; text-align: right; }
.replay .time b { color: var(--text); font-weight: 650; }
.replay .select { width: auto; min-height: 30px; padding: 3px 8px; font-size: 12.5px; border-radius: 9px; }
.replay-only { display: none; }
.is-replay .replay-only { display: inline-flex; }
.is-replay .live-only { display: none; }
.dock .attribution { font-size: 10.5px; color: var(--faint); }

/* ---- Map markers ------------------------------------------------------ */
.rm { position: relative; width: 0; height: 0; cursor: pointer; will-change: transform; }
.rm-dot {
  position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c); color: #0a0d12; font: 750 11px/26px var(--font); text-align: center;
  box-shadow: 0 0 0 2.5px #0a0d12, 0 6px 16px rgba(0, 0, 0, 0.55); transition: transform 0.2s, opacity 0.3s;
}
.rm-pulse { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%; background: var(--c); opacity: 0; }
.rm.is-moving .rm-pulse { animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(2.7); opacity: 0; } }
.rm-arrow { position: absolute; left: -5px; top: -24px; width: 10px; height: 8px; transform-origin: 5px 24px; transform: rotate(var(--h, 0deg)); display: none; }
.rm-arrow::before { content: ""; position: absolute; inset: 0; background: var(--c); clip-path: polygon(50% 0, 100% 100%, 50% 70%, 0 100%); }
.rm.is-moving.has-heading .rm-arrow { display: block; }
.rm-label {
  position: absolute; left: 18px; top: -10px; padding: 2px 8px; border-radius: 7px; white-space: nowrap;
  background: var(--panel); font-size: 11.5px; font-weight: 650; border: 1px solid var(--line);
  opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; pointer-events: none;
}
.rm:hover .rm-label, .rm.is-selected .rm-label, .show-labels .rm-label { opacity: 1; transform: none; }
.rm.is-stopped .rm-dot { box-shadow: 0 0 0 2.5px #0a0d12, 0 0 0 4.5px color-mix(in srgb, var(--warn) 80%, transparent); }
.rm.is-offline .rm-dot { opacity: 0.45; filter: grayscale(0.7); }
.rm.is-finished .rm-dot { box-shadow: 0 0 0 2.5px #0a0d12, 0 0 0 4.5px var(--cyan); }
.rm.is-selected { z-index: 5 !important; }
.rm.is-selected .rm-dot { transform: scale(1.3); box-shadow: 0 0 0 3px #0a0d12, 0 0 0 5.5px var(--c), 0 10px 26px rgba(0, 0, 0, 0.6); }
.rm.is-dim { opacity: 0.22; }
.rm.is-dim .rm-pulse { animation: none; }

.cpm { position: relative; width: 0; height: 0; }
.cpm i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; transform: rotate(45deg); background: var(--bg); border: 2.5px solid var(--text); border-radius: 3px; }
.cpm.k-start i, .cpm.k-finish i { border-color: var(--accent-text); }
.cpm span { position: absolute; left: 14px; top: -9px; font-size: 11.5px; font-weight: 650; white-space: nowrap; color: var(--text); text-shadow: 0 0 4px var(--halo), 0 0 2px var(--halo), 0 0 1px var(--halo); }

.maplibregl-ctrl-top-right { transition: right 0.35s; }
.detail-open .maplibregl-ctrl-top-right { right: 396px; }
.maplibregl-ctrl-group { background: var(--panel-solid) !important; border: 1px solid var(--line); box-shadow: none !important; border-radius: 12px !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 34px; height: 34px; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1) brightness(1.6); }
.maplibregl-ctrl-attrib { background: var(--panel) !important; color: var(--faint); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-bottom-right { bottom: 172px; }
.maplibregl-popup-content { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; }
.maplibregl-popup-tip { display: none; }

.conn { position: fixed; z-index: 30; left: 50%; bottom: 184px; transform: translateX(-50%); }
.map-tools { position: fixed; z-index: 18; right: 12px; top: 96px; display: grid; gap: 6px; transition: right 0.35s; }
.detail-open .map-tools { right: 408px; }
.map-tools .icon-btn { background: var(--panel-solid); border-color: var(--line); }

/* ---- Mobile ----------------------------------------------------------- */
@media (max-width: 900px) {
  .sidebar {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 86dvh;
    border-radius: 20px 20px 0 0; border-bottom: 0;
    transform: translateY(calc(86dvh - 132px)); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    touch-action: pan-y;
  }
  .sidebar[data-snap="half"] { transform: translateY(calc(86dvh - 50dvh)); }
  .sidebar[data-snap="full"] { transform: none; }
  .sheet-handle { display: block; width: 100%; height: 22px; border: 0; background: transparent; flex: none; }
  .sheet-handle::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 25%, transparent); margin: 0 auto; }
  .side-head { padding: 0 14px 10px; }
  .side-head .brand { font-size: 15px; }
  .event-title { font-size: 17px; margin-top: 6px; }
  .event-tag { display: none; }
  .event-meta { margin-top: 8px; }
  .stats { display: none; }
  .sidebar[data-snap="half"] .stats, .sidebar[data-snap="full"] .stats { display: grid; }

  .detail {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 78dvh; border-radius: 20px 20px 0 0; border-bottom: 0;
    transform: translateY(100%); z-index: 25;
  }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .tile b { font-size: 17px; }

  .dock { left: 8px; right: 8px; top: 8px; bottom: auto; padding: 7px 10px; }
  .dock .profile, .dock .attribution { display: none; }
  .replay .time { min-width: 0; font-size: 11.5px; }
  .replay .time span { display: none; }
  .map-tools { top: 62px; right: 8px; }
  .detail-open .map-tools { right: 8px; }
  .maplibregl-ctrl-top-right { display: none; }
  .maplibregl-ctrl-bottom-right { bottom: 136px; }
  .conn { bottom: auto; top: 62px; }
  .rm-label { display: none; }
  .rm.is-selected .rm-label { display: block; }
}

/* Mandatory sections */
.feed .k-parcours .ico { color: var(--section); background: color-mix(in srgb, var(--section) 13%, transparent); }
.parcours .minibar { position: relative; height: 6px; border-radius: 6px; background: var(--raise-2); margin: 6px 0 4px; }
.parcours .minibar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--section); }
.parcours .minibar em { position: absolute; top: -3px; width: 2px; height: 12px; background: color-mix(in srgb, var(--text) 50%, transparent); }
.parcours .is-done .minibar i { background: var(--accent-text); }
.parcours .is-done .meta span { color: var(--accent-text); }
.parcours .is-missed .meta span { color: var(--danger); }

/* Blips on the map */
.blip { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--c, var(--text)); background: var(--panel-solid); display: grid; place-items: center; font-size: 15px; line-height: 1; padding: 0; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); transition: transform 0.15s; }
.blip:hover { transform: scale(1.12); }
.blip.has-photo { width: 40px; height: 40px; overflow: hidden; border-color: #fff; }
.blip.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blip-popup .maplibregl-popup-content { padding: 0; overflow: hidden; width: 280px; }
/* Close button in the style of .icon-btn: a small tile with its own panel
   background, so it reads both on a photo and on the card. A card without
   a photo keeps room for it next to the time (.meta padding below). */
.blip-popup .maplibregl-popup-close-button {
  top: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel-solid); color: var(--muted);
  font-size: 18px; line-height: 1; transition: background 0.15s, color 0.15s;
}
.blip-popup .maplibregl-popup-close-button:hover { background: var(--raise-2); color: var(--text); }
.blip-card:not(.has-photo) .meta { padding-right: 44px; padding-top: 12px; }
.blip-card img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.blip-card .meta { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px 2px; font-size: 12px; color: var(--muted); }
.blip-card .meta b { color: var(--text); font-size: 13px; }
.blip-card p { margin: 0; padding: 4px 12px 0; font-size: 13.5px; line-height: 1.4; }
.blip-card small { display: block; padding: 4px 12px 0; color: var(--muted); }
.blip-card > :last-child { padding-bottom: 12px; }
.feed .k-blip .ico { color: var(--blip); background: color-mix(in srgb, var(--blip) 12%, transparent); }
.d-blips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.d-blips button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); padding: 0; overflow: hidden; font-size: 20px; cursor: pointer; }
.d-blips img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blip.is-organizer { border-radius: 9px; border-color: var(--text); width: 28px; height: 28px; font-size: 14px; }

/* Ridden profile (events without a course) */
.profile-empty { height: 100%; display: grid; place-items: center; font-size: 13px; border: 1px dashed var(--line); border-radius: 12px; }
.profile-caption { position: absolute; left: 4px; top: -2px; font-size: 11.5px; color: var(--muted); }

:root[data-theme="light"] .maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: none; }

/* ---- Group ride panel (ADR 0023, static/js/live/group.js) ------------------
   Sits under the stats in the sidebar. Only theme tokens: the group's state
   in the accent ("Together") or warning colour ("Split"), alerts in the
   warning colour so a flat tyre at the back is the first thing the front sees. */
.group-panel { margin: 0 16px 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--raise); border: 1px solid var(--line); display: grid; gap: 8px; }
.group-panel[hidden] { display: none; }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g-head h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.g-line-text { font-size: 15px; font-weight: 650; }
/* The trackers on one line, back (left) to front (right), at their real
   places. Each dot carries its role's letter (S, M, L), so dots that come
   close never produce overlapping labels. The bar is inset by half a dot so
   the outer dots stay inside the panel. */
.g-bar { position: relative; height: 22px; margin: 4px 11px 0; }
.g-line { position: absolute; left: 0; right: 0; top: 10px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--accent-text) 45%, transparent); }
.g-dot { position: absolute; top: 0; transform: translateX(-50%); }
.g-dot i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 750;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--panel-solid); }
.g-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.g-split { font-size: 13px; color: var(--warn); }
.g-alert { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; font-size: 13px;
  background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.g-alert b { color: var(--warn); }
.g-alert span { color: var(--muted); font-size: 12px; }
.g-note { font-size: 11.5px; color: var(--faint); }
