/* Aetherfall wiki: night sky, lilac stone, aether light and old gold. */
:root {
  --bg: #0d0b18;
  --bg2: #141127;
  --panel: #1a1631;
  --panel2: #221d3f;
  --line: #2f2852;
  --text: #e9e4f7;
  --muted: #9d94bf;
  --gold: #e8be52;
  --aether: #8ee6ff;
  --lilac: #c6b6e4;
  --rose: #ff4fd8;
  --ok: #7be07b;
  --warn: #ffb86a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 15px/1.6 Inter, system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 70% -200px, #2a1d55 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 10%, #12304a 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
}
a { color: var(--aether); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: Cinzel, Georgia, serif; letter-spacing: .02em; line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 1.2rem 0 .4rem; color: var(--gold); }
h2 { font-size: 1.35rem; margin: 2rem 0 .7rem; color: var(--lilac); }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
code, kbd { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
code { background: #ffffff10; padding: .1em .4em; border-radius: 5px; color: #f3e6ff; }
kbd { background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 2px; padding: .05em .45em; border-radius: 5px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.gold { color: var(--gold); }
.warn { color: var(--warn); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: #0d0b18e6; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 54px; }
.brand { font-family: Cinzel, serif; font-weight: 700; color: var(--gold); font-size: 1.1rem; white-space: nowrap; }
.brand small { color: var(--muted); font-family: Inter, sans-serif; font-weight: 500; font-size: .75rem; }
.brand .sigil { color: var(--aether); text-shadow: 0 0 10px var(--aether); }
.top nav { display: flex; flex-wrap: wrap; gap: 2px; }
.top nav a { color: var(--muted); padding: 6px 9px; border-radius: 7px; font-size: .9rem; }
.top nav a:hover { color: var(--text); background: #ffffff0d; text-decoration: none; }
.top nav a.on { color: var(--bg); background: var(--gold); }
.menu { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 7px; padding: 4px 10px; font-size: 1.1rem; }

/* home */
.hero { padding: 1.2rem 0 .5rem; }
.hero h1 { font-size: 2.8rem; margin-bottom: .2rem; text-shadow: 0 0 30px #e8be5240; }
.lead { font-size: 1.08rem; max-width: 720px; color: #d8d0f0; }
.join { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: var(--radius); margin: .6rem 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #555; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 1.4rem 0; }
.card { display: block; background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--text); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.card h3 { color: var(--gold); }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
ul.plain { list-style: none; padding: 0; }
.steps li { margin-bottom: .6rem; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent, var(--line)); border-radius: var(--radius);
  padding: 14px 18px; margin: 12px 0; }
.panel h2 { margin-top: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 12px 0; }
.cols .panel { margin: 0; }
.rules p { margin: .35rem 0; }

/* tables */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
table.list th, table.list td, table.perks th, table.perks td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th, table.perks th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.list th.n, table.list td[data-v] { text-align: right; white-space: nowrap; }
table.list tbody tr:hover { background: #ffffff06; }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th.asc::after { content: " ▲"; } table.sortable th.desc::after { content: " ▼"; }
.perks td.lvl { color: var(--gold); font-weight: 600; width: 60px; }
.chips { min-width: 180px; }
.chip { display: inline-block; font-size: .75rem; margin: 2px 3px 2px 0; padding: 1px 8px; border-radius: 999px; background: #ffffff0a;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); white-space: nowrap; }
.chip b { color: var(--text); }

/* stats */
.tabs { display: flex; gap: 6px; margin-top: 1rem; }
.tabs a { padding: 6px 14px; border-radius: 999px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); font-size: .9rem; }
.tabs a.on { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.online b { color: var(--ok); font-size: 1.1rem; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding: 22px 0 22px; margin: 10px 0 14px; }
.bar { flex: 1; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.bar i { display: block; background: linear-gradient(180deg, var(--lilac), #7a5cff); border-radius: 4px 4px 0 0; opacity: .85; }
.bar.last i { background: linear-gradient(180deg, var(--gold), #a87a1e); }
.bar:hover i { opacity: 1; }
.bar .v { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.bar .l { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.famegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.fame { background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.fame .big { font-size: 1.4rem; font-weight: 600; color: var(--gold); }
.fame .what { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fame .who { margin-top: 4px; }
.totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.totals div, .facts div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.totals b { font-size: 1.3rem; color: var(--aether); }
.totals span, .facts span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 12px 0; }
.facts b { font-size: 1.05rem; }
ul.tally { list-style: none; padding: 0; margin: 0; }
ul.tally li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
ul.tally li:last-child { border-bottom: 0; }

/* items */
.search { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 9px 12px; font: inherit; margin: 6px 0 12px; }
.search:focus { outline: none; border-color: var(--gold); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.toc a { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: .85rem; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.ihead { display: flex; gap: 12px; align-items: center; }
.ihead h3 { margin: 0; font-family: Inter, sans-serif; font-weight: 600; letter-spacing: 0; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.ihead img, .noimg { width: 40px; height: 40px; flex: none; background: #0000002e; border-radius: 6px; padding: 4px; }
.noimg { display: grid; place-items: center; color: var(--lilac); }
.lore { color: var(--muted); font-size: .88rem; margin: .5rem 0; }
.tier-common { color: #e9e4f7; } .tier-uncommon { color: #7be07b; } .tier-rare { color: #6fb8ff; }
.tier-epic { color: #c080ff; } .tier-legendary { color: var(--gold); } .tier-mythic { color: var(--rose); }
.recipe { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 210px; }
.grid3 span { background: #00000040; border: 1px solid var(--line); border-radius: 4px; font-size: .62rem; line-height: 1.2; min-height: 34px;
  display: grid; place-items: center; text-align: center; padding: 2px; color: #d8d0f0; overflow: hidden; }
.arrow { color: var(--gold); font-weight: 600; white-space: nowrap; }

/* paintings */
.gallery { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.painting { margin: 0; width: calc(var(--w) * 72px); max-width: 100%; }
.painting img { width: 100%; display: block; border: 6px solid #3a2414; box-shadow: 0 0 0 2px #1a0e06, 0 10px 24px #0008; }
.painting figcaption { font-size: .85rem; margin-top: 6px; }

.foot { color: var(--muted); font-size: .82rem; padding: 2.5rem 16px 2rem; border-top: 1px solid var(--line); margin-top: 3rem; }

@media (max-width: 860px) {
  .menu { display: block; }
  .top .wrap { flex-wrap: wrap; }
  .top nav { display: none; width: 100%; padding-bottom: 10px; }
  body.nav-open .top nav { display: flex; }
  .hero h1 { font-size: 2.1rem; }
  .chart { gap: 2px; }
  .bar .v { display: none; }
  .painting { width: calc(var(--w) * 56px); }
}
