@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: rgb(24, 22, 20);
  --panel: rgba(24, 22, 20, 0.6);
  --gold: #e2be6e;
  --gold-hi: #f5d68c;
  --cream: #fdf6e4;
  --muted: #b3ab9a;
  --line: rgba(214, 196, 160, 0.2);
  --map-bg: rgb(16, 14, 12);
  --sidebar: 430px;
  --thumb: rgba(202, 172, 84, 0.55);
}
@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; }

/* the sidebar sits on the site's own page background: the game's journal page under a dark wash */
#sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar); background: linear-gradient(rgba(24, 22, 20, 0.62), rgba(24, 22, 20, 0.62)), url(/ui/kit/page-bg.webp) center top / cover no-repeat, rgb(20, 20, 28); z-index: 3; box-shadow: 6px 0 24px rgba(0, 0, 0, 0.45); }
/* the sidebar's edge: a gold rule fading out at both ends */
#sidebar::after { content: ""; position: absolute; top: 0; bottom: 0; right: -2px; width: 4px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(202, 172, 84, 0.75) 12%, rgba(202, 172, 84, 0.75) 88%, transparent); }
#sidebar .inner { height: 100%; overflow-y: auto; padding: 18px 20px 28px; }
/* scrollbars: the game's gold slider on its range (menu.scrollbar), as on the site. Chrome ignores the
   ::-webkit-scrollbar parts once scrollbar-color is set, so the standard properties are for browsers without them. */
@supports not selector(::-webkit-scrollbar) {
  #sidebar .inner, .maplibregl-popup-content, #search-results { scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; }
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track:vertical { border: 1px solid transparent; border-image: url(/ui/kit/scroll-track.webp) 85 32 89 31 fill / 16px 6px 17px 6px stretch; }
::-webkit-scrollbar-thumb:vertical { border: 1px solid transparent; border-image: url(/ui/kit/scroll-thumb.webp) 62 27 62 27 fill / 14px 6px stretch; }
::-webkit-scrollbar-corner { background: transparent; }
body.collapsed #sidebar { transform: translateX(-100%); }
#collapse, #expand { position: fixed; top: 16px; z-index: 4; width: 30px; height: 44px; background: rgb(52, 49, 60); color: var(--gold); border: 1px solid rgba(202, 172, 84, 0.55); 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; }
/* fields: the game's basic widget shape in its dark menu colour; focus takes a gold glow */
select, input[type=search] { width: 100%; background: transparent; color: var(--cream); border: 1px solid transparent; border-image: url(/ui/kit/field.webp) 46 fill / 10px stretch; padding: 10px 12px; font: inherit; font-size: 17px; outline: none; }
select:focus, input[type=search]:focus { filter: drop-shadow(0 0 4px rgba(202, 172, 84, 0.55)); }
select option { background: var(--bg); }
/* tick boxes: the journal's quest-page diamond, open until ticked, then filled gold */
input[type=checkbox] { -webkit-appearance: none; appearance: none; border: 0; border-radius: 0; cursor: pointer; background: url(/ui/kit/tick-off.webp) center / 100% 100% no-repeat; }
input[type=checkbox]:checked { background-image: url(/ui/kit/tick-on.webp); }
input[type=search] { margin-bottom: 12px; }

/* Markers / Quests: the game's top tab bar (gold rule under its navy), the current tab white over tab_highlight */
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 14px; background: url(/ui/kit/rule.webp) 0 100% / 100% 2px no-repeat, rgba(24, 22, 30, 0.8); }
.tabs button { background: transparent; border: 0; color: rgba(192, 205, 213, 0.67); font: inherit; font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 0; cursor: pointer; }
.tabs button.on { color: #fff; background: url(/ui/kit/tab-glow.webp) center bottom / 80% 100% no-repeat; }

.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: url(/ui/kit/row-on.webp) left center / 100% 100% no-repeat; }
.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: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 14px; 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); }
/* step numbers in the journal's quest-page diamond, the next one filled gold */
#quest-view li .n { flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: url(/ui/kit/tick-off.webp) center / 100% 100% no-repeat; color: var(--gold-hi); font-size: 14px; font-weight: 700; }
#quest-view li.go { cursor: pointer; }
#quest-view li.go:hover { background: url(/ui/kit/row-on.webp) left center / 100% 100% no-repeat; }
#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; }
#quest-view li.done .t { color: var(--muted); text-decoration: line-through; }
#quest-view li.next .n { background-image: url(/ui/kit/tick-on.webp); color: var(--bg); }
#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: url(/ui/kit/row-on.webp) left center / 100% 100% no-repeat; }
.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(30, 28, 36, 0.85); 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-image: linear-gradient(180deg, rgb(44, 41, 38), var(--bg)); color: var(--cream); border: solid transparent; border-width: 18px 5px 1px 5px; border-image: url(/ui/kit/frame-panel.webp) 96 14 72 14 / 24px 8px 18px 8px stretch; background-clip: padding-box; 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: rgb(52, 49, 60) !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(202, 172, 84, 0.12); }

