/* Waystone design system
   The map fills the screen; dark warm glass controls and cards float over it.
   One border (1px), two corner radii (14px large, 10px small), two typefaces:
   Cormorant Garamond for anything you read, Inter for anything you press. */
:root {
  --cream: #f6ecd6; --dim: #cdbf9f; --gold: #dcae52; --gold-hi: #f3d58a; --red: #a63d2f; --ink: #3a2a18; --brown: #8a5a22;
  --glass: rgba(28, 19, 11, .58); --panel: rgba(26, 18, 11, .95); --line: rgba(220, 174, 82, .34); --line-soft: rgba(246, 236, 214, .2);
  --r: 14px; --r-sm: 10px;
  --read: 'Cormorant Garamond', Georgia, serif; --ui: Inter, system-ui, sans-serif;
  --ease: cubic-bezier(.65, 0, .25, 1);
  --pad: 28px; --st: 0px; --sb: 0px; --colw: 0px;
  --card-h: 223px; /* the facts card: tall enough for the longest fact on a desktop; phones (below) keep five lines and fade the rest */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b140d; color: var(--cream); font: 13px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
button:disabled { opacity: .3; cursor: default; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.msg { color: var(--dim); font: 400 14px/1.5 var(--ui); }
.msg button, .retry { margin-left: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--gold-hi); font: 500 12px var(--ui); }
/* parchment: map tooltips (the facts card and its More view are dark glass, below) */
.parch { background: linear-gradient(180deg, #f8edd3, #ecd9ae); border: 1px solid #c9ab6b; color: var(--ink); border-radius: var(--r); }

/* ================= map ================= */
#mapwrap { position: fixed; inset: 0; z-index: 0; overflow: hidden; transition: clip-path .85s var(--ease); }
#tiles { position: absolute; inset: 0; overflow: hidden; background: #24424f; filter: sepia(.3) saturate(.82) contrast(1.04) brightness(1.06); }
#tiles img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; pointer-events: none; opacity: 0; transition: opacity .35s; }
#tiles img.ok { opacity: 1; }
body:not([data-style="terrain"]) #tiles { display: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map:active { cursor: grabbing; }

/* satellite: imagery under light labels */
.sea { fill: #a9c4bd; }
.grat { fill: none; stroke: rgba(255, 255, 255, .25); stroke-width: .6; vector-effect: non-scaling-stroke; }
.land-glow { fill: none; stroke: rgba(255, 250, 235, .5); stroke-width: 7; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.land { fill: #eedfba; stroke: #b0935c; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lake { fill: #94b9bb; stroke: #6d989c; stroke-width: 1; vector-effect: non-scaling-stroke; }
.river { fill: none; stroke: #86b1b8; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
body[data-style="terrain"] :is(.sea, .grat, .land, .land-glow, .land-wash, .rings, .hills, .lake, .river) { display: none; }
body:not([data-style="parchment"]) :is(.land-wash, .rings, .hills, #paper, #rose) { display: none; }
.region { font: 600 14px var(--ui); letter-spacing: .3em; text-anchor: middle; pointer-events: none; fill: rgba(255, 244, 214, .82); paint-order: stroke fill; stroke: rgba(30, 18, 8, .5); stroke-width: 3px; stroke-linejoin: round; }
.region.small { font-size: 9.5px; letter-spacing: .22em; }
.region.sea-l { font: italic 500 18px var(--read); letter-spacing: .3em; fill: rgba(214, 236, 240, .7); stroke: rgba(10, 30, 40, .35); }
.region.sea-l.small { font-size: 12px; }
.rlabel { font: italic 600 10.5px var(--read); fill: #e2f3f6; text-anchor: middle; pointer-events: none; paint-order: stroke fill; stroke: rgba(10, 30, 40, .7); stroke-width: 3px; stroke-linejoin: round; }
.rlabel.lake-l { text-anchor: end; }
#map[data-z="near"] .region:not(.small) { opacity: 0; }
#map:not([data-z="near"]) .lake-l, #map[data-z="far"] .rlabel, #map[data-z="far"] .lm:not(.major) text { opacity: 0; }
.lm { cursor: pointer; }
.lm .art { filter: drop-shadow(0 2px 2px rgba(20, 10, 0, .5)); } /* the shadow on the icon only, so it never muddies the label */
.lm.off { display: none; }
.lm .art { transition: transform .25s; }
.lm:hover .art { transform: scale(1.18); }
#map[data-z="far"] .lm:not(.major) .art { transform: scale(.72); }
.lm text { font: 700 10.5px var(--ui); fill: var(--cream); text-anchor: middle; paint-order: stroke fill; stroke: rgba(30, 18, 8, .85); stroke-width: 3.4px; stroke-linejoin: round; transition: opacity .3s; }
.trail-case { fill: none; stroke: rgba(255, 246, 224, .85); stroke-linecap: round; stroke-linejoin: round; }
.trail-bg { fill: none; stroke: rgba(255, 246, 224, .8); stroke-width: 2.2; stroke-dasharray: 1 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trail { fill: none; stroke: #b5392a; stroke-linecap: round; stroke-linejoin: round; }
.wp .dot { fill: var(--cream); stroke: #8f2f24; stroke-width: 2; }
/* how sure a place is: approximate sites get a soft dashed halo (around the pin, on the ground; around a route stop's dot) and a
   small "≈ approx. site" after the name; places not known keep the shaded area and "?" pin and say "location not known" */
.cert-ring { fill: rgba(243, 213, 138, .14); stroke: var(--gold-hi); stroke-width: 1.3; stroke-dasharray: 3.2 2.6; pointer-events: none; }
.cert-tag { font: italic 600 .84em var(--read); letter-spacing: .02em; fill-opacity: .92; }
.ev-q { font: 700 20px var(--read); fill: #fbefd2; pointer-events: none; } /* the "?" in an unknown place's pin */
body[data-style="modern"] .cert-ring { fill: rgba(168, 48, 31, .08); stroke: #a8301f; stroke-opacity: .75; }
body[data-style="parchment"] .cert-ring { fill: rgba(168, 67, 42, .08); stroke: #a8432a; stroke-opacity: .8; }
body[data-style="parchment"] .cert-tag { font-family: 'IM Fell English', Georgia, serif; }
.wp text, .ev-label { font: 700 12px var(--ui); fill: #fff6e0; paint-order: stroke fill; stroke: rgba(36, 14, 8, .9); stroke-width: 3.6px; stroke-linejoin: round; }
.ev-label { font: 700 14.5px var(--read); }
.fuzz { fill: rgba(220, 174, 82, .16); stroke: var(--gold-hi); stroke-width: 1.6; stroke-dasharray: 7 7; vector-effect: non-scaling-stroke; }
.pulse { fill: none; stroke: var(--gold-hi); stroke-width: 2; animation: pulse 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { transform: scale(.7); opacity: .95; } to { transform: scale(2.4); opacity: 0; } }
.medal { fill: url(#gMedal); stroke: var(--gold-hi); stroke-width: 1.8; }
.medal.light { fill: #f6ecd6; stroke: #8f2f24; }
.glyph { color: #fbefd2; fill: currentColor; }
.medal.light + .glyph { color: #7c241b; }
.ev-pin > g, .traveler { filter: drop-shadow(0 3px 4px rgba(20, 8, 0, .55)); }
/* Labels stay readable where they cross coastlines, rivers and borders: a crisp halo (the stroke, painted under the letters)
   plus a wider, softly blurred one in the map's own land tone (#lbl-halo, map.js); the current story's names (its stops and pin)
   sit on a faint translucent pill instead (#lbl-pill). The filters' colours are set per style below. */
:is(.lm text, .rlabel, .region) { filter: url(#lbl-halo); }
:is(.wp text, .ev-label) { filter: url(#lbl-pill); }
#lbl-halo .lbl-c { flood-color: rgba(26, 14, 6, .5); }
#lbl-pill .lbl-c { flood-color: rgba(26, 14, 6, .5); }
body[data-style="modern"] #lbl-halo .lbl-c { flood-color: rgba(239, 227, 201, .9); }
body[data-style="modern"] #lbl-pill .lbl-c { flood-color: rgba(248, 241, 224, .8); }
body[data-style="parchment"] #lbl-halo .lbl-c { flood-color: rgba(239, 226, 196, .9); }
body[data-style="parchment"] #lbl-pill .lbl-c { flood-color: rgba(243, 233, 207, .82); }
/* a place not known (Eden): its name and "location not known" a little larger, so the note reads even zoomed out */
body .ev-pin.cert-unknown .ev-label { font-size: 19px; }
.cert-unknown .cert-tag { font-size: .92em; fill-opacity: 1; }
.ev-pin { cursor: pointer; }

/* modern (the default): warm and flat, sea-green water, sand land, deep red route */
body[data-style="modern"] #mapwrap { background: #9fbab9; }
body[data-style="modern"] .sea { fill: #9fbab9; }
body[data-style="modern"] .grat { stroke: rgba(60, 80, 78, .1); }
body[data-style="modern"] .land-glow { display: none; }
body[data-style="modern"] .land { fill: #efe3c9; stroke: #a89886; stroke-width: 1; filter: drop-shadow(0 1.5px 3px rgba(79, 95, 92, .38)); }
body[data-style="modern"] .lake { fill: #9fbab9; stroke: #a89886; stroke-width: .8; }
body[data-style="modern"] .river { stroke: #7ea3a3; stroke-width: 1.7; }
body[data-style="modern"] .region { font: 600 12px var(--ui); letter-spacing: .42em; fill: #85796a; stroke: rgba(239, 227, 201, .75); stroke-width: 3px; stroke-linejoin: round; }
body[data-style="modern"] .region.small { font-size: 10px; letter-spacing: .34em; }
body[data-style="modern"] .region.sea-l { font: italic 600 16px var(--read); letter-spacing: .14em; fill: #587a7d; stroke: none; }
body[data-style="modern"] .rlabel { font: italic 700 11.5px var(--read); fill: #4c6f72; stroke: rgba(239, 227, 201, .95); }
body[data-style="modern"] .lm .art { filter: drop-shadow(0 1px 2px rgba(58, 42, 24, .35)); }
body[data-style="modern"] .lm text { font: 700 12.5px var(--read); fill: #33240f; stroke: rgba(239, 227, 201, .97); stroke-width: 3.8px; }
body[data-style="modern"] :is(.ev-label, .wp text) { font: 700 15px var(--read); fill: #33240f; stroke: rgba(246, 238, 220, .97); stroke-width: 4px; }
body[data-style="modern"] .trail { stroke: #a8301f; }
body[data-style="modern"] .trail-case { stroke: rgba(246, 236, 214, .85); }
body[data-style="modern"] .trail-bg { stroke: #a8301f; stroke-width: 2.6; stroke-dasharray: .1 7; }
body[data-style="modern"] .wp .dot { fill: #fbf3df; stroke: #a8301f; stroke-width: 2.2; }
body[data-style="modern"] .fuzz { fill: rgba(168, 48, 31, .08); stroke: #a8301f; }

/* old map: an engraved, hand-coloured chart */
body[data-style="parchment"] { --paper-c: #efe2c4; --sea-c: #d1d6bc; --ink-c: #5b3f25; }
body[data-style="parchment"] #mapwrap { background: var(--sea-c); }
body[data-style="parchment"] .sea { fill: var(--sea-c); }
body[data-style="parchment"] .grat { stroke: rgba(91, 63, 37, .16); stroke-dasharray: 2 4; }
.ring { fill: none; stroke: #61796c; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ring-gap { fill: none; stroke: #d1d6bc; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
body[data-style="parchment"] .land-glow { display: none; }
body[data-style="parchment"] .land { fill: var(--paper-c); stroke: var(--ink-c); stroke-width: 1.3; }
.land-wash { fill: none; stroke: #a3ae72; stroke-opacity: .42; stroke-width: 16; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
body[data-style="parchment"] .lake { fill: var(--sea-c); stroke: var(--ink-c); stroke-width: 1.1; }
body[data-style="parchment"] .river { stroke: #5f7d7a; stroke-width: 1.7; }
.hill { pointer-events: none; }
.hill .h1 { fill: #e6d3a8; stroke: #5b3f25; stroke-width: .9; }
.hill .h2 { fill: none; stroke: #5b3f25; stroke-width: .6; }
#map[data-z="far"] .hill.fine { display: none; }
#map[data-z="near"] .hill:not(.fine) { opacity: .5; }
body[data-style="parchment"] .region { font: italic 400 16px 'IM Fell English', Georgia, serif; letter-spacing: .38em; fill: rgba(91, 63, 37, .72); stroke: rgba(239, 226, 196, .85); stroke-width: 3px; }
body[data-style="parchment"] .region.small { font-size: 11px; }
body[data-style="parchment"] .region.sea-l { font: italic 400 22px 'IM Fell English', Georgia, serif; letter-spacing: .3em; fill: rgba(60, 84, 74, .62); stroke: none; }
body[data-style="parchment"] .rlabel { font: italic 400 11.5px 'IM Fell English', Georgia, serif; fill: #355f5b; stroke: rgba(239, 226, 196, .92); stroke-width: 3.2px; }
body[data-style="parchment"] .lm .art { filter: drop-shadow(0 1px 1px rgba(60, 35, 10, .35)); }
body[data-style="parchment"] .lm text { font: 400 12px 'IM Fell English', Georgia, serif; fill: #301e0e; stroke: rgba(239, 226, 196, .95); stroke-width: 3.6px; }
body[data-style="parchment"] :is(.ev-label, .wp text) { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-weight: 400; font-size: 13.5px; fill: #6e2010; stroke: rgba(243, 233, 207, .96); stroke-width: 3.8px; }
body[data-style="parchment"] .ev-label { font-size: 16px; }
body[data-style="parchment"] .trail-bg { stroke: rgba(122, 38, 20, .35); }
body[data-style="parchment"] .trail-case { stroke: rgba(239, 226, 196, .9); }
body[data-style="parchment"] .fuzz { fill: rgba(168, 67, 42, .1); stroke: #a8432a; }
#paper { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .55;
  background: radial-gradient(circle at 78% 22%, rgba(150, 100, 50, .18), transparent 30%), radial-gradient(circle at 18% 80%, rgba(150, 100, 50, .16), transparent 34%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .37 0 0 0 0 .22 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#rose { position: fixed; left: 24px; bottom: 120px; width: 76px; height: 84px; z-index: 1; pointer-events: none; opacity: .8; transition: opacity .4s; }
#rose circle { stroke: #5b3f25; stroke-width: .8; }
#rose .pt path { fill: #5b3f25; } #rose .pt path.lt { fill: #efe2c4; stroke: #5b3f25; stroke-width: .6; }
#rose .pt.red path { fill: #a8432a; } #rose .pt.red path.lt { fill: #efe2c4; }
#rose text { font: 14px 'IM Fell English', serif; fill: #5b3f25; }
body:not([data-mode="map"]) #rose { opacity: 0; }

/* ================= scrims: soft fades at the top and bottom keep the controls readable ================= */
#scrim-top, #scrim-bottom { position: fixed; left: 0; right: 0; z-index: 5; pointer-events: none; transition: opacity .5s; }
#scrim-top { top: 0; height: 230px; background: linear-gradient(to bottom, rgba(28, 19, 11, .84), rgba(28, 19, 11, .62) 55%, rgba(28, 19, 11, 0)); }
#scrim-bottom { bottom: 0; height: 230px; background: linear-gradient(to top, rgba(28, 19, 11, .88), rgba(28, 19, 11, .55) 48%, rgba(28, 19, 11, 0)); }
#dim { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .6s; background: linear-gradient(to right, rgba(32, 22, 13, .32), rgba(32, 22, 13, .5) 60%, rgba(32, 22, 13, .62)); }
body:is([data-mode="read"], [data-mode="ask"]) #dim { opacity: 1; }
body:is([data-mode="read"], [data-mode="ask"]) #scrim-bottom { opacity: 0; }
#brand, #lockup, #ruler, #meta, #chnav { text-shadow: 0 1px 10px rgba(20, 12, 6, .55); }

/* ================= top: timeline ruler, brand, date lockup, modes ================= */
#ruler { position: fixed; z-index: 13; left: 0; right: 0; top: 0; height: 62px; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
#ruler.drag { cursor: grabbing; }
#rtrack { position: absolute; left: 50%; top: 0; height: 62px; width: 7200px; transition: transform .6s var(--ease); }
#ruler.drag #rtrack { transition: none; }
#rtrack .tk { position: absolute; left: -107.5px; right: 0; top: 21px; height: 7px; background: repeating-linear-gradient(90deg, rgba(246, 236, 214, .34) 0 1px, transparent 1px 21.5px); }
#rtrack .eh { position: absolute; top: 20px; height: 1.5px; opacity: .7; transition: opacity .4s; }
#rtrack .eh.on { opacity: 1; }
#rtrack .mj { position: absolute; top: 21px; width: 1px; height: 12px; background: rgba(246, 236, 214, .6); }
#rtrack .nm { position: absolute; top: 40px; transform: translateX(-50%); white-space: nowrap; font: italic 500 15px/1 var(--read); color: rgba(246, 236, 214, .85); opacity: 0; transition: opacity .4s, top .3s, font-size .3s, color .2s; }
#rtrack .nm:hover { color: var(--gold-hi); }
#rtrack .nm.cur { font: italic 700 18px/1 var(--read); color: var(--gold-hi); top: 38px; }
#rtrack .el { position: absolute; top: 7px; font: 600 8.5px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity .4s; pointer-events: none; }
#ruler .needle { position: absolute; left: 50%; top: 12px; width: 2px; height: 24px; margin-left: -1px; background: var(--gold); box-shadow: 0 0 10px rgba(220, 174, 82, .7); z-index: 2; pointer-events: none; }
#ruler .needle::before { content: ''; position: absolute; left: 50%; top: 3px; width: 8px; height: 8px; background: var(--gold); transform: translate(-50%, 0) rotate(45deg); border-radius: 1px; }
#pruler { display: none; }

#brand { position: fixed; z-index: 14; left: var(--pad); top: 66px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
#brand b { font: 600 22px/1 var(--read); letter-spacing: .015em; }
#brand svg { width: 28px; height: 28px; }
#lockup { position: fixed; z-index: 14; left: var(--pad); top: 106px; cursor: pointer; touch-action: pan-y; user-select: none; }
#lockup .d { font: 600 36px/1 var(--read); display: flex; align-items: center; gap: 10px; font-variant-numeric: lining-nums; }
#lockup .d .chev { font-size: 15px; color: var(--gold-hi); margin-top: 5px; }
#lockup .d .dq { font: italic 400 15px/1 var(--read); color: rgba(246, 236, 214, .7); margin: 8px 0 0 -2px; white-space: nowrap; } /* "traditional" after a date */
#lockup .d .dq .sh { display: none; }
#lockup:hover .d .chev { color: #fff; }
#lockup .s { margin-top: 7px; font: italic 500 17px/1 var(--read); color: rgba(246, 236, 214, .88); display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
#lockup .s b { font: 600 9.5px/1 var(--ui); letter-spacing: .17em; text-transform: uppercase; }
#lockup .s u { text-decoration: none; color: rgba(246, 236, 214, .35); }
@keyframes in-r { from { opacity: 0; transform: translateX(26px); } }
@keyframes in-l { from { opacity: 0; transform: translateX(-26px); } }
#lockup.in-r > div { animation: in-r .35s var(--ease); }
#lockup.in-l > div { animation: in-l .35s var(--ease); }

#tabs { position: fixed; z-index: 14; right: 80px; top: 62px; height: 44px; display: flex; padding: 4px; gap: 2px; border-radius: var(--r); background: var(--glass); backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); border: 1px solid var(--line); }
.tb { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: var(--r-sm); font: 500 13.5px/1 var(--ui); color: rgba(246, 236, 214, .8); border: 1px solid transparent; transition: background .2s, color .2s; }
.tb .ic { font-size: 17px; }
.tb:hover { color: #fff6e0; background: rgba(246, 236, 214, .08); }
.tb.on { background: rgba(220, 174, 82, .24); border-color: rgba(220, 174, 82, .6); color: #fff6e0; box-shadow: 0 0 14px -2px rgba(220, 174, 82, .35); }
.tb.on .ic { color: var(--gold-hi); }
#layers { position: fixed; z-index: 14; right: var(--pad); top: 62px; width: 44px; height: 44px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 20px; color: rgba(246, 236, 214, .9); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); }
#layers:hover, #layers.on { background: rgba(220, 174, 82, .24); border-color: rgba(220, 174, 82, .6); }

/* ================= popovers ================= */
.pop { position: fixed; z-index: 25; width: 270px; padding: 14px; border-radius: var(--r); background: rgba(26, 18, 11, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(-6px) scale(.97); pointer-events: none; transition: opacity .2s, transform .2s; transform-origin: top right; }
.pop.show { opacity: 1; transform: none; pointer-events: auto; }
.pop h5 { font: 600 9.5px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 2px 0 8px; }
.pop .seg { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.pop .seg button { flex: 1; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); font: 500 12px var(--ui); color: var(--dim); display: flex; align-items: center; justify-content: center; }
.pop .seg button .ic { font-size: 15px; }
.pop .seg button:hover { color: var(--cream); border-color: var(--line); }
.pop .seg button.on { background: rgba(220, 174, 82, .22); border-color: rgba(220, 174, 82, .6); color: #fff6e0; }
.pop .seg.wrap button { flex: 0 0 calc(33.3% - 3px); }
.pop .note { font: 500 11px/1.45 var(--ui); color: var(--dim); display: flex; gap: 7px; }
.pop .note .ic { font-size: 14px; color: var(--gold); margin-top: 1px; }
.pop .phone-only { display: none; }
#pop-layers { right: var(--pad); top: 114px; }
/* how sure is the place: one line, the two marks the map uses */
.pop .cert-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 14px; font: 500 11.5px/1.3 var(--ui); color: var(--dim); }
.pop .cert-key span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pop .cert-key svg { width: 26px; height: 14px; flex: none; overflow: visible; }
.pop .cert-key .ring { fill: rgba(243, 213, 138, .14); stroke: var(--gold-hi); stroke-width: 1.1; stroke-dasharray: 2.6 2; }
.pop .cert-key .pin { fill: #a8301f; stroke: var(--gold-hi); stroke-width: 1; }
.pop .cert-key .area { fill: rgba(220, 174, 82, .16); stroke: var(--gold-hi); stroke-width: 1; stroke-dasharray: 2.4 2.4; }
.pop .cert-key text { font: 700 10px var(--read); fill: var(--gold-hi); text-anchor: middle; }
.pop .phone-only .cert-key { margin: 12px 0 0; }
#pop-more { right: var(--pad); bottom: 70px; transform-origin: bottom right; }

/* ================= key facts: dark warm glass like the mode pill, cream reading text, gold labels =================
   The card keeps one height at each size whatever the fact (so the arrows and dots never move): a fact too long for it
   fades out at the bottom, and More has the rest. */
#card { position: fixed; z-index: 10; right: var(--pad); top: 126px; width: 310px; height: var(--card-h); display: flex; flex-direction: column; padding: 14px 16px 11px;
  border-radius: var(--r); border: 1px solid var(--line); color: var(--cream);
  background: linear-gradient(180deg, rgba(40, 28, 17, .86), rgba(26, 18, 11, .9)); backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(246, 236, 214, .08);
  cursor: default; opacity: 0; transform: scale(.5); transform-origin: top right; pointer-events: none; transition: opacity .3s, transform .45s var(--ease); }
#card.has-more { cursor: pointer; }
body.facts-open:is([data-mode="map"], [data-mode="watch"]):not(.no-facts) #card { opacity: 1; transform: none; pointer-events: auto; }
#card.pop-in { animation: card-in .5s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
#card .k { flex: none; font: 600 9.5px/1.25 var(--ui); letter-spacing: .15em; color: var(--gold); text-transform: uppercase; display: flex; align-items: flex-start; gap: 8px; padding-top: 2px; }
#card .k span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#card .k button { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--dim); margin: -5px -5px -5px 0; flex: none; }
#card button:hover { background: rgba(246, 236, 214, .1); color: #fff6e0; }
#card .bd { flex: 1; min-height: 0; overflow: hidden; margin: 8px 0 9px; }
#card .bd.clip { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); }
#card p { font: 600 17.5px/1.3 var(--read); margin: 0; color: #fff6e0; }
#card .art { float: right; width: 38px; height: 38px; margin: 2px 0 4px 10px; }
.art { fill: none; stroke: var(--gold-hi); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.art .fl { fill: var(--gold); fill-opacity: .2; stroke: none; }
#card .f { flex: none; height: 26px; display: flex; align-items: center; gap: 6px; }
#card .dots { display: flex; gap: 5px; align-items: center; }
#card .dots button { width: 7px; height: 7px; border-radius: 4px; background: rgba(246, 236, 214, .28); transition: width .25s, background .25s; }
#card .dots button.on, #card .dots button.on:hover { width: 20px; background: var(--gold); }
#card .mr { margin-left: auto; height: 24px; padding: 0 4px 0 8px; border-radius: 12px; font: 600 11.5px var(--ui); color: var(--gold-hi); display: flex; align-items: center; gap: 2px; }
#card .mr[hidden] { display: flex; visibility: hidden; }
#card .ask { height: 24px; padding: 0 9px 0 7px; border-radius: 12px; border: 1px solid rgba(220, 174, 82, .45); font: 600 11px var(--ui); color: var(--gold-hi); display: flex; align-items: center; gap: 4px; }
#card .ask .ic { font-size: 14px; }
#card .ar { display: flex; gap: 3px; margin-left: 2px; }
#card .ar button { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--cream); border: 1px solid var(--line-soft); }
#chip { position: fixed; z-index: 10; right: var(--pad); top: 126px; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px 0 11px; border-radius: 18px; background: linear-gradient(180deg, rgba(40, 28, 17, .82), rgba(26, 18, 11, .86)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(220, 174, 82, .5); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); font: 500 12.5px var(--ui); color: var(--gold-hi); transform-origin: top right; transition: opacity .25s .1s, transform .35s var(--ease); }
#chip:hover { border-color: var(--gold); color: #fff6e0; }
#chip .ic { font-size: 18px; }
body:is(.facts-open, .no-facts, [data-mode="read"], [data-mode="ask"]) #chip { opacity: 0; transform: scale(.6); pointer-events: none; transition: opacity .15s; }

/* More: a popover over the card on desktop, a bottom sheet on a phone */
#factmore { position: fixed; z-index: 30; right: var(--pad); top: 126px; width: 400px; max-height: calc(100% - 220px); display: flex; flex-direction: column; overflow: hidden; padding: 22px 0 18px;
  border-radius: var(--r); border: 1px solid var(--line); color: var(--cream);
  background: linear-gradient(180deg, rgba(38, 27, 16, .95), rgba(24, 17, 10, .96)); backdrop-filter: blur(22px) saturate(1.1); -webkit-backdrop-filter: blur(22px) saturate(1.1);
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(246, 236, 214, .07);
  opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top right; pointer-events: none; transition: opacity .2s, transform .3s var(--ease); }
body.more-open #factmore { opacity: 1; transform: none; pointer-events: auto; }
#factmore > * { flex: none; margin-left: 24px; margin-right: 24px; }
/* only the reading scrolls: the title stays at the top and Ask about this, the actions and the arrows stay in view at the bottom */
#factmore .tx { flex: 1 1 auto; min-height: 60px; overflow-y: auto; margin: 0; padding: 0 24px; scrollbar-width: thin; scrollbar-color: rgba(220, 174, 82, .4) transparent; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); }
#factmore .tx::after { content: ''; display: block; height: 10px; }
#factmore .x { margin: 0; }
#factmore .hd { display: flex; align-items: center; gap: 14px; padding-right: 30px; }
#factmore .hd .art { width: 54px; height: 54px; flex: none; padding: 6px; border-radius: 50%; background: rgba(220, 174, 82, .1); border: 1px solid rgba(220, 174, 82, .3); }
#factmore .k { font: 600 10px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
#factmore h3 { font: 600 28px/1.1 var(--read); margin: 8px 0 14px; color: #fff6e0; }
#factmore .hd h3 { margin-bottom: 0; }
#factmore .hd + .tx { margin-top: 14px; }
#factmore .tx > :first-child { margin-top: 0; }
#factmore p { font: 500 18px/1.45 var(--read); margin: 0 0 11px; color: rgba(246, 236, 214, .88); }
#factmore .lead { font-weight: 700; color: #fff6e0; }
#factmore .meta { font: 500 11.5px/1.45 var(--ui); color: var(--dim); margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(220, 174, 82, .18); }
#factmore .x { position: absolute; right: 10px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--dim); }
#factmore .x:hover, #factmore .nav button:hover { background: rgba(246, 236, 214, .1); color: #fff6e0; }
#factmore .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
#factmore .acts button { height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(246, 236, 214, .08); border: 1px solid var(--line-soft); color: var(--cream); font: 600 12px var(--ui); display: flex; align-items: center; gap: 7px; }
#factmore .acts button:hover { background: rgba(246, 236, 214, .14); border-color: var(--line); }
#factmore .acts button.ask { background: rgba(220, 174, 82, .22); border-color: rgba(220, 174, 82, .6); color: #fff6e0; }
#factmore .acts button.ask:hover { background: rgba(220, 174, 82, .32); }
#factmore .acts .ic { font-size: 15px; color: var(--gold-hi); }
#factmore .nav { display: flex; gap: 6px; margin-top: 16px; align-items: center; font: 500 11px var(--ui); color: var(--dim); }
#factmore .nav button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--cream); }
#shade { position: fixed; inset: 0; z-index: 29; background: rgba(14, 9, 5, .55); opacity: 0; pointer-events: none; transition: opacity .3s; }

/* ================= subtitle: the verse being read, no box, the spoken word lit ================= */
#sub { position: fixed; z-index: 12; left: calc(50% - var(--colw) / 2); bottom: 64px; transform: translateX(-50%); width: min(920px, 90vw); text-align: center; margin-bottom: 14px; transition: opacity .4s; cursor: ns-resize; touch-action: none; user-select: none; }
body:is([data-mode="read"], [data-mode="ask"]) #sub { opacity: 0; pointer-events: none; }
#subroll { transition: transform .5s var(--ease); will-change: transform; }
#subcur { font: 600 28px/1.28 var(--read); color: #fff6e0; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); text-wrap: balance; transition: opacity .45s; }
#subcur.mid { font-size: 25px; } #subcur.long { font-size: 21px; } #subcur.xlong { font-size: 18px; line-height: 1.3; }
/* the verses either side: one dim line each, like film subtitles with their context */
#sub .ctx { font: 500 18px/1.3 var(--read); color: #fff6e0; opacity: .4; max-width: 84%; margin: 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 10px rgba(0, 0, 0, .65); transition: opacity .45s; cursor: pointer; }
#sub .ctx.empty { visibility: hidden; }
#subprev { margin-bottom: 9px; } #subnext { margin-top: 9px; }
/* the verse number: a small gold old-style numeral in italic Cormorant, then an ordinary space (in the markup) before the text */
#sub .vn { display: inline-block; font: italic 500 .74em/1 var(--read); color: var(--gold-hi); font-variant-numeric: oldstyle-nums proportional-nums; letter-spacing: .02em; vertical-align: .06em; text-shadow: 0 1px 8px rgba(0, 0, 0, .75); }
body.speaking #subcur .w { color: rgba(246, 236, 214, .6); }
body.speaking #subcur .w.s { color: #fff6e0; }
.w.n { color: var(--gold-hi) !important; text-shadow: 0 0 18px rgba(243, 213, 138, .55), 0 2px 16px rgba(0, 0, 0, .55); }

/* ================= player ================= */
#prog { position: fixed; z-index: 13; left: 0; right: var(--colw); bottom: var(--sb); height: 28px; transition: right .6s var(--ease); }
#prog .ln { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(246, 236, 214, .24); pointer-events: none; }
#prog .fl { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #b98a35, var(--gold-hi)); pointer-events: none; }
#prog .tkb { position: absolute; bottom: 0; height: 28px; }
#prog .tkb i { position: absolute; left: calc(50% - .5px); bottom: 3px; width: 1px; height: 6px; background: rgba(246, 236, 214, .45); transition: height .15s; }
#prog .tkb.p i { background: rgba(243, 213, 138, .9); }
#prog .tkb:hover i { height: 12px; background: #fff; }
#prog .tkb .vl { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font: 600 10px/1 var(--ui); color: rgba(246, 236, 214, .45); white-space: nowrap; opacity: 0; pointer-events: none; }
#prog .tkb.lb .vl, #prog .tkb:hover .vl { opacity: 1; }
#prog .tkb:hover .vl { color: #1b140d; background: var(--gold-hi); padding: 4px 7px; border-radius: 6px; bottom: 18px; z-index: 2; }
#prog .kn { position: absolute; bottom: -3px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 3px rgba(243, 213, 138, .28); pointer-events: none; }
#play { position: fixed; z-index: 14; left: var(--pad); bottom: calc(var(--sb) + 32px); width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 6px 18px -4px rgba(220, 174, 82, .55), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .15s; }
#play:active { transform: scale(.94); }
#chnav { position: fixed; z-index: 14; left: calc(50% - var(--colw) / 2); bottom: calc(var(--sb) + 42px); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; font: 600 12.5px/1 var(--ui); white-space: nowrap; transition: left .6s var(--ease); }
#chnav button { height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); color: var(--cream); }
#chnav #c-prev, #chnav #c-next { width: 30px; font-size: 16px; color: rgba(246, 236, 214, .8); }
#c-name { padding: 0 10px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
#chnav button:not(:disabled):hover { background: rgba(246, 236, 214, .14); }
#meta { position: fixed; z-index: 14; right: calc(var(--colw) + var(--pad)); bottom: calc(var(--sb) + 42px); display: flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--ui); color: rgba(246, 236, 214, .75); letter-spacing: .03em; font-variant-numeric: tabular-nums; transition: right .6s var(--ease); }
#more { width: 32px; height: 30px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 22px; color: rgba(246, 236, 214, .85); }
#more:hover, #more.on { background: rgba(246, 236, 214, .14); }
#attrib { position: fixed; z-index: 14; right: calc(var(--colw) + var(--pad)); bottom: calc(var(--sb) + 76px); font: 400 9.5px var(--ui); color: rgba(246, 236, 214, .5); pointer-events: none; }

/* ================= book and chapter picker ================= */
#pick { position: fixed; z-index: 31; left: calc(50% - var(--colw) / 2); bottom: calc(var(--sb) + 80px); width: 380px; height: min(480px, 70%); display: flex; flex-direction: column; background: rgba(26, 18, 11, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 24px 60px -10px rgba(0, 0, 0, .7); opacity: 0; transform: translate(-50%, 8px) scale(.98); pointer-events: none; transition: opacity .2s, transform .3s var(--ease); transform-origin: bottom center; overflow: hidden; }
body.pick-open #pick { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#pick .pt { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid rgba(220, 174, 82, .2); flex: none; }
#pick .pt b { font: 600 24px/1 var(--read); flex: 1; }
#pick .pt button { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-sm); font: 500 12px var(--ui); color: var(--dim); border: 1px solid var(--line-soft); }
#pick .pt button:hover { color: var(--cream); }
#pick .bl { overflow-y: auto; flex: 1; padding: 4px 8px 16px; scrollbar-width: thin; }
#pick .bl h6 { font: 600 9.5px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); padding: 14px 10px 6px; margin: 0; }
#pick .bl button { display: flex; justify-content: space-between; align-items: baseline; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); font: 500 19px/1.2 var(--read); color: rgba(246, 236, 214, .85); }
#pick .bl button:hover { background: rgba(246, 236, 214, .08); }
#pick .bl button.on { color: var(--gold-hi); background: rgba(220, 174, 82, .12); }
#pick .bl button small { font: 500 11px var(--ui); color: var(--dim); }
#pick .gridc { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 7px; padding: 14px 16px; overflow-y: auto; flex: 1; align-content: start; }
#pick .gridc button { position: relative; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); font: 500 14px var(--ui); text-align: center; }
#pick .gridc button:hover { border-color: var(--gold); }
#pick .gridc button.on { background: rgba(220, 174, 82, .25); border-color: var(--gold); color: #fff6e0; }
#pick .gridc button.has::after, #pick .legend i { content: ''; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
#pick .legend { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; font: 500 11px var(--ui); color: var(--dim); border-top: 1px solid rgba(220, 174, 82, .14); }
#pick .legend i { position: static; margin: 0; width: 5px; height: 5px; }

/* ================= Watch: the stage fills the screen; the map lives on in a round inset ================= */
#scene { position: fixed; inset: 0; z-index: 3; overflow: hidden; visibility: hidden; background: #1c120a; clip-path: circle(0 at var(--cx, 50%) var(--cy, 50%)); transition: clip-path .55s cubic-bezier(.6, 0, .8, .4), visibility 0s .55s; }
#scene.open { visibility: visible; clip-path: circle(150vmax at var(--cx, 50%) var(--cy, 50%)); transition: clip-path 1.1s cubic-bezier(.55, 0, .2, 1), visibility 0s; }
#stage { position: absolute; display: block; cursor: pointer; transform: scale(1.1); transition: transform .55s; }
#scene.open #stage { transform: none; transition: transform 1.3s cubic-bezier(.2, .7, .2, 1); }
body.inset #mapwrap { z-index: 6; pointer-events: none; }
body.inset-anim :is(#scrim-top, #scrim-bottom) { z-index: 6; } /* while the map grows from or closes into the inset, the scrims stay over it */
#ring { position: fixed; z-index: 7; border-radius: 50%; border: 1px solid var(--line); box-shadow: 0 0 0 5px rgba(32, 22, 13, .5), 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.inset #ring { opacity: 1; pointer-events: auto; transition: opacity .4s .7s; }
#ring:hover { box-shadow: 0 0 0 5px rgba(32, 22, 13, .5), 0 0 0 7px rgba(243, 213, 138, .55), 0 10px 30px rgba(0, 0, 0, .35); }
#inset-cap { position: fixed; z-index: 7; display: flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--ui); color: #fff6e0; text-shadow: 0 1px 3px rgba(20, 12, 6, .8), 0 0 12px rgba(20, 12, 6, .7); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s; }
#inset-cap .ic { font-size: 13px; color: var(--gold-hi); }
#inset-cap .cm { font: italic 600 14px/1 var(--read); color: var(--gold-hi); }
body.inset #inset-cap { opacity: 1; transition: opacity .4s .75s; }
/* growing back into the map, the ring and its label go at once: the circle itself becomes the map */
body.inset-out #ring, body.inset-out #inset-cap { opacity: 0; pointer-events: none; transition: none; }
body[data-mode="watch"] #scrim-top { height: 190px; }
body[data-mode="watch"] #card { width: 280px; padding: 13px 14px 10px; --card-h: 206px; }
body[data-mode="watch"] #card p { font-size: 16px; }
body[data-mode="watch"] #card .bd { margin: 6px 0 8px; }

/* ================= Read and Ask: one column on desktop ================= */
body:is([data-mode="read"], [data-mode="ask"]) { --colw: min(440px, 46vw); }
#col { position: fixed; z-index: 9; right: 0; top: 0; bottom: 0; width: min(440px, 46vw); background: linear-gradient(to left, rgba(26, 18, 11, .95), rgba(26, 18, 11, .9)); backdrop-filter: blur(24px) saturate(1.1); -webkit-backdrop-filter: blur(24px) saturate(1.1); border-left: 1px solid rgba(220, 174, 82, .2); display: flex; flex-direction: column; overflow: hidden; transform: translateX(102%); transition: transform .6s var(--ease); }
body:is([data-mode="read"], [data-mode="ask"]) #col { transform: none; }
#grab { display: none; }
.pane { display: none; flex-direction: column; flex: 1; min-height: 0; }
body[data-mode="read"] #p-read, body[data-mode="ask"] #p-ask { display: flex; }
.ch { padding: 132px 40px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ch .a { display: block; font: 600 10px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.ch .h { display: flex; align-items: center; gap: 8px; font: 600 40px/1 var(--read); margin-top: 8px; white-space: nowrap; }
.ch .h .ic { font-size: 16px; color: var(--dim); }
.ch em { display: block; font: italic 500 18px/1 var(--read); color: var(--dim); margin-top: 8px; min-height: 18px; }
.ch .ttl { display: block; }
.ch .ttl:hover .h { color: var(--gold-hi); }
.ch .tl button { height: 28px; padding: 0 10px; border-radius: var(--r-sm); font: 500 12px var(--ui); color: var(--dim); border: 1px solid var(--line-soft); }
.ch .tl button:hover { color: var(--cream); background: rgba(246, 236, 214, .1); }
#verses { position: relative; padding: 8px 40px 90px; overflow-y: auto; flex: 1; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 88%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 88%, transparent); }
#verses::-webkit-scrollbar { display: none; }
.vs { position: relative; padding: 9px 0; font: 500 20.5px/1.46 var(--read); color: rgba(246, 236, 214, .82); cursor: pointer; transition: background .3s; }
.vs:hover { color: #fff6e0; }
.vs sup { font: 600 12px var(--ui); color: var(--gold); margin-right: 7px; vertical-align: .45em; line-height: 0; }
.vs.on { margin: 0 -40px; padding: 11px 40px; background: linear-gradient(90deg, rgba(220, 174, 82, .16), rgba(220, 174, 82, .04)); box-shadow: inset 2px 0 0 var(--gold); color: #fff6e0; }
body.speaking .vs.on .w { color: rgba(246, 236, 214, .62); }
body.speaking .vs.on .w.s { color: #fff6e0; }
.vs .eq { position: absolute; right: 16px; top: 16px; display: none; gap: 2px; align-items: flex-end; height: 14px; }
body.playing .vs.on .eq { display: flex; }
.vs .eq i { width: 2.5px; background: var(--gold); border-radius: 1px; height: 6px; animation: eq .9s ease-in-out infinite alternate; }
.vs .eq i:nth-child(2) { animation-delay: .2s; } .vs .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { from { height: 4px; } to { height: 14px; } }
/* facts between the verses (narrow screens) or beside them (wide) */
.pn { display: none; width: 100%; margin: 2px 0 10px; padding: 6px 0 6px 12px; border-left: 1px solid var(--gold); text-align: left; }
.pn b { display: block; font: 600 8.5px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 5px; }
.pn span { font: italic 500 15px/1.32 var(--read); color: var(--cream); }
.pn em { font: 600 11px var(--ui); font-style: normal; color: var(--gold); margin-left: 6px; white-space: nowrap; }
#notes { position: fixed; z-index: 8; inset: 0; pointer-events: none; }
.mn { position: absolute; width: 262px; text-align: right; pointer-events: auto; opacity: 0; transition: opacity .5s, top .3s; }
body:not([data-mode="read"]) .mn, .mn:not(.vis) { pointer-events: none; }
body[data-mode="read"] .mn.vis { opacity: 1; }
.mn .k { display: block; font: 600 9px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 6px; }
.mn .p { display: block; font: italic 500 16px/1.32 var(--read); color: var(--cream); }
.mn .mr { display: inline-block; margin-top: 6px; font: 600 10.5px var(--ui); color: var(--gold); letter-spacing: .03em; }
.mn::after { content: ''; position: absolute; right: -36px; top: var(--ly, 5px); width: 30px; height: 1px; background: var(--gold); }
.mn::before { content: ''; position: absolute; right: -39px; top: calc(var(--ly, 5px) - 2.5px); width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.mn .bg { position: absolute; inset: -10px -4px -10px -30px; background: linear-gradient(to left, rgba(28, 19, 11, .62), rgba(28, 19, 11, .5) 70%, rgba(28, 19, 11, 0)); z-index: -1; transition: background .2s; }
.mn:hover .bg { background: linear-gradient(to left, rgba(28, 19, 11, .8), rgba(28, 19, 11, .7) 70%, rgba(28, 19, 11, 0)); }
@media (max-width: 1099px) { #notes { display: none; } .pn { display: block; } }

/* Ask: honest about not being connected yet */
/* Only the messages scroll: the header stays at the top and the suggestions, pinned verse, what the question is about and the
   question box stay at the bottom, each in its own row of the column, so nothing can sit on top of anything else.
   The messages fade out at both ends so a line cut by the edge reads as "more this way", never as text under a box. */
#thread { padding: 14px 40px 16px; flex: 1 1 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 18px; scrollbar-width: none; min-height: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
#thread::-webkit-scrollbar { display: none; }
#thread > * { flex: none; }
#thread > :first-child { margin-top: auto; } /* a short thread sits down by the question box, a long one scrolls */
#p-ask > :not(#thread) { flex: none; }
.me { align-self: flex-end; max-width: 84%; padding: 10px 15px; border-radius: 14px 14px 4px 14px; background: rgba(246, 236, 214, .14); font: 500 13.5px/1.4 var(--ui); overflow-wrap: anywhere; }
.gd p { overflow-wrap: break-word; }
.gd .who { display: flex; align-items: center; gap: 8px; font: 600 10px/1 var(--ui); letter-spacing: .18em; color: var(--gold); text-transform: uppercase; margin-bottom: 9px; }
.gd .who .ic { font-size: 13px; }
.gd p { margin: 0; font: 500 19px/1.4 var(--read); color: var(--dim); }
#sug { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 40px 14px; }
#sug button { min-height: 30px; padding: 6px 13px; border-radius: 15px; border: 1px solid var(--line-soft); font: 500 12px/1.3 var(--ui); color: var(--dim); text-align: left; }
#sug button:hover { border-color: var(--gold); color: var(--cream); }
/* the verse in focus, pinned above the question box, and what an "Ask about this" question is about */
#askv { flex: none; margin: 0 28px 10px; display: flex; align-items: center; gap: 4px; padding: 9px 6px; border-radius: var(--r); background: rgba(246, 236, 214, .05); border: 1px solid rgba(220, 174, 82, .22); }
#askv[hidden], #askctx[hidden] { display: none; }
#askv .st { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--cream); }
#askv .st:not(:disabled):hover { background: rgba(246, 236, 214, .1); }
#askv .vb { flex: 1; min-width: 0; padding: 0 4px; }
#askv .vr { display: flex; align-items: center; gap: 8px; min-height: 22px; }
#askv .vr b { font: 600 9.5px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#askv .av { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 6px; border-radius: 11px; border: 1px solid rgba(220, 174, 82, .45); font: 600 10.5px var(--ui); color: var(--gold-hi); }
#askv .av:hover { background: rgba(220, 174, 82, .18); color: #fff6e0; }
#askv .av .ic { font-size: 13px; }
#askv p { margin: 4px 0 0; font: 500 16px/1.32 var(--read); color: rgba(246, 236, 214, .9); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#askctx { flex: none; margin: 0 28px 8px; display: flex; align-items: flex-start; gap: 7px; font: 500 11.5px/1.4 var(--ui); color: var(--dim); }
#askctx > .ic { font-size: 14px; color: var(--gold); margin-top: 1px; }
#askctx span { flex: 1; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#askctx b { color: var(--gold-hi); font-weight: 600; }
#askctx i { font: italic 500 13.5px/1.3 var(--read); color: var(--cream); }
#askctx button { flex: none; width: 22px; height: 22px; margin-top: -2px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--dim); }
#askctx button:hover { background: rgba(246, 236, 214, .1); color: #fff6e0; }
.me .cx { display: block; margin-bottom: 4px; font: 600 9px/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
#inp { margin: 0 28px 32px; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 7px 0 18px; border-radius: var(--r); background: rgba(246, 236, 214, .08); border: 1px solid var(--line-soft); }
#inp:focus-within { border-color: rgba(220, 174, 82, .7); }
#inp input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: 400 13.5px var(--ui); }
#inp input::placeholder { color: rgba(246, 236, 214, .5); }
#inp .go { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 18px; }

/* ================= History: a colour-coded drawer from the top ================= */
#catch { position: fixed; inset: 0; z-index: 10; display: none; }
body.drawer-open #catch { display: block; }
#drawer { position: fixed; z-index: 11; left: 0; right: 0; top: 0; max-height: 90%; overflow-y: auto; background: rgba(26, 18, 11, .9); backdrop-filter: blur(26px) saturate(1.1); -webkit-backdrop-filter: blur(26px) saturate(1.1); border-bottom: 1px solid var(--line); transform: translateY(-102%); transition: transform .55s var(--ease); padding-bottom: 24px; }
body.drawer-open #drawer { transform: none; }
#drawer .hd { padding-top: 76px; text-align: center; font: 600 10px/1 var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
#drawer .dh { display: none; }
#drawer .cols { margin: 100px var(--pad) 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 20px; }
#drawer .ec { position: relative; padding-top: 14px; }
#drawer .ec::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c); opacity: .75; }
#drawer .ec.on::before { opacity: 1; box-shadow: 0 0 12px var(--c); }
#drawer .ec b { display: block; font: 600 10px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
#drawer .ec small { display: block; margin: 6px 0 10px; font: 500 10.5px/1.2 var(--ui); color: var(--dim); }
#drawer .ec ol { list-style: none; margin: 0; padding: 0; }
#drawer .ec li button { display: block; width: 100%; padding: 5px 0; font: italic 500 16px/1.15 var(--read); color: rgba(246, 236, 214, .7); position: relative; }
#drawer .ec li button:hover { color: #fff; }
#drawer .ec li button em { display: none; }
#drawer .ec li.on button { color: var(--gold-hi); font-weight: 700; padding-left: 14px; }
#drawer .ec li.on button::before { content: ''; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); border-radius: 1px; }
#drawer .gr { display: block; margin: 18px auto 0; width: 40px; height: 12px; background: linear-gradient(rgba(246, 236, 214, .3), rgba(246, 236, 214, .3)) center / 40px 3px no-repeat; }
@media (max-width: 1180px) and (min-width: 701px) { #drawer .cols { grid-template-columns: repeat(5, 1fr); row-gap: 26px; } }

#tip { position: fixed; z-index: 30; pointer-events: none; padding: 8px 12px; border-radius: var(--r-sm); font: 13px/1.4 var(--ui); max-width: 250px; opacity: 0; transition: opacity .15s; }
#tip b { display: block; font: 700 16px var(--read); } #tip span { color: #7a5a34; }
#toast { position: fixed; z-index: 40; left: 50%; bottom: 120px; transform: translate(-50%, 10px); padding: 10px 16px; border-radius: 12px; background: rgba(26, 18, 11, .92); border: 1px solid var(--line); font: 500 12.5px var(--ui); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= phone ================= */
@media (max-width: 700px) {
  :root { --pad: 12px; --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); }
  body:is([data-mode="read"], [data-mode="ask"]) { --colw: 0px; }
  #scrim-top { height: calc(var(--st) + 190px); }
  #scrim-bottom { height: 300px; }
  #ruler { display: none; }
  #brand { left: 12px; top: calc(var(--st) + 14px); }
  #brand svg { width: 26px; height: 26px; }
  #brand b { display: none; }
  #lockup { left: 46px; top: calc(var(--st) + 10px); }
  #lockup > div { max-width: 140px; }
  #lockup .d { font-size: 21px; }
  #lockup .d .chev { display: none; }
  #lockup .d { white-space: nowrap; }
  #lockup .d.q { font-size: 17px; gap: 6px; } /* a qualified date stays on one line beside the mode switch */
  #lockup .d .dq { font-size: 10.5px; margin-top: 3px; }
  #lockup .d .dq .l { display: none; }
  #lockup .d .dq .sh { display: inline; }
  #lockup .s { display: block; font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
  #lockup .s u, #lockup .s b { display: none; }
  #tabs { right: 8px; top: calc(var(--st) + 8px); height: 42px; padding: 3px; gap: 0; border-radius: 13px; }
  .tb { flex-direction: column; gap: 2px; justify-content: center; padding: 0; width: 44px; height: 34px; font-size: 9px; letter-spacing: .02em; border-radius: 9px; }
  .tb .ic { font-size: 16px; }
  #layers, #attrib { display: none; }
  .pop .phone-only { display: block; margin-top: 14px; }
  .pop .phone-only .seg { margin-bottom: 0; }
  #pruler { display: flex; position: fixed; z-index: 13; left: 6px; right: 6px; top: calc(var(--st) + 58px); height: 24px; align-items: center; gap: 2px; }
  #pruler .pa { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: rgba(246, 236, 214, .75); flex: none; }
  #pruler .pa.dis { opacity: .2; pointer-events: none; }
  #pruler .pd { flex: 1; position: relative; display: flex; justify-content: space-between; align-items: center; height: 24px; cursor: pointer; }
  #pruler .pd::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(246, 236, 214, .22); }
  #pruler .pd i { position: relative; width: 5px; height: 5px; border-radius: 50%; opacity: .85; transition: all .3s; }
  #pruler .pd i.c { width: 11px; height: 11px; background: var(--gold) !important; box-shadow: 0 0 0 3px rgba(220, 174, 82, .35); opacity: 1; }
  #card, #chip { right: 12px; top: calc(var(--st) + 94px); }
  #card { width: min(262px, calc(100% - 24px)); padding: 13px 14px 10px; --card-h: 186px; }
  #card p { font-size: 16px; }
  #card .bd { margin: 7px 0 8px; }
  #card .art { width: 32px; height: 32px; margin-left: 8px; }
  #chip { height: 34px; }
  body[data-mode="watch"] #card { width: min(238px, calc(100% - 128px)); --card-h: 175px; }
  body[data-mode="watch"] #card p { font-size: 14.5px; }
  #card .f { gap: 4px; }
  #card .mr { padding: 0 2px 0 6px; }
  /* the narrow Watch card: Ask is just its icon, so the arrows keep their place on the card */
  body[data-mode="watch"] #card .ask { padding: 0 6px; }
  body[data-mode="watch"] #card .ask span { display: none; }
  body[data-mode="watch"] #card .dots { gap: 4px; }
  body[data-mode="watch"] #card .dots button.on { width: 14px; }
  #factmore { top: auto !important; right: 0 !important; bottom: 0; left: 0; width: 100%; max-height: 82%; border-radius: 22px 22px 0 0; padding: 24px 0 calc(var(--sb) + 22px); transform: translateY(40px); transform-origin: bottom center; }
  #factmore > * { margin-left: 22px; margin-right: 22px; } #factmore .tx { padding: 0 22px; }
  #factmore h3 { font-size: 26px; } #factmore p { font-size: 17.5px; }
  #factmore .hd .art { width: 46px; height: 46px; }
  #factmore .acts button { height: 34px; padding: 0 12px; }
  body:is(.more-open, .pick-open) #shade { opacity: 1; pointer-events: auto; }
  #inset-cap { font-size: 10.5px; }
  #sub { left: 50%; width: calc(100% - 40px); bottom: calc(var(--sb) + 112px); }
  #subcur { font-size: 22px; line-height: 1.25; }
  #subcur.mid { font-size: 19.5px; } #subcur.long { font-size: 17px; } #subcur.xlong { font-size: 15px; }
  #sub .ctx { font-size: 14px; max-width: 92%; } #subprev { margin-bottom: 5px; } #subnext { margin-top: 5px; }
  #play { left: 16px; bottom: calc(var(--sb) + 40px); width: 46px; height: 46px; font-size: 20px; }
  #chnav { left: 50%; bottom: calc(var(--sb) + 48px); font-size: 12px; }
  #chnav #c-prev, #chnav #c-next { width: 26px; }
  #c-name { padding: 0 6px; max-width: 150px; }
  #meta { right: 8px; bottom: calc(var(--sb) + 48px); gap: 2px; font-size: 10.5px; }
  #prog { left: 16px; right: 16px; bottom: calc(var(--sb) + 14px); }
  #pop-more { right: 12px; bottom: calc(var(--sb) + 92px); width: min(290px, calc(100% - 24px)); }
  #pick { left: 0; right: 0; bottom: 0; width: auto; height: 74%; border-radius: 22px 22px 0 0; transform: translateY(40px); }
  body.pick-open #pick { transform: none; }
  #pick .legend { padding-bottom: calc(var(--sb) + 16px); }
  /* Read and Ask: a half-height sheet you can drag up to full */
  #col { left: 0; right: 0; width: auto; top: var(--sh, 50%); bottom: 0; border-left: 0; border-radius: 22px 22px 0 0; border-top: 1px solid rgba(220, 174, 82, .22); background: var(--panel); transform: translateY(104%); transition: transform .6s var(--ease), top .4s var(--ease); }
  #col.dragging { transition: transform .6s var(--ease); }
  #grab { display: flex; justify-content: center; align-items: center; height: 26px; flex: none; cursor: grab; touch-action: none; }
  #grab i { width: 40px; height: 4px; border-radius: 2px; background: rgba(246, 236, 214, .35); }
  .ch { padding: 2px 22px 8px; touch-action: none; }
  .ch .h { font-size: 28px; margin-top: 5px; }
  .ch em { display: none; }
  #verses { padding: 4px 22px 130px; }
  .vs { font-size: 18px; line-height: 1.42; padding: 8px 0; }
  .vs.on { margin: 0 -22px; padding: 9px 22px; }
  #thread { padding: 10px 20px 12px; gap: 13px; }
  .gd p { font-size: 17.5px; line-height: 1.36; }
  #sug { padding: 0 14px 10px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #sug button { white-space: nowrap; flex: none; }
  #inp { margin: 0 14px calc(var(--sb) + 106px); height: 46px; }
  #askv { margin: 0 14px 8px; padding: 7px 4px; }
  #askv p { font-size: 15px; margin-top: 2px; }
  #askctx { margin: 0 16px 6px; }
  #p-ask:has(#askctx:not([hidden])) #sug { display: none; } /* a question is ready: the suggestions give way to it */
  body:is([data-mode="read"], [data-mode="ask"]) #scrim-bottom { opacity: 1; height: calc(var(--sb) + 130px); z-index: 10; background: linear-gradient(to top, rgba(26, 18, 11, 1) 62%, rgba(26, 18, 11, 0)); }
  /* Ask on a phone: the sheet's rows (header, messages, suggestions, pinned verse, question box) stack above the player and never
     overlap; the half sheet is a little taller in Ask (app.js) and keeps the pinned verse to one line so the messages keep room */
  body[data-mode="ask"] #scrim-bottom { height: calc(var(--sb) + 98px); background: linear-gradient(to top, rgba(26, 18, 11, 1) 78%, rgba(26, 18, 11, 0)); }
  #p-ask .ch { padding-bottom: 2px; }
  #p-ask .ch .h { font-size: 24px; margin-top: 4px; }
  #thread { min-height: 72px; }
  #col[data-sheet="half"] #askv p { -webkit-line-clamp: 1; }
  /* the on-screen keyboard is up (app.js sets --kb to its height): the sheet stands on it at full height, the player is under it */
  body.kb #col { top: var(--sh-full, 50%); bottom: var(--kb, 0px); transition: none; }
  body.kb #inp { margin-bottom: 10px; }
  body.kb :is(#play, #chnav, #meta, #prog, #scrim-bottom) { visibility: hidden; }
  /* History: one full-height list of every era and its stories */
  #drawer { inset: 0; max-height: none; transform: translateY(104%); padding: 0; z-index: 28; background: rgba(22, 15, 9, .98); border: 0; }
  #drawer .hd, #drawer .gr { display: none; }
  #drawer .dh { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; padding: calc(var(--st) + 16px) 18px 14px; background: linear-gradient(rgba(22, 15, 9, 1) 85%, rgba(22, 15, 9, 0)); }
  #drawer .dh b { display: block; font: 600 28px/1 var(--read); }
  #drawer .dh small { display: block; font: 600 9.5px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-top: 6px; }
  #drawer .dh .x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; }
  #drawer .cols { display: block; margin: 0 20px; padding-bottom: calc(var(--sb) + 40px); }
  #drawer .ec { padding: 18px 0 4px; }
  #drawer .ec::before { display: none; }
  #drawer .ec b { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; }
  #drawer .ec b::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
  #drawer .ec small { display: inline-block; margin: 0 0 4px 10px; }
  #drawer .ec li button { font-size: 21px; padding: 11px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid rgba(246, 236, 214, .08); text-align: left; }
  #drawer .ec li button em { display: block; font: 500 11px var(--ui); font-style: normal; color: var(--dim); white-space: nowrap; }
  #drawer .ec li.on button { font-size: 22px; padding-left: 18px; }
  #drawer .ec li.on button::before { top: 21px; }
  #toast { bottom: calc(var(--sb) + 120px); }
}

/* label placement (map.js): labels that would collide fade out; minor icons near the route shrink or hide */
.cs text { transition: opacity .25s; }
.cs text.lbl-off { opacity: 0 !important; }
.lm .art { transition: transform .25s, opacity .25s; }
.lm.ic-off .art { opacity: 0; pointer-events: none; }
.lm.ic-sm .art { transform: scale(.62); }
.lm.ic-off, .lm.ic-sm:hover { cursor: default; }
/* The round Watch inset: the land and sea (and the old map's hills), the route, the traveller, one dot for the current place
   (its name is #inset-cap) and a few small, faded landmark icons near it for context. No labels at all. */
.inset-dot { display: none; pointer-events: none; }
.inset-dot .dot { fill: #b5392a; stroke: #fff6e0; stroke-width: 2.4; }
.inset-dot .halo { fill: rgba(181, 57, 42, .28); stroke: none; }
.inset-dot .cert-ring { display: none; fill: none; stroke: #fff6e0; stroke-width: 1.6; stroke-dasharray: 3.4 2.8; stroke-opacity: .95; }
.inset-dot:is(.cert-approx, .cert-unknown) .cert-ring { display: inline; }
.inset-dot:is(.cert-approx, .cert-unknown) .halo { fill: rgba(181, 57, 42, .2); }
body.inset #map .inset-dot { display: inline; }
body.inset #map .cs:not(.traveler):not(.inset-dot):not(.hill):not(.lm.in-near) { display: none; }
body.inset #map .inset-dot.hid { display: none; }
body.inset #map .lm.in-near { pointer-events: none; filter: none; }
body.inset #map .lm.in-near text { display: none; }
body.inset #map .lm.in-near .art { opacity: .72; transform: scale(.66); transition: none; }
@media (max-width: 700px) { /* the phone's inset is half the size: smaller icons and hills */
  body.inset #map .lm.in-near .art { transform: scale(.4); }
  body.inset #map[data-z] .hill { opacity: .45; }
  body.inset #map .hill > path { transform: scale(.55); }
}
body.inset[data-style="terrain"] #map .lm.in-near .art { opacity: .85; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .6)); }
body.inset #map[data-z] .hill { display: inline; opacity: .55; } /* the inset is a far zoom, but it shows the hill country it is looking at, faintly */
/* the inset caption sizes to its text and never clips (map.js / app.js cut names over 24 characters with an ellipsis) */
#inset-cap { width: max-content; max-width: calc(100vw - 24px); overflow: visible; }
#inset-cap span { flex: none; overflow: visible; }
#inset-cap .ic { flex: none; }
