/* Routes view (2026-11-18): js/routes-view.js, in Fire's Aurora look.
   The dark basemap fills the view. On a wide screen a frosted panel sits on the
   left and can be tucked away; on a phone it is a bottom sheet (peek, half,
   full) over a full-height map. The panel's top bar never scrolls away, so the
   way back out of a route is always on screen. Markers are one standard look
   (white dot, gold star, green $); each route's colour is on its road line.
   Loaded after app.css and aurora.css, which supply the palette (--aur-*) and type. */

:root {
    --rv-gold: #ffc53d;
    --rv-gold-ink: #241a02;
    --rv-green: #1fcf6a;
    --rv-green-ink: #04210f;
    --rv-ring: #0d0708;
}

#routes-view.view.active { display: block; position: relative; }
body[data-view="routes"] #topbar { background: rgba(10, 6, 7, 0.94); }

.rv { position: absolute; inset: 0; overflow: hidden; color: #fff; font: 500 13px/1.45 var(--font-ui); }
.rv-map { position: absolute; inset: 0; background: #0b0606; z-index: 0; }

/* ------------------------------------------------------------ the panel */
.rv-panel {
    position: absolute; top: 16px; left: 16px; bottom: 16px; width: 404px; z-index: 500;
    display: flex; flex-direction: column; overflow: hidden;
    background: rgba(20, 9, 10, 0.9); border: 1px solid var(--aur-line); border-radius: 18px;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.rv.panel-hidden .rv-panel { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.rv-grab { display: none; }

.rv-bar {
    flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-height: 58px;
    padding: 10px 12px 10px 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(20, 9, 10, 0.6);
}
.rv-bar.on-route { padding-left: 8px; }
.rv-bar-t { flex: 1; min-width: 0; }
.rv-bar-t b { display: block; font: 700 15px/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-bar-t span { display: block; font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 1px; }
.rv-swatch { flex: 0 0 auto; width: 6px; height: 30px; border-radius: 3px; }
.rv-ib {
    flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    background: rgba(255,255,255,0.08); border: 1px solid var(--aur-line-strong); color: #fff;
    transition: background 0.15s;
}
.rv-ib:hover { background: rgba(255,255,255,0.18); }
.rv-ib svg, .rv-show svg, .rv-done svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round; }

.rv-scroll {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 16px 18px 24px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent;
}
.rv-scroll::-webkit-scrollbar { width: 6px; }
.rv-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 3px; }

/* "Show routes" when the panel is tucked away */
.rv-show {
    position: absolute; top: 16px; left: 16px; z-index: 600; display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 999px; cursor: pointer; border: 0;
    background: #fff; color: var(--aur-ink); font: 700 13px var(--font-ui); box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.rv-show[hidden] { display: none; }

/* ------------------------------------------------------------ panel content */
.rv-eyebrow { font: 700 10.5px var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--aur-red); }
.rv-title { font: 700 24px/1.1 var(--font-display); letter-spacing: -0.02em; margin: 4px 0 4px; }
.rv-sub { color: rgba(255,255,255,0.62); font-size: 12.5px; }
.rv-plan { margin-top: 10px; font: 600 12.5px var(--font-ui); color: #fff; background: rgba(255,255,255,0.07);
    border: 1px solid var(--aur-line-strong); border-radius: 999px; padding: 7px 12px; }
.rv-plan option { color: #111; }

.rv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 4px; }
.rv-stats div { border: 1px solid var(--aur-line); border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,0.04); }
.rv-stats b { display: block; font: 700 24px/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rv-stats span { font-size: 11.5px; color: rgba(255,255,255,0.6); }
.rv-note { color: rgba(255,255,255,0.78); margin: 10px 0 0; }
.rv-dim { color: rgba(255,255,255,0.55); }
.rv-foot { color: rgba(255,255,255,0.5); font-size: 11.5px; margin-top: 16px; }
.rv-group { font: 700 10.5px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin: 18px 2px 8px; }

.rv-route {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
    padding: 11px 12px; margin-bottom: 6px; color: #fff; font: inherit;
    background: rgba(255,255,255,0.04); border: 1px solid var(--aur-line); border-radius: 14px;
    transition: background 0.15s, border-color 0.15s;
}
.rv-route:hover { background: rgba(255,255,255,0.08); border-color: var(--aur-line-strong); }
.rv-route > i { flex: 0 0 auto; width: 6px; align-self: stretch; border-radius: 3px; }
.rv-route b { display: block; font-weight: 700; font-size: 13.5px; }
.rv-route em { display: block; font-style: normal; font-size: 12px; color: rgba(255,255,255,0.6); }
.rv-route u { text-decoration: none; display: inline-block; min-width: 20px; margin-right: 6px; color: rgba(255,255,255,0.5);
    font-variant-numeric: tabular-nums; }
.rv-route small { display: block; font: 700 10.5px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--aur-red); margin-bottom: 2px; }
.rv-route .rv-why { margin-top: 5px; color: rgba(255,255,255,0.74); }
.rv-pick { border-color: var(--aur-line-strong); background: rgba(255,255,255,0.07); }
.rv-t-cust, .rv-t-star { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-weight: 700; font-size: 11px; line-height: 18px; }
.rv-t-cust { background: var(--rv-green); color: var(--rv-green-ink); }
.rv-t-star { background: var(--rv-gold); color: var(--rv-gold-ink); }

.rv-rank { font: 700 10.5px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--aur-red); }
.rv-meta { color: rgba(255,255,255,0.62); font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums; }

.rv-days { display: flex; gap: 6px; margin: 14px 0 0; flex-wrap: wrap; }
.rv-day { border-radius: 999px; padding: 8px 14px; font: 600 12.5px var(--font-ui); color: rgba(255,255,255,0.84);
    background: rgba(255,255,255,0.06); border: 1px solid var(--aur-line); cursor: pointer; min-height: 38px; }
.rv-day em { font-style: normal; color: rgba(255,255,255,0.55); margin-left: 6px; font-weight: 500; }
.rv-day.active { background: #fff; color: var(--aur-ink); border-color: #fff; }
.rv-day.active em { color: rgba(20,8,8,0.6); }

/* Aurora primary: the white pill */
.rv-go { display: block; text-align: center; margin: 14px 0 6px; padding: 10px 16px; border-radius: 999px;
    background: #fff; color: var(--aur-ink); font: 700 14px/1.25 var(--font-ui); text-decoration: none; }
.rv-go small { display: block; font: 700 10.5px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(20,8,8,0.55); }
.rv-go span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-hint a { color: #fff; }
.rv-alldone { margin: 14px 0 6px; font-size: 12.5px; }
.rv-acts a.rv-apple { background: #fff; color: var(--aur-ink); border-color: #fff; }
.rv-acts a.rv-apple:hover { background: rgba(255,255,255,0.88); }
.rv-go:hover { background: rgba(255,255,255,0.9); }
.rv-hint { text-align: center; font-size: 11.5px; color: rgba(255,255,255,0.55); }

.rv-stops { list-style: none; margin: 14px 0 0; padding: 0; }
.rv-stop { display: flex; gap: 12px; padding: 12px 8px; margin: 0 -8px; border-top: 1px solid rgba(255,255,255,0.08); border-radius: 12px; }
.rv-stop.flash { animation: rvFlash 1.4s ease; }
@keyframes rvFlash { 0%, 40% { background: rgba(255,255,255,0.12); } 100% { background: transparent; } }
.rv-sbody { min-width: 0; flex: 1; }
.rv-sname { font: 700 14.5px/1.25 var(--font-display); }
.rv-stop.done .rv-sname { text-decoration: line-through; color: rgba(255,255,255,0.5); }
.rv-sline { color: rgba(255,255,255,0.62); font-size: 12px; margin-top: 4px; }
.rv-sline b { color: rgba(255,255,255,0.9); font-weight: 600; }
.rv-tel { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.4); }
.rv-chip { display: inline-block; border-radius: 999px; padding: 1px 8px; margin-right: 6px; font: 700 10.5px/1.6 var(--font-ui);
    letter-spacing: 0.02em; border: 1px solid currentColor; }
.p-first { color: #ff6b5f; } .p-soon { color: #f5b544; } .p-nurture { color: #5ccfe0; } .p-low { color: rgba(255,255,255,0.55); }
.rv-sf { display: inline-block; border-radius: 999px; padding: 1px 8px; margin-right: 6px; font: 700 10.5px/1.6 var(--font-ui); }
.rv-sf-cust { background: var(--rv-green); color: var(--rv-green-ink); }
.rv-sf-star { background: var(--rv-gold); color: var(--rv-gold-ink); }
.rv-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.rv-acts a { display: inline-flex; align-items: center; min-height: 36px; border-radius: 999px; padding: 0 14px;
    font: 600 12.5px var(--font-ui); color: #fff; text-decoration: none;
    background: rgba(255,255,255,0.07); border: 1px solid var(--aur-line-strong); }
.rv-acts a:hover { background: rgba(255,255,255,0.14); }
.rv-acts label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 6px; font-size: 12.5px;
    color: rgba(255,255,255,0.7); cursor: pointer; }
.rv-acts input { width: 18px; height: 18px; accent-color: var(--aur-red); }
.rv-rm { min-height: 36px; background: none; border: 0; padding: 0 6px; cursor: pointer;
    font: 600 12.5px var(--font-ui); color: rgba(255,255,255,0.5); }
.rv-rm:hover { color: #ff6b5f; }
.rv-end { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; color: rgba(255,255,255,0.6); font-size: 12px; }
.rv-end a { color: #fff; }
.rv-done { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 16px; min-height: 44px;
    border-radius: 999px; cursor: pointer; background: rgba(255,255,255,0.07); border: 1px solid var(--aur-line-strong);
    color: #fff; font: 600 13px var(--font-ui); }
.rv-done:hover { background: rgba(255,255,255,0.14); }

.rv-gone { margin-top: 6px; }
.rv-gone-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0;
    font-size: 12.5px; color: rgba(255,255,255,0.55); }
.rv-gone-row span { text-decoration: line-through; }
.rv-gone-row button { flex: 0 0 auto; min-height: 34px; border-radius: 999px; padding: 0 14px; cursor: pointer;
    font: 600 12px var(--font-ui); color: #fff; background: rgba(255,255,255,0.07); border: 1px solid var(--aur-line-strong); }
.rv-gone-row button:hover { background: rgba(255,255,255,0.14); }

.rv-route:focus-visible, .rv-day:focus-visible, .rv-go:focus-visible, .rv-acts a:focus-visible, .rv-ib:focus-visible,
.rv-rm:focus-visible, .rv-gone-row button:focus-visible, .rv-done:focus-visible, .rv-show:focus-visible, .rv-grab:focus-visible {
    outline: 2px solid var(--aur-red); outline-offset: 2px; }

/* ------------------------------------------------------------ legend */
.rv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: 11.5px; color: rgba(255,255,255,0.72); }
.rv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rv-legend i { display: inline-grid; place-items: center; font-style: normal; }
.rv-lg-cust { width: 16px; height: 16px; border-radius: 50%; background: var(--rv-green); color: #fff; font: 800 10px var(--font-ui);
    box-shadow: 0 0 0 1.5px #fff; }
.rv-lg-star { width: 17px; height: 17px; }
.rv-lg-star svg { width: 100%; height: 100%; }
.rv-lg-star path { fill: var(--rv-gold); stroke: var(--rv-ring); stroke-width: 1.4; }
.rv-lg-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--rv-ring); }

/* ------------------------------------------------------------ stop numbers, matching the pins */
.rv-num { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    font: 800 12px var(--font-ui); font-variant-numeric: tabular-nums; }
.rv-num-plain { background: #fff; color: var(--rv-ring); }
.rv-num-history { background: var(--rv-gold); color: var(--rv-gold-ink); }
.rv-num-customer { background: var(--rv-green); color: #fff; font-size: 15px; box-shadow: 0 0 0 2px #fff inset; }

/* ------------------------------------------------------------ map markers: one standard look */
.rv-plain span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: #fff; color: var(--rv-ring); font: 800 12px var(--font-ui);
    box-shadow: 0 0 0 2px var(--rv-ring), 0 3px 10px rgba(0,0,0,0.6); }
.rv-star svg, .rv-dstar svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible;
    filter: drop-shadow(0 0 6px rgba(255,197,61,0.55)) drop-shadow(0 2px 4px rgba(0,0,0,0.7)); }
.rv-star path, .rv-dstar path { fill: var(--rv-gold); stroke: var(--rv-ring); stroke-width: 1.3; stroke-linejoin: round; }
.rv-star b { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding-top: 4px;
    font: 800 11.5px var(--font-ui); color: var(--rv-gold-ink); }
.rv-cust span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--rv-green); color: #fff; font: 800 18px var(--font-display);
    border: 2.5px solid #fff; box-shadow: 0 0 0 2px var(--rv-ring), 0 0 14px rgba(31,207,106,0.6), 0 3px 10px rgba(0,0,0,0.6); }
.rv-cust b { position: absolute; right: -9px; top: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
    background: #fff; color: var(--rv-ring); font: 800 10.5px/18px var(--font-ui); text-align: center;
    box-shadow: 0 0 0 1.5px var(--rv-ring); }
.rv-pin.faded { opacity: 0.35; }
.rv-dplain span { display: block; width: 10px; height: 10px; border-radius: 50%; background: #fff;
    box-shadow: 0 0 0 1.5px var(--rv-ring), 0 1px 4px rgba(0,0,0,0.6); }
.rv-dcust span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--rv-green);
    color: #fff; font: 800 11px var(--font-ui); border: 1.5px solid #fff; box-shadow: 0 0 0 1.5px var(--rv-ring), 0 0 10px rgba(31,207,106,0.55); }
.rv-home span { display: block; width: 14px; height: 14px; border-radius: 3px; background: #fff; border: 2px solid #120808; }
.rv-home b { position: absolute; left: 18px; top: -3px; white-space: nowrap; font: 700 13px var(--font-display);
    color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.9); }
.rv .leaflet-control-attribution { background: rgba(10,6,7,0.7); color: rgba(255,255,255,0.5); }
.rv .leaflet-control-attribution a { color: rgba(255,255,255,0.7); }
.rv .leaflet-control-zoom a { background: rgba(20,9,10,0.9); color: #fff; border-color: var(--aur-line); }

/* ------------------------------------------------------------ phone: the bottom sheet */
@media (max-width: 899px) {
    .rv-panel {
        top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 52%;
        border-radius: 20px 20px 0 0; border-bottom: 0;
        background: rgba(20, 9, 10, 0.96);
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
        transition: height 0.24s ease;
        padding-bottom: env(safe-area-inset-bottom);
        max-height: calc(100% - 12px);
    }
    .rv-panel.dragging { transition: none; }
    .rv-grab { display: flex; justify-content: center; flex: 0 0 auto; padding: 10px 0 4px; cursor: grab; touch-action: none; }
    .rv-grab span { width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.35); }
    .rv-bar { touch-action: none; border-bottom-color: transparent; background: none; padding-top: 2px; min-height: 52px; }
    .rv-panel[data-sheet="peek"] .rv-scroll { overflow: hidden; }
    .rv-scroll { padding: 6px 16px 72px; }   /* clear of Safari's floating bar */
    .rv-title { font-size: 21px; }
    .rv-show { display: none; }
    .rv .leaflet-top.leaflet-right { top: 6px; }
    .rv-acts a { min-height: 40px; }
    .rv-acts label, .rv-rm { min-height: 40px; }
}

/* ------------------------------------------------------------ next stop first (layout 2, 2026-11-18) */
.rv-prog { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.12); margin: 2px 0 12px; overflow: hidden; }
.rv-prog i { display: block; height: 100%; background: #fff; border-radius: 2px; transition: width 0.3s ease; }
.rv-next { border: 1px solid var(--aur-line-strong); border-radius: 16px; padding: 14px; background: rgba(255,255,255,0.05); margin-top: 12px; }
.rv-next.is-customer { border-color: rgba(31,207,106,0.6); }
.rv-next.is-history { border-color: rgba(255,197,61,0.5); }
.rv-next.is-done { text-align: center; }
.rv-next-k { font: 700 10.5px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.rv-next-name { display: flex; align-items: center; gap: 10px; margin: 8px 0 8px; font: 700 19px/1.2 var(--font-display); letter-spacing: -0.01em; }
.rv-next.is-done .rv-next-name { justify-content: center; }
.rv-next-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rv-next-tags .rv-chip { margin: 0; }
.rv-town { font-size: 12px; color: rgba(255,255,255,0.6); }
.rv-head-tag { display: inline-block; border-radius: 999px; padding: 2px 9px; font: 700 11.5px/1.5 var(--font-ui); }
.rv-head-tag.c { background: var(--rv-green); color: var(--rv-green-ink); }
.rv-head-tag.o { background: #ff6b5f; color: #2a0606; }
.rv-head-tag.h { background: var(--rv-gold); color: var(--rv-gold-ink); }
.rv-next-chief { margin-top: 10px; font-size: 13px; color: rgba(255,255,255,0.85); }
.rv-next-chief span { display: inline-block; margin-right: 6px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.rv-next-chief b { font-weight: 600; color: #fff; }
.rv-next .rv-go { margin: 12px 0 8px; padding: 13px 16px; font-size: 15px; }
.rv-next-acts { display: flex; gap: 6px; margin-top: 8px; }
.rv-next-acts a, .rv-next-acts button, .rv-next-acts .off { flex: 1; display: inline-flex; align-items: center; justify-content: center;
    min-height: 42px; border-radius: 999px; padding: 0 10px; cursor: pointer; text-decoration: none;
    font: 600 13px var(--font-ui); color: #fff; background: rgba(255,255,255,0.07); border: 1px solid var(--aur-line-strong); }
.rv-next-acts a:hover, .rv-next-acts button:hover { background: rgba(255,255,255,0.14); }
.rv-next-acts a.pri { background: #fff; color: var(--aur-ink); border-color: #fff; }
.rv-next-acts .off { color: rgba(255,255,255,0.4); cursor: default; }
.rv-more { margin-top: 10px; font-size: 12.5px; color: rgba(255,255,255,0.7); }
.rv-more summary { cursor: pointer; color: rgba(255,255,255,0.6); font-weight: 600; list-style-position: inside; padding: 4px 0; }
.rv-more p { margin: 6px 0 0; }
.rv-more a { color: #fff; }
.rv-daylinks { display: flex; justify-content: space-between; gap: 10px; margin: 10px 4px 0; font-size: 12.5px; }
.rv-daylinks a { color: rgba(255,255,255,0.8); font-weight: 600; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.4); }
.rv-list { list-style: none; margin: 0; padding: 0; }
.rv-mini { border-top: 1px solid rgba(255,255,255,0.08); }
.rv-mini-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 2px; background: none; border: 0;
    color: #fff; font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.rv-mini-t { flex: 1; min-width: 0; }
.rv-mini-t b { display: block; font: 600 13.5px/1.3 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-mini-t em { font-style: normal; font-size: 12px; color: rgba(255,255,255,0.55); }
.rv-mini-t .rv-head-tag { margin-top: 3px; font-size: 10.5px; padding: 0 8px; }
.rv-mini-leg { flex: 0 0 auto; font-size: 12px; color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums; }
.rv-mini-b { display: none; padding: 0 2px 12px 38px; }
.rv-mini.open .rv-mini-b { display: block; }
.rv-mini.open { background: rgba(255,255,255,0.04); border-radius: 12px; }
.rv-mini-b .rv-next-chief { margin-top: 0; }
.rv-list.is-done .rv-mini-t b { text-decoration: line-through; color: rgba(255,255,255,0.5); }
.rv-list.is-done .rv-num { opacity: 0.5; }
.rv-route-meta { margin-top: 16px; text-align: center; }
.rv-ctags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rv-ctag { border-radius: 999px; padding: 0 8px; font: 700 10.5px/18px var(--font-ui); background: rgba(255,197,61,0.18); color: var(--rv-gold); }
.rv-ctag.c { background: var(--rv-green); color: var(--rv-green-ink); }
.rv-ctag.o { background: #ff6b5f; color: #2a0606; }
.rv-pin.is-next { z-index: 9999 !important; }
.rv-pin.is-next::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
    border-radius: 50%; border: 2px solid #fff; animation: rvPulse 1.6s ease-out infinite; pointer-events: none; }
@keyframes rvPulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rv-pin.is-next::after { animation: none; opacity: 0.8; } }

/* ------------------------------------------------------------ day slots and the bench (2026-11-19) */
.rv-slots { display: grid; gap: 10px; margin-top: 16px; }
.rv-slot { border: 1.5px dashed transparent; border-radius: 16px; padding: 8px 8px 2px; background: rgba(255,255,255,0.03);
    transition: border-color 0.15s, background 0.15s; }
.rv-slot-k { font: 700 10.5px var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--aur-red); margin: 2px 4px 6px; }
.rv-slot .rv-route { margin-bottom: 6px; }
.rv-dragging .rv-slot { border-color: rgba(255,255,255,0.22); }
.rv-slot.over { border-color: #fff; background: rgba(255,255,255,0.1); }
.rv-slot.landed { animation: rvLand 0.9s ease; }
@keyframes rvLand { 0% { background: rgba(31,207,106,0.28); } 100% { background: rgba(255,255,255,0.03); } }
.rv-bench-k { margin: 18px 4px 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11.5px; color: rgba(255,255,255,0.5); text-align: center; }
.rv-rc { flex: 1; min-width: 0; }
.rv-grip { flex: 0 0 auto; width: 22px; height: 22px; color: rgba(255,255,255,0.35); cursor: grab; }
.rv-grip svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.rv-route { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rv-route.rv-lifted { opacity: 0.35; }
.rv-ghost { position: fixed; z-index: 10000; pointer-events: none; margin: 0; transform: rotate(-1.5deg) scale(1.03);
    background: #2a1314 !important; border-color: #fff !important; box-shadow: 0 18px 40px rgba(0,0,0,0.6);
    color: #fff; font: 500 13px/1.45 var(--font-ui); }
.rv-use { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.rv-use button { min-height: 30px; padding: 0 12px; white-space: nowrap; border-radius: 999px; cursor: pointer;
    font: 600 11.5px var(--font-ui); color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.06); border: 1px solid var(--aur-line); }
.rv-use button:hover { background: #fff; color: var(--aur-ink); border-color: #fff; }
.rv-use em { font-style: normal; font-size: 11.5px; color: rgba(255,255,255,0.5); align-self: center; margin-right: 2px; }

/* Undo and reset for the day slots (2026-11-19) */
.rv-slotbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 -4px; padding: 8px 10px;
    border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--aur-line); font-size: 12.5px; }
.rv-slotbar span { flex: 1 1 140px; color: rgba(255,255,255,0.75); }
.rv-slotbar button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px;
    cursor: pointer; font: 600 12.5px var(--font-ui); color: #fff; background: rgba(255,255,255,0.08); border: 1px solid var(--aur-line-strong); }
.rv-slotbar button:hover { background: rgba(255,255,255,0.16); }
.rv-slotbar button[data-undo] { background: #fff; color: var(--aur-ink); border-color: #fff; }
.rv-slotbar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ stop detail (2026-11-19 redo) */
.rv-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px;
    padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.05); }
.rv-who-l { min-width: 0; }
.rv-who-l b { display: block; font: 600 14px/1.3 var(--font-ui); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-who-k { display: block; font: 700 10px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.rv-who-tel { flex: 0 0 auto; font: 600 14px var(--font-ui); color: #fff; text-decoration: none; font-variant-numeric: tabular-nums;
    padding: 6px 0; border-bottom: 1px dotted rgba(255,255,255,0.45); }
.rv-who-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.6); }
.rv-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; min-height: 46px; border-radius: 999px;
    background: #fff; color: var(--aur-ink); font: 700 14px var(--font-ui); text-decoration: none; }
.rv-nav.big { min-height: 50px; font-size: 15px; }
.rv-nav:hover { background: rgba(255,255,255,0.9); }
.rv-nav svg, .rv-acts3 svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round; }
.rv-acts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.rv-acts3 > a, .rv-acts3 > button, .rv-acts3 > .off { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
    border-radius: 12px; padding: 0 6px; cursor: pointer; text-decoration: none; white-space: nowrap;
    font: 600 13px var(--font-ui); color: #fff; background: rgba(255,255,255,0.07); border: 1px solid var(--aur-line-strong); }
.rv-acts3 > a:hover, .rv-acts3 > button:hover { background: rgba(255,255,255,0.14); }
.rv-acts3 > .off { color: rgba(255,255,255,0.35); cursor: default; }
.rv-sfbox { margin-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px; }
.rv-sfbox-k { font: 700 10.5px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 4px; }
.rv-recs { list-style: none; margin: 0; padding: 0; }
.rv-rec { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.rv-rec + .rv-rec { border-top: 1px solid rgba(255,255,255,0.06); }
.rv-rec-pill { flex: 0 0 56px; text-align: center; border-radius: 999px; padding: 2px 0; margin-top: 1px;
    font: 700 10.5px/1.5 var(--font-ui); background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.75); }
.k-won .rv-rec-pill, .k-ax .rv-rec-pill { background: var(--rv-green); color: var(--rv-green-ink); }
.k-open .rv-rec-pill { background: #ff6b5f; color: #2a0606; }
.k-lost .rv-rec-pill, .k-quote .rv-rec-pill { background: rgba(255,197,61,0.2); color: var(--rv-gold); }
.rv-rec-t { min-width: 0; }
.rv-rec-t b { display: block; font: 600 13px/1.35 var(--font-ui); color: #fff; }
.rv-rec-t em { display: block; font-style: normal; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,0.6); }
.rv-rec-none { font-size: 12.5px; color: rgba(255,255,255,0.5); padding: 4px 0; }
.rv-approx { margin-top: 8px; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11.5px; }
.rv-glink { display: block; margin-top: 10px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,0.65); }
.rv-mini-b { padding: 0 10px 14px; }

/* Day limits (2026-11-19): a slot that would refuse the dragged route turns red */
.rv-slot.no { border-color: #ff6b5f; background: rgba(255,107,95,0.1); }
.rv-slotbar.no { border-color: rgba(255,107,95,0.6); background: rgba(255,107,95,0.12); }
.rv-slotbar.no span { color: #ffb3ad; }
.rv-slot-k span { margin-left: 8px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: rgba(255,255,255,0.5); }
.rv-slots, .rv-bench, .rv-slot-k, .rv-bench-k { -webkit-user-select: none; user-select: none; }

/* Leg times say where they are timed from (2026-11-19) */
.rv-mini-leg { text-align: right; line-height: 1.2; }
.rv-mini-leg small { display: block; font-size: 10.5px; color: rgba(255,255,255,0.4); }
.rv-legnote { margin-top: 10px; font-size: 11px; line-height: 1.4; color: rgba(255,255,255,0.45); text-align: center; }
