/* RunoVerse region map (rv_region_map.js): the poem-view map's look from similarity.html (.rmap), for pages
   that use the site's plain colour names (--fg, --bg, --rule, --muted) or the tool pages' (--rv-text, ...). */
.rv-rmap {
    --rm-text: var(--rv-text, var(--fg, #1F2822));
    --rm-surface: var(--rv-surface, var(--bg, #F4F0E7));
    --rm-border: var(--rv-border, var(--rule, #D8D2C2));
    --rm-muted: var(--rv-text-3, var(--muted, #5C6A5E));
    --map-sea: #DCE4E1;
    --map-bg: #E9E4D8;
    --map-stroke: #D3CCBA;
    --map-land: #F0EDE4;
    --map-ring: #A56D55;
    --band1: #CFE0C9;
    --band2: #8DB487;
    --band4: #2E5C3A;
    --bar: var(--moss, #7A8B76);
    color: var(--rm-text);
    min-width: 0;
    font-size: .85rem;
    line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
    .rv-rmap {
        --map-sea: #121C1F;
        --map-bg: #223127;
        --map-stroke: #33443A;
        --map-land: #1D2820;
        --band1: #34503B;
        --band2: #5F8E64;
        --band4: #A9CFA7;
    }
}
.rv-rmap[hidden] { display: none !important; }
.rv-rmap .rmap-status { margin: 0; padding: .6em 0; color: var(--rm-muted); }
.rv-rmap.is-loading { min-height: 12em; }
.rv-rmap .rmap-stage { position: relative; }
.rv-rmap .rmap-canvas {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    background: var(--map-sea);
    border: 1px solid var(--rm-border);
    border-radius: 4px;
    touch-action: pan-x pan-y;
    -webkit-user-select: none;
    user-select: none;
}
/* The arrow stays the cursor over the map, zoomed in or not; a hand only over a place, and while dragging. */
.rv-rmap .rmap-canvas.zoomed { touch-action: none; }
.rv-rmap .rmap-canvas.dragging, .rv-rmap .rmap-canvas.dragging .place-link { cursor: grabbing; }
.rv-rmap path { fill-rule: evenodd; }
.rv-rmap .land { fill: var(--map-land); }
.rv-rmap .lakes { fill: var(--map-sea); }
.rv-rmap .bg { fill: var(--map-bg); stroke: var(--map-stroke); stroke-width: calc(.7px * var(--k, 1)); pointer-events: visiblePainted; }
.rv-rmap .b1 { fill: var(--band1); }
.rv-rmap .b2 { fill: var(--band2); }
.rv-rmap .b4 { fill: var(--band4); }
.rv-rmap .regfill { opacity: .55; pointer-events: visiblePainted; }
.rv-rmap .parish { stroke: var(--map-stroke); stroke-width: calc(1px * var(--k, 1)); pointer-events: visiblePainted; }
.rv-rmap .hover-area { fill: none; stroke: var(--rm-text); stroke-width: calc(2.5px * var(--k, 1)); stroke-linejoin: round; pointer-events: none; }
.rv-rmap .region-mark { fill: none; stroke: var(--map-ring); stroke-width: calc(2px * var(--k, 1)); stroke-dasharray: 4 3; pointer-events: none; }
.rv-rmap .dot { stroke: var(--rm-surface); stroke-width: calc(2px * var(--k, 1)); pointer-events: none; }
.rv-rmap .dot.hover { stroke: var(--rm-text); stroke-width: calc(3px * var(--k, 1)); }
.rv-rmap .tap { fill: transparent; stroke: none; pointer-events: all; }
.rv-rmap .place-link { cursor: pointer; }
.rv-rmap .place-link:focus { outline: none; }
.rv-rmap .place-link:focus-visible .parish, .rv-rmap .place-link:focus-visible .tap { stroke: var(--rm-text); stroke-width: calc(2.5px * var(--k, 1)); }
.rv-rmap .rmap-tip {
    position: absolute;
    z-index: 3;
    max-width: 260px;
    padding: 4px 8px;
    border: 1px solid var(--rm-border);
    border-radius: 4px;
    background: var(--rm-surface);
    color: var(--rm-text);
    font-size: .8rem;
    line-height: 1.35;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    pointer-events: none;
    overflow-wrap: anywhere;
}
.rv-rmap .rmap-tip[hidden] { display: none; }
.rv-rmap .rmap-tip span, .rv-rmap .rmap-tip a { display: block; }
.rv-rmap .rmap-tip a { margin-top: .3em; padding: .2em 0; text-decoration: underline; }
.rv-rmap .rmap-tip.has-link { pointer-events: auto; }
.rv-rmap .map-zoom { position: absolute; top: 6px; left: 6px; display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.rv-rmap .map-zoom button {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 18px;
    line-height: 1;
    background: var(--rm-surface);
    color: var(--rm-text);
    border: 1px solid var(--map-stroke);
    border-radius: 4px;
    cursor: pointer;
}
.rv-rmap .map-zoom button:disabled { opacity: .45; cursor: default; }
.rv-rmap button:focus-visible { outline: 2px solid var(--rm-text); outline-offset: 2px; }
@media (pointer: coarse) { .rv-rmap .map-zoom button { width: 40px; height: 40px; } }
.rv-rmap .map-key { list-style: none; display: flex; flex-wrap: wrap; gap: .3em 1em; padding: 0; margin: .5em 0 0; }
.rv-rmap .map-key li { display: flex; align-items: center; }
.rv-rmap .map-key svg { flex: none; margin-right: .35em; }
.rv-rmap .map-key rect { stroke: var(--map-stroke); stroke-width: 1px; }
.rv-rmap .rmap-off { margin: .35em 0 0; color: var(--rm-muted); }
.rv-rmap .rmap-decades { margin-top: .8em; }
.rv-rmap .rmap-decades-label { margin: 0 0 .25em; color: var(--rm-muted); }
.rv-rmap .rmap-strip { position: relative; }
.rv-rmap .rmap-strip svg { display: block; width: 100%; height: 40px; overflow: visible; }
.rv-rmap .dbar { fill: var(--bar); }
.rv-rmap .dbar.on { fill: var(--rm-text); }
.rv-rmap .dbase { fill: var(--rm-border); }
.rv-rmap .rmap-strip-axis { display: flex; justify-content: space-between; color: var(--rm-muted); font-size: .9em; }
.rv-rmap .rmap-strip-tip {
    position: absolute;
    bottom: 100%;
    margin-bottom: 2px;
    padding: 2px 6px;
    border: 1px solid var(--rm-border);
    border-radius: 4px;
    background: var(--rm-surface);
    color: var(--rm-text);
    font-size: .95em;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    pointer-events: none;
}
.rv-rmap .rmap-strip-tip[hidden] { display: none; }
.rv-rmap .rmap-undated { margin: .25em 0 0; color: var(--rm-muted); }

/* Place profile pages (data-rv-locator, drawLocator): the place in red, the villages and other places its songs were
   recorded in as dots (hollow where the sources agree only roughly), and a small overview of the whole area. */
.rv-rmap.rv-loc {
    --loc-own: #B23A2B;
    --loc-own-fill: rgba(178, 58, 43, .16);
    --loc-dot: #24343A;
}
@media (prefers-color-scheme: dark) {
    .rv-rmap.rv-loc { --loc-own: #E2725F; --loc-own-fill: rgba(226, 114, 95, .2); --loc-dot: #E9E5DA; }
}
.rv-loc .regfill { opacity: 1; }
.rv-loc .own { fill: var(--loc-own-fill); stroke: var(--loc-own); stroke-width: calc(2.2px * var(--k, 1)); stroke-linejoin: round; pointer-events: visiblePainted; }
.rv-loc .own-dot { fill: var(--loc-own); pointer-events: visiblePainted; }
.rv-loc .own-ring { fill: var(--loc-own-fill); stroke: var(--loc-own); stroke-width: calc(2px * var(--k, 1)); pointer-events: visiblePainted; }
.rv-loc .vdot { fill: var(--loc-dot); stroke: var(--rm-surface); stroke-width: calc(1.2px * var(--k, 1)); }
.rv-loc .vdot.loose { fill: var(--rm-surface); stroke: var(--loc-dot); stroke-width: calc(1.6px * var(--k, 1)); }
.rv-loc .vdot.hover { stroke: var(--loc-own); stroke-width: calc(2.5px * var(--k, 1)); }
.rv-loc .map-key .own-sw { fill: var(--loc-own-fill); stroke: var(--loc-own); stroke-width: 2px; }
.rv-loc .map-key .vdot { stroke-width: 1.2px; }
.rv-loc .map-key .vdot.loose { stroke-width: 1.6px; }
.rv-loc .rloc-foot { display: flex; gap: .8em; align-items: flex-start; margin-top: .5em; }
.rv-loc .rloc-overview { flex: none; width: 64px; }
.rv-loc .rloc-inset { display: block; width: 100%; height: auto; border: 1px solid var(--rm-border); border-radius: 3px; }
.rv-loc .rloc-inset .sea { fill: var(--map-sea); }
.rv-loc .rloc-inset .land { fill: var(--map-bg); stroke: var(--map-stroke); stroke-width: .4px; }
.rv-loc .rloc-inset .idot { fill: var(--loc-own); }
.rv-loc .rloc-inset .iring { fill: none; stroke: var(--loc-own); stroke-width: 1.4px; }
.rv-loc .rloc-keys { flex: 1; min-width: 0; }
.rv-loc .rloc-keys .map-key { margin-top: 0; }
.rv-loc .rloc-credit { margin: .35em 0 0; }
.rv-loc .rloc-credit a { color: var(--rm-muted); text-decoration: underline; }
@media print { .rv-loc .map-zoom { display: none; } }
/* Word pages (data-mode="share"): five classes from much less often (brown) to much more often (green) than the
   usual share; the middle class, no clear difference, stays pale. */
.rv-rmap.share {
    --sh-lo2: #9C5E27;
    --sh-lo: #DDBE8A;
    --sh-mid: #FAF8F2;
    --sh-hi: #9DC596;
    --sh-hi2: #2C6A3C;
}
@media (prefers-color-scheme: dark) {
    .rv-rmap.share {
        --sh-lo2: #D9A061;
        --sh-lo: #7D613D;
        --sh-mid: #2A372E;
        --sh-hi: #4E8456;
        --sh-hi2: #ADD6A9;
    }
}
.rv-rmap .blo2 { fill: var(--sh-lo2); }
.rv-rmap .blo { fill: var(--sh-lo); }
.rv-rmap .bmid { fill: var(--sh-mid); }
.rv-rmap .bhi { fill: var(--sh-hi); }
.rv-rmap .bhi2 { fill: var(--sh-hi2); }
.rv-rmap.share .dot { stroke: var(--rm-muted); stroke-width: calc(1.2px * var(--k, 1)); }
.rv-rmap.share .dot.hover { stroke: var(--rm-text); stroke-width: calc(3px * var(--k, 1)); }
.rv-rmap.share .regfill { opacity: .7; }
.rv-rmap .rmap-tip .rmap-tip-class { margin-top: .15em; color: var(--rm-muted); }
.rv-rmap .rmap-usual { margin: .35em 0 0; color: var(--rm-muted); }
.rv-rmap.share .rmap-strip .dbar { stroke: var(--rm-border); stroke-width: .4px; vector-effect: non-scaling-stroke; }
.rv-rmap.share .rmap-strip .dtick { fill: var(--rm-muted); stroke: none; }
.rv-rmap.share .rmap-strip .dbar.on { fill: var(--rm-text); }
.rv-rmap .dusual { stroke: var(--rm-text); stroke-width: 1.2px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.rv-rmap.share .rmap-strip-tip { white-space: pre-line; width: max-content; max-width: 20em; }