.maplibregl-ctrl-group { background: rgb(52, 49, 60); 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: #f5c558; }
.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(202, 172, 84, 0.12); flex: none; }
.pop li { align-items: center; }
.pop .more { outline: none; display: block; margin: 2px 0 8px; color: #f5c558; 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: #f5c558; }
.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] { width: 18px; height: 18px; }
.tools button { background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; cursor: pointer; }
.tools button:hover { filter: brightness(1.15); }
#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: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; cursor: pointer; }
.progress button:hover { filter: brightness(1.15); }

/* 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: solid transparent; border-width: 18px 5px 1px 5px; border-image: url(/ui/kit/frame-panel.webp) 96 14 72 14 / 24px 8px 18px 8px stretch; background-clip: padding-box; background-color: 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: url(/ui/kit/row-on.webp) left center / 100% 100% no-repeat; }
#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; }

/* find layers: the legend of what is on (each line in its dots' colour, with a way off), the highlighted ore block,
   and the creature and item toggles under their own filter box */
#find-note { margin: 0 0 14px; border: solid transparent; border-width: 18px 5px 1px 5px; border-image: url(/ui/kit/frame-panel.webp) 96 14 72 14 / 24px 8px 18px 8px stretch; background-clip: padding-box; background-color: var(--panel); }
#find-note[hidden] { display: none; }
#find-note > div { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 16px; color: var(--cream); border-bottom: 1px solid var(--line); }
#find-note > div:last-child { border-bottom: 0; }
#find-note span { flex: 1; min-width: 0; }
#find-note span:not(.plain)::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 span.plain { color: var(--muted); }
#find-note button { background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 12px; cursor: pointer; }
#find-note button:hover { filter: brightness(1.15); }

#ores { margin: 0 0 14px; padding: 10px 10px 8px; border: solid transparent; border-width: 18px 5px 1px 5px; border-image: url(/ui/kit/frame-panel.webp) 96 14 72 14 / 24px 8px 18px 8px stretch; background-clip: padding-box; background-color: var(--panel); }
#ores[hidden] { display: none; }
#ores h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #f5c558; text-transform: uppercase; letter-spacing: 0.16em; display: flex; justify-content: space-between; align-items: baseline; }
#ores h2 small { color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
#ores .surf { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 16px; color: var(--cream); cursor: pointer; }
#ores .surf input { width: 18px; height: 18px; }
#ores .cat::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1.5px #1c120c; }

