/* Import UI aliases; status and map colours remain unchanged (SPEC §5). */
:root {
  --bg: var(--surface);
  --panel: var(--surface-raised);
  --text: var(--ink);
  --muted: var(--ink-muted);
  --faint: var(--ink-muted);
  --separator: var(--line);
  --fill: var(--surface-muted);
  --fill-strong: var(--line);
  --hover: var(--surface-muted);
  --ok-text: #005F94; /* Protected blue status text. */
  --vermilion-text: var(--ink);
  --select: var(--surface-muted);
  --on-text: var(--surface-raised);
  --toast-link: var(--on-secondary);
  /* Protected blue status and map colours; never replace status blue with success green. */
  --ok: #0072B2;
  --ok-tint: rgba(0, 114, 178, 0.10);
  --vermilion: #D55E00;
  --known-road: #F0B48A;
}
:root[data-theme="night"] {
  /* Protected map/status colours. */
  --ok-tint: rgba(86, 180, 233, 0.16);
  --known-road: #7A3A12;
  --ok-text: #7CC4F0; /* Protected blue status text. */
}

body.shell { font-size: 14px; }
.muted { color: var(--muted); }

.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card {
  width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px;
  padding: 32px; border-radius: var(--radius-lg); background: var(--panel);
}
.card h1 { margin: 0; font-size: 26px; font-weight: 800; }
.card p { margin: 0; font-size: 15px; line-height: 1.5; }
.secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; margin-top: 8px;
  border: 0; border-radius: var(--radius-md); background: var(--fill); color: var(--ink); font-weight: 600; font-size: 16px;
}

