@font-face { font-family: "PF Din Text Cond Pro"; src: url("fonts/1.woff2") format("woff2"); font-weight: 400; font-style: normal; }
@font-face { font-family: "PF Din Text Cond Pro"; src: url("fonts/3.woff2") format("woff2"); font-weight: 400; font-style: italic; }
@font-face { font-family: "PF Din Text Cond Pro"; src: url("fonts/5.woff2") format("woff2"); font-weight: 700; font-style: normal; }

:root {
  --bg: #000;
  --panel: #121110;
  --gold: #9a8866;
  --gold-hi: #c8b07c;
  --cream: #fdf3cf;
  --muted: #a89f86;
  --line: rgba(154, 136, 102, 0.2);
  --map-bg: #0e0e0e;
  --sidebar: 430px;
  --thumb: rgba(154, 136, 102, 0.5);
}
@media (max-width: 1100px) { :root { --sidebar: 370px; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--map-bg); }
body { font-family: "PF Din Text Cond Pro", "Fira Sans Condensed", sans-serif; color: var(--cream); font-size: 18px; }

#map { position: fixed; inset: 0 0 0 var(--sidebar); background: var(--map-bg); }
body.collapsed #map { left: 0; }

#sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar); background: var(--bg); z-index: 3; border-right: 1px solid var(--line); }
#sidebar .inner { height: 100%; overflow-y: auto; padding: 18px 20px 28px; }
/* scrollbars in the map's own colours: thin gold thumb on the black panel */
#sidebar .inner, .maplibregl-popup-content, #search-results { scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; }
#sidebar .inner::-webkit-scrollbar, .maplibregl-popup-content::-webkit-scrollbar { width: 10px; }
#sidebar .inner::-webkit-scrollbar-thumb, .maplibregl-popup-content::-webkit-scrollbar-thumb { background: var(--thumb); border: 3px solid var(--bg); }
#sidebar .inner::-webkit-scrollbar-track, .maplibregl-popup-content::-webkit-scrollbar-track { background: transparent; }
body.collapsed #sidebar { transform: translateX(-100%); }
#collapse, #expand { position: fixed; top: 16px; z-index: 4; width: 30px; height: 44px; background: var(--bg); color: var(--gold); border: 1px solid var(--line); font-size: 24px; cursor: pointer; }
#collapse { left: calc(var(--sidebar) - 1px); }
#expand { left: 0; display: none; }
body.collapsed #collapse { display: none; }
body.collapsed #expand { display: block; }