#finders { margin: 0 0 14px; }
#finders input[type=search] { margin-bottom: 8px; }
.fgroup h2 { cursor: pointer; }
.fgroup h2 span::before { content: "\203A"; display: inline-block; width: 14px; transition: transform 0.15s; }
.fgroup.open h2 span::before { transform: rotate(90deg); }
.fgroup h3 { margin: 8px 0 2px; font-size: 14px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
#finder-groups .none { margin: 0 0 8px; color: var(--muted); font-size: 16px; }
/* 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 14px; background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 16px; cursor: pointer; }
#copy-link:hover { filter: brightness(1.15); }
body.collapsed #copy-link { left: 10px; }
body.embed #copy-link { display: none; }
.tools .lvl { color: var(--muted); }
.tools .lvl input { width: 64px; background: transparent; color: var(--cream); border: 1px solid transparent; border-image: url(/ui/kit/field.webp) 46 fill / 10px stretch; 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: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 15px; padding: 5px 12px; cursor: pointer; }
.maplibregl-popup .acts button.on { border-image-source: url(/ui/kit/cta.webp); border-image-slice: 16 fill; border-image-width: 8px; color: #2a2212; }
.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 14px; background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font-size: 16px; text-decoration: none; }
body.embed #open-full:hover { filter: brightness(1.15); }
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(202, 172, 84, 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; cursor: pointer; }
#quest-view li.done > span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(202, 172, 84, 0.6); }
#quest-view li.skipped { opacity: 0.5; }
#quest-view li.next { background: url(/ui/kit/row-on.webp) left center / 100% 100% no-repeat; }
#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; }
.pop.qobj .obj .n { flex: none; min-width: 22px; height: 22px; display: grid; place-items: center; background: rgba(202, 172, 84, 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 14px; background: none; border: 1px solid transparent; border-image: url(/ui/kit/cta.webp) 16 fill / 8px stretch; color: #2a2212; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 16px; cursor: pointer; text-align: left; }
.maplibregl-popup .showq:hover { filter: brightness(1.15); }
.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(30, 28, 36, 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: #f5c558; }
.field[hidden] { display: none; }

/* #pin=u,v: one spot a page points at, a bright diamond over the marker icons */
.spot-pin { width: 30px; height: 30px; pointer-events: none; z-index: 2; }
.spot-pin span { display: block; width: 20px; height: 20px; margin: 5px; transform: rotate(45deg); background: #ffd27a; border: 3px solid #141412;
  box-shadow: 0 0 0 2px #ffd27a, 0 0 22px 8px rgba(255, 196, 92, 0.85), 0 2px 8px rgba(0, 0, 0, 0.9); }
/* an ore or creature toggle that is off still reads as a choice, not as a disabled marker category; one that is on
   is lit */
#ores .cat.off, .fgroup .cat.off { opacity: 0.78; }
#ores .cat:not(.off), .fgroup .cat:not(.off) { opacity: 1; background: url(/ui/kit/row-on.webp) left center / 100% 100% no-repeat; }
#ores .more { display: block; width: 100%; margin: 6px 0 2px; padding: 4px 6px; background: transparent; border: 0; border-top: 1px solid var(--line); color: var(--gold-hi); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
#ores .more::before { content: "\203A"; display: inline-block; width: 14px; transition: transform 0.15s; }
#ores .more.open::before { transform: rotate(90deg); }
#ores .more:hover { color: var(--cream); }
/* a phone's half-width column has no room for the ore's picture beside its colour dot and name */
@media (max-width: 720px) { #ores .cat img { display: none; } }

/* ---- 3D view (map3d.js) ------------------------------------------------------------------------ */
#map3d { position: fixed; inset: 0 0 0 var(--sidebar); display: none; background: var(--map-bg); overflow: hidden; }
body.collapsed #map3d, body.embed #map3d { left: 0; }
body.mode-3d #map3d { display: block; }
body.mode-3d #map { visibility: hidden; }
body.mode-3d #coords { display: none; }
#view-toggle { position: fixed; right: 54px; top: 10px; z-index: 3; min-width: 64px; padding: 6px 14px; background: none; border: 1px solid transparent;
  border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 16px; cursor: pointer; }
#view-toggle[aria-pressed="true"] { right: 10px; border-image-source: url(/ui/kit/cta.webp); }
#view-toggle:hover { filter: brightness(1.15); }
#view-toggle:disabled { opacity: .7; cursor: progress; }
body.embed #view-toggle, body.embed #m3d-opts { display: none; }
#m3d-opts { position: fixed; right: 10px; top: 56px; z-index: 3; display: none; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 12px; color: var(--cream);
  background: rgba(30, 28, 36, 0.85); font-size: 15px; }
#m3d-opts label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
#m3d-opts .row { display: flex; gap: 6px; }
#freecam, #keys-toggle { flex: 1; padding: 5px 12px; background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch;
  color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer; }
#freecam[aria-pressed="true"], #keys-toggle[aria-expanded="true"] { border-image-source: url(/ui/kit/cta.webp); }
#freecam:hover, #keys-toggle:hover { filter: brightness(1.15); }
/* the controls of whichever camera is on; a touch screen has no keys and a mouse no pinch */
#m3d-keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 2px 0 0; font-size: 14px; line-height: 1.4; }
#m3d-keys dt { color: #fff1ba; white-space: nowrap; }
#m3d-keys dd { margin: 0; }
#m3d-keys[hidden], #m3d-keys .t, #m3d-opts:not(.free) .fly, #m3d-opts.free .map { display: none; }
@media (pointer: coarse) {
  #m3d-keys .k, #m3d-opts:not(.free) #m3d-keys, #m3d-opts:not(.free) #keys-toggle { display: none; }
  #m3d-opts.free #m3d-keys:not([hidden]) .t { display: block; }
}
body.mode-3d #m3d-opts { display: flex; }
body.mode-3d .maplibregl-ctrl-top-right { display: none; }
#hint .h3d, body.mode-3d #hint .h2d { display: none; }
body.mode-3d #hint .h3d { display: inline; }
.m3d-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.m3d-overlay > * { position: absolute; left: 0; top: 0; }
.m3d-overlay .qpin, .m3d-overlay .m3d-popup .maplibregl-popup-content { pointer-events: auto; }
.m3d-label { pointer-events: none; }
.m3d-popup { max-width: 380px; }
.m3d-hover { max-width: 320px; }
@media (max-width: 720px) {
  body:not(.collapsed) #map3d { left: 0; }
  /* the open sidebar covers the map on a phone; the map's own buttons wait until it is closed */
  body:not(.collapsed) #view-toggle, body:not(.collapsed) #m3d-opts { display: none; }
}
.m3d-note { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); margin: 0; padding: 8px 14px; background: rgba(30, 28, 36, 0.9); color: var(--cream); font-size: 15px; line-height: 1.4; pointer-events: none; }