/* Fetching an archive: in the middle of the page, over a veil that lets the map show through (75%). */
.progress-veil {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: color-mix(in srgb, var(--secondary) 25%, transparent); backdrop-filter: blur(2px);
}
.progress-card {
  width: min(460px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 28px;
  border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-card);
}
.progress-top { display: flex; align-items: center; gap: 12px; }
.progress-card h2 { margin: 0; font: 700 22px/1.2 "Plus Jakarta Sans", sans-serif; }
.progress-card p { margin: 0; font-size: 15px; line-height: 1.45; }
.progress-card #progress-text { font-variant-numeric: tabular-nums; font-weight: 600; }
.progress-card .progress-name { min-height: 1.45em; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-card #progress-cancel { flex: none; align-self: flex-start; margin-top: 4px; padding: 0 16px; }
.progress-card.done #progress-cancel { display: none; }
.progress-card.stopped .progress-bar { display: none; }
.progress-card.stopped #progress-text { font-weight: 400; }
.progress-card.stopped .progress-name, .progress-card #progress-note:empty { display: none; }
.progress-bar { position: relative; height: 10px; border-radius: var(--radius-pill); background: var(--fill); overflow: hidden; }
#progress-fill { height: 100%; width: 0; border-radius: inherit; background: var(--vermilion); transition: width 0.3s ease; }
.progress-bar.waiting #progress-fill { width: 30%; animation: progress-wait 1.2s ease-in-out infinite alternate; }
.progress-card.done #progress-fill { background: var(--ok); }
@keyframes progress-wait { from { transform: translateX(-10%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .progress-bar.waiting #progress-fill { animation: none; width: 100%; opacity: 0.4; } }

/* Toevoegen: files from the computer, or the Roadmarker button for a route planner. */
.dialog {
  width: min(520px, calc(100vw - 32px)); padding: 28px; border: 0; border-radius: var(--radius-lg);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-card);
}
.dialog::backdrop { background: color-mix(in srgb, var(--secondary) 35%, transparent); }
.dialog h2 { margin: 0 0 10px; font-size: 22px; font-weight: 800; }
.dialog p, .dialog li { font-size: 14px; line-height: 1.55; }
.dialog ol { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; }
.dialog kbd { padding: 1px 6px; border-radius: 5px; background: var(--fill); font: 12px/1.6 inherit; }
.add-dialog { width: min(560px, calc(100vw - 32px)); padding: 24px; border-radius: var(--radius-lg); }
.add-dialog > div { display: flex; flex-direction: column; gap: 14px; }
.add-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.add-top h2 { flex: 1; margin: 0; font: 700 24px/1.15 "Plus Jakarta Sans", sans-serif; }
#add-planner .add-top { justify-content: flex-start; }
.add-icon {
  flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer;
}
.add-icon:hover { background: var(--hover); color: var(--text); }
.add-label { margin: 6px 0 -4px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.add-drop {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 16px; text-align: center;
  border: 2px dashed var(--shell-quiet-line); border-radius: var(--radius-md); background: var(--shell-side); color: var(--muted);
}
.add-drop strong { color: var(--text); font-size: 15px; }
.add-drop.over { border-color: var(--ink); background: var(--ok-tint); }
.add-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.add-pick .quiet-button { flex: none; }
/* MyRoute: which folders to fetch, as a tree with a box per folder. */
.choose-all { display: flex; gap: 8px; }
.choose-all .quiet-button, .choose-foot .quiet-button, .choose-foot .add-button { flex: none; width: auto; }
.choose-tree {
  max-height: min(50vh, 420px); overflow-y: auto; padding: 6px 0;
  border: 1px solid var(--shell-quiet-line); border-radius: var(--radius-md);
}
.choose-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px; cursor: pointer; font-size: 14px; }
.choose-row:hover { background: var(--hover); }
.choose-row input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.choose-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choose-row .muted { flex: none; font-variant-numeric: tabular-nums; font-size: 13px; }
.choose-foot { display: flex; justify-content: flex-end; gap: 8px; }
.add-target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: -4px; font-size: 14px; }
.add-target .muted { flex-basis: 100%; font-size: 12.5px; }
/* The folder new files go in: a pill like the filters, opening the folder dialog. */
.target-button {
  position: relative; max-width: 100%; height: 34px; padding: 0 30px 0 13px; border: 1px solid var(--shell-quiet-line);
  border-radius: var(--radius-pill); background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.target-button::after {
  content: ''; position: absolute; right: 13px; top: 12px; width: 6px; height: 6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
.target-button:hover { background: var(--hover); }
.target-button.on { border-color: var(--shell-dark); box-shadow: inset 0 0 0 1px var(--shell-dark); }
.planners { display: flex; flex-direction: column; border: 1px solid var(--shell-line); border-radius: var(--radius-md); }
.planner { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--separator); }
.planner-mark { flex: none; width: 40px; height: 40px; box-sizing: border-box; border-radius: var(--radius-sm); object-fit: cover; }
/* TomTom's pin is red on nothing: on white, with room around it, by day and by night. */
.planner-mark.tomtom { padding: 6px; background: var(--on-secondary); object-fit: contain; box-shadow: inset 0 0 0 1px var(--separator); }
.planner-mark[hidden] { display: none; }
.planner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.planner-text .muted { font-size: 13.5px; }
.planner .quiet-button { flex: none; }
.planner-other { margin: 0; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }
.add-dialog .steps { margin: 0; padding-left: 22px; gap: 14px; }
.add-dialog .steps li > span { display: block; }
.add-dialog .steps .muted { margin-top: 4px; font-size: 13px; }
.add-dialog p a, .add-dialog li a:not(.bookmarklet) { color: var(--ink); }
.add-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.planner-switch { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-sm); background: var(--fill); }
.planner-switch button {
  height: 34px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.planner-switch button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-card); }
/* Opened by an older Roadmarker button: how to replace it. */
.old-button {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--vermilion) 12%, var(--panel)); font-size: 13.5px; line-height: 1.45;
}
.old-button strong { color: var(--vermilion-text); }
.old-button .add-button { height: 36px; padding: 0 12px; font-size: 13.5px; }
.old-button .add-icon { margin: 0; width: 36px; height: 36px; }
/* The one button in the head of the page, and the way out to a planner's site. */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.add-button {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px;
  border: 0; border-radius: var(--radius-sm); background: var(--shell-dark); color: var(--shell-on-dark);
  font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.add-button:hover { opacity: 0.88; }
.empty-sources { display: flex; flex-direction: column; gap: 14px; padding: 6px 0 24px; }
.empty-sources > p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.empty-sources .add-drop { background: var(--panel); }
.empty-planners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.empty-planners button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; text-align: left;
  border: 1px solid transparent; border-radius: var(--radius-md); background: var(--surface-muted); color: var(--text); font: inherit; cursor: pointer;
}
.empty-planners button:hover { border-color: var(--ink-muted); }
.empty-planners strong { font-size: 15px; }
.empty-planners .muted { font-size: 13px; line-height: 1.4; }
.bookmarklet {
  display: inline-block; margin: 6px 0 2px; padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--secondary); color: var(--on-secondary); font-weight: 700; text-decoration: none; cursor: grab;
}

