@font-face { font-family: "NotoSans"; src: url("/fonts/NotoSans.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "NotoSansThai"; src: url("/fonts/NotoSansThai.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "NotoSansKhmer"; src: url("/fonts/NotoSansKhmer.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "NotoSansLao"; src: url("/fonts/NotoSansLao.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "NotoSansMyanmar"; src: url("/fonts/NotoSansMyanmar.woff2") format("woff2"); font-display: swap; ascent-override: 115%; descent-override: 50%; line-gap-override: 0%; }
:root {
  --bg: #07060a;
  --bg2: #0d0a0d;
  --panel: #130e10;
  --panel2: #1a1214;
  --line: rgba(222, 182, 106, 0.22);
  --line-hi: rgba(240, 206, 136, 0.55);
  --gold: #e3bd72;
  --gold-hi: #f8e2a8;
  --gold-dk: #9c7434;
  --crimson: #c0182f;
  --crimson-hi: #ec3349;
  --crimson-dk: #5e0a16;
  --text: #eee4d3;
  --muted: #b5a690;
  --dim: #8a7d6a;
  --font: "NotoSans", "NotoSansThai", "NotoSansKhmer", "NotoSansLao", "NotoSansMyanmar", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --bar-h: 64px;
  --bar-all: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); /* the bar plus the status bar it stands under (the page draws behind it; viewport-fit=cover) */
  color-scheme: dark;
}
@media (min-width: 761px) { :root { --gutter: 32px; } }
/* NOVA ORIGIN Wiki. The website's tokens and fonts (client/src/site/site.css :root, prepended by build.mjs) with the
   wiki's own pieces: a sidebar on a wide screen, a menu on a phone, cards that wrap, tables that turn into blocks on a
   phone, never a sideways scroll and never a visible inner scrollbar. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); scrollbar-color: #4a3620 var(--bg); scrollbar-width: thin; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(1200px 600px at 70% -10%, rgba(192, 24, 47, 0.13), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(227, 189, 114, 0.07), transparent 60%); }
img { max-width: 100%; height: auto; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
small { color: var(--dim); font-weight: 600; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; padding: 8px 14px; background: var(--panel2); border-radius: 8px; }
.skip:focus { left: 8px; }
.dim { color: var(--muted); }
.mini { margin: 10px 0 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.frame { position: relative; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.06), 0 14px 32px rgba(0, 0, 0, 0.4); }
.frame::before, .frame::after { content: ""; position: absolute; width: 12px; height: 12px; border: 1px solid var(--line-hi); pointer-events: none; }
.frame::before { top: 5px; left: 5px; border-right: 0; border-bottom: 0; border-top-left-radius: 5px; }
.frame::after { bottom: 5px; right: 5px; border-left: 0; border-top: 0; border-bottom-right-radius: 5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; line-height: 1.2; white-space: nowrap; border: 1px solid transparent; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-gold { color: #2a1606; background: linear-gradient(180deg, #fff0c4 0%, #f0c86e 40%, #c58e3a 75%, #8f5d1f 100%); border-color: #ffe2a0; box-shadow: 0 0 0 1px #4a2c0c, 0 6px 18px rgba(232, 170, 70, 0.25); }
.btn-ghost { color: var(--gold-hi); background: rgba(20, 12, 10, 0.55); border-color: var(--line-hi); }
.btn-sm { min-height: 38px; padding: 7px 14px; }

/* ---------- top bar ---------- */
.wb { position: sticky; top: 0; z-index: 50; height: var(--bar-h); background: rgba(8, 6, 9, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(0, 0, 0, 0.45); }
.wb-in { height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 14px; }
.wb-brand img { display: block; width: 84px; height: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8)); }
.wb-wiki { padding: 4px 10px; border: 1px solid var(--line-hi); border-radius: 8px; color: var(--gold-hi); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; }
.wb-wiki:hover { text-decoration: none; background: rgba(227, 189, 114, 0.08); }
.wb-search { position: relative; flex: 1; max-width: 460px; margin-left: 8px; }
.wb-search input, .ws-search input, .filter input, .search-page input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 10px; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, 0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3bd72' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px 50% / 18px no-repeat; color: var(--text); font-size: 15px; }
.wb-search input:focus, .ws-search input:focus, .filter input:focus, .search-page input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 189, 114, 0.18); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(0.8) sepia(1) hue-rotate(5deg); }
.sr-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; padding: 6px; border-radius: 12px; border: 1px solid var(--line-hi); background: #0f0b0d; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7); }
.sr-list a, .sr-res a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--text); min-height: 44px; }
.sr-list a:hover, .sr-list a[aria-selected="true"], .sr-res a:hover { background: rgba(227, 189, 114, 0.1); text-decoration: none; }
.sr-list img, .sr-res img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.sr-list .sr-t, .sr-res .sr-t { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.sr-list .sr-k, .sr-res .sr-k { margin-left: auto; padding-left: 8px; color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.sr-none { padding: 10px; color: var(--muted); }
.wb-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* the language picker (the website's): the current code; a tap opens every language in its own script */
.langs { position: relative; }
.langs summary { list-style: none; display: flex; align-items: center; gap: 6px; min-width: 56px; height: 36px; padding: 0 10px; border: 1px solid var(--line-hi); border-radius: 9px; color: var(--gold-hi); font-size: 13px; font-weight: 700; cursor: pointer; user-select: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.langs[open] summary { background: rgba(60, 34, 18, 0.6); }
.langs-m { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; display: grid; min-width: 210px; padding: 6px; background: #0d0a0d; border: 1px solid var(--line-hi); border-radius: 10px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6); }
.langs-m a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 7px; color: var(--text); font-size: 15px; }
.langs-m a b { min-width: 30px; color: var(--muted); font-size: 12px; }
.langs-m a:hover { text-decoration: none; background: rgba(227, 189, 114, 0.1); }
.langs-m a[aria-current] { background: linear-gradient(180deg, #f0c86e, #b07d32); color: #2a1606; }
.langs-m a[aria-current] b { color: #2a1606; }
@media (max-width: 640px) { .langs-m { position: fixed; top: calc(var(--bar-h) - 4px); right: var(--gutter); } } /* on a phone the list sits under the bar at the screen's edge */
.menu-btn { display: none; width: 44px; height: 40px; border: 1px solid var(--line-hi); border-radius: 9px; background: rgba(20, 12, 10, 0.6); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn i { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--gold-hi); transition: transform 0.2s, opacity 0.2s; }
.nav-open .menu-btn i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .menu-btn i:nth-child(2) { opacity: 0; }
.nav-open .menu-btn i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- layout ---------- */
.wl { max-width: 1400px; margin: 0 auto; padding: 22px var(--gutter) 48px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.ws { position: sticky; top: calc(var(--bar-h) + 16px); }
.ws-search { display: none; position: relative; margin-bottom: 14px; }
.nav-g + .nav-g { margin-top: 16px; }
.nav-h { margin: 0 0 6px 10px; color: var(--crimson-hi); font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ws ul { display: grid; gap: 1px; }
.ws a { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 9px; color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.3; min-height: 34px; }
.ws a img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.ws a:hover { background: rgba(227, 189, 114, 0.08); color: var(--gold-hi); text-decoration: none; }
.ws a[aria-current] { background: linear-gradient(90deg, rgba(192, 24, 47, 0.32), rgba(192, 24, 47, 0.06)); color: var(--gold-hi); box-shadow: inset 2px 0 0 var(--crimson-hi); }
.wm { min-width: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin-bottom: 10px; font-size: 13.5px; color: var(--dim); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--gold-dk); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); overflow-wrap: anywhere; }
.wm > h1 { margin: 0 0 18px; font-size: clamp(26px, 3.4vw, 38px); background: linear-gradient(180deg, #fff5d6 0%, var(--gold-hi) 35%, var(--gold) 70%, #a97a35 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 17px; color: #e6dccb; }
.sec { margin-top: 30px; }
.sec > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 21px; color: var(--gold-hi); }
.sec > h2::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--crimson-hi); box-shadow: 0 0 8px rgba(236, 51, 73, 0.7); flex: none; }
.sec h3 { margin: 18px 0 10px; font-size: 16.5px; color: var(--text); }
.sec h3 small { margin-left: 6px; }
.note { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: rgba(227, 189, 114, 0.07); color: #e9dfcd; font-size: 15px; }
.note.warn { border-color: var(--crimson-hi); background: rgba(192, 24, 47, 0.1); }
.list { display: grid; gap: 6px; margin: 0 0 12px; }
.list li { position: relative; padding-left: 20px; }
.list li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold); }
.steps { counter-reset: st; display: grid; gap: 10px; margin: 0 0 12px; }
.steps > li { counter-increment: st; position: relative; padding: 12px 14px 12px 54px; border: 1px solid var(--line); border-radius: 12px; background: rgba(20, 12, 12, 0.55); }
.steps > li::before { content: counter(st); position: absolute; left: 12px; top: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #f0c86e, #a97a35); color: #2a1606; font-weight: 800; }
.steps > li b:first-child { display: block; color: var(--gold-hi); }

/* ---------- pieces ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.facts > div { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.28); min-width: 0; }
.facts dt { color: var(--dim); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.facts dd { margin: 2px 0 0; color: var(--text); font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0 0 12px; }
.cards-lg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cards-map { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cd { position: relative; height: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(30, 20, 20, 0.8), rgba(14, 10, 12, 0.9)); color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.cd:hover { text-decoration: none; border-color: var(--line-hi); transform: translateY(-1px); }
.cd > img { flex: none; object-fit: contain; width: 56px; height: 56px; }
.cd .cd-map { width: 112px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.cd-b { display: flex; flex-direction: column; min-width: 0; }
.cd-t { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cd-s { color: var(--muted); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.cd .tag { position: absolute; top: 8px; right: 8px; }
.cards-lg .cd { align-items: flex-start; }
.duo { display: flex; flex: none; }
.duo img { width: 72px; height: 96px; object-fit: contain; }
.duo.big img { width: 150px; height: 180px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; border: 1px solid var(--line-hi); color: var(--gold-hi); background: rgba(0, 0, 0, 0.45); }
.tag.boss, .tag.worldboss { color: #ffd0d4; border-color: rgba(236, 51, 73, 0.6); background: rgba(94, 10, 22, 0.75); }
.tag.elite { color: #e9d4ff; border-color: rgba(176, 120, 255, 0.55); background: rgba(46, 18, 76, 0.7); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chips a, .chips span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.32); color: var(--text); font-size: 14px; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
.chips span:not(:has(img)) , .chips a:not(:has(img)) { padding-left: 12px; }
.chips a:hover { border-color: var(--line-hi); text-decoration: none; color: var(--gold-hi); }
.chips img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.chips b { color: var(--gold); }
.ic-row { display: inline-flex; align-items: center; gap: 10px; }
.ic-row img { width: 40px; height: 40px; flex: none; }
.hero-card { display: flex; gap: 18px; align-items: flex-start; padding: 18px; margin-bottom: 8px; }
.hero-card > img, .hero-card > .duo { flex: none; }
.hero-card > div { min-width: 0; flex: 1; }
.mob-big { width: 160px; height: 160px; object-fit: contain; }
.item-big { width: 128px; height: 128px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)); }
.tb { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14.5px; }
.tb th { text-align: left; padding: 9px 12px; background: rgba(227, 189, 114, 0.1); color: var(--gold-hi); font-size: 13px; font-weight: 700; }
.tb td { padding: 9px 12px; border-top: 1px solid rgba(227, 189, 114, 0.12); vertical-align: top; overflow-wrap: break-word; }
.tb tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
.shot { margin: 14px 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45); }
.shot figcaption { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shots .shot { margin: 0; }
.mapview { position: relative; overflow: hidden; padding: 0; max-width: 860px; }
.mapview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; border-radius: 14px; }
.pin { position: absolute; z-index: 1; transform: translate(-50%, -50%); min-width: 22px; height: 22px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.85); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); }
.pin:hover { text-decoration: none; z-index: 2; transform: translate(-50%, -50%) scale(1.15); }
.pin-portal { background: #7b3ff2; }
.pin-npc { background: #0f8fb0; }
.pin-mob { background: #b4141f; }
.pin-boss { background: #e08a12; color: #1b0e00; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin: 12px 0; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.legend b { flex: none; min-width: 22px; height: 22px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; font-size: 11.5px; color: #fff; }
.lg-portal b { background: #7b3ff2; } .lg-npc b { background: #0f8fb0; } .lg-mob b { background: #b4141f; } .lg-boss b { background: #e08a12; color: #1b0e00; }
.legend a, .legend li { overflow-wrap: anywhere; }
.how { padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.how > b { display: block; margin-bottom: 6px; color: var(--gold-hi); }
.how p { margin: 0 0 8px; }
.set { padding: 14px 16px; margin: 0 0 10px; }
.set h3 { margin: 0 0 10px; }
.set p { margin: 0; }
.npc { display: flex; gap: 14px; padding: 14px 16px; margin: 0 0 10px; scroll-margin-top: calc(var(--bar-h) + 16px); }
.npc > img { flex: none; width: 96px; height: 96px; object-fit: contain; }
.npc > div { min-width: 0; flex: 1; }
.npc h3 { margin: 0 0 4px; }
.npc:target { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 189, 114, 0.35); }
.quest { padding: 12px 14px; margin: 0 0 10px; scroll-margin-top: calc(var(--bar-h) + 16px); }
.quest:target { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 189, 114, 0.35); }
.quest h3 { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.quest p { margin: 0 0 6px; }
.quest .q-meta { color: var(--muted); font-size: 13.5px; }
.filter { margin: 0 0 14px; max-width: 420px; }
.hide-f { display: none !important; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.panel { padding: 16px 18px; }
.panel h3 { margin-top: 0; }
.big-num { font-size: 22px; font-weight: 800; color: var(--gold-hi); }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cal .panel p { margin: 0 0 4px; }
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: center; padding: 22px; margin-bottom: 10px; overflow: hidden; }
.home-hero h1 { font-size: clamp(28px, 3.6vw, 42px); background: linear-gradient(180deg, #fff5d6 0%, var(--gold-hi) 35%, var(--gold) 70%, #a97a35 100%); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }
.home-hero .shot { margin: 0; }
.home-hero .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; }
.counts a { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.3); color: var(--text); text-align: center; }
.counts a:hover { text-decoration: none; border-color: var(--line-hi); }
.counts b { font-size: 24px; color: var(--gold-hi); line-height: 1.1; }
.counts span { color: var(--muted); font-size: 13px; }
.guide-cards .cd > img { width: 48px; height: 48px; }
.search-page { max-width: 640px; }
.sr-res { display: grid; gap: 2px; margin-top: 12px; }
#lb { max-width: min(96vw, 1400px); max-height: 94vh; padding: 0; border: 1px solid var(--line-hi); border-radius: 14px; background: #0b0809; color: var(--text); overflow: hidden; }
#lb::backdrop { background: rgba(0, 0, 0, 0.85); }
#lb img { display: block; max-width: 100%; max-height: 86vh; width: auto; height: auto; margin: 0 auto; }
#lb p { margin: 0; padding: 8px 14px; color: var(--muted); font-size: 14px; }
.lb-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 1px solid var(--line-hi); border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: var(--gold-hi); font-size: 24px; cursor: pointer; }

/* ---------- footer ---------- */
.wf { border-top: 1px solid var(--line); background: #060508; }
.wf-in { max-width: 1400px; margin: 0 auto; padding: 26px var(--gutter) 34px; display: grid; gap: 10px; justify-items: center; text-align: center; color: var(--dim); font-size: 13.5px; }
.wf-in img { width: 140px; height: auto; }
.wf ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.wf a { color: var(--muted); }
.wf p { margin: 0; max-width: 720px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) { .wl { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; } }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .wb-search { display: none; }
  .wl { display: block; padding-top: 14px; }
  .ws { position: static; display: none; margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #0c090b; }
  .nav-open .ws { display: block; }
  .ws-search { display: block; }
  .ws ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
  .ws a { min-height: 44px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --bar-h: 58px; }
  body { font-size: 15.5px; }
  .wb-in { gap: 8px; }
  .wb-brand img { width: 70px; }
  .wb-wiki { padding: 3px 8px; font-size: 13px; }
  .wb-end { gap: 6px; }
  .langs summary { min-width: 50px; padding: 0 8px; }
  .btn-sm { padding: 7px 10px; }
  .hero-card { flex-direction: column; align-items: center; text-align: center; padding: 14px; }
  .hero-card .facts { text-align: left; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .cards-lg, .cards-map { grid-template-columns: minmax(0, 1fr); }
  .shots, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .duo.big img { width: 120px; height: 150px; }
  .tb-stack, .tb-stack tbody, .tb-stack tr, .tb-stack td { display: block; width: 100%; }
  .tb-stack { border: 0; border-radius: 0; overflow: visible; }
  .tb-stack thead { display: none; }
  .tb-stack tr { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.28); overflow: hidden; }
  .tb-stack tr:nth-child(even) td { background: transparent; }
  .tb-stack td { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 10px; padding: 7px 12px; border-top: 1px solid rgba(227, 189, 114, 0.1); }
  .tb-stack td:first-child { border-top: 0; background: rgba(227, 189, 114, 0.07) !important; }
  .tb-stack td::before { content: attr(data-l); color: var(--dim); font-size: 12.5px; font-weight: 600; }
  .tb:not(.tb-stack) { table-layout: fixed; }
  .tb:not(.tb-stack) th, .tb:not(.tb-stack) td { padding: 7px 8px; font-size: 13.5px; overflow-wrap: anywhere; }
  .npc { flex-direction: column; }
  .legend { grid-template-columns: minmax(0, 1fr); }
  .pin { min-width: 18px; height: 18px; font-size: 10px; padding: 0 3px; }
}
@media (max-width: 380px) { .wb-wiki { display: none; } }

/* ---------- inside the game (wiki.js adds .in-game when the game's Wiki window frames these pages) ---------- */
html.in-game { --bar-h: 52px; scroll-behavior: auto; }
.in-game .wb-brand, .in-game .langs, .in-game .wb-end > .btn, .in-game .wf, .in-game .skip, .in-game .home-hero .btn-ghost { display: none; }
.in-game .wb-wiki { display: inline-block; }
.in-game .wl { padding-top: 14px; padding-bottom: 24px; }
.in-game .wb-in { gap: 10px; }