/* ---- save import, every enemy, container level: framed blocks like the ore block ---------------------------- */
#save, #enemy-layer, #loot-level { margin: 0 0 14px; padding: 10px 10px 10px; border: solid transparent; border-width: 18px 5px 1px 5px; border-image: url(/ui/kit/frame-panel.webp) 96 14 72 14 / 24px 8px 18px 8px stretch; background-clip: padding-box; background-color: var(--panel); }
#save[hidden], #enemy-layer[hidden], #loot-level[hidden] { display: none; }
#save h2, #enemy-layer h2, #loot-level summary { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #f5c558; text-transform: uppercase; letter-spacing: 0.16em; cursor: default; }
#loot-level summary { display: flex; justify-content: space-between; align-items: baseline; margin: 0; cursor: pointer; list-style: none; }
#loot-level summary::-webkit-details-marker { display: none; }
#loot-level summary span::before { content: "\203A"; display: inline-block; width: 14px; transition: transform 0.15s; }
#loot-level[open] summary span::before { transform: rotate(90deg); }
#loot-level summary small { color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
#save .note { margin: 0 0 10px; color: var(--muted); font-size: 16px; line-height: 1.35; }
#save .note b { color: var(--cream); font-weight: 400; }
#save .row { display: flex; flex-wrap: wrap; gap: 8px; }
#save .row button { background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; cursor: pointer; }
#save .row button[aria-pressed="true"] { border-image-source: url(/ui/kit/cta.webp); border-image-slice: 16 fill; border-image-width: 8px; color: #2a2212; }
#save .row button:hover { filter: brightness(1.15); }
#save .howto { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
#save .howto summary { cursor: pointer; color: var(--gold-hi); }
#save .howto p { margin: 6px 0 0; line-height: 1.4; }
#save code { font-family: inherit; color: var(--cream); overflow-wrap: anywhere; }
#save .err { color: #f08a70; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; color: var(--cream); cursor: pointer; }
.check input { width: 18px; height: 18px; }

/* level range: two thumbs on one track */
.range { margin: 8px 0 0; }
.range[hidden] { display: none; }
.range .vals { display: flex; align-items: baseline; gap: 6px; font-size: 16px; font-variant-numeric: tabular-nums; }
.range .vals .hi { color: var(--muted); }
.range .reset { margin-left: auto; background: none; border: 0; color: var(--gold-hi); font: inherit; font-size: 15px; cursor: pointer; padding: 0; }
.range .reset[hidden] { display: none; }
.range .track { position: relative; height: 26px; margin-top: 4px; }
.range .track::before { content: ""; position: absolute; left: 8px; right: 8px; top: 11px; height: 4px; background: rgba(202, 172, 84, 0.3); }
.range input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; background: url(/ui/kit/tick-on.webp) center / 100% 100% no-repeat; border: 0; cursor: pointer; }
.range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; background: url(/ui/kit/tick-on.webp) center / 100% 100% no-repeat; border: 0; border-radius: 0; cursor: pointer; }
.range input[type=range]::-moz-range-track { background: transparent; }

/* a category with found markers: a thin gold bar of how many */
.cat.prog { position: relative; }
.cat.prog::after { content: ""; position: absolute; left: 40px; right: 6px; bottom: 1px; height: 2px; background: linear-gradient(90deg, var(--gold) var(--done), rgba(202, 172, 84, 0.18) var(--done)); }

