/* Lore Atlas: night-and-lantern look. Works over a dark theme background. */
:root { --lore-ink: #ece5d6; --lore-dim: #a79f90; --lore-line: #34312c; --lore-panel: #1e2024; --lore-lamp: #e3b866; }
body { --global--color-background: #16181c; }
.lore-atlas { margin: 1.5rem auto 2rem; max-width: 1400px; padding: 0 1rem; color: var(--lore-ink); }
.lore-atlas-bar { display: flex; flex-direction: column; gap: .75rem; margin-bottom: .9rem; }
.lore-filter { display: flex; flex-wrap: wrap; gap: .45rem; }
.lore-f { display: inline-flex; align-items: center; gap: .4rem; background: var(--lore-panel); color: var(--lore-ink); border: 1px solid var(--lore-line); border-radius: 999px; padding: .38rem .8rem; font-size: .9rem; cursor: pointer; line-height: 1.2; }
.lore-f i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--chip, #d8cfc0); display: inline-block; }
.lore-f span { color: var(--lore-dim); font-size: .8rem; }
.lore-f.is-on { border-color: var(--chip, #f2eee6); box-shadow: 0 0 0 1px var(--chip, #f2eee6) inset; }
.lore-f:focus-visible { outline: 2px solid var(--lore-lamp); outline-offset: 2px; }
.lore-filter-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: end; font-size: .85rem; color: var(--lore-dim); }
.lore-filter-row label { display: flex; flex-direction: column; gap: .25rem; }
.lore-filter-row select, .lore-filter-row input { background: var(--lore-panel); color: var(--lore-ink); border: 1px solid var(--lore-line); border-radius: 6px; padding: .4rem .55rem; font-size: .95rem; min-width: 12rem; }
.lore-atlas-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; }
.lore-map { width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--lore-line); background: #16181c; }
.lore-map--single { height: 340px; }
.lore-list { list-style: none; margin: 0; padding: 0; max-height: 72vh; overflow-y: auto; border: 1px solid var(--lore-line); border-radius: 10px; background: var(--lore-panel); }
.lore-list li { margin: 0; border-bottom: 1px solid var(--lore-line); }
.lore-list button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: .8rem 1fr; column-gap: .6rem; width: 100%; padding: .6rem .8rem; cursor: pointer; }
.lore-list button:hover, .lore-list button:focus-visible { background: #26282d; }
.lore-list i { grid-row: span 2; width: .7rem; height: .7rem; border-radius: 50%; margin-top: .35rem; }
.lore-list i.ring { background: transparent !important; box-shadow: 0 0 0 2px #d8cfc0 inset; }
.lore-list strong { font-size: .95rem; color: var(--lore-ink); font-weight: 600; }
.lore-list span { font-size: .8rem; color: var(--lore-dim); }
.lore-empty { padding: 1rem; color: var(--lore-dim); }
.lore-legend-key { font-size: .8rem; color: var(--lore-dim); margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center; }
.lore-legend-key .k { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.k-exact { background: var(--lore-key, #f2eee6); }
.k-approx { border: 2px dashed var(--lore-key, #f2eee6); background: radial-gradient(circle, var(--lore-key, #f2eee6) 0 2px, transparent 2.5px); width: 1rem !important; height: 1rem !important; box-sizing: border-box; }
.k-town { box-shadow: 0 0 0 2px var(--lore-key, #f2eee6) inset; }
.lore-cluster, .lore-map button.lore-cluster, .lore-map button.lore-cluster:hover, .lore-map button.lore-cluster:focus { border: 0 !important; padding: 0 !important; margin: 0 !important; background: transparent !important; box-shadow: none !important; min-width: 0 !important; min-height: 0 !important; width: auto !important; height: auto !important; border-radius: 50% !important; cursor: pointer; display: block; line-height: 0; }
.lore-cluster svg { display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.lore-cluster:focus-visible { outline: 2px solid #f2eee6; outline-offset: 2px; border-radius: 50%; }
.lore-popup .maplibregl-popup-content { background: #22242a; color: var(--lore-ink); border: 1px solid var(--lore-line); border-radius: 8px; padding: .8rem .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.lore-popup .maplibregl-popup-tip { border-top-color: #22242a; border-bottom-color: #22242a; }
.lore-popup .maplibregl-popup-close-button { color: var(--lore-dim); font-size: 1.1rem; }
.lore-pop-t { display: block; font-weight: 700; font-size: 1rem; color: var(--lore-lamp); text-decoration: none; margin-right: 1rem; }
.lore-pop-s { display: block; font-size: .78rem; color: var(--lore-dim); margin: .15rem 0 .4rem; }
.lore-pop p { font-size: .85rem; margin: 0 0 .5rem; line-height: 1.4; }
.lore-pop-more { font-size: .82rem; color: var(--lore-lamp); }
.lore-facts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1.2rem; }
.lore-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; letter-spacing: .03em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--chip); color: var(--chip); }
.lore-chip::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--chip); }
.lore-status-chip { font-size: .78rem; padding: .2rem .6rem; border-radius: 999px; background: #2a2c31; color: var(--lore-ink); cursor: help; }
.lore-where { font-size: .9rem; color: var(--lore-dim); }
.lore-story { font-size: 1.12rem; line-height: 1.7; }
.lore-section { margin-top: 2.2rem; }
.lore-section h2 { font-size: 1.25rem; margin-bottom: .7rem; }
.lore-note { font-size: .85rem; color: var(--lore-dim); margin-top: .5rem; }
.lore-sources { padding-left: 1.1rem; }
.lore-sources li { margin-bottom: .35rem; }
.lore-sources span { color: var(--lore-dim); font-size: .8rem; margin-left: .3rem; }
.lore-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.lore-cards a { display: flex; flex-direction: column; gap: .35rem; padding: .8rem; border: 1px solid var(--lore-line); border-radius: 8px; background: var(--lore-panel); text-decoration: none; color: var(--lore-ink); height: 100%; box-sizing: border-box; }
.lore-cards a:hover { border-color: var(--lore-lamp); }
.lore-cards .lore-chip { align-self: flex-start; }
.lore-cards span { font-size: .8rem; color: var(--lore-dim); }
.lore-tellings { border: 1px dashed var(--lore-line); border-radius: 10px; padding: 1rem 1.2rem; background: rgba(255, 255, 255, .02); }
.lore-tellings h2 { margin-top: 0; }
.lore-being-link { font-style: italic; color: var(--lore-dim); }
@media (max-width: 860px) {
	.lore-atlas-body { grid-template-columns: 1fr; }
	.lore-list { max-height: 42vh; }
	.lore-map--atlas { height: 60vh !important; }
	.lore-filter-row select, .lore-filter-row input { min-width: 0; width: 100%; }
	.lore-filter-row label { flex: 1 1 45%; }
}
/* Theme buttons and fields win on specificity in Twenty Twenty-One; pin ours. */
.lore-atlas button.lore-f { background: var(--lore-panel) !important; color: var(--lore-ink) !important; border: 1px solid var(--lore-line) !important; font-weight: 400; text-decoration: none; }
.lore-atlas button.lore-f.is-on { border-color: var(--chip, #f2eee6) !important; }
.lore-atlas .lore-list button { background: transparent !important; color: var(--lore-ink) !important; border: 0 !important; }
.lore-atlas .lore-list button:hover, .lore-atlas .lore-list button:focus-visible { background: #26282d !important; }
.lore-atlas .lore-filter-row input.lore-q, .lore-atlas .lore-filter-row select { background: var(--lore-panel) !important; color: var(--lore-ink) !important; border: 1px solid var(--lore-line) !important; }
.lore-atlas .lore-filter-row input.lore-q::placeholder { color: var(--lore-dim); }
.lore-popup .maplibregl-popup-close-button { background: transparent !important; color: var(--lore-dim) !important; border: 0 !important; }
/* 0.1.2: popups fully dark; theme link and focus styles must not paint the title white-on-black. */
.lore-popup .maplibregl-popup-content { background: #1e2024 !important; color: var(--lore-ink) !important; }
.lore-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip, .lore-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .lore-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: #1e2024 !important; }
.lore-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .lore-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .lore-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: #1e2024 !important; }
.lore-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: #1e2024 !important; }
.lore-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: #1e2024 !important; }
.lore-popup a.lore-pop-t, .lore-popup a.lore-pop-t:focus, .lore-popup a.lore-pop-t:hover, .lore-popup a.lore-pop-t:visited { color: var(--lore-lamp) !important; background: transparent !important; text-decoration: none !important; outline-offset: 2px; }
.lore-popup a.lore-pop-more, .lore-popup a.lore-pop-more:focus, .lore-popup a.lore-pop-more:hover, .lore-popup a.lore-pop-more:visited { color: var(--lore-lamp) !important; background: transparent !important; }
.lore-popup .lore-pop p { color: var(--lore-ink) !important; }
.lore-popup .lore-pop-s { color: var(--lore-dim) !important; }
.lore-popup .maplibregl-popup-close-button:hover, .lore-popup .maplibregl-popup-close-button:focus { background: transparent !important; color: var(--lore-ink) !important; }
.lore-map--single { height: 380px; }

/* 0.1.3: source strength chips. Thin entries stay on the map, labelled. */
.lore-ev-chip { display: inline-block; font-size: .72rem; padding: .15rem .55rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.62); background: transparent; cursor: help; }
.lore-figs { display: grid; gap: .75rem; margin: 1rem 0 1.25rem; }
.lore-figs--two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lore-fig { margin: 0; }
.lore-fig img { display: block; width: 100%; height: auto; border-radius: 6px; }
.lore-fig figcaption { font-size: .75rem; opacity: .65; margin-top: .3rem; }
/* No theme credit line on the atlas. */
.site-info .powered-by{display:none}
.lore-atlas .lore-f[hidden] { display: none !important; }

/* 0.3.0: location levels, legends listed under the map, record facts. */
.k-group { border: 2px dotted var(--lore-key, #f2eee6); }
.k-list { border-radius: 2px !important; background: transparent; box-shadow: 0 0 0 1px var(--lore-key, #f2eee6) inset; opacity: .7; }
.lore-list li.lore-offmap a { all: unset; box-sizing: border-box; display: grid; grid-template-columns: .8rem 1fr; column-gap: .6rem; width: 100%; padding: .6rem .8rem; cursor: pointer; }
.lore-list li.lore-offmap a:hover, .lore-list li.lore-offmap a:focus-visible { background: #26282d; }
.lore-list i.off { background: transparent !important; border-radius: 2px; box-shadow: 0 0 0 1.5px var(--chip, #d8cfc0) inset; }
.lore-record { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem 1.2rem; margin: 0 0 1.4rem; padding: .8rem 1rem; border: 1px solid var(--lore-line); border-radius: 8px; background: var(--lore-panel); }
.lore-record div { margin: 0; }
.lore-record dt { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--lore-dim); margin: 0; }
.lore-record dd { margin: .1rem 0 0; font-size: .95rem; color: var(--lore-ink); }
.lore-places { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .88rem; color: var(--lore-dim); }
.lore-places strong { color: var(--lore-ink); font-weight: 600; margin-right: .3rem; }

/* 0.3.4 story and field guide */
.lore-tale-head { margin-bottom: 1.2rem; }
.lore-tale-title { font-size: 1.15rem; font-weight: 600; line-height: 1.3; margin: 0 0 .35rem; color: var(--lore-ink); }
.lore-tale-dek { font-style: italic; color: var(--lore-dim); font-size: 1.1rem; margin: 0 0 .4rem; }
.lore-tale-meta { font-size: .8rem; color: var(--lore-dim); margin: 0; }
.lore-tale-toc { border: 1px solid var(--lore-line); border-radius: 8px; background: var(--lore-panel); padding: .7rem 1rem; margin: 0 0 1.6rem; font-size: .92rem; }
.lore-tale-toc ol { margin: 0; padding-left: 1.3rem; columns: 2 14rem; }
.lore-tale-toc a { color: var(--lore-ink); text-decoration: none; }
.lore-tale-toc a:hover { color: var(--lore-lamp); }
.lore-tale-ch { font-size: 1.12rem; line-height: 1.7; color: var(--lore-ink); scroll-margin-top: 5rem; }
.lore-tale-ch p { font-size: inherit; margin: 0 0 1.05em; }
.lore-tale-ch h3, .lore-marks h3 { font-size: 1.1rem; line-height: 1.35; }
.lore-tale-ch h3 { margin: 2.2rem 0 .8rem; }
.lore-tale-n { display: inline-block; min-width: 1.6rem; color: var(--lore-lamp); font-variant-numeric: oldstyle-nums; }
.lore-tale-ch:first-of-type > p:first-of-type::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: .3rem .5rem 0 0; color: var(--lore-lamp); }
.lore-pull { border-left: 3px solid var(--lore-lamp); margin: 1.6rem 0; padding: .2rem 0 .2rem 1.2rem; font-style: italic; font-size: 1.25rem; color: var(--lore-ink); }
.lore-pull p { margin: 0; }
.lore-tale-fig { margin: 1.6rem 0; }
.lore-tale-fig.is-wide { margin-left: -4vw; margin-right: -4vw; }
.lore-tale-fig img { width: 100%; height: auto; border-radius: 8px; display: block; }
.lore-tale-fig figcaption { font-size: .85rem; color: var(--lore-dim); margin-top: .45rem; }
.lore-editorial-note { font-size: .85rem; color: var(--lore-dim); margin: .9rem 0 0; }
.lore-marks { border: 1px solid var(--lore-line); border-radius: 8px; background: var(--lore-panel); padding: .9rem 1.1rem; margin: 0 0 1.6rem; }
.lore-marks h3 { margin: 0 0 .6rem; }
.lore-marks dl { margin: 0; display: grid; gap: .45rem; }
.lore-marks dl div { display: grid; grid-template-columns: 8rem 1fr; gap: .8rem; }
.lore-marks dt { color: var(--lore-dim); font-size: .88rem; }
.lore-marks dd { margin: 0; color: var(--lore-ink); }
.lore-account { margin: 1rem 0; padding: .8rem 1rem; border-left: 3px solid var(--lore-line); background: var(--lore-panel); border-radius: 0 8px 8px 0; }
.lore-account footer { font-size: .82rem; color: var(--lore-dim); margin-top: .4rem; }
@media (max-width: 560px) { .lore-marks dl div { grid-template-columns: 1fr; gap: .1rem; } }