header { text-align: center; margin: 0 0 14px; }
h1 { margin: 0; line-height: 0; }
h1 img { width: 100%; max-width: 190px; height: auto; }
.eyebrow { margin: 2px 0 0; color: var(--gold); text-transform: uppercase; letter-spacing: 0.22em; font-size: 13px; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; color: var(--muted); font-size: 15px; margin-bottom: 6px; }
select, input[type=search] { width: 100%; background: var(--panel); color: var(--cream); border: 1px solid var(--line); padding: 10px 12px; font: inherit; font-size: 17px; outline: none; }
select:focus, input[type=search]:focus { border-color: var(--gold); }
input[type=search] { margin-bottom: 12px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.tabs button { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 0; cursor: pointer; }
.tabs button.on { color: var(--cream); background: linear-gradient(0deg, rgba(154, 136, 102, 0.22), rgba(154, 136, 102, 0)); }

.qgroup { margin-bottom: 16px; }
.qgroup h2 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.16em; display: flex; justify-content: space-between; }
.qgroup h2 small { color: var(--muted); font-weight: 400; letter-spacing: 0.04em; }
.qrow { display: flex; align-items: center; gap: 10px; padding: 7px 6px; cursor: pointer; font-size: 17px; line-height: 1.2; }
.qrow:hover { background: linear-gradient(90deg, rgba(154, 136, 102, 0.16), rgba(154, 136, 102, 0)); }
.qrow img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.qrow .t { flex: 1; min-width: 0; }
.qrow .lv { color: var(--muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qrow.elsewhere { opacity: 0.6; }

#quest-view .back { background: transparent; border: 1px solid var(--line); color: var(--gold-hi); font: inherit; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 12px; cursor: pointer; margin-bottom: 14px; }
#quest-view h2 { margin: 0; font-size: 24px; line-height: 1.15; }
#quest-view .meta { color: var(--gold); font-size: 15px; text-transform: uppercase; letter-spacing: 0.12em; margin: 6px 0 12px; }
#quest-view .desc { color: var(--muted); font-size: 17px; line-height: 1.4; margin: 0 0 16px; }
#quest-view ol { list-style: none; margin: 0; padding: 0; counter-reset: obj; }
#quest-view li { display: flex; gap: 12px; padding: 9px 6px; font-size: 17px; line-height: 1.25; border-bottom: 1px solid var(--line); }
#quest-view li .n { flex: none; width: 26px; height: 26px; display: grid; place-items: center; background: rgba(154, 136, 102, 0.2); color: var(--cream); font-size: 15px; font-weight: 700; }
#quest-view li.go { cursor: pointer; }
#quest-view li.go:hover { background: linear-gradient(90deg, rgba(154, 136, 102, 0.16), rgba(154, 136, 102, 0)); }
#quest-view li .where { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }

/* absolute, as MapLibre gives every marker: "relative" left each pin in document flow, so each one
   sat lower than the last by the height of the pins before it. A quest step pin is its step number. */
.qpin { position: absolute; min-width: 30px; height: 30px; padding: 0 6px; display: grid; place-items: center; cursor: pointer;
  background: #141412; color: var(--cream); border: 2px solid var(--gold-hi); font-size: 15px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
.qpin.next { background: var(--gold-hi); color: #141412; border-color: var(--cream); }
.qpin.done { opacity: 0.45; }
#quest-view li input { flex: none; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--gold-hi); }
#quest-view li.done .t { color: var(--muted); text-decoration: line-through; }
#quest-view li.next .n { background: var(--gold-hi); color: #141412; }
#quest-view .qpage { display: inline-block; margin: 0 0 14px; color: var(--gold-hi); font-size: 16px; }
#quest-view .qreset { margin-top: 14px; background: transparent; border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: 15px; padding: 6px 12px; cursor: pointer; }

.group { margin-bottom: 12px; }
.group h2 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.16em; display: flex; justify-content: space-between; align-items: baseline; cursor: pointer; }
.group h2 small { color: var(--muted); font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.cat { display: flex; align-items: center; gap: 8px; padding: 2px 6px; cursor: pointer; user-select: none; opacity: 0.88; min-width: 0; min-height: 34px; }
.cat:hover { opacity: 1; background: linear-gradient(90deg, rgba(154, 136, 102, 0.16), rgba(154, 136, 102, 0)); }
.cat.off { opacity: 0.32; }
.cat img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.cat .label { font-size: 16px; line-height: 1.12; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cat .count { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.sub { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 4px 0 6px; }
.sub .cat img { width: 24px; height: 24px; }

#status { color: var(--muted); font-size: 15px; margin-top: 18px; }

#coords:empty { display: none; }
#coords { position: fixed; right: 12px; bottom: 10px; z-index: 2; color: var(--muted); font-size: 15px; background: rgba(20, 20, 18, 0.8); padding: 4px 10px; font-variant-numeric: tabular-nums; pointer-events: none; }

.maplibregl-map { font-family: "PF Din Text Cond Pro", "Fira Sans Condensed", sans-serif; }
.maplibregl-popup-content { background: var(--bg); color: var(--cream); border: 1px solid var(--line); border-radius: 0; padding: 14px 16px; font-family: inherit; font-size: 17px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6); max-width: 380px; max-height: 62vh; overflow-y: auto; }
.maplibregl-popup-tip { border-top-color: var(--bg) !important; border-bottom-color: var(--bg) !important; }
.maplibregl-popup-close-button { color: var(--gold); font-size: 22px; padding: 2px 8px; }
.pop h3 { margin: 0 24px 2px 0; font-size: 21px; font-weight: 700; }
.pop .kind { color: var(--gold); font-size: 15px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 8px; font-size: 16px; }
.pop dt { color: var(--muted); }
.pop dd { margin: 0; }
.pop ul { list-style: none; margin: 4px 0 0; padding: 0; font-size: 16px; }
.pop li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.pop li span:last-child { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pop .section { color: var(--gold); font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; margin: 10px 0 2px; }
.pop .pick { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.pop .herb { display: flex; align-items: center; gap: 10px; }
.pop .herb img { width: 40px; height: 40px; background: rgba(154, 136, 102, 0.12); }

.maplibregl-ctrl-group { background: var(--bg); border-radius: 0; }
.maplibregl-ctrl-group button { filter: invert(0.85) sepia(0.4); }

@media (max-width: 720px) {
  :root { --sidebar: 100vw; }
  body:not(.collapsed) #map { left: 0; }
  #collapse { left: auto; right: 0; }
}

.pop a { color: var(--cream); text-decoration: none; }
.pop a:hover { color: #f6c977; }
.pop a.it { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pop a.it img { width: 26px; height: 26px; object-fit: contain; background: rgba(154, 136, 102, 0.12); flex: none; }
.pop li { align-items: center; }
.pop .more { outline: none; display: block; margin: 2px 0 8px; color: #f6c977; font-size: 16px; }
.maplibregl-popup.hover .maplibregl-popup-content { padding: 10px 12px; pointer-events: none; }
.maplibregl-popup.hover .maplibregl-popup-tip { display: none; }
.hov { display: flex; gap: 10px; align-items: flex-start; }
.hov .pin { width: 34px; height: 34px; object-fit: contain; flex: none; }
.hov b { display: block; font-size: 18px; line-height: 1.15; }
.hov i { display: block; font-style: normal; color: var(--gold); font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.hov p { margin: 5px 0 0; font-size: 16px; color: var(--muted); line-height: 1.3; }
.hov .herb { display: inline-flex; align-items: center; gap: 6px; color: var(--cream); }
.hov .herb img { width: 24px; height: 24px; }
.pop .art, .hov .art { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 0 8px; border: 1px solid var(--line); }
.hov .miss { color: #f6c977; }
.qpin img { width: 40px; height: 40px; }
.qpin { width: 40px; height: 40px; }

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; font-size: 16px; color: var(--muted); }
.tools label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--cream); }
.tools input[type=checkbox] { accent-color: #e2a84b; width: 16px; height: 16px; }
.tools button { background: transparent; border: 1px solid var(--line); color: var(--gold-hi); font: inherit; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px; cursor: pointer; }
.tools button:hover { border-color: var(--gold); }
#found-count { margin-right: auto; font-variant-numeric: tabular-nums; }
.progress { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.progress button { background: transparent; border: 1px solid var(--line); color: var(--gold-hi); font: inherit; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px; cursor: pointer; }
.progress button:hover { border-color: var(--gold); }

/* search: the box filters the map, places with one spot list underneath and fly there on click */
.searchbox input[type=search] { margin-bottom: 8px; }
#search-results { margin: 0 0 12px; border: 1px solid var(--line); background: var(--panel); }
#search-results button { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 7px 10px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--cream); font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
#search-results button:last-child { border-bottom: 0; }
#search-results button:hover { background: rgba(154, 136, 102, 0.14); }
#search-results .t { flex: 1; min-width: 0; }
#search-results .k { color: var(--gold); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
#search-results p { margin: 0; padding: 6px 10px; color: var(--muted); font-size: 15px; }

/* where-to-find picker: the note under it carries the colour of the dots it draws */
.findpick { margin: 0 0 8px; }
.findpick select { font-size: 16px; padding: 8px 10px; }
#find-note { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16px; color: var(--cream); }
#find-note[hidden] { display: none; }
#find-note span { flex: 1; min-width: 0; }
#find-note span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--dot, #e0533a); box-shadow: 0 0 0 1.5px #1c120c; }
#find-note button { background: transparent; border: 1px solid var(--line); color: var(--gold-hi); font: inherit; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; cursor: pointer; }
/* a fishing spot's catch */
.pop ul.fish { margin-top: 8px; }
.pop ul.fish a { display: inline-flex; align-items: center; gap: 8px; }
.pop ul.fish img { width: 24px; height: 24px; object-fit: contain; }

#copy-link { position: fixed; left: calc(var(--sidebar) + 10px); bottom: 10px; z-index: 2; padding: 6px 12px; background: rgba(20, 20, 18, 0.88); border: 1px solid var(--line); color: var(--cream); font: inherit; font-size: 16px; cursor: pointer; }
#copy-link:hover { color: var(--gold-hi); }
body.collapsed #copy-link { left: 10px; }
body.embed #copy-link { display: none; }
.tools .lvl { color: var(--muted); }
.tools .lvl input { width: 64px; background: var(--panel); color: var(--cream); border: 1px solid var(--line); padding: 5px 8px; font: inherit; font-size: 16px; }
#level-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -6px 0 16px; font-size: 15px; color: var(--muted); }
#level-legend span { display: inline-flex; align-items: center; gap: 6px; }
#level-legend i { width: 12px; height: 12px; display: inline-block; opacity: 0.85; }
.maplibregl-popup .acts { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.maplibregl-popup .acts button { background: transparent; border: 1px solid var(--line); color: var(--cream); font: inherit; font-size: 15px; padding: 5px 10px; cursor: pointer; }
.maplibregl-popup .acts button.on { border-color: #e2a84b; color: #f6c977; }
.maplibregl-popup .acts .tp { margin-left: auto; color: var(--gold-hi); font-variant-numeric: tabular-nums; }

/* framed in a quest page: map only, plus a way out to the full viewer */
#open-full { display: none; }
body.embed #sidebar, body.embed #expand, body.embed #collapse, body.embed #coords { display: none; }
body.embed #map { left: 0; }
body.embed #open-full { display: block; position: fixed; left: 10px; bottom: 10px; z-index: 2; padding: 6px 12px; background: rgba(20, 20, 18, 0.88); border: 1px solid var(--line); color: var(--cream); font-size: 16px; text-decoration: none; }
body.embed #open-full:hover { color: var(--gold); }
body.embed .maplibregl-popup-content { max-height: 45vh; }
/* quest pins: a merged pin lists several objective numbers; done pins fade and carry a tick; the
   focused pin turns gold above the rest; the next objective pulses */
.qpin { transition: opacity 0.2s; }
.qpin span { white-space: nowrap; grid-auto-flow: column; }
.qpin.multi span { right: auto; left: 22px; }
.qpin.on img { transform: scale(1.3); filter: drop-shadow(0 0 6px rgba(225, 193, 110, 0.95)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9)); }
.qpin.on span { background: var(--gold); color: #141412; }
.qpin.on { z-index: 3; }
body.focusing .qpin:not(.on) { opacity: 0.45; }
.qpin.done { opacity: 0.55; }
.qpin.done span::before { content: "\2713\00a0"; color: var(--gold-hi); }
.qpin.next::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 2px solid var(--gold-hi); border-radius: 50%; animation: qpulse 1.6s ease-out infinite; pointer-events: none; }
@keyframes qpulse { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qpin.next::after { animation: none; opacity: 0.8; } }

/* selected quest sidebar: link to the quest page, progress, tick boxes */
#quest-view .qpage { display: block; margin: 0 0 12px; color: var(--gold-hi); font-size: 16px; text-decoration: none; }
#quest-view .qpage:hover { text-decoration: underline; }
#quest-view .qprog { position: relative; margin: 0 0 10px; padding-bottom: 8px; color: var(--muted); font-size: 16px; }
#quest-view .qprog::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(154, 136, 102, 0.18); }
#quest-view .qprog i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--gold); z-index: 1; }
#quest-view li input { flex: none; width: 18px; height: 18px; margin: 4px 0 0; accent-color: #e2a84b; cursor: pointer; }
#quest-view li.done > span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(154, 136, 102, 0.6); }
#quest-view li.skipped { opacity: 0.5; }
#quest-view li.next { background: linear-gradient(90deg, rgba(226, 168, 75, 0.16), rgba(226, 168, 75, 0)); }
#quest-view li .tag { display: inline-block; margin-left: 8px; color: var(--gold-hi); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
#quest-view .qreset { margin-top: 12px; background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 16px; cursor: pointer; padding: 0; }
#quest-view .qreset:hover { color: var(--cream); }

/* objective popup with tick boxes, and the jump from a quest marker to its quest */
.pop.qobj .obj { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 16px; line-height: 1.3; }
.pop.qobj .obj input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #e2a84b; }
.pop.qobj .obj .n { flex: none; min-width: 22px; height: 22px; display: grid; place-items: center; background: rgba(154, 136, 102, 0.2); font-size: 14px; font-weight: 700; }
.pop.qobj .obj.done .t { color: var(--muted); text-decoration: line-through; }
.maplibregl-popup .showq { display: block; width: 100%; margin-top: 10px; padding: 7px 10px; background: rgba(226, 168, 75, 0.14); border: 1px solid rgba(226, 168, 75, 0.6); color: var(--cream); font: inherit; font-size: 16px; cursor: pointer; text-align: left; }
.maplibregl-popup .showq:hover { background: rgba(226, 168, 75, 0.26); }
.hov .hint { color: var(--gold-hi); }

/* first-visit hint in the framed map */
#hint { display: none; }
body.embed #hint { display: block; position: fixed; right: 10px; bottom: 10px; z-index: 2; padding: 6px 12px; background: rgba(20, 20, 18, 0.88); border: 1px solid var(--line); color: var(--cream); font-size: 16px; pointer-events: none; transition: opacity 0.4s; }
body.embed #hint.gone { opacity: 0; }

/* marker location hints (wiki descriptions) and the item link under them */
.pop p.desc { margin: 8px 0 0; color: var(--cream); line-height: 1.45; }
.pop a.it { margin-top: 10px; color: #f6c977; }
.field[hidden] { display: none; }
