/* Xyra game database (Server/WikiDb): fonts and the reset. The design itself lives in production.css, which the build appends. */
@font-face { font-family: "Xiah Web Display"; src: url("fonts/cinzel-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Xiah Web Sans"; src: url("fonts/source-sans-3-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Xiah Web Sans"; src: url("fonts/source-sans-3-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Xiah Web Sans"; src: url("fonts/source-sans-3-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; }
img, svg { max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin-block-start: 0; }
button, input, select { font: inherit; color: inherit; }

/* Xyra Game Database: "The Reference". Dark gothic charcoal, antique gold, bronze and a little crimson.
   One stylesheet for every page type; assets/site.css only supplies the fonts and the reset. */
:root {
  color-scheme: dark;
  --bg: #0e0d0b;
  --bg-2: #141311;
  --surface: #1a1815;
  --surface-2: #211e19;
  --surface-3: #2a261f;
  --line: #2e2922;
  --line-2: #433c30;
  --bronze: #8e7956;
  --bronze-2: #b39a6b;
  --gold: #d6b373;
  --gold-hi: #f2d9a3;
  --gold-deep: #8c6a2e;
  --crimson: #b83a3a;
  --crimson-hi: #e8706b;
  --text: #efe9de;
  --text-2: #cbc2b2;
  --muted: #a8a090;
  --good: #96cb84;
  --blue: #86b7ea;
  --purple: #c8a2f2;
  --orange: #f2a965;
  --red: #f08a80;
  --font-body: "Xiah Web Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Xiah Web Display", Georgia, serif;
  --wrap: 1360px;
  --gutter: 28px;
  --infobox: 344px;
  /* Compatibility aliases for markup and tests that still use the earlier names. */
  --card: var(--surface);
  --border: var(--line-2);
  --accent: var(--gold);
  --accent-hover: var(--gold-hi);
}

html { scroll-padding-top: 20px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  background: var(--bg);
  background-image: radial-gradient(1200px 420px at 50% -80px, rgb(140 106 46 / 14%), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
button, select, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: .02em; color: var(--text); }
b, strong { font-weight: 600; color: var(--text); }
p { margin-bottom: 1rem; }
.muted { color: var(--muted); }
.lead { max-width: 68ch; margin: 10px 0 0; color: var(--text-2); font-size: 1.12rem; line-height: 1.55; }
.note { color: var(--text-2); font-size: .95rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--gold); color: #1b1408; font-weight: 700; border-radius: 3px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.glyph { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.glyph-s { width: 16px; height: 16px; }

/* ---- Header ------------------------------------------------------------------------------------------------ */
.site-header { background: linear-gradient(180deg, #181612, #12110e); border-bottom: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgb(214 179 115 / 14%); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 76px; padding-block: 10px; }
.brand { flex: none; display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.brand img { display: block; flex: none; width: 128px; height: auto; padding: 0; object-fit: contain; background: transparent; border: 0; border-radius: 0; filter: drop-shadow(0 0 1px rgba(255, 232, 200, .85)) drop-shadow(0 0 10px rgba(231, 183, 138, .28)); }
.brand-logo { display: block; width: 240px; max-width: 100%; }
.brand-logo svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 1px rgba(255, 232, 200, .85)) drop-shadow(0 0 10px rgba(231, 183, 138, .28)); }
.brand-text { display: flex; flex-direction: column; gap: 4px; padding-left: 14px; border-left: 1px solid var(--bronze); line-height: 1.15; white-space: nowrap; }
.brand-name { font: 600 16px/1.2 var(--font-display); letter-spacing: .14em; color: var(--gold-hi); }
.brand-sub { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.header-row .brand-name { font-size: 13px; }
.header-row .brand-sub { font-size: 11px; }
.ext { flex: none; font-size: 15px; }
.play-link { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid var(--bronze); border-radius: 3px; color: var(--gold-hi); font-weight: 600; line-height: 1.25; text-decoration: none; white-space: nowrap; }
.play-link:hover { border-color: var(--gold); background: rgb(214 179 115 / 11%); }
.header-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--bronze); border-radius: 3px; background: var(--surface); color: var(--gold-hi); line-height: 1; }
.main-nav { border-top: 1px solid var(--line); background: rgb(0 0 0 / 22%); }
.main-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav li { flex: 1; }
.main-nav a { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 600; font-size: 15px; line-height: 1.25; text-decoration: none; white-space: nowrap; }
.main-nav a .glyph { color: var(--bronze-2); }
.main-nav a:hover { background: rgb(214 179 115 / 7%); color: var(--text); }
.main-nav .is-section a, .main-nav a[aria-current="page"] { border-bottom-color: var(--crimson); color: var(--gold-hi); }
.main-nav .is-section a .glyph { color: var(--gold); }
.nav-play { display: none; }

/* ---- Search (header, home, search page) ------------------------------------------------------------------- */
.search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 52px; margin: 0; padding: 3px 3px 3px 14px; border: 1px solid var(--line-2); border-radius: 3px; background: #11100e; }
.search input {
  flex: 1; width: 0; min-width: 0; min-height: 44px; padding: 8px 0; border: 0;
  background: transparent; color: var(--text); font-size: 16px; line-height: 24px;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search:focus-within { border-color: var(--gold); outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.search input:focus { outline: none; }
.search-glyph { color: var(--bronze-2); pointer-events: none; }
.search > button {
  flex: none; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 2px;
  background: var(--gold); color: #1b1408; font-weight: 700; font-size: 14px; line-height: 20px;
}
.search > button:hover { background: var(--gold-hi); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none;
  background: var(--surface-2); border: 1px solid var(--bronze); border-radius: 4px; box-shadow: 0 22px 50px rgb(0 0 0 / 65%);
  max-height: min(72vh, 34rem); overflow-y: auto;
}
.search-results li a, .result-list li a {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 8px 10px;
  border-radius: 3px; color: var(--text); text-decoration: none;
}
.search-results li[aria-selected="true"] a, .search-results li a:hover, .result-list li a:hover { background: rgb(214 179 115 / 11%); }
.search-results li[aria-selected="true"] a { outline: 1px solid var(--gold-deep); }
.result-main { display: grid; min-width: 0; line-height: 1.3; }
.result-name { font-weight: 600; overflow-wrap: anywhere; }
.result-name mark { background: none; color: var(--gold-hi); text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: 3px; }
.result-sub { color: var(--muted); font-size: 13.5px; }
.result-kind { padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.result-kind-item { color: var(--gold); border-color: rgb(214 179 115 / 40%); }
.result-kind-monster { color: var(--red); border-color: rgb(240 138 128 / 40%); }
.result-kind-npc { color: var(--blue); border-color: rgb(134 183 234 / 40%); }
.result-kind-map { color: var(--good); border-color: rgb(150 203 132 / 40%); }
.result-kind-skill { color: var(--purple); border-color: rgb(200 162 242 / 40%); }
.result-glyph { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface-3); color: var(--bronze-2); font: 600 15px var(--font-display); }
.search-results .icon, .result-list .icon { display: block; width: 36px; height: 36px; object-fit: contain; }
.search-empty { padding: 12px 14px; color: var(--muted); }
.search-more a { display: block !important; min-height: 44px; padding: 12px 10px !important; margin-top: 4px; border-top: 1px solid var(--line-2); border-radius: 0 !important; color: var(--gold); font-weight: 600; }
.search-hero { max-width: 44rem; min-height: 60px; margin: 22px 0 0; padding: 7px 7px 7px 16px; border-color: var(--bronze); }
.search-hero input { font-size: 18px; }
.search-hero .search-glyph { width: 22px; height: 22px; }
.search-hero > button { padding: 0 22px; font-size: 15px; }
.hero-hints { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }
.search-types { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 22px 0 8px; border-bottom: 1px solid var(--line-2); }
.search-types button { min-height: 44px; padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--text-2); font-size: 15px; font-weight: 600; }
.search-types button:hover { color: var(--gold-hi); }
.search-types button[aria-pressed="true"] { border-bottom-color: var(--crimson); color: var(--gold-hi); }
.search-type-count { color: var(--muted); font-weight: 400; }
.search-retry, .search-reset, .filter-reset { min-height: 44px; margin: 10px 0; padding: 8px 16px; border: 1px solid var(--bronze); border-radius: 3px; background: var(--surface); color: var(--gold); font-weight: 600; }
.search-retry:hover, .search-reset:hover, .filter-reset:hover { background: var(--surface-3); }
.result-list { max-width: none; margin: 0; padding: 0; list-style: none; }
.result-list li { border-bottom: 1px solid var(--line); }
.browse-links { margin-top: 28px; color: var(--muted); }

/* ---- Layout, breadcrumbs, article head ---------------------------------------------------------------------- */
.layout { padding-top: 6px; padding-bottom: 64px; }
main { min-width: 0; min-height: 60vh; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 14px 0 18px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--bronze); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--gold-hi); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }

.entity-head, .list-head { position: relative; display: flex; align-items: center; gap: 22px; margin: 0 0 28px; padding: 0 0 24px; }
.entity-head::after, .list-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--gold-deep), var(--line-2) 55%, transparent); }
.entity-head > div, .list-head > div { min-width: 0; }
.entity-head h1, .list-head h1 { margin: 0; font-size: clamp(2rem, 1.1rem + 3.2vw, 3rem); line-height: 1.12; letter-spacing: .035em; text-wrap: balance; }
.entity-head > .icon-l { width: 80px; height: 80px; padding: 8px; border: 1px solid var(--bronze); border-radius: 3px; background: radial-gradient(ellipse at 50% 40%, #3a2d18, #14120e 78%); image-rendering: pixelated; object-fit: contain; }
.list-head { display: block; }
.list-head .lead { margin-top: 12px; }
.kicker { margin: 0 0 8px; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border: 1px solid var(--line-2); border-radius: 3px;
  background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 600; line-height: 1.5; text-decoration: none; white-space: nowrap;
}
a.badge:hover { border-color: var(--gold-deep); color: var(--gold-hi); }
.badge-level { color: var(--gold-hi); border-color: rgb(214 179 115 / 40%); background: rgb(214 179 115 / 9%); }
.badge-rank { color: var(--purple); border-color: rgb(200 162 242 / 40%); background: rgb(200 162 242 / 8%); }
.badge-boss { color: var(--red); border-color: rgb(232 112 107 / 45%); background: rgb(184 58 58 / 14%); }
.badge-good { color: var(--good); border-color: rgb(150 203 132 / 40%); background: rgb(150 203 132 / 8%); }
.badge-map { color: var(--good); border-color: rgb(150 203 132 / 32%); }
.badge-npc { color: var(--blue); border-color: rgb(134 183 234 / 36%); }
.badge-class.class-swordsman { color: var(--orange); border-color: rgb(242 169 101 / 45%); background: rgb(242 169 101 / 8%); }
.badge-class.class-mage { color: var(--blue); border-color: rgb(134 183 234 / 45%); background: rgb(134 183 234 / 8%); }
.badge-class.class-warrior { color: var(--red); border-color: rgb(240 138 128 / 45%); background: rgb(240 138 128 / 8%); }
.badge-class.class-ghost { color: var(--purple); border-color: rgb(200 162 242 / 45%); background: rgb(200 162 242 / 8%); }
.badge-class.class-all { color: var(--text-2); }

.entity-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--infobox); gap: 0 36px; align-items: start; }
.entity-main { grid-column: 1; grid-row: 1; min-width: 0; }
.infobox { grid-column: 2; grid-row: 1; }
.entity-guide .entity-body { grid-template-columns: minmax(0, 1fr); }
.entity-main > section { margin: 0 0 8px; }
.entity-main > p { max-width: 76ch; }
.entity-main h2, .changes h2 {
  position: relative; display: flex; align-items: baseline; gap: 10px; margin: 40px 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--line-2);
  font-size: 1.55rem; scroll-margin-top: 20px;
}
.entity-main > section:first-child > h2, .entity-main > .article-contents + section > h2 { margin-top: 4px; }
.entity-main h2::after, .changes h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px; background: var(--gold); }
.entity-main h3 { margin: 24px 0 8px; font-size: 1.12rem; color: var(--gold-hi); }
.heading-anchor { margin-left: auto; color: var(--muted); font: 600 1rem var(--font-body); text-decoration: none; opacity: 0; transition: opacity .15s; }
h2:hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
.article-contents { margin: 0 0 28px; padding: 14px 18px 10px; border: 1px solid var(--line-2); border-left: 3px solid var(--gold-deep); border-radius: 3px; background: var(--surface); }
.toc-title { margin: 0 0 6px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.article-contents ol { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.article-contents li { counter-increment: toc; }
.article-contents li::before { content: counter(toc) "."; margin-right: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.article-contents a { display: inline-flex; min-height: 34px; align-items: center; color: var(--text-2); text-decoration: none; }
.article-contents a:hover { color: var(--gold-hi); text-decoration: underline; }

/* ---- Infobox -------------------------------------------------------------------------------------------------- */
.infobox {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  border: 1px solid var(--bronze); border-top: 3px solid var(--gold-deep); border-radius: 4px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 60%); box-shadow: 0 0 0 1px #000, 0 20px 44px rgb(0 0 0 / 38%);
}
.infobox figure {
  position: relative; margin: 0; padding: 22px 16px 16px; border-bottom: 1px solid var(--line-2); text-align: center;
  background: radial-gradient(ellipse at center, #302719 0, #10100e 75%); /* same panel the media edge audit composites against */
}
.infobox figure > img.icon, .infobox figure > img.icon-l {
  display: block; width: 128px; height: 128px; margin: 0 auto; border: 0; background: none; box-shadow: none; object-fit: contain;
  image-rendering: pixelated; filter: drop-shadow(0 8px 12px rgb(0 0 0 / 65%));
}
.infobox .info-label { margin: 0; padding: 14px 16px 0; color: var(--gold); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.infobox h2.taught-skill { margin: 0; padding: 4px 16px 4px; border: 0; font: 600 1.25rem/1.25 var(--font-display); text-align: center; }
.infobox h2.taught-skill a { text-decoration: none; color: var(--gold-hi); }
.infobox h2.taught-skill a:hover { text-decoration: underline; }
.infobox .skill-description { margin: 0; padding: 0 20px 14px; color: var(--muted); font-size: 14px; text-align: center; }
.infobox .skill-icon-link { display: inline-block; text-decoration: none; }
.infobox .skill-icon-link .icon-l { display: block; width: 112px; height: 112px; margin: 0 auto; border: 0; background: none; box-shadow: none; image-rendering: pixelated; }
.stat-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; border-bottom: 1px solid var(--line-2); background: rgb(0 0 0 / 22%); }
.stat-tiles > div { padding: 12px 6px 11px; text-align: center; }
.stat-tiles > div + div { border-left: 1px solid var(--line); }
.stat-tiles dt { margin: 0 0 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.stat-tiles dd { margin: 0; color: var(--gold-hi); font: 600 1.4rem/1.2 var(--font-display); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.ib-group { border-top: 1px solid var(--line); }
.ib-group:first-of-type { border-top: 0; }
.stat-tiles + .ib-group { border-top: 0; }
.ib-title { margin: 0; padding: 14px 16px 6px; color: var(--gold); font: 700 11.5px/1.2 var(--font-body); letter-spacing: .15em; text-transform: uppercase; }
.infobox dl.facts { margin: 0 0 8px; font-size: 15px; }
.infobox .facts > div { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 12px; padding: 6px 16px; }
.infobox .facts > div + div { border-top: 1px solid rgb(255 255 255 / 4.5%); }
.infobox .facts dt { color: var(--text-2); }
.infobox .facts dd { margin: 0; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.infobox .facts dd .badge { font-size: 13px; padding: 1px 9px; }
.ib-links { margin: 0 0 8px; padding: 0; list-style: none; }
.ib-links li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ib-links li a { flex: 1; min-width: 0; padding: 7px 16px; color: var(--gold); text-decoration: none; }
.ib-links a:hover { background: rgb(214 179 115 / 8%); color: var(--gold-hi); }
.ib-links li a b { color: var(--gold-hi); }
.ib-meta { padding-right: 16px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.ib-none { margin: 0; padding: 4px 16px 12px; color: var(--muted); font-size: 14.5px; }
.infobox .chips { padding: 4px 16px 16px; }
.infobox .chip { min-height: 32px; font-size: 13.5px; padding: 3px 11px; }
.secondary-facts { margin: 0; border-top: 1px solid var(--line); }
.secondary-facts > summary { min-height: 44px; padding: 10px 16px; color: var(--gold); font-size: 14px; font-weight: 600; }
.secondary-facts[open] { padding-bottom: 6px; }
.ib-map { padding: 0; }
.ib-map a { display: block; position: relative; }
.ib-map img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.infobox figure.ib-map { padding: 0; background: #000; }

/* Chips and tags */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 13px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14.5px; text-decoration: none; }
.chip:hover { border-color: var(--gold-deep); color: var(--gold-hi); background: var(--surface-2); }
.chip small { color: var(--muted); font-size: 12.5px; }
.chip .icon { display: block; width: 26px; height: 26px; margin: 0; border: 0; background: none; object-fit: contain; image-rendering: pixelated; }
.tag { display: inline-block; margin-left: 6px; padding: 0 7px; border: 1px solid rgb(232 112 107 / 45%); border-radius: 3px; background: rgb(184 58 58 / 16%); color: var(--red); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }
.kind, .src { display: inline-block; padding: 1px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.kind-stone { color: var(--blue); border-color: rgb(134 183 234 / 40%); }
.kind-pill { color: var(--purple); border-color: rgb(200 162 242 / 40%); }
.kind-book { color: var(--good); border-color: rgb(150 203 132 / 40%); }
.kind-equipment { color: var(--gold); border-color: rgb(214 179 115 / 40%); }
.src-drop { color: var(--red); border-color: rgb(240 138 128 / 36%); }
.src-sold { color: var(--gold); border-color: rgb(214 179 115 / 36%); }
.src-compound { color: var(--purple); border-color: rgb(200 162 242 / 36%); }
.qty { margin-right: 4px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---- Icons, references, tables ---------------------------------------------------------------------------------- */
.icon { display: inline-block; flex: none; vertical-align: middle; image-rendering: pixelated; }
.icon-s { width: 32px; height: 32px; }
.icon-m { width: 56px; height: 56px; }
.icon-none { background: repeating-linear-gradient(45deg, #15130f 0 6px, #1b1814 6px 12px); }
a.ref { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; vertical-align: middle; }
a.ref span { text-decoration: underline; text-decoration-color: rgb(214 179 115 / 35%); text-underline-offset: 3px; }
a.ref:hover span { text-decoration-color: currentColor; }
.table-wrap .icon { width: 32px; height: 32px; margin-right: 0; border: 0; background: none; box-shadow: none; }

.table-wrap { max-width: 100%; margin: 12px 0 24px; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface); scrollbar-color: var(--line-2) var(--surface); }
table.data { width: 100%; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; }
table.data caption { padding: 12px 16px; text-align: left; color: var(--text-2); }
table.data th { position: sticky; top: 0; z-index: 2; padding: 11px 16px; border-bottom: 2px solid var(--bronze); background: #26211a; color: var(--gold-hi); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
table.data td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: normal; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:nth-child(even) td { background: rgb(255 255 255 / 1.8%); }
table.data tbody tr:hover td { background: rgb(214 179 115 / 8%); }
table.data .num { text-align: right; white-space: nowrap; }
table.data a { overflow-wrap: normal; }
table.data a.ref { min-width: 9rem; }
table.data small { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; }
table.data th[aria-sort] { padding: 0; }
table.data th button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 7px; width: 100%; min-height: 44px; padding: 0 16px; cursor: pointer; }
table.data th.num button { justify-content: flex-end; }
table.data th button:hover { color: #fff; }
table.data th button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: -3px; }
table.data th button::after { content: "\2195"; color: var(--bronze); font-size: 12px; letter-spacing: 0; }
table.data th[aria-sort="ascending"] button::after { content: "\25B2"; color: var(--gold); font-size: 10px; }
table.data th[aria-sort="descending"] button::after { content: "\25BC"; color: var(--gold); font-size: 10px; }
table.data.sticky-first th:first-child, table.data.sticky-first td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line-2); }
table.data.sticky-first th:first-child { z-index: 3; background: #26211a; }
.chance { white-space: nowrap; }
.chance-pct { font-weight: 700; color: var(--c, var(--text)); }
.chance-pct::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.chance-common { --c: #9fd08c; }
.chance-uncommon { --c: #86b7ea; }
.chance-rare { --c: #d3a8f5; }
.chance-very-rare { --c: #f2a965; }
.section-note { color: var(--muted); }

/* Filters */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 6px; }
.filter { position: relative; flex: 1 1 18rem; min-width: 0; max-width: 26rem; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 3px; background: #11100e; }
.filter .glyph { color: var(--bronze-2); pointer-events: none; }
.filter input { flex: 1; width: 0; min-width: 0; min-height: 42px; padding: 8px 0; border: 0; background: transparent; font-size: 15.5px; line-height: 24px; }
.filter input::placeholder { color: var(--muted); opacity: 1; }
.filter:focus-within, .atlas-search:focus-within { border-color: var(--gold); outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.filter input:focus, .atlas-search input:focus { outline: none; }
.facet select:focus { border-color: var(--gold); outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.facet { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.facet select { min-height: 44px; max-width: 14rem; padding: 6px 30px 6px 12px; border: 1px solid var(--line-2); border-radius: 3px; background: #11100e; color: var(--text); font-size: 15px; }
.chip-btn { min-height: 44px; padding: 4px 15px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14.5px; font-weight: 600; }
.chip-btn:hover { border-color: var(--gold-deep); color: var(--gold-hi); }
.chip-btn[aria-pressed="true"] { border-color: var(--gold); background: rgb(214 179 115 / 14%); color: var(--gold-hi); }
.filter-count, .map-filter-count { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; min-height: 28px; margin: 4px 0 6px; color: var(--muted); font-size: 14px; }
.filter-reset { min-height: 36px; margin: 0; padding: 2px 12px; }
.category-tabs { margin: 0 0 20px; }
.category-tabs ul { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.category-tabs a { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface); color: var(--text-2); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.category-tabs a small { color: var(--muted); font-weight: 400; }
.category-tabs a:hover { border-color: var(--gold-deep); color: var(--gold-hi); }
.category-tabs a[aria-current="page"] { border-color: var(--gold); border-bottom: 2px solid var(--crimson); background: rgb(214 179 115 / 11%); color: var(--gold-hi); }

/* Tiles: home sections, item categories, guides */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 32px; padding: 0; list-style: none; }
.tiles-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 4px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, background .15s; }
.tile::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 2px 2px 0; background: var(--gold-deep); transition: background .15s; }
.tile:hover { border-color: var(--bronze); background: linear-gradient(180deg, #27231c, var(--surface-2)); color: var(--text); transform: translateY(-2px); }
.tile:hover::before { background: var(--gold); }
.tile-glyph { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--bronze); border-radius: 3px; background: radial-gradient(circle at 50% 40%, #3a2d18, #17140f 80%); color: var(--gold); }
.tile-glyph .glyph { width: 26px; height: 26px; }
.tile-art { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 3px; background: radial-gradient(circle at 50% 40%, #33281a, #15130f 80%); }
.tile-art .icon { width: 44px; height: 44px; object-fit: contain; }
.tile-body { display: grid; gap: 2px; min-width: 0; }
.tile-title { font: 600 1.18rem/1.25 var(--font-display); letter-spacing: .03em; }
.tile-text { color: var(--text-2); font-size: 14.5px; line-height: 1.4; }
.tile-count { align-self: start; color: var(--gold); font: 600 1.3rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.tiles-compact .tile { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 14px; gap: 4px 12px; }
.tiles-compact .tile-title { font-size: 1rem; }
.tiles-compact .tile-text { font-size: 13.5px; }
.tile-guide { grid-template-columns: auto minmax(0, 1fr); }

.map-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.map-card { display: block; height: 100%; overflow: hidden; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.map-card:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.map-card-art { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #000; border-bottom: 1px solid var(--line-2); }
.map-card-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.map-card:hover .map-card-img { transform: scale(1.04); }
.map-card-body { display: grid; gap: 8px; padding: 14px 16px 16px; }
.map-card-name { font: 600 1.25rem/1.2 var(--font-display); letter-spacing: .03em; }
.map-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--muted); font-size: 14px; }

/* ---- Article furniture ----------------------------------------------------------------------------------------- */
.changes { margin-top: 44px; }
.changes h2 { font-size: 1.2rem; color: var(--text-2); }
.changes h2::after { background: var(--bronze); }
.changes table.data { font-size: 14px; }
.navbox { margin: 36px 0 0; }
.navbox h2 { margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line-2); font-size: 1.25rem; }
.navbox .chips { margin-top: 14px; }
.chip-ref small { padding-left: 2px; }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; margin: 34px 0 0; align-items: stretch; }
.pager-cell { display: grid; align-content: center; gap: 2px; min-height: 64px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
a.pager-cell:hover { border-color: var(--gold); background: var(--surface-2); }
.pager-cell small { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pager-name { display: flex; align-items: center; gap: 10px; color: var(--gold-hi); font-weight: 600; min-width: 0; }
.pager-name .icon { width: 28px; height: 28px; }
.pager-next { text-align: right; justify-items: end; }
.pager-cell.is-empty { visibility: hidden; }
.pager-up { display: flex; align-items: center; padding: 0 20px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--text-2); text-decoration: none; font-weight: 600; text-align: center; }
.pager-up:hover { border-color: var(--gold); color: var(--gold-hi); }
.source-details { margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.source-details summary { min-height: 44px; padding: 10px 0; color: var(--text-2); }
details > summary { min-height: 44px; padding: 8px 0; }
.prose { max-width: 70ch; padding-left: 1.3rem; }
.prose li { margin: .4rem 0; }
.steps { max-width: 74ch; margin: 22px 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; margin: 0 0 12px; padding: 14px 18px 14px 64px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 12px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--bronze); border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a2d18, #17140f 80%); color: var(--gold-hi); font: 600 1.05rem var(--font-display); }
.entity-guide .entity-main > .prose { max-width: 70ch; }

/* ---- Media: skill, monster and NPC loops ------------------------------------------------------------------------ */
.infobox .media-viewer { display: block; position: relative; overflow: hidden; }
.infobox .media-fullsize { position: relative; display: block; text-decoration: none; }
.infobox .media-viewer picture { display: block; width: 100%; aspect-ratio: 1; background: transparent; }
.infobox .media-viewer img.animation { display: block; width: 100%; height: 100%; max-width: 100%; margin: 0 auto; border: 0; background: transparent; object-fit: contain; image-rendering: auto; }
/* The poster stays on top of the loop until the loop's first frame is ready, then fades out (set by site.js). */
.infobox .media-poster { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; pointer-events: none; opacity: 1; transition: opacity .35s ease; }
.infobox .media-viewer[data-state="playing"] .media-poster, .infobox .media-viewer[data-canvas="true"] .media-poster { opacity: 0; }
/* Once a canvas carries the frame (painted from the decoded loop, or a copy of the displayed frame while paused) the image underneath is hidden. */
.infobox .media-freeze { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.infobox .media-viewer[data-canvas="true"] img.animation { visibility: hidden; }
/* Controls are a small overlay inside the panel, never a bar under it. */
.infobox .media-controls { position: absolute; right: 8px; bottom: 8px; left: 8px; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; padding: 0; border: 0; background: none; pointer-events: none; transition: opacity .2s ease; }
.infobox .media-controls > * { pointer-events: auto; }
.infobox .media-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.infobox .media-controls button {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; min-height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--bronze); border-radius: 999px;
  background: rgb(14 13 11 / 72%); color: var(--gold-hi); font-size: 13px; font-weight: 600; line-height: 1; backdrop-filter: blur(3px);
}
.infobox .media-controls button:hover { border-color: var(--gold); background: rgb(14 13 11 / 88%); }
.infobox .media-controls button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.infobox .media-controls button[aria-pressed="true"]:not(.media-toggle) { border-color: var(--gold); background: rgb(214 179 115 / 22%); }
.infobox .media-controls .media-toggle { margin-left: auto; }
.infobox .media-toggle::before { content: ""; flex: none; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
.infobox .media-toggle[aria-pressed="true"]::before { width: 8px; height: 10px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.infobox .media-status { position: absolute; left: 8px; top: 8px; z-index: 3; max-width: calc(100% - 16px); padding: 3px 9px; border: 1px solid rgb(142 121 86 / 55%); border-radius: 999px; background: rgb(14 13 11 / 72%); color: var(--text-2); font-size: 12px; line-height: 1.4; pointer-events: none; }
.infobox .media-status:empty { display: none; }
.infobox .media-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 2px; overflow: hidden; background: rgb(142 121 86 / 30%); pointer-events: none; opacity: 0; }
.infobox .media-viewer[data-state="loading"] .media-progress { opacity: 1; }
.infobox .media-progress::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--gold); animation: media-load 1.2s ease-in-out infinite; }
@keyframes media-load { to { left: 100%; } }
/* Mouse users see the controls on hover or focus, and always while the loop is not playing; touch always sees them. */
@media (hover: hover) and (pointer: fine) {
  .infobox .media-viewer[data-state="playing"] .media-controls { opacity: 0; }
  .infobox .media-viewer[data-state="playing"]:hover .media-controls,
  .infobox .media-viewer[data-state="playing"]:focus-within .media-controls { opacity: 1; }
}
@media (pointer: coarse) {
  .infobox .media-controls button { min-height: 44px; min-width: 44px; padding: 0 16px 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .infobox .media-poster, .infobox .media-controls { transition: none; }
  .infobox .media-progress::after { animation: none; left: 0; width: 100%; opacity: .5; }
}
.infobox figure:has(.media-viewer) { padding: 14px; }

/* ---- Home --------------------------------------------------------------------------------------------------- */
.page-home .layout { padding-top: 0; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); align-items: center; gap: 48px; padding: 52px 0 44px; }
.home-hero h1 { margin: 0 0 16px; font-size: clamp(2.3rem, 1rem + 4vw, 3.9rem); line-height: 1.08; letter-spacing: .03em; text-wrap: balance; }
.home-hero .lead { max-width: 52ch; margin: 0; font-size: 1.18rem; }
.home-map { position: relative; display: block; overflow: hidden; border: 1px solid var(--bronze); border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 28px 60px rgb(0 0 0 / 55%); color: var(--text); text-decoration: none; }
.home-map img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; transition: transform .5s; }
.home-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgb(14 13 11 / 78%)); pointer-events: none; }
.home-map:hover img { transform: scale(1.03); }
.home-map span { position: absolute; left: 16px; bottom: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--bronze); border-radius: 3px; background: rgb(14 13 11 / 88%); color: var(--gold-hi); font-weight: 600; }
.home-panel { margin: 0; padding: 20px 22px 22px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); }
.home-panel h2 { margin: 0 0 14px; padding: 0 0 10px; border-bottom: 1px solid var(--line-2); font-size: 1.15rem; }
.home-wide { margin-bottom: 20px; }
.home-wide .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.home-wide .chips li { min-width: 0; }
.home-wide .chip { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; min-height: 64px; height: 100%; padding: 12px 16px; border-radius: 3px; }
.home-wide .chip .icon { width: 32px; height: 32px; }
.home-wide .chip > span { min-width: 0; line-height: 1.3; }
.home-wide .chip small { padding: 0; line-height: 1.3; font-variant-numeric: tabular-nums; }
.home-cols { display: grid; grid-template-columns: 1.35fr 1fr .75fr; gap: 20px; align-items: start; }
.change-list { margin: 0; padding: 0; list-style: none; }
.change-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.change-list li:last-child { border-bottom: 0; }
.change-ver { grid-row: 1 / 3; align-self: start; padding: 0 8px; border: 1px solid rgb(214 179 115 / 40%); border-radius: 3px; color: var(--gold-hi); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.change-list time { color: var(--muted); font-size: 13px; }
.featured-card { display: grid; gap: 12px; color: var(--text); text-decoration: none; }
.featured-art { display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line-2); border-radius: 3px; background: radial-gradient(ellipse at center, #302719 0, #10100e 75%); }
.featured-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.featured-body { display: grid; gap: 4px; }
.featured-name { font: 600 1.2rem var(--font-display); }
.featured-text { color: var(--text-2); font-size: 14.5px; }
.featured-go { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; }
.featured-card:hover .featured-go { color: var(--gold-hi); }
.guide-links { margin: 0; padding: 0; list-style: none; }
.guide-links a { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); color: var(--text-2); text-decoration: none; }
.guide-links li:last-child a { border-bottom: 0; }
.guide-links a:hover { color: var(--gold-hi); }

/* ---- Footer ------------------------------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line-2); background: #0a0a09; color: var(--text-2); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-block: 32px 40px; }
.site-footer p { margin: 0 0 .6rem; }
.footer-brand { width: fit-content; margin-bottom: 20px; }
.footer-brand img { width: 112px; }
.generated { color: var(--muted); font-size: 14px; }
.footer-title { margin: 0 0 8px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-nav a { display: inline-flex; min-height: 34px; align-items: center; color: var(--text-2); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-hi); text-decoration: underline; }

/* ---- Xiah atlas --------------------------------------------------------------------------------------------- */
.map-panel { --atlas-height: clamp(280px, 62dvh, 650px); position: relative; max-width: 100%; margin: 12px 0 24px; border: 1px solid var(--bronze); background: #15130f; }
.atlas-section { clear: both; margin-bottom: 32px; }
.atlas-section > h2 { margin: 0 0 12px; font: 600 1.35rem var(--font-display); }
.atlas-toolbar { position: relative; display: grid; grid-template-columns: minmax(140px, 1fr) minmax(120px, 180px) minmax(125px, 150px) auto auto; gap: 10px; padding: 12px; border-bottom: 1px solid #55432b; background: linear-gradient(120deg, #242017, #191611); }
.atlas-toolbar button, .atlas-toolbar select, .atlas-world { height: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #6b573b; border-radius: 2px; background: #201c15; color: #ecd8b1; font: 600 14px/1 var(--font-body); }
.atlas-toolbar button:hover, .atlas-toolbar select:hover, .atlas-world:hover { background: #30271b; border-color: #c8a56a; }
.atlas-toolbar button, .atlas-world { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; cursor: pointer; }
.atlas-world { text-decoration: none; }
@media (min-width: 901px) { .atlas-toolbar:has(.atlas-world) { grid-template-columns: minmax(140px, 1fr) minmax(120px, 180px) minmax(125px, 150px) repeat(3, auto); } }
@media (max-width: 900px) { .atlas-world { grid-column: 1 / -1; } }
.atlas-toolbar button[data-atlas-action="fullscreen"] { font-size: 24px; }
.atlas-toolbar button span { font-size: 14px; }
.atlas-map-select { min-width: 0; }
.atlas-map-select select { display: block; width: 100%; text-overflow: ellipsis; }
.atlas-search { position: relative; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid #75603e; border-radius: 2px; background: #0d0d0a; }
.atlas-search input { flex: 1; width: 0; min-width: 0; min-height: 42px; padding: 8px 0; border: 0; background: transparent; color: #f5ead7; font: 16px/24px var(--font-body); }
.atlas-search input::placeholder { color: #bcb09a; opacity: 1; }
.atlas-search .glyph { color: #e5c994; pointer-events: none; }
.atlas-layout { display: grid; grid-template-columns: minmax(0, 1fr) 244px; }
.atlas-no-layers .atlas-layout { grid-template-columns: minmax(0, 1fr); }
.atlas-stage { position: relative; min-width: 0; height: var(--atlas-height); overflow: hidden; background: #0c100d; }
.atlas-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; background-color: #101410; background-image: radial-gradient(ellipse at center, #28312480, transparent 75%), linear-gradient(#8d79551a 1px, transparent 1px), linear-gradient(90deg, #8d79551a 1px, transparent 1px); background-size: auto, 48px 48px, 48px 48px; }
.atlas-viewport.is-dragging { cursor: grabbing; }
.atlas-stage, .atlas-stage *, .atlas-toolbar button, .atlas-toolbar select { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.atlas-viewport.is-dragging .atlas-pin, .atlas-viewport.is-dragging .atlas-pin-label { pointer-events: none !important; }
.atlas-viewport:focus-visible { outline: 3px solid #f8e6bd; outline-offset: -4px; }
.atlas-canvas, .atlas-pins { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.atlas-world-frame { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.atlas-edit-account { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
.atlas-editor { padding: 12px; border-block: 1px solid #6b573b; background: #201c15; }
.atlas-editor p { margin: 8px 0; }
.atlas-editor .edit-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.atlas-editor button, .atlas-edit-account button, .atlas-edit-dialog button { min-height: 44px; padding: 8px 12px; border: 1px solid #6b573b; background: #201c15; color: #ecd8b1; cursor: pointer; }
.atlas-editor button[aria-pressed="true"] { border-color: #c8a56a; background: #30271b; }
.atlas-editor button:disabled { opacity: .5; cursor: default; }
.atlas-editor .edit-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; margin: 10px 0; }
.atlas-editor label, .atlas-edit-dialog label { display: grid; gap: 4px; min-width: 0; }
.atlas-editor input, .atlas-editor textarea, .atlas-editor select, .atlas-edit-dialog input { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #6b573b; color: #ecd8b1; background: #17140f; }
.atlas-editor details { margin: 10px 0; }.atlas-editor summary { min-height: 44px; cursor: pointer; }
.atlas-edit-dialog { width: min(420px, calc(100vw - 32px)); padding: 20px; color: #ecd8b1; background: #201c15; border: 1px solid #c8a56a; }.atlas-edit-dialog::backdrop { background: #0009; }
.atlas-edit-dialog label { margin-block: 12px; }.edit-revision { border-top: 1px solid #6b573b; padding: 8px 0; }
.atlas-edit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }.is-edit-drawing { cursor: crosshair; }
.atlas-canvas { z-index: 1; }
.atlas-pins { z-index: 2; }
.atlas-pin { position: absolute; top: -22px; left: -22px; width: 44px; height: 44px; padding: 6px; border: 0; background: transparent; pointer-events: auto; cursor: pointer; color: #ebc48c; }
.atlas-pin-symbol { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid #ffedcd; border-radius: 50%; background: #161511; box-shadow: 0 0 0 2px #0b0c09, 0 2px 5px #000a; }
.atlas-pin-symbol { position: relative; border-color: #c8a56a; }
.atlas-head { display: block; width: 28px; height: 28px; object-fit: contain; border-radius: 50%; }
.atlas-role-badge { position: absolute; bottom: -4px; right: -5px; display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid #c8a56a; border-radius: 50%; background: #17150f; }
.atlas-pin .atlas-role-badge svg { width: 12px; height: 12px; stroke-width: 2; }
.atlas-pin.is-highlighted .atlas-pin-symbol { box-shadow: 0 0 0 3px #e6bc71, 0 0 0 5px #17150f; }
.map-panel[data-display="names"] .atlas-pin:not(.atlas-cluster) .atlas-pin-symbol { display: none; }
.map-panel[data-display="names"] .atlas-pin:not(.atlas-cluster) { width: max-content; height: 30px; padding: 0; margin: 7px 0 0 22px; }
.map-panel[data-display="names"] .atlas-pin:not(.atlas-cluster) .atlas-pin-label { position: relative; display: block; top: 0; left: 0; right: auto; pointer-events: auto; }
.map-panel[data-display="names"] .atlas-pin:not(.atlas-cluster):has(.atlas-pin-label[hidden]) { display: none; }
.map-panel[data-display="names"] .atlas-pin:focus-visible { outline: 2px solid #f8e6bd; outline-offset: 2px; }
.atlas-tooltip { display: flex; gap: 8px; align-items: center; }
.atlas-tooltip .atlas-head { flex: none; border: 1px solid #c8a56a; }
.atlas-display { min-width: 0; }
.atlas-display select { width: 100%; }
.atlas-pin svg, .atlas-key svg, .atlas-result > svg, .atlas-popup-kind svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.atlas-pin-monster, .atlas-key-monster { color: #ffb1a0; }
.atlas-pin-npc, .atlas-key-npc { color: #ecd2a6; }
.atlas-pin-shop, .atlas-key-shop { color: #ffe09a; }
.atlas-pin-portal, .atlas-key-portal { color: #9ce4ef; }
.atlas-pin-safe-zone, .atlas-key-safe-zone { color: #cef2a4; }
.atlas-pin-safe-zone { pointer-events: none; }
.atlas-pin-safe-zone .atlas-pin-symbol { width: 20px; height: 20px; margin: 6px; border-width: 1px; color: #b7d8c8; box-shadow: 0 1px 4px #0006; }
.atlas-pin-safe-zone svg { width: 14px; height: 14px; }
.atlas-pin-safe-zone[data-source="server"] .atlas-pin-symbol { color: #e4c889; }
.atlas-pin-poi, .atlas-key-poi { color: #dcc3ff; }
.atlas-pin:hover .atlas-pin-symbol, .atlas-pin:focus-visible .atlas-pin-symbol, .atlas-pin.is-selected .atlas-pin-symbol { background: #342b1e; border-color: white; box-shadow: 0 0 0 3px #d6b373, 0 0 0 5px #10100d; }
.atlas-pin:focus-visible { outline: 0; z-index: 5; }
.atlas-pin.is-selected { z-index: 4; }
.atlas-cluster .atlas-pin-symbol { width: 34px; height: 34px; margin: -1px; border-color: currentColor; }
.atlas-cluster .atlas-pin-symbol svg { width: 16px; height: 16px; transform: translateX(-5px); }
.atlas-cluster-count { position: absolute; right: 6px; top: 14px; min-width: 16px; background: #161511; color: #fff4dd; font: 700 12px var(--font-body); text-align: center; }
.atlas-pin-label { position: absolute; left: 44px; top: 9px; max-width: 190px; padding: 3px 8px; border: 1px solid #8f7850; border-radius: 2px; background: #15150ff2; color: #ffedcd; font: 600 13px var(--font-body); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; pointer-events: auto; box-shadow: 0 1px 5px #0009; }
.atlas-pin.label-left .atlas-pin-label { left: auto; right: 44px; }
.atlas-tooltip { position: absolute; z-index: 10; max-width: min(240px, calc(100% - 24px)); padding: 8px 12px; border: 1px solid #c7aa70; border-radius: 2px; background: #100f0bf5; color: #fff1d2; font-size: 13px; line-height: 1.4; text-align: center; transform: translate(-50%, -100%); pointer-events: none; }
.atlas-zoom { position: absolute; z-index: 3; top: 18px; right: 18px; display: grid; border: 1px solid #a48b5e; border-radius: 2px; box-shadow: 0 2px 10px #0008; }
.atlas-zoom button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-bottom: 1px solid #685639; background: #17160fed; color: #f4dfb5; font: 600 26px var(--font-body); cursor: pointer; }
.atlas-zoom button:last-child { border-bottom: 0; font-size: 23px; }
.atlas-zoom button:hover { background: #3b2f1d; color: white; }
.atlas-inset { position: absolute; z-index: 3; bottom: 38px; right: 18px; width: 146px; max-width: calc(100% - 36px); height: 190px; padding: 3px; border: 1px solid #c2a572; border-radius: 2px; background: #13150e; box-shadow: 0 2px 8px #000a; cursor: grab; touch-action: none; user-select: none; }
.atlas-inset.is-dragging { cursor: grabbing; }
.atlas-inset:focus-visible { outline: 3px solid #f8e6bd; outline-offset: 3px; }
.atlas-inset canvas { display: block; width: 100%; height: calc(100% - 44px); }
.atlas-inset-controls { display: flex; height: 44px; }
.atlas-inset-controls button { flex: 1; min-width: 0; padding: 0; border: 1px solid #685639; background: #17160f; color: #f4dfb5; font-size: 20px; cursor: pointer; }
.atlas-status { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 12px; min-height: 28px; padding: 5px 12px; border-top: 1px solid #675538; background: #14140eeb; color: #e2d2b4; font-size: 11px; pointer-events: none; }
.atlas-status output { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-scale { flex: none; }
.atlas-layers { min-width: 0; max-height: var(--atlas-height); overflow-y: auto; padding: 22px 18px 16px; border-left: 1px solid #685334; background: linear-gradient(160deg, #242017, #17150f 80%); }
.atlas-layers h3 { margin: 0 0 7px; color: #efd9ad; font: 600 1.05rem var(--font-display); }
.atlas-layers > p { margin: 0 0 16px; color: #c7bba6; font-size: 13px; line-height: 1.55; }
.atlas-layers fieldset { margin: 0; padding: 0; border: 0; }
.atlas-layer { display: grid; grid-template-columns: 18px 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 46px; border-bottom: 1px solid #50432e; color: #ecdfc5; font-size: 14px; cursor: pointer; }
.atlas-layer input { width: 17px; height: 17px; margin: 0; accent-color: #d6b373; }
.atlas-layer small { color: #c8b694; font-size: 12px; }
.atlas-key { display: grid; place-items: center; }
.atlas-categories, .atlas-portraits { margin-top: 12px; font-size: 13px; }
.atlas-categories summary, .atlas-portraits summary { min-height: 44px; padding: 12px 0; cursor: pointer; color: #e9c991; }
.atlas-portraits ul { margin: 0; padding: 0; list-style: none; }
.atlas-portraits li { display: flex; gap: 6px; align-items: center; min-height: 40px; font-size: 12px; }
.atlas-portraits svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.atlas-layer:has(input:not(:checked)) { color: #b9ac94; }
.atlas-layer:has(input:not(:checked)) .atlas-key { color: #b9ac94; }
.atlas-layer-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; padding: 14px 0 0; border-top: 1px solid #655137; color: #cbb993; font-size: 12px; line-height: 1.55; }
.atlas-layer-note > span { color: #e0c58e; font-size: 24px; line-height: 1; }
.atlas-layer-note p { margin: 0; }
.atlas-layers #atlas-help { margin-top: 20px; margin-bottom: 0; color: #bdb19b; font-size: 12px; }
.atlas-search-results { position: absolute; z-index: 70; left: 12px; top: 62px; width: min(470px, calc(100% - 24px)); max-height: 340px; overflow: auto; border: 1px solid #a48b5e; background: #14130e; box-shadow: 0 8px 24px #000a; }
.atlas-result { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 2px 10px; width: 100%; min-height: 54px; padding: 10px 14px; border: 0; border-bottom: 1px solid #51422c; background: transparent; color: #f2dfb8; text-align: left; font: 600 15px var(--font-body); cursor: pointer; }
.atlas-result > svg { grid-row: 1 / 3; align-self: center; color: #d6b373; }
.atlas-result small { grid-column: 2; color: #c2b69c; font-size: 12px; font-weight: 400; }
.atlas-result > .atlas-head { grid-row: 1 / 3; align-self: center; }
.atlas-result-members { padding: 0 14px 6px 49px; font-size: 12px; color: #d6c4a3; border-bottom: 1px solid #51422c; }
.atlas-result-members summary { cursor: pointer; min-height: 36px; padding: 8px 0; }
.atlas-result-sub, .atlas-member-list button { display: block; width: 100%; min-height: 44px; padding: 8px; border: 0; border-top: 1px solid #51422c; background: transparent; color: #f1cf8f; text-align: left; font: 14px var(--font-body); cursor: pointer; }
.atlas-member-list { padding: 0; margin: 12px 0; list-style: none; }
.atlas-result:hover, .atlas-result:focus-visible { background: #30271b; }
.atlas-search-empty { padding: 8px 14px; color: #e5d8bc; font-size: 14px; }
.atlas-popup { position: absolute; z-index: 20; top: 20px; left: 20px; width: min(350px, calc(100% - 40px)); max-height: 60%; overflow: auto; overscroll-behavior: contain; padding: 22px 20px 16px; border: 1px solid #c6a56c; border-top: 3px solid #d6b373; border-radius: 2px; background: #17150ff5; color: #efe1c5; box-shadow: 0 8px 24px #0009; }
.atlas-popup-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 12px; }
.atlas-popup-hero > img, .atlas-popup-hero > svg { width: 64px; height: 64px; border: 2px solid #c8a56a; border-radius: 50%; background: #211e17; object-fit: contain; }
.atlas-popup-hero > svg { padding: 12px; fill: none; stroke: #d6b373; stroke-width: 1.7; }
.atlas-popup-hero h3 { margin: 6px 14px 0 0; }
.atlas-popup-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0 12px; font-size: 12px; }
.atlas-popup-facts dt { color: #cfc0a1; }
.atlas-popup-facts dd { margin: 0; color: #f6e7cc; }
.atlas-popup h4 { margin: 12px 0 6px; color: #ebcc99; font: 600 14px var(--font-body); }
.atlas-quick-items { margin: 0; padding: 0; list-style: none; }
.atlas-quick-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 38px; border-top: 1px solid #51422c; font-size: 12px; }
.atlas-quick-items a { display: flex; gap: 6px; align-items: center; color: #f1cf8f; overflow-wrap: anywhere; }
.atlas-quick-items img { width: 28px; height: 28px; flex: none; object-fit: contain; }
.atlas-quick-items li > span { max-width: 95px; text-align: right; color: #d8c7a5; }
.atlas-rarity-dot { color: #b9d8a0; }
.atlas-rarity-uncommon .atlas-rarity-dot { color: #8cd4e8; }
.atlas-rarity-rare .atlas-rarity-dot { color: #deb0ec; }
.atlas-popup-more { margin: 4px 0 8px; font-size: 12px; color: #cfc0a1; }
.atlas-popup:focus { outline: 2px solid #ffedcd; outline-offset: 3px; }
.atlas-popup h3 { margin: 4px 20px 12px 0; color: #ffe5b6; font: 600 1.2rem var(--font-display); overflow-wrap: anywhere; }
.atlas-popup-kind { display: flex; align-items: center; gap: 8px; padding-right: 18px; margin: 0; color: #e0c58e; font-size: 12px; }
.atlas-popup-kind svg { width: 18px; height: 18px; flex: none; }
.atlas-popup-summary { margin: 0 0 12px; color: #d2c5ad; font-size: 14px; line-height: 1.55; }
.atlas-popup-close { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #f2dfb8; font-size: 27px; cursor: pointer; }
.atlas-popup-link { display: inline-flex; align-items: center; min-height: 44px; border-top: 1px solid #655036; width: 100%; color: #f1cf8f; font-size: 14px; font-weight: 600; text-decoration: none; }
.atlas-destinations { display: grid; gap: 0; margin: 4px 0 10px; padding: 0; list-style: none; }
.atlas-destinations li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-top: 1px solid #51422c; font-size: 13px; }
.atlas-destinations a { display: flex; align-items: center; min-height: 44px; color: #f1cf8f; }
.atlas-destinations span { flex: none; color: #cfc0a1; font-size: 12px; }
.atlas-static { display: grid; justify-items: center; padding: 16px; }
.atlas-static picture { display: block; min-width: 0; width: min(100%, 900px); }
.atlas-static img { display: block; width: 100%; height: auto; }
.atlas-static p { color: var(--text-2); font-size: 14px; }
.atlas-ready .atlas-static { display: none; }
@media (scripting: enabled) {
  .atlas-static { display: flex; flex-direction: column; align-items: center; height: calc(var(--atlas-height) + 69px); overflow: hidden; }
  .atlas-static picture { width: 100%; min-height: 0; flex: 1; }
  .atlas-static img { width: 100%; height: 100%; object-fit: contain; }
  .atlas-static p { flex: none; }
}
.map-index { border-top: 1px solid var(--line-2); padding: 0 16px; }
.map-index > summary { display: list-item; min-height: 44px; padding: 10px 0; color: var(--gold); font-size: 14px; font-weight: 600; cursor: pointer; }
.map-index ul { columns: 2; margin: 8px 0 14px; padding-left: 20px; font-size: 14px; }
.map-index li { break-inside: avoid; padding: 6px 0; overflow-wrap: anywhere; }
.map-index li > span { color: var(--muted); }
.map-caption { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.infobox .atlas-thumbnail { position: relative; display: block; max-width: 220px; margin: 16px auto; padding: 0; }
.atlas-thumbnail > a { position: relative; display: block; border: 1px solid var(--bronze); color: #f2d9a3; text-decoration: none; }
.atlas-thumbnail img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.atlas-thumb-caption { position: absolute; bottom: 0; left: 0; right: 0; min-height: 36px; padding: 8px 12px; background: #11100ded; font-size: 13px; font-weight: 600; }
.atlas-locator { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas-locator circle { fill: #d8aa55; stroke: white; stroke-width: 10; paint-order: stroke; }
.map-panel:fullscreen, .map-panel.atlas-fullscreen { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; max-width: none; margin: 0; border: 0; padding: 0; background: #11100d; }
.map-panel:fullscreen .atlas-enhanced, .map-panel.atlas-fullscreen .atlas-enhanced { display: flex; flex-direction: column; height: 100%; }
.map-panel:fullscreen .atlas-layout, .map-panel.atlas-fullscreen .atlas-layout { flex: 1; min-height: 0; }
.map-panel:fullscreen .atlas-stage, .map-panel.atlas-fullscreen .atlas-stage { height: 100%; min-height: 0; }
.map-panel:fullscreen .map-index, .map-panel:fullscreen .map-caption, .atlas-fullscreen .map-index, .atlas-fullscreen .map-caption { display: none; }
.map-panel:fullscreen .atlas-layers, .map-panel.atlas-fullscreen .atlas-layers { overflow: auto; }
.atlas-lock { overflow: hidden; }
@media (max-width: 900px) {
  .atlas-layout { grid-template-columns: minmax(0, 1fr) 212px; }
  .atlas-layers { padding: 18px 14px; }
  .atlas-toolbar button[data-atlas-action="fullscreen"] span { display: none; }
  .atlas-toolbar { grid-template-columns: minmax(130px, 1fr) 120px 130px auto 44px; gap: 8px; }
}
@media (max-width: 640px) {
  .map-panel { --atlas-height: clamp(280px, 58dvh, 420px); }
  .atlas-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; gap: 8px; }
  .atlas-search { grid-column: 1 / -1; }
  .atlas-toolbar select { font-size: 14px; }
  .atlas-toolbar button { padding-inline: 10px; }
  .atlas-layout { grid-template-columns: minmax(0, 1fr); }
  .atlas-stage { height: var(--atlas-height); }
  .atlas-layers { border-left: 0; border-top: 1px solid #685334; }
  .atlas-layers fieldset { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; }
  .atlas-layer { grid-template-columns: 17px 20px minmax(0, 1fr); gap: 7px; font-size: 12px; }
  .atlas-layer small { display: none; }
  .atlas-layer-note, .atlas-layers #atlas-help { display: none; }
  .atlas-zoom { top: 12px; right: 12px; }
  .atlas-inset { width: 140px; height: 184px; right: 12px; }
  .atlas-search-results { top: 57px; left: 10px; width: calc(100% - 20px); max-height: 270px; }
  .atlas-popup { top: auto; bottom: 44px; left: 12px; width: calc(100% - 24px); max-height: 60%; padding: 18px 16px 12px; }
  .map-index ul { columns: 1; }
  .map-panel:fullscreen .atlas-layout, .map-panel.atlas-fullscreen .atlas-layout { grid-template-rows: minmax(0, 1fr) auto; }
  .map-panel:fullscreen .atlas-layers, .map-panel.atlas-fullscreen .atlas-layers { max-height: 220px; }
}
@media (scripting: enabled) and (max-width: 640px) {
  .atlas-static { height: calc(var(--atlas-height) + 117px); }
}
@media (max-height: 650px) {
  .atlas-zoom { grid-auto-flow: column; top: 12px; right: 12px; }
  .atlas-zoom button { border-bottom: 0; border-right: 1px solid #685639; }
  .atlas-zoom button:last-child { border-right: 0; }
  .atlas-inset { width: 140px; height: 184px; right: 12px; }
}
@media (forced-colors: active) {
  .atlas-pin-symbol, .atlas-toolbar button, .atlas-popup, .atlas-tooltip { background: Canvas; color: CanvasText; border-color: CanvasText; }
  .atlas-pin:focus-visible .atlas-pin-symbol { outline: 3px solid Highlight; }
}

/* ---- Responsive ---------------------------------------------------------------------------------------------- */
@media (min-width: 981px) {
  .table-wrap.table-page { overflow: visible; }
  .table-wrap.table-page table.data th:first-child { border-top-left-radius: 3px; }
}
@media (max-width: 1180px) {
  :root { --infobox: 316px; --gutter: 24px; }
  .entity-body { gap: 0 28px; }
  .tiles-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-cols { grid-template-columns: 1fr 1fr; }
  .home-cols > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .header-row .brand-text { display: none; }
  .entity-body { display: block; }
  .infobox { position: static; max-height: none; overflow: visible; margin: 0 0 28px; }
  .infobox .media-viewer { max-width: 340px; margin-inline: auto; }
  .infobox figure > img.icon, .infobox figure > img.icon-l { width: 112px; height: 112px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 0 32px; }
  .home-wide .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16.5px; }
  .header-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; min-height: 0; padding-block: 10px 12px; }
  .brand { gap: 10px; }
  .brand img { width: 88px; height: auto; padding: 0; }
  .header-row .brand { min-width: 0; }
  .brand-logo { width: 150px; }
  .brand-text { padding-left: 10px; }
  .brand-name { font-size: 13px; }
  .brand-sub { display: none; }
  .ext { margin: 0; font-size: 13.5px; }
  .header-row .search { grid-column: 1 / -1; grid-row: 2; max-width: none; margin: 0; }
  .main-nav a { padding: 0 14px; }
  .search-hero input { font-size: 16.5px; }
  .crumbs ol { margin: 10px 0 12px; }
  .entity-head, .list-head { gap: 14px; margin-bottom: 20px; padding-bottom: 18px; }
  .entity-head > .icon-l { width: 64px; height: 64px; padding: 6px; }
  .lead { font-size: 1.05rem; }
  .entity-main h2, .changes h2 { margin-top: 30px; font-size: 1.35rem; }
  .infobox figure { padding: 16px 12px 12px; }
  .infobox figure > img.icon, .infobox figure > img.icon-l { width: 96px; height: 96px; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tile { padding: 14px 16px; }
  .tiles-compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .tiles-compact .tile { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; }
  .tiles-compact .tile-art, .tiles-compact .tile-text { display: none; }
  .home-hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .home-cols { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pager-up { grid-column: 1 / -1; grid-row: 2; justify-content: center; min-height: 44px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .filter { max-width: none; flex-basis: 100%; }
  .facet { width: 100%; justify-content: space-between; }
  .facet select { flex: 1; max-width: none; }
  table.data { font-size: 14.5px; }
  table.data th, table.data td { padding: 9px 12px; }
  table.data .opt { display: none; }
  table.data a.ref { min-width: 0; }
  .search-results li a, .result-list li a { grid-template-columns: 36px minmax(0, 1fr); }
  .result-kind { grid-column: 2; justify-self: start; }
  .map-index ul { columns: 1; }
  .article-contents ol { gap: 0 16px; }
  .stat-tiles dd { font-size: 1.25rem; }
  .map-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .header-row { grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .header-row .ext { display: none; }
  .main-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding-block: 8px; }
  .main-nav a { min-height: 48px; }
  .nav-play { display: block; grid-column: 1 / -1; }
  .main-nav .play-link { border: 1px solid var(--bronze); color: var(--gold-hi); }
  .home-wide .chips { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .brand-name { letter-spacing: .1em; }
  .tiles-compact { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .tile:hover, .map-card:hover, .map-card:hover .map-card-img, .home-map:hover img { transform: none; }
}
@media (forced-colors: active) {
  .badge, .chip, .tile, .pager-cell, .infobox { border: 1px solid CanvasText; }
}

/* Native full-HD skill loops use the full infobox at their recorded aspect. */
.infobox figure:has(.skill-animation img[width="1920"][height="1080"]) { margin: 0; padding: 0; }
.infobox .skill-animation:has(img[width="1920"][height="1080"]) picture { aspect-ratio: 16 / 9; max-height: none; }
.infobox .skill-animation img.animation[width="1920"][height="1080"] { max-width: none; max-height: none; object-fit: contain; }
@media (max-width: 980px) {
  .infobox .skill-animation:has(img[width="1920"][height="1080"]) { max-width: none; }
}
.atlas-edit-dialog pre{max-height:18rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:.85rem}
