/* Ashenvale Wiki — dark ash & ember. Plain CSS, no framework. */
@font-face {
  font-family: 'Pixelify Sans';
  src: url('fonts/PixelifySans.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #141210;
  --bg2: #1c1612;
  --panel: #211a15;
  --panel2: #2a211b;
  --line: #3a2d24;
  --rim: #835b42;
  --rim2: #8a6e5a;
  --ember: #ff9a40;
  --ember-dim: #c9702a;
  --gold: #e8c98a;
  --text: #e9dfd3;
  --muted: #a8998a;
  --dim: #7d6f62;
  --unique: #d9b26f;
  --rare: #f2df5c;
  --magic: #7f9cff;
  --bad: #ff6b5a;
  --good: #9fd08a;
  --pixel: 'Pixelify Sans', 'Courier New', monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 420px at 50% -120px, rgba(255, 122, 40, 0.12), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; }
a { color: var(--gold); text-decoration-color: rgba(232, 201, 138, 0.35); text-underline-offset: 3px; }
a:hover { color: var(--ember); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--pixel); font-weight: 600; line-height: 1.15; color: var(--gold); letter-spacing: 0.01em; }
h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 8px; color: #f3dca7; text-shadow: 0 2px 0 #3b2414, 0 0 24px rgba(255, 154, 64, 0.18); }
h2 { font-size: clamp(22px, 3vw, 28px); margin: 36px 0 12px; }
h3 { font-size: 20px; margin: 24px 0 8px; color: var(--text); }
h4 { font-size: 17px; margin: 20px 0 6px; color: var(--text); }
code { font: 0.88em var(--mono); background: #0e0c0a; border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px; color: #f0c690; }
hr { border: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--rim), transparent); margin: 32px 0; }
.dim { color: var(--dim); }
.yes { color: var(--good); }
.sr { position: absolute; 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; background: var(--ember); color: #1a0f06; padding: 8px 12px; }
.skip:focus { left: 8px; }
.px, .ico, .ico-lg, .ico-xl, .hero-logo, .brand img { image-rendering: pixelated; image-rendering: crisp-edges; }
.broken { color: var(--bad); border-bottom: 1px dashed var(--bad); }

/* ------------------------------------------------ pixel frames (9-slice from the game UI) */
.frame {
  border: 12px solid transparent;
  border-image: url('ui/panel_bronze.png') 16 fill / 12px / 0 stretch;
  background: none;
}
.frame-sq {
  border: 10px solid transparent;
  border-image: url('ui/slot.png') 10 fill / 10px stretch;
}
.frame-thin { border: 1px solid var(--rim); background: var(--bg2); box-shadow: inset 0 0 0 1px #0b0908, inset 0 0 0 2px rgba(138, 110, 90, 0.25); border-radius: var(--radius); }

/* ------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 18, 16, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid #0b0908;
  box-shadow: 0 1px 0 var(--rim), 0 6px 18px rgba(0, 0, 0, 0.45);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar { max-width: var(--maxw); margin: 0 auto; padding: 8px var(--gutter); display: flex; gap: 16px; align-items: center; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.brand img { width: 44px; height: 44px; }
.brand span { font: 600 24px/1 var(--pixel); color: #f3dca7; text-shadow: 0 2px 0 #3b2414; display: flex; align-items: baseline; gap: 6px; }
.brand small { font-size: 15px; color: var(--ember); letter-spacing: 0.08em; text-transform: uppercase; }
.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.search input, .hero-search input, .search-page input, .ftext input, .fsel select {
  width: 100%;
  font: 15px var(--sans);
  color: var(--text);
  background: #0e0c0a;
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.5);
  padding: 9px 36px 9px 12px;
}
.search input::placeholder, .hero-search input::placeholder, .ftext input::placeholder { color: var(--dim); }
.search input:focus, .hero-search input:focus, .search-page input:focus, .ftext input:focus, .fsel select:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 2px rgba(255, 154, 64, 0.25); }
.kbd-hint { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 12px var(--mono); color: var(--dim); border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; pointer-events: none; }
.search input:focus + .kbd-hint { display: none; }
.q-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--bg2); border: 1px solid var(--rim); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  max-height: min(70vh, 520px); overflow-y: auto;
}
.q-results li a, .search-results li a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; text-decoration: none; color: var(--text); border-radius: 2px; }
.q-results li[aria-selected='true'] a, .q-results li a:hover { background: var(--panel2); box-shadow: inset 2px 0 0 var(--ember); }
.q-results .r-t, .search-results .r-t { display: block; font-weight: 600; }
.q-results .r-s, .search-results .r-s { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-results .r-c, .search-results .r-c { margin-left: auto; font: 13px var(--pixel); color: var(--rim2); flex: none; }
.q-results .r-body, .search-results .r-body { min-width: 0; }
.q-results mark, .search-results mark { background: none; color: var(--ember); }
.q-results .r-more a { justify-content: center; color: var(--gold); font-size: 14px; }
.q-results .r-empty { padding: 10px; color: var(--muted); }
.menu-btn { display: none; }
.site-nav { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { font: 17px var(--pixel); color: var(--muted); text-decoration: none; padding: 6px 12px 8px; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav a:hover { color: var(--gold); }
.site-nav a[aria-current] { color: var(--ember); border-bottom-color: var(--ember); }

/* ------------------------------------------------ main */
.main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gutter) 64px; }
.crumbs ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; color: var(--dim); }
.crumbs li + li::before { content: '›'; margin-right: 4px; color: var(--rim); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ember); }
.page-head { margin-bottom: 20px; }
.lead { font-size: 18px; color: #d8cabb; max-width: 70ch; }
.kicker { margin: 0 0 2px; font: 15px var(--pixel); color: var(--ember); letter-spacing: 0.06em; text-transform: uppercase; }
.kicker a { color: inherit; text-decoration: none; }
.btn { display: inline-block; font: 18px var(--pixel); color: #1d0f05; background: linear-gradient(#ffb566, var(--ember) 55%, #d9721f); border: 1px solid #5c2f10; box-shadow: inset 0 1px 0 #ffe0b5, 0 2px 0 #3a1c08; padding: 7px 18px 9px; border-radius: 2px; text-decoration: none; }
.btn:hover { color: #1d0f05; filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--rim); box-shadow: none; }
.btn-ghost:hover { color: var(--ember); border-color: var(--ember); }

/* entity links */
.ent { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; vertical-align: middle; }
.ent span { text-decoration: underline; text-decoration-color: rgba(232, 201, 138, 0.3); text-underline-offset: 3px; }
.ent:hover span { text-decoration-color: currentColor; }
.ent.c-uniques { color: var(--unique); }
.ent.c-monsters { color: #f0b39a; }
.ent.c-skills, .ent.c-abilities { color: #bfe0a4; }
.ico { width: 22px; height: 22px; object-fit: contain; flex: none; }
.ico-lg { width: 44px; height: 44px; object-fit: contain; flex: none; }
.ico-xl { width: 88px; height: 88px; object-fit: contain; }
.ico-none { display: inline-block; background: radial-gradient(circle, rgba(255, 154, 64, 0.35) 0 25%, transparent 30%); }
.ico.ico-none { width: 10px; height: 10px; }

/* ------------------------------------------------ prose */
.prose { max-width: 78ch; }
.prose p, .prose li { color: #e2d6c9; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--ember-dim); }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--rim); color: var(--muted); }
.prose img:not(.ico) { image-rendering: pixelated; }
.prose h2 .anchor, .prose h3 .anchor { float: left; margin-left: -1em; width: 1em; opacity: 0; text-decoration: none; color: var(--rim); }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
pre.code { background: #0c0a09; border: 1px solid var(--line); border-left: 3px solid var(--rim); padding: 12px 14px; overflow-x: auto; font: 14px/1.5 var(--mono); }
pre.code code { background: none; border: 0; padding: 0; color: #e7d4bb; }
.callout { margin: 20px 0; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--rim2); border-radius: var(--radius); }
.callout-title { font: 17px var(--pixel); color: var(--gold); margin-bottom: 4px; }
.callout > p:last-child { margin-bottom: 0; }
.callout > p:first-of-type { margin-top: 0; }
.callout-tip { border-left-color: var(--good); } .callout-tip .callout-title { color: var(--good); }
.callout-warning { border-left-color: var(--bad); } .callout-warning .callout-title { color: #ff9b8c; }
.callout-lore { border-left-color: var(--ember); font-style: italic; } .callout-lore .callout-title { color: var(--ember); font-style: normal; }
.toc { padding: 12px 16px; margin: 0 0 24px; max-width: 420px; }
.toc h2 { font-size: 16px; margin: 0 0 6px; border: 0; padding: 0; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: 2px 0; font-size: 15px; }

/* ------------------------------------------------ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 20px; border: 1px solid var(--rim); border-radius: var(--radius); background: var(--bg2); box-shadow: inset 0 0 0 1px #0b0908; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { position: sticky; top: 0; background: #2b211a; font: 500 15px var(--pixel); color: var(--gold); white-space: nowrap; border-bottom: 2px solid var(--rim); }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.018); }
tbody tr:hover { background: rgba(255, 154, 64, 0.06); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th[data-num] { text-align: right; font-variant-numeric: tabular-nums; }
th[data-num] button { flex-direction: row-reverse; }
.c-name { min-width: 180px; font-weight: 600; }
.c-sum { color: var(--muted); font-size: 14px; min-width: 240px; }
.data-table th button { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.data-table th button:focus-visible { outline: 2px solid var(--ember); }
.data-table th i::after { content: '⇅'; font-style: normal; color: var(--rim); font-size: 12px; }
.data-table th[aria-sort='ascending'] i::after { content: '▲'; color: var(--ember); }
.data-table th[aria-sort='descending'] i::after { content: '▼'; color: var(--ember); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 16px 0 4px; }
.ftext { flex: 1 1 220px; max-width: 340px; }
.ftext input { padding-right: 12px; }
.fsel { display: flex; flex-direction: column; gap: 2px; font: 13px var(--pixel); color: var(--muted); }
.fsel select { padding: 8px 28px 8px 10px; min-width: 120px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.fcount { margin-left: auto; color: var(--dim); font-size: 14px; padding-bottom: 8px; }
.fcount b { color: var(--gold); }
.empty { color: var(--muted); }
.empty button { all: unset; color: var(--ember); cursor: pointer; text-decoration: underline; }

/* ------------------------------------------------ entity page */
.ent-head { display: flex; gap: 20px; align-items: center; margin-bottom: 12px; }
.ent-head h1 { margin: 0; }
.ent-icon { flex: none; display: grid; place-items: center; width: 116px; height: 116px; background: #0e0c0a; }
.entity.c-uniques h1 { color: var(--unique); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.tags a { display: block; font: 13px var(--pixel); color: var(--muted); border: 1px solid var(--line); background: var(--panel); padding: 1px 8px 2px; border-radius: 2px; text-decoration: none; }
.tags a:hover { color: var(--ember); border-color: var(--ember-dim); }
.ent-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.ent-main { min-width: 0; }
.ent-main > .lead:first-child { margin-top: 4px; }
.lore { margin: 12px 0 20px; padding: 10px 18px; border-left: 3px solid var(--ember-dim); background: linear-gradient(90deg, rgba(255, 154, 64, 0.07), transparent); }
.lore p { margin: 0; font-style: italic; color: #d9c29a !important; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; }
.infobox { position: sticky; top: 124px; }
.infobox { padding: 6px 8px 10px; background: #1b1511; background-clip: padding-box; }
.ib-title { font: 600 20px var(--pixel); color: var(--gold); text-align: center; padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.entity.c-uniques .ib-title { color: var(--unique); }
.ib-icon { display: grid; place-items: center; padding: 14px; background: radial-gradient(circle, rgba(255, 154, 64, 0.13), transparent 65%); }
.infobox dl { margin: 0; }
.infobox dl > div { display: grid; grid-template-columns: 42% 1fr; gap: 8px; padding: 6px 4px; border-bottom: 1px solid rgba(58, 45, 36, 0.7); font-size: 15px; }
.infobox dl > div:last-child { border-bottom: 0; }
.infobox dt { color: var(--muted); font: 14px var(--pixel); padding-top: 2px; }
.infobox dd { margin: 0; overflow-wrap: anywhere; }
.kv { margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.chips { list-style: none; padding: 0 !important; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 3px 10px; }
.chips li:has(.ent) { padding: 2px 8px 2px 4px; }
.refgroup h3 { font-size: 16px; margin: 14px 0 4px; color: var(--muted); }
.refs h2 { margin-top: 36px; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager small { width: 100%; color: var(--dim); font: 13px var(--pixel); }
.pager .next { justify-content: flex-end; text-align: right; }
.pager .next small { text-align: right; }
.pager .up { font: 15px var(--pixel); color: var(--muted); }

/* ------------------------------------------------ guides */
.guide-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.gnav { position: sticky; top: 124px; max-height: calc(100vh - 140px); overflow-y: auto; font-size: 15px; }
.gnav summary { display: none; }
.gnav h3 { font-size: 15px; color: var(--ember); margin: 18px 0 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.gnav-sec:first-child h3 { margin-top: 0; }
.gnav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.gnav a { display: block; padding: 3px 0 3px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.gnav a:hover { color: var(--gold); }
.gnav a[aria-current] { color: var(--gold); border-left-color: var(--ember); }
.guide-list { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.guide-list a { display: block; height: 100%; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--rim); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.guide-list a:hover { border-color: var(--rim2); border-left-color: var(--ember); background: var(--panel2); }
.guide-list strong { display: block; font: 600 18px var(--pixel); color: var(--gold); }
.guide-list span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.guide-list.compact { grid-template-columns: 1fr; gap: 6px; }
.guide-list.compact a { padding: 8px 12px; }

/* ------------------------------------------------ cards & tiles */
.card { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); padding: 6px 8px; background: #1b1511; background-clip: padding-box; transition: transform 0.12s; }
.card:hover { transform: translateY(-2px); color: var(--text); }
.card-body { display: flex; flex-direction: column; min-width: 0; }
.card-kicker { font: 12px var(--pixel); color: var(--ember); text-transform: uppercase; letter-spacing: 0.06em; }
.card-title { font: 600 19px var(--pixel); color: var(--gold); }
.c-uniques .card-title, .card.c-uniques .card-title { color: var(--unique); }
.card-sum { font-size: 14px; color: var(--muted); line-height: 1.4; }
.prose .ent-card { max-width: 460px; margin: 16px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.tile-group h3 { font-size: 17px; color: var(--muted); margin: 22px 0 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tile { display: flex; gap: 10px; align-items: center; padding: 4px 8px; text-decoration: none; background: #1b1511; background-clip: padding-box; transition: transform 0.12s; }
.tile:hover { transform: translateY(-2px); }
.tile-body { display: flex; flex-direction: column; }
.tile-title { font: 600 19px var(--pixel); color: var(--gold); }
.tile-count { font-size: 13px; color: var(--dim); }
.tile .ico-lg { width: 40px; height: 40px; }

/* ------------------------------------------------ home */
.page-home .main { padding-top: 0; }
.hero {
  position: relative;
  margin: 0 calc(50% - 50vw) 28px;
  padding: 48px var(--gutter) 40px;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.15), rgba(20, 18, 16, 0.35) 45%, var(--bg) 100%), url('backdrop.png') center 62% / cover no-repeat;
  image-rendering: pixelated;
  border-bottom: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}
.hero-inner { position: relative; max-width: 640px; margin: 0 auto; }
.hero-logo { width: min(360px, 80vw); height: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7)); }
.hero-tag { font: 22px/1.3 var(--pixel); color: #f6e3c0; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, 0.9); margin: 8px 0 20px; }
.hero-search { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.hero-search input { font-size: 17px; padding: 12px 14px; background: rgba(14, 12, 10, 0.92); }
.hero-search button { font: 18px var(--pixel); color: #1d0f05; background: linear-gradient(#ffb566, var(--ember) 55%, #d9721f); border: 1px solid #5c2f10; box-shadow: inset 0 1px 0 #ffe0b5; border-radius: 2px; padding: 0 18px; cursor: pointer; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.stat { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 6px 12px; background: rgba(20, 16, 13, 0.82); border: 1px solid var(--rim); border-radius: 2px; text-decoration: none; }
.stat b { font: 600 24px/1.1 var(--pixel); color: var(--ember); }
.stat span { font-size: 13px; color: var(--muted); }
.stat:hover { border-color: var(--ember); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.about { padding: 8px 18px 6px; background: #1b1511; background-clip: padding-box; }
.about h2, .start h2 { margin-top: 8px; }
.about p { color: #ddd0c2; }
.featured h2, .browse h2 { margin-top: 40px; }

/* ------------------------------------------------ search page, 404 */
.search-page input { font-size: 18px; padding: 12px 14px; max-width: 640px; }
.search-results { list-style: none; padding: 0; margin: 12px 0; max-width: 760px; }
.search-results li { border-bottom: 1px solid var(--line); }
.notfound { max-width: 560px; margin: 48px auto; padding: 16px 28px; text-align: center; background: #1b1511; background-clip: padding-box; }

/* ------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); background: #100e0c; padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--muted); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; display: flex; gap: 14px; align-items: center; }
.foot-inner p { margin: 2px 0; }
.site-footer a { color: var(--muted); }

/* ------------------------------------------------ responsive */
@media (max-width: 960px) {
  .ent-grid { grid-template-columns: 1fr; }
  .infobox { position: static; order: -1; max-width: 460px; }
  .guide-layout { grid-template-columns: 1fr; gap: 12px; }
  .gnav { position: static; max-height: none; }
  .gnav summary { display: block; cursor: pointer; font: 16px var(--pixel); color: var(--gold); padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); }
  .gnav details { margin-bottom: 8px; }
  .gnav details[open] > div { padding: 8px 12px; }
  .home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .bar { flex-wrap: wrap; gap: 8px 12px; padding-top: 6px; padding-bottom: 6px; }
  .brand img { width: 38px; }
  .brand span { font-size: 21px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .kbd-hint { display: none; }
  .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; margin-left: auto; width: 42px; height: 38px; padding: 0 10px; background: var(--panel); border: 1px solid var(--rim); border-radius: 2px; cursor: pointer; }
  .menu-btn span { display: block; height: 2px; background: var(--gold); }
  .site-nav { display: none; flex-direction: column; gap: 0; padding-bottom: 8px; }
  .site-nav.open { display: flex; }
  .site-nav a { border-bottom: 1px solid var(--line); border-left: 2px solid transparent; padding: 10px 6px; }
  .site-nav a[aria-current] { border-bottom-color: var(--line); border-left-color: var(--ember); }
  html { scroll-padding-top: 130px; }
  .infobox, .gnav { top: auto; }
  .hero { padding-top: 28px; }
  .hero-tag { font-size: 18px; }
  .ent-head { gap: 12px; }
  .filters { gap: 8px; }
  .ftext { flex-basis: 100%; max-width: none; }
  .fsel { flex: 1 1 130px; }
  .fsel select { min-width: 0; }
  .fcount { flex-basis: 100%; margin-left: 0; padding: 0; }
  th, td { padding: 7px 9px; }
  .c-name { min-width: 150px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .up { grid-column: 1 / -1; grid-row: 2; text-align: center; justify-content: center; }
  .foot-inner { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* item-tooltip style stat lines */
.statlines { list-style: none; padding: 10px 16px !important; margin: 8px 0 16px; background: #0f0d0b; border: 1px solid var(--line); border-left: 3px solid var(--magic); border-radius: var(--radius); max-width: 460px; }
.statlines li { color: #9fb4ff !important; margin: 2px 0; font-weight: 500; }
.entity.c-uniques .statlines { border-left-color: var(--unique); }
.stat-line { color: #9fb4ff; }
td.wrap { min-width: 260px; }

.ent-intro { margin-bottom: 8px; }
.ent-intro .lead { margin-top: 4px; }
.ent-grid .ent-main > section:first-child h2 { margin-top: 8px; }
@media (max-width: 720px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 2px 4px; gap: 6px; }
  .tile-title { font-size: 16px; }
  .tile .ico-lg { width: 32px; height: 32px; }
  .infobox .ib-title { display: none; }
  .ib-icon { padding: 8px; }
}

/* ------------------------------------------------ drop tables */
.drop-table td.num { white-space: nowrap; }
.drop-table .rate { font-variant-numeric: tabular-nums; }
.drop-table td .dim { font-size: 13px; }
.drop-table tr.drop-unique td:first-child a, .drop-table tr.drop-unique td:first-child { color: var(--unique); }
.drop-table tr.drop-signature td:first-child a, .drop-table tr.drop-signature td:first-child { color: var(--gold); }
.drop-table tr.drop-pet td:first-child a { color: var(--good); }