/* popups: level and position, narration, container loot */
.pop dl.where { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pop .vo { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; }
.pop .vo span { color: var(--gold); font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; }
.pop .vo audio { width: 100%; height: 36px; }
.pop .loot ul { margin-top: 2px; }
.pop .loot li a.it { margin-top: 0; }
.pop .loot a.it { color: var(--cream); }
.pop .loot a.it:hover { color: #f5c558; }
.pop .loot .pool { margin-top: 8px; }
.pop .loot .pool summary { cursor: pointer; color: var(--gold-hi); font-size: 16px; }
.pop .loot .pool .sub { display: block; padding: 8px 0 0; color: var(--gold); font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; }
.pop .loot .pool .sub small { color: var(--muted); font-size: 14px; letter-spacing: 0; }
.maplibregl-popup .acts { flex-wrap: wrap; }

/* ---- 3D settings panel, walk mode ------------------------------------------------------------------------- */
#walk, #m3d-more { flex: 1; padding: 5px 12px; background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch;
  color: #fff1ba; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer; }
#walk[aria-pressed="true"], #m3d-more[aria-expanded="true"] { border-image-source: url(/ui/kit/cta.webp); }
#walk:hover, #m3d-more:hover { filter: brightness(1.15); }
#m3d-opts { width: 250px; max-height: calc(100vh - 80px); overflow-y: auto; }
#m3d-settings { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 2px; border-top: 1px solid var(--line); }
#m3d-settings[hidden] { display: none; }
#m3d-settings label { display: flex; align-items: center; gap: 8px; }
#m3d-settings label[hidden] { display: none; }
#m3d-settings input[type=checkbox] { width: 18px; height: 18px; flex: none; }
#m3d-settings .slider { flex-direction: column; align-items: stretch; gap: 2px; }
#m3d-settings .slider span { color: var(--muted); font-size: 14px; }
#m3d-settings input[type=range] { width: 100%; accent-color: var(--gold); }
#m3d-settings .seg { display: flex; align-items: center; gap: 6px; }
#m3d-settings .seg span { color: var(--muted); font-size: 14px; margin-right: auto; }
#m3d-settings .seg button { padding: 3px 12px; background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; font: inherit; font-size: 14px; cursor: pointer; }
#m3d-settings .seg button[aria-pressed="true"] { border-image-source: url(/ui/kit/cta.webp); border-image-slice: 16 fill; border-image-width: 8px; color: #2a2212; }
#m3d-opts:not(.walking) .walk, #m3d-opts.walking .map, #m3d-opts.walking .fly { display: none; }
@media (pointer: coarse) {
  #m3d-opts.walking #m3d-keys:not([hidden]) .walk.t { display: block; }
}
.pop p.under { margin: 10px 0 0; color: #f5c558; font-size: 16px; line-height: 1.35; }

/* walking: the crosshair, a first-time tip, and on touch screens the stick and the jump and fly buttons */
#walk-hud { position: fixed; inset: 0 0 0 var(--sidebar); pointer-events: none; z-index: 2; }
body.collapsed #walk-hud { left: 0; }
#walk-hud[hidden] { display: none; }
#walk-hud .aim { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid rgba(255, 241, 186, 0.85); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
#walk-hud .tip { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; padding: 8px 14px; max-width: min(560px, calc(100% - 32px)); background: rgba(30, 28, 36, 0.88); color: var(--cream); font-size: 15px; line-height: 1.4; text-align: center; }
@media (pointer: coarse) { #walk-hud .tip { display: none; } }
.walk-pad { position: absolute; left: 0; top: 0; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255, 241, 186, 0.5); background: rgba(30, 28, 36, 0.35); pointer-events: none; display: none; z-index: 2; }
.walk-pad.on { display: block; }
.walk-pad .knob { position: absolute; left: 36px; top: 36px; width: 48px; height: 48px; border-radius: 50%; background: rgba(245, 197, 88, 0.75); }
.walk-buttons { position: absolute; right: 14px; bottom: 18px; display: none; flex-direction: column; gap: 10px; z-index: 2; }
@media (pointer: coarse) { .walk-buttons.on { display: flex; } }
.walk-buttons button { min-width: 76px; padding: 12px 14px; background: none; border: 1px solid transparent; border-image: url(/ui/kit/button.webp) 41 63 41 66 fill / 50% 14px stretch; color: #fff1ba; font: inherit; font-size: 17px; touch-action: none; }
.walk-buttons button[hidden] { display: none; }

/* quest spots: an NPC or objective area, a gold ring beside the numbered steps */
.qpin.place { min-width: 22px; height: 22px; padding: 0; font-size: 12px; background: rgba(28, 18, 12, 0.92); color: #e2be6e; border: 2px solid #e2be6e; border-radius: 50%; }
h3.qplaces { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); }
ul.qplaces { list-style: none; margin: 0; padding: 0; }
ul.qplaces li { padding: 5px 0; border-top: 1px solid var(--line); cursor: pointer; }
ul.qplaces li:hover { color: var(--gold-hi); }
ul.qplaces li small { color: var(--muted); margin-left: 6px; }