/* ---------- The list ---------- */

.app { flex: 1; min-height: 0; display: flex; }
/* GPX files or a folder dragged over the page. */
.drop {
  position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ok) 14%, transparent); outline: 3px dashed var(--ok); outline-offset: -12px; pointer-events: none;
}
.drop span { padding: 12px 18px; border-radius: var(--radius-md); background: var(--panel); color: var(--text); font-weight: 600; font-size: 15px; box-shadow: var(--shadow-card); }
body.dropping .drop { display: flex; }
.side { flex: 0 0 var(--side, 460px); min-width: 0; display: flex; flex-direction: column; }

/* The line between list and map, to drag. */
.resizer { position: relative; z-index: 5; flex: 0 0 9px; margin: 0 -4px; cursor: col-resize; touch-action: none; outline: none; }
.resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: var(--separator); transition: background .12s, width .12s, left .12s; }
.resizer:hover::after, .resizer:focus-visible::after, .resizing .resizer::after { left: 3px; width: 3px; background: var(--ok); }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing .map-wrap { pointer-events: none; }

.page-head { flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; padding: 22px 20px 0; }
.title { margin: 0; font: 700 30px/1.1 "Plus Jakarta Sans", sans-serif; letter-spacing: -0.015em; }
.quiet-button {
  flex: 1; display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 12px;
  border: 1px solid var(--shell-quiet-line); border-radius: var(--radius-sm); background: var(--panel); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.quiet-button:hover { background: var(--hover); }
.head { flex-shrink: 0; padding: 14px 20px 0; }
.sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.banner { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-tint); font-size: 12.5px; line-height: 1.35; }
.banner b { font-weight: 600; }
.spin { width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--ok-tint); border-top-color: var(--ok); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { display: flex; height: 6px; margin-top: 16px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bar .b-imp { background: var(--vermilion); }
.bar .b-skip { background: var(--faint); }
.stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 9px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stat { display: flex; align-items: center; gap: 6px; }
.stat b { font-weight: 600; color: var(--text); }
.key { width: 8px; height: 8px; border-radius: 2px; }
.key.imp { background: var(--vermilion); } .key.skip { background: var(--faint); } .key.rev { background: var(--fill-strong); }
/* Source and folder as pills; a native select inside, so the keyboard and the browser's list work as usual. */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.pick { position: relative; min-width: 0; max-width: 100%; }
.pick select {
  max-width: 100%; height: 34px; padding: 0 30px 0 13px; border: 1px solid var(--shell-quiet-line); border-radius: var(--radius-pill);
  background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
}
.pick::after {
  content: ''; position: absolute; right: 13px; top: 12px; width: 6px; height: 6px; pointer-events: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
.pick.on select { border-color: var(--shell-dark); box-shadow: inset 0 0 0 1px var(--shell-dark); }
.pick select:hover { background: var(--hover); }
/* Selecteren: a box on every row, to delete many at once; Klaar goes back. */
.select-toggle {
  margin-left: auto; height: 34px; padding: 0 14px; border: 1px solid var(--shell-quiet-line); border-radius: var(--radius-pill);
  background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.select-toggle:hover { background: var(--hover); }
.select-toggle.on { border-color: var(--shell-dark); background: var(--shell-dark); color: var(--shell-on-dark); }
.select-box { cursor: pointer; }
.select-box input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin-top: 16px; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-muted); }
.seg button { height: 36px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap; }
.seg button span { margin-left: 5px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.seg button.on { background: var(--surface-raised); box-shadow: 0 1px 3px rgba(31,41,51,.12); }

.list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 48px; display: flex; flex-direction: column; }
/* Never squeeze a block to fit: a box of rows with overflow hidden would shrink to nothing in a long list (the
   unusable routes did, 21 Oct 2026). The list scrolls instead. */
.list > * { flex-shrink: 0; }
/* Below the list: Alle … importeren, always in reach. */
.list-foot {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-top: 1px solid var(--separator); background: var(--panel); color: var(--muted); font-size: 14px;
}
.list-foot[hidden] { display: none; }
.foot-actions { display: flex; gap: 8px; }
.foot-actions .quiet-button { flex: none; }
.add-button.danger { background: var(--surface-muted); color: var(--error); }
.add-button:disabled { opacity: 0.4; cursor: default; }
.hint { margin: 12px 4px 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.rows { background: var(--panel); border-radius: var(--radius-md); overflow: hidden; }
.note-card { margin-top: 14px; padding: 14px 16px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }

/* A year: a header that stays on top while its rides scroll by, and folds. */
.year-head, .sub-head {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 42px; margin-top: 6px; padding: 0 6px 0 4px;
  border: 0; background: var(--bg); color: var(--text); text-align: left;
}
.year-head { position: sticky; top: 0; z-index: 3; }
.year-label, .sub-title { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.year-meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.year-head:hover .year-label, .sub-head:hover .sub-title { color: var(--ink); }
.sub-head { margin-top: 18px; }
.chev { display: flex; margin-left: auto; color: var(--faint); transition: transform .15s; }
.chev.closed { transform: rotate(-90deg); }

.under { margin-top: 12px; }
.under-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 0 4px 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; color: var(--muted); }
.under-tip { font-weight: 500; letter-spacing: 0; text-transform: none; }
.under-head button { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0;
  border-radius: var(--radius-lg); background: transparent; color: inherit; cursor: pointer; }
.under-head button:hover { background: var(--hover); color: var(--text); }
.under .rows { outline: 2px solid var(--ink); outline-offset: -2px; }

/* A row: + or ✓ on the left, the whole name to focus, the km, × or ↺ on the right. Hairlines inset like
   the app's lists. */
.row, .cluster, .unusable { position: relative; }
.rows > * + *::before, .members > * + *::before {
  content: ''; position: absolute; z-index: 1; top: 0; left: 52px; right: 0; height: 1px; background: var(--separator);
}
.members > * + *::before { left: 68px; }
.rows > .unusable + .unusable::before { left: 16px; }
.line { display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 7px 6px; }
.row:hover > .line, .row.hot > .line, .cluster.hot > .cluster-head { background: var(--hover); }
.row.focused > .line, .cluster.focused > .cluster-head { background: var(--select); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 0 6px 0 2px; cursor: pointer; }
.row-name {
  display: block; max-width: 100%; padding: 0; border: 0; background: transparent;
  font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text); text-align: left; overflow-wrap: anywhere;
}
.row-text:hover .row-name { color: var(--ink); }
.row.skipped .row-name { color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 4px; vertical-align: 1px; }
.row-meta { min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.chip { display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--ok-tint); color: var(--ok-text); font-size: 11px; font-weight: 650; }
.row.imported .chip { background: color-mix(in srgb, var(--vermilion) 10%, var(--panel)); color: var(--vermilion-text); }
.km { flex-shrink: 0; min-width: 58px; text-align: right; font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.row.imported .km { color: var(--vermilion-text); font-weight: 600; }

/* Buttons: a 44 px target around a 30 px circle. */
.act { flex-shrink: 0; width: 40px; height: 44px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.disc { width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; transition: background .12s, color .12s; }
.disc svg { stroke-width: 2.6; }
.act-space { width: 40px; flex-shrink: 0; }
.act.add .disc { background: var(--ok-tint); color: var(--ink); }
.act.add:hover .disc { background: var(--secondary); color: var(--on-secondary); }
.act.done .disc { background: var(--vermilion); color: var(--on-secondary); } /* Protected imported status colour. */
.act.skip .disc, .act.back .disc { color: var(--faint); }
.act.skip:hover .disc, .act.back:hover .disc { background: var(--fill-strong); color: var(--text); }

.date-link { padding: 0; border: 0; background: transparent; font-size: inherit; font-weight: 600; color: var(--ink); opacity: 0; transition: opacity .12s; }
.date-link.show, .row:hover .date-link, .date-link:focus-visible { opacity: 1; }
.date-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 12px 14px 54px; }
.member .date-edit { padding-left: 70px; }
.date-edit input { height: 32px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--surface-muted); color: var(--ink); font-family: inherit; font-size: 13px; }
.date-hint { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.small { height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 0; background: var(--fill); font-weight: 600; font-size: 13px; color: var(--ink); }
.small.dark { background: var(--secondary); color: var(--on-secondary); }

/* A cluster: a little stack with the number of variants; open, its variants each with their colour. */
.cluster-head { display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 7px 6px; }
.stack { flex-shrink: 0; width: 40px; height: 44px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.stack-box {
  width: 28px; height: 28px; margin: 3px 3px 0 0; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  background: var(--panel); outline: 1.5px solid var(--ink-muted); outline-offset: -1.5px;
  font-size: 12.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums;
}
.stack:hover .stack-box { outline: 1.5px solid var(--ink-muted); outline-offset: -1.5px; color: var(--ink); }
.members { position: relative; background: var(--hover); border-top: 1px solid var(--separator); }
.member > .line { padding-left: 22px; }

.unusable, .unusable-text { display: flex; flex-direction: column; gap: 2px; }
.unusable { padding: 10px 16px; }
.unusable.selectable { flex-direction: row; align-items: center; gap: 4px; padding: 4px 16px 4px 6px; }
.unusable .row-name { color: var(--muted); font-size: 14px; }
.unusable .row-meta { color: var(--faint); }
.empty { display: flex; flex-direction: column; gap: 8px; padding: 24px 4px; font-size: 14px; line-height: 1.5; }
.empty strong { font-size: 18px; font-weight: 700; }

/* ---------- The map ---------- */

.map-wrap { flex: 1; min-width: 0; position: relative; }
#map { position: absolute; inset: 0; }
.pills { position: absolute; left: 16px; top: 16px; right: 72px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.map-pill {
  pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 100%; height: 38px; padding: 0 5px 0 14px;
  border-radius: var(--radius-pill); background: var(--secondary); color: var(--on-secondary); font-weight: 600; font-size: 13.5px;
}
.map-pill button { width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-lg); border: 0; background: var(--shell-pill-close); color: var(--shell-pill-close-fg); display: flex; align-items: center; justify-content: center; }
.pill-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend {
  position: absolute; left: 16px; bottom: 28px; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--shell-float); box-shadow: var(--shadow-label); font-size: 12.5px; font-weight: 500;
}
.legend span { display: flex; align-items: center; gap: 10px; }
.toast {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: 70%;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: var(--radius-md);
  background: var(--secondary); color: var(--on-secondary); font-weight: 500; font-size: 13.5px; box-shadow: var(--shadow-card);
}
.toast > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .undo { flex-shrink: 0; height: 30px; padding: 0 10px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--toast-link); font-weight: 600; font-size: 13.5px; }
.toast .close { width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--radius-sm); border: 0; background: var(--shell-pill-close); color: var(--shell-pill-close-fg); display: flex; align-items: center; justify-content: center; }
.end { padding: 3px 8px; border-radius: var(--radius-sm); border: 2px solid var(--text); background: var(--panel); color: var(--text); font-weight: 700; font-size: 12px; white-space: nowrap; box-shadow: none; }
.end.dark { background: var(--secondary); color: var(--on-secondary); }

.date-edit input:hover { border-color: var(--ink-muted); }
.date-edit input:focus { border-color: var(--ink); }
