/* Saved library: pins, several trails at once, folders ("trips"), Today, graphs, member trails. Everything is a flat row or a plain number:
   no nested cards. Touch targets are 44 px or more (--tap is 48). No selector matches class names by substring and none uses :has(). */

/* a list item with an eye switch next to it */
.sv-item { display: flex; align-items: center; min-width: 0; }
.sv-item > .row { flex: 1 1 auto; min-width: 0; }
.sv-item > .btn { flex: none; margin-right: var(--s2); }
.sv-eye { flex: none; color: var(--muted); }
.sv-eye.on { color: var(--accent); }
.sv-eye svg { width: 22px; height: 22px; }
.sv-filter { margin: var(--s2) 0 var(--s3); }

/* round badge with a pin's icon */
.sv-badge { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; color: #0b0d10; box-shadow: 0 0 0 2px #0b0d10 inset; }
.sv-badge svg { width: 20px; height: 20px; }
.sv-badge.big { width: 44px; height: 44px; }
.sv-badge.big svg { width: 24px; height: 24px; }
.sv-pinrow { gap: var(--s3); }

/* the small card over the map (a pin, a dropped spot, a member's path) */
.sv-card { position: fixed; z-index: 30; left: calc(var(--panel-l, 0px) + 12px); right: 12px; bottom: calc(var(--dock-b, 0px) + 12px); max-width: 440px; padding: var(--s3); border-radius: var(--r-card);
  background: var(--surface); box-shadow: 0 8px 28px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-strong, var(--line)); display: grid; gap: var(--s2); }
.sv-card-top { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.sv-card-t { flex: 1; min-width: 0; display: grid; }
.sv-card-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-3, 17px); }
.sv-card-sub { color: var(--muted); font-size: var(--fs-1); font-variant-numeric: tabular-nums; }
.sv-card-note { margin: 0; color: var(--muted); font-size: var(--fs-1); overflow-wrap: anywhere; }
.sv-card-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sv-card-acts .btn { flex: 1 1 auto; min-height: 44px; }

/* icon and colour pickers */
.sv-grid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sv-opt { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-ctl); background: var(--raised); color: var(--text); touch-action: manipulation; }
.sv-opt svg { width: 24px; height: 24px; }
.sv-opt.on { box-shadow: 0 0 0 2px var(--accent) inset; color: var(--accent); }
.sv-sw i { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #0b0d10 inset; }
.sv-sw.on i { box-shadow: 0 0 0 2px #0b0d10 inset, 0 0 0 4px var(--accent); }
.sv-colorrow { padding: var(--s2) var(--s4); }

/* flat statistics: label left, number right, hairlines between */
.sv-stats { margin: 0 0 var(--s4); padding: 0; display: grid; grid-template-columns: 1fr; }
.sv-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 10px var(--s1); border-bottom: 1px solid var(--line); }
.sv-stats dt { color: var(--muted); font-size: var(--fs-1); }
.sv-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sv-plot { touch-action: none; }
.sv-pick { max-height: 50vh; overflow: auto; }

/* trips */
.sv-folder { display: flex; align-items: center; margin: var(--s3) 0 var(--s1); }
.sv-folder-b { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s1); border: 0; background: none; color: var(--text); font-size: var(--fs-2, 15px); font-weight: 700; text-align: left; touch-action: manipulation; }
.sv-folder-b svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.sv-folder-b .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-folder-b .count { color: var(--muted); font-weight: 400; }
.sv-fold { transition: transform .16s ease-out; }
.sv-fold.open { transform: rotate(90deg); }
.sv-newtrip { margin: var(--s3) 0 var(--s4); }

/* Today, group destination, notices */
.sv-today { margin: 0 0 var(--s3); border-radius: var(--r-card); background: var(--surface); }
.sv-daynav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 var(--s2); }
.sv-day { margin: 0; flex: 1; text-align: center; font-size: var(--fs-4, 22px); }
.sv-live { flex: none; background: var(--danger) !important; margin: 0 var(--s3); }
.sv-dest { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-card); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.sv-dest-t { flex: 1; min-width: 0; display: grid; }
.sv-dest-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-dest-t small { color: var(--muted); }
.sv-note { position: fixed; z-index: 31; left: calc(var(--panel-l, 0px) + 12px); right: 12px; top: calc(var(--chrome-t, 0px) + 12px); max-width: 440px; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); padding: var(--s3); border-radius: var(--r-card);
  background: var(--surface); box-shadow: 0 8px 28px rgba(0, 0, 0, .5), inset 3px 0 0 var(--accent); }
.sv-note-t { flex: 1 1 200px; min-width: 0; font-weight: 600; }
.sv-note .btn { min-height: 44px; }

@media (prefers-reduced-motion: reduce) { .sv-fold { transition: none; } }

/* folder list and multi-select */
.sv-folderrow { min-height: 64px; }
.sv-selbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s2); }
.sv-selbar .btn { min-height: 44px; }
.sv-selcount { flex: 1 1 auto; font-weight: 600; }
.sv-selrow { gap: var(--s3); }
.sv-check { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--raised); box-shadow: 0 0 0 2px var(--line-strong, var(--line)) inset; color: #0b0d10; }
.sv-selrow.on .sv-check { background: var(--accent); box-shadow: none; }
.sv-check svg { width: 18px; height: 18px; }
.sv-list .tbtns .btn { flex: 1 1 96px; padding-left: 10px; padding-right: 10px; }
/* KML import: the file's inner layer (Google My Maps layer) as a small caption under the name */
.sv-group { display: block; overflow: hidden; font-size: var(--fs-1, .8125rem); line-height: 1.3; color: var(--muted, #98a2ad); white-space: nowrap; text-overflow: ellipsis; }
/* "Uploading N of M…": calm progress while the server paces uploads */
.sv-upnote { align-items: center; }
.sv-upnote .spin { flex: none; }
