/* Leverfall website, copied to www/style.css by tools/www.py. */

@font-face { font-family: Cinzel; src: url(fonts/Cinzel-Bold.ttf); font-weight: 700; }
@font-face { font-family: Inter; src: url(fonts/Inter-Regular.ttf); font-weight: 400; }
@font-face { font-family: Inter; src: url(fonts/Inter-Medium.ttf); font-weight: 500; }
@font-face { font-family: Inter; src: url(fonts/Inter-SemiBold.ttf); font-weight: 600; }
@font-face { font-family: Inter; src: url(fonts/Inter-Bold.ttf); font-weight: 700; }
@font-face { font-family: Inter; src: url(fonts/Inter-ExtraBold.ttf); font-weight: 800; }
@font-face { font-family: Silk; src: url(fonts/Silkscreen-Regular.ttf); font-weight: 400; }
@font-face { font-family: Silk; src: url(fonts/Silkscreen-Bold.ttf); font-weight: 700; }

:root {
	--bg: #0c0915;
	--bg2: #130e22;
	--panel: #1a1430;
	--panel2: #221a3c;
	--edge: #3a2f5c;
	--gold: #e6b93a;
	--gold2: #f6d77a;
	--text: #ece7f7;
	--muted: #8f86a8;
	--good: #7ee08a;
	--bad: #ff7a7a;
	--r0: #dcdce1;
	--r1: #468cff;
	--r2: #be50ff;
	--r3: #ff961e;
	--r4: #ff6566;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.6 Inter, system-ui, sans-serif;
}

a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: Cinzel, Georgia, serif; font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 44px; color: var(--gold2); }
h2 { font-size: 30px; color: var(--gold2); }
h3 { font-size: 19px; color: var(--text); }
p { margin: 0 0 1em; }

.px, .spr { image-rendering: pixelated; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.center { text-align: center; }
.hide { display: none !important; }

/* Rarity colors, the unique one shifts through the rainbow like in the game. */
.r0 { --rc: var(--r0); }
.r1 { --rc: var(--r1); }
.r2 { --rc: var(--r2); }
.r3 { --rc: var(--r3); }
.r4 { --rc: var(--r4); }
a.r0, a.r1, a.r2, a.r3, .nm.r0, .nm.r1, .nm.r2, .nm.r3, td.r0, td.r1, td.r2, td.r3 { color: var(--rc); }
a.r4, .nm.r4, td.r4, .rung.r4 b {
	background: linear-gradient(90deg, #ff5a5a, #ffb43a, #f6ff5a, #5aff8a, #5ad8ff, #b45aff, #ff5a5a);
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: hue 8s linear infinite;
}
.nm.r4 a, .nm a { color: inherit; }
@keyframes hue { to { background-position: 300% 0; } }

/* Header */
.top {
	position: sticky; top: 0; z-index: 50;
	display: flex; align-items: center; gap: 24px;
	padding: 10px 28px;
	background: rgba(12, 9, 21, .92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--edge);
}
.logo { display: flex; align-items: center; gap: 10px; font: 700 22px Cinzel, serif; color: var(--gold2); }
.logo img { width: 36px; height: 36px; border-radius: 8px; }
.logo:hover { text-decoration: none; }
.main { display: flex; gap: 20px; font-weight: 600; font-size: 15px; }
.main a { color: var(--text); }
.main a.dbl { color: var(--gold2); }
.search { margin-left: auto; position: relative; width: 340px; }
.search input, .ff {
	width: 100%; padding: 9px 14px;
	background: var(--panel); color: var(--text);
	border: 1px solid var(--edge); border-radius: 10px;
	font: 500 14px Inter, sans-serif;
}
.search input:focus, .ff:focus { outline: none; border-color: var(--gold); }
#qr {
	position: absolute; top: 44px; left: 0; right: 0;
	background: var(--panel); border: 1px solid var(--edge); border-radius: 10px;
	max-height: 70vh; overflow: auto; display: none;
	box-shadow: 0 20px 50px rgba(0,0,0,.6);
}
#qr.open { display: block; }
#qr a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; color: var(--text); }
#qr a:hover, #qr a.sel { background: var(--panel2); text-decoration: none; }
#qr img { width: 32px; height: 32px; image-rendering: pixelated; }
#qr .t { font-size: 12px; color: var(--muted); }
#qr .e { padding: 12px; color: var(--muted); }

/*
 * The item database: its pages in a sidebar, grouped under headings,
 * the page itself next to it. Phones get a button that folds it open.
 */
.dblayout { display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1560px; margin: 0 auto; }
.dbside {
	position: sticky; top: 57px; align-self: start;
	max-height: calc(100vh - 57px); overflow-y: auto;
	padding: 28px 12px 28px 28px;
	border-right: 1px solid var(--edge);
}
.dbtoggle { display: none; }
.dblist .grp { margin-bottom: 18px; }
.dblist h4 {
	margin: 0 0 6px; padding: 0 10px 6px;
	font: 700 15px Cinzel, serif; color: var(--gold2);
	border-bottom: 1px solid var(--edge);
}
.dblist a {
	display: block; padding: 5px 10px; border-radius: 7px;
	color: var(--muted); font-weight: 600; font-size: 14px;
}
.dblist a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.dblist a.on { color: var(--bg); background: var(--gold); }
.dbmain .wrap { max-width: none; margin: 0; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 36px 28px 60px; }
.lead { color: #cfc8e2; max-width: 860px; font-size: 17px; }
section { margin-bottom: 40px; }

.foot {
	border-top: 1px solid var(--edge);
	padding: 30px 28px; text-align: center; font-size: 14px;
	background: var(--bg2);
}

/* Sprites: a sheet row played as an idle loop. --k scales them. */
.spr { background-repeat: no-repeat; }
.spr.mon {
	--k: 1;
	width: calc(var(--w) * var(--k) * 1px);
	height: calc(var(--h) * var(--k) * 1px);
	background-size: calc(var(--w) * 8 * var(--k) * 1px) 100%;
	animation: idle8 1.1s steps(8) infinite;
}
.spr.hero {
	--k: 1;
	width: calc(156px * var(--k));
	height: calc(132px * var(--k));
	background-size: calc(1248px * var(--k)) 100%;
	animation: idle8h 1s steps(8) infinite;
}
@keyframes idle8 { to { background-position: calc(var(--w) * 8 * var(--k) * -1px) 0; } }
@keyframes idle8h { to { background-position: calc(1248px * var(--k) * -1) 0; } }

/* A fight scene: the dungeon's backdrop with the fighters on its floor. */
.stage {
	position: relative;
	height: 384px;
	background-color: var(--bg-c, #000);
	background-position: center bottom;
	background-size: auto 100%;
	background-repeat: repeat-x;
	image-rendering: pixelated;
	overflow: hidden;
}
.stage.tall { height: 576px; }
.stage.small { height: 240px; }
.stage .spr { position: absolute; bottom: 0; }
.stage .l { left: 18%; bottom: 4%; }
.stage .r { right: 14%; bottom: 2%; }
.stage.small .l { left: 6%; }
.stage.small .r { right: 4%; }
.stage::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(12,9,21,.0) 55%, rgba(12,9,21,.65) 100%);
	pointer-events: none;
}

/* Landing page */
.hero-top { position: relative; margin: 0; }
.hero-top .stage { height: min(78vh, 640px); }
.hero-top .stage .l { left: 8%; bottom: 5%; }
.hero-top .stage .r { right: 6%; bottom: 3%; }
.hero-top .stage::after { background: linear-gradient(180deg, rgba(12,9,21,.55) 0%, rgba(12,9,21,.15) 40%, rgba(12,9,21,.9) 100%); }
.hero-copy {
	position: absolute; left: 50%; top: 6%; transform: translateX(-50%);
	width: min(760px, 92%); text-align: center; z-index: 2;
	padding: 18px 36px 26px; border-radius: 28px;
	background: radial-gradient(ellipse at 50% 50%, rgba(12,9,21,.82) 0%, rgba(12,9,21,.6) 55%, rgba(12,9,21,0) 78%);
}
.hero-copy h1 {
	font-size: clamp(54px, 9vw, 112px); margin: 0;
	background: linear-gradient(180deg, #fff3c4 0%, #f6d77a 45%, #c48a1c 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 4px 0 #3a1d00) drop-shadow(0 10px 24px rgba(0,0,0,.7));
	letter-spacing: 2px;
}
.tagline { font: 700 26px/1.3 Inter, sans-serif; color: #fff; text-shadow: 0 2px 10px #000; margin: 8px 0 14px; }
.hero-copy p { text-shadow: 0 1px 6px #000; font-size: 18px; }
.hero-copy p.platforms { margin: 12px 0 0; font: 700 16px/1.3 Inter, sans-serif; color: #e9d9ae; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.btn {
	display: inline-block; padding: 11px 22px; border-radius: 12px;
	background: var(--panel2); color: var(--text);
	border: 1px solid var(--edge); font-weight: 700;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 0 #0a0712;
}
.btn:hover { text-decoration: none; border-color: var(--gold); }
.btn.gold {
	background: linear-gradient(180deg, #ffe08a, #e6b93a 55%, #b9851a);
	color: #2a1800; border-color: #ffe9a8;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 0 #6d4a08;
}

.anchors {
	position: sticky; top: 57px; z-index: 40;
	display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
	padding: 10px; background: rgba(19,14,34,.95);
	border-bottom: 1px solid var(--edge); border-top: 1px solid var(--edge);
}
.anchors a { padding: 5px 13px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.anchors a:hover, .anchors a.on { background: var(--panel2); color: var(--gold2); text-decoration: none; }

.block { padding: 80px max(28px, calc((100% - 1200px) / 2)); margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; align-items: center; }
.block.alt { background: var(--bg2); }
.block > .stage { grid-column: 1 / -1; margin: -80px calc(-1 * max(28px, calc((100vw - 1200px) / 2))) 0; }
.block .copy.wide { grid-column: 1 / -1; max-width: 880px; }
.block .copy p { font-size: 17px; color: #d6d0e8; }
.kicker { font: 700 13px Silk, monospace; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.block h2 { font-size: 40px; }

.shot img { width: 100%; border-radius: 14px; border: 2px solid #6d5320; box-shadow: 0 30px 60px rgba(0,0,0,.6); display: block; }
/* Three phones in a row: the fight in the middle stands up, the town and the gear at its sides sit lower. */
.shot.phones { display: flex; justify-content: center; align-items: flex-start; gap: 16px; }
.shot.phones img { width: calc((100% - 32px) / 3); max-width: 180px; border-radius: 18px; box-shadow: 0 20px 40px rgba(0,0,0,.6); }
.shot.phones img:nth-child(odd) { margin-top: 36px; }

.syms { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.sym { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 12px; }
.sym img { width: 48px; height: 48px; flex: none; }
.sym p { margin: 0; font-size: 14px; color: #cfc8e2; }

.duns { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dun { background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; color: var(--text); display: flex; flex-direction: column; }
.dun:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-2px); transition: .15s; }
.dun.eg { border-color: #6a2a3a; background: linear-gradient(180deg, #2a1424, var(--panel)); }
.dpic { position: relative; height: 175px; background-size: cover; background-position: center; image-rendering: pixelated; }
.dpic .dmon { position: absolute; right: 6px; bottom: -6px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.7)); }
.dtxt { padding: 14px 16px; }
.dtxt h3 { margin-bottom: 4px; }
.dtxt p { font-size: 14px; color: #cfc8e2; margin-bottom: 6px; }
.dlv { font: 700 11px Silk, monospace; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; }
.dun.eg .dlv { color: #ff7a8a; }

.ladder { display: flex; gap: 8px; margin: 18px 0 22px; flex-wrap: wrap; }
.rung { flex: 1; min-width: 92px; text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--panel); border: 2px solid var(--rc); box-shadow: 0 0 18px -6px var(--rc); }
.rung img { width: 64px; height: 64px; display: block; margin: 0 auto 4px; }
.rung b { color: var(--rc); font-size: 14px; }
.lootwall { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.lw {
	aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
	border-radius: 16px; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 28%, #17122a), #120d20 72%);
	border: 1px solid color-mix(in srgb, var(--rc) 55%, #2a2244);
	box-shadow: 0 0 22px -8px var(--rc);
	transition: transform .15s, box-shadow .15s;
}
.lw:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 0 30px -4px var(--rc); }
.lw img { width: 78%; height: 78%; }
.lw.r4 { border-color: transparent; background: radial-gradient(circle, #3a1c30, #120d20 72%) padding-box, linear-gradient(135deg, #ff5a5a, #ffb43a, #5aff8a, #5ad8ff, #b45aff) border-box; }

.town {
	position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
	background: var(--peaks) center / cover, var(--sky) center / cover;
	border: 2px solid var(--edge);
}
.town .th { position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%); }

.trees { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 16px; }
.tree { background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 18%, var(--panel)), var(--panel) 60%); border: 1px solid color-mix(in srgb, var(--tc) 45%, var(--edge)); border-radius: 16px; padding: 20px; position: relative; }
.tree h3 { color: var(--tc); font-size: 24px; }
.tsym { position: absolute; right: 16px; top: 16px; }
.tsym img { width: 52px; height: 52px; }
.tag { font: 700 12px Silk, monospace; letter-spacing: 1px; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.ticons { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.ticons img { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--edge); background: #0c0915; }
.tree .cap { font-size: 14px; color: #d6d0e8; }

.feats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.feat { background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 18px; text-align: center; }
.feat img { width: 96px; height: 96px; }
.feat p { font-size: 14px; color: #cfc8e2; }

.minis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; color: var(--text); font-size: 13px; font-weight: 600; text-align: center; }
.mini:hover { text-decoration: none; border-color: var(--gold); }
.mini img { width: 64px; height: 64px; }

.wagers { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.wager { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 14px; }
.wager img { width: 52px; height: 52px; flex: none; }
.wager p { margin: 0; font-size: 14px; }

.egs { grid-column: 1 / -1; display: grid; gap: 22px; }
.egd { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; background: var(--panel); border: 1px solid #5a2433; border-radius: 16px; overflow: hidden; }
.egd .stage { height: 260px; }
.egt { padding: 22px 26px; }
.egt .tag { color: #ff7a8a; }

.raid > .stage { --bg-c: #1a0800; }
.rbs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.rb { background: var(--panel); border: 1px solid #6a2a14; border-radius: 14px; overflow: hidden; color: var(--text); }
.rb:hover { text-decoration: none; border-color: #ff8a3a; }
.rbpic { position: relative; height: 170px; background-size: auto 100%; background-position: center bottom; }
.rbpic .rbmon { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); }
.rb b { display: block; padding: 10px 12px 2px; color: #ffb07a; }
.rb p { padding: 0 12px 12px; margin: 0; font-size: 13px; color: #cfc8e2; }
.mates { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mate { position: relative; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 20%, var(--panel)), var(--panel)); border: 1px solid color-mix(in srgb, var(--tc) 50%, var(--edge)); border-radius: 14px; padding: 12px; }
.mate .spr { margin: 0 auto; }
.mate .crest { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; }
.mate b { font: 700 20px Cinzel, serif; color: var(--tc); display: block; }
.mate p { font-size: 13px; color: #cfc8e2; margin: 0; }

.fhs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fh { display: flex; flex-direction: column; align-items: center; padding: 10px; background: radial-gradient(ellipse at 50% 70%, #2a2048, var(--panel) 70%); border: 1px solid var(--edge); border-radius: 14px; color: var(--text); font-weight: 600; font-size: 14px; }
.fh:hover { text-decoration: none; border-color: var(--gold); }

.final .stage::after { background: linear-gradient(180deg, rgba(12,9,21,0) 30%, rgba(12,9,21,.95) 100%); }
.final .copy { margin-top: -120px; position: relative; z-index: 2; }

/* Item cards, after the item window in the game. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px 18px; padding-top: 12px; align-items: stretch; }
.card { display: flex; flex-direction: column; }
.card .src { margin-top: auto; padding-top: 10px; }
/*
 * The frame of loot_card_frame() in the game, with u = 1px: a face that
 * fades from the rarity into the dark, a dark line round the outside,
 * a band in the rarity color with a lit line on it, a dark line inside
 * that and a faint one further in, studs in the corners, a crest on
 * the top edge and a pip on the bottom one.
 */
.card {
	--lit: color-mix(in srgb, var(--rc) 50%, #fff);
	--dk: #0b0604;
	position: relative;
	background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 35%, #000), color-mix(in srgb, var(--rc) 16%, #000) 50%, #160f14);
	border: 6px solid var(--rc);
	border-radius: 14px;
	padding: 16px 18px 18px;
	box-shadow: 0 0 0 1px var(--dk), inset 0 0 0 1px var(--dk), 0 10px 28px rgba(0,0,0,.45);
	font-size: 14px;
}
.card::before, .card::after { content: ""; position: absolute; pointer-events: none; }
.card::before { inset: -5px; border: 1px solid color-mix(in srgb, var(--lit) 86%, transparent); border-radius: 13px; }
.card::after { inset: 6px; border: 1px solid color-mix(in srgb, var(--rc) 43%, transparent); border-radius: 3px; }
.card .fr { position: absolute; pointer-events: none; }
.card .stud { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, var(--lit) 0 3px, var(--dk) 3.5px); }
.card .stud.a { left: 2px; top: 2px; }
.card .stud.b { right: 2px; top: 2px; }
.card .stud.c { left: 2px; bottom: 2px; }
.card .stud.d { right: 2px; bottom: 2px; }
.card .crest { left: 50%; top: -12px; width: 52px; height: 16px; margin-left: -26px; border-radius: 8px; background: var(--dk); }
.card .crest::before { content: ""; position: absolute; inset: 2px; border-radius: 6px; background: var(--rc); }
.card .crest::after { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 3px; border-radius: 2px; background: var(--lit); }
.card .pip { left: 50%; bottom: -12px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--dk); }
.card .pip::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--rc); }
.card .pip::after { content: ""; position: absolute; left: 5px; top: 4px; width: 5px; height: 4px; border-radius: 2px; background: var(--lit); }

/* The unique color runs through the rainbow, as in the game. */
@property --rc { syntax: "<color>"; inherits: true; initial-value: #ff6566; }
.card.r4 { animation: rcHue 8s linear infinite; }
@keyframes rcHue {
	0% { --rc: #ff5a5a; } 17% { --rc: #ffb43a; } 33% { --rc: #e6ff5a; }
	50% { --rc: #5aff8a; } 67% { --rc: #5ad8ff; } 83% { --rc: #b45aff; }
	100% { --rc: #ff5a5a; }
}
.ch { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ic { width: 64px; height: 64px; flex: none; border-radius: 10px; }
.ic.sm { width: 40px; height: 40px; }
.ic.lg { width: 80px; height: 80px; }
.nm { font: 800 18px/1.25 Inter, sans-serif; }
.nm a { color: inherit; }
.sub { font-size: 13px; color: #cfc8e2; }
.il { font-size: 12px; color: var(--muted); }
/* The card the way the game draws it: rarity and slot left, item level right. */
.meta { display: flex; justify-content: space-between; gap: 10px; font: 600 13px Inter, sans-serif; color: #b9b1cf; }
.sts { border-top: 1px solid rgba(255,255,255,.1); margin-top: 8px; padding-top: 8px; }
.st { color: #f4f0ff; font-weight: 700; font-size: 15px; }
.mods { margin-top: 8px; }
.mod { color: #3ee6a0; font-weight: 600; }
.mod.ward { color: #f4f0ff; font-weight: 700; }
.mods { font-size: 15px; }
.set { margin-top: 8px; color: #8f86a8; font-weight: 600; font-size: 15px; }
.set .sh { color: #ffd24a; margin-bottom: 2px; }
.src { margin-top: 8px; font: 600 12px Inter, sans-serif; color: #ffa931; }
.src a { color: #ffa931; text-decoration: underline; text-decoration-color: rgba(255,169,49,.4); }
.sell { font: 600 12px Inter, sans-serif; color: #ffc84a; margin-top: 4px; }
.lbl { color: var(--muted); }
.ch2 { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 6px; background: rgba(230,185,58,.14); color: var(--gold2); font-weight: 700; font-size: 12px; }

.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.filters .ff { width: 260px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
	padding: 6px 13px; border-radius: 999px; cursor: pointer;
	background: var(--panel); border: 1px solid var(--edge);
	color: var(--rc, var(--text)); font: 700 13px Inter, sans-serif;
}
.chip.on { background: color-mix(in srgb, var(--rc, var(--gold)) 22%, var(--panel)); border-color: var(--rc, var(--gold)); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0 20px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 6px 8px; border-bottom: 1px solid var(--edge); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl.wide td:first-child { white-space: nowrap; }
/* Unique and rule tables under each other: the same column width, so the rules line up. */
.tbl.rules { table-layout: fixed; }
.tbl.rules th:first-child { width: 260px; }

/* Bosses */
.boss { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 24px; background: var(--panel); border: 1px solid var(--edge); border-radius: 16px; }
.bosspic { align-self: start; display: flex; align-items: flex-end; justify-content: center; height: 300px; }
.bosspic .spr { --k: .85; }
.bossinfo .tag { margin-bottom: 4px; }

/* Things: cogs, trinkets */
.things { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.thing { display: flex; gap: 16px; background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 16px; }
.thing h3 { margin-bottom: 4px; }
.thing p { margin: 0 0 6px; font-size: 15px; }
.flavor { font-style: italic; color: var(--muted); }

/* Base gear */
.bases { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.base { background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 12px; }
.bn { font-weight: 700; margin-bottom: 4px; }
.bi { display: flex; gap: 6px; }
.bi .ic { border: 1px solid var(--rc); }

/* Fashion */
.fset, .setblock { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 20px; background: var(--panel); border: 1px solid var(--edge); border-radius: 16px; }
.setblock { display: block; border-color: color-mix(in srgb, var(--tc) 45%, var(--edge)); }
.sethead { display: grid; grid-template-columns: 240px 1fr; gap: 24px; margin-bottom: 16px; }
.setblock h2 { color: var(--tc); }
.herobox { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 240px; border-radius: 14px; background: radial-gradient(ellipse at 50% 80%, #2d2350, #120d20 75%); }
.herobox .spr { --k: 1.5; }
.herobox.big { min-height: 300px; }
.herobox.big .spr { --k: 2; }
.herobox .cap { position: absolute; top: 10px; left: 12px; font: 700 11px Silk, monospace; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 10px 0; }
.pieces.big { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 30px; }
.piece { display: flex; gap: 10px; align-items: center; background: var(--bg2); border: 1px solid var(--edge); border-radius: 10px; padding: 8px; font-size: 14px; }
.piece .ic { --rc: #8f86a8; }

/* Overview */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 24px 0 40px; }
.tile { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; color: var(--text); overflow: hidden; }
.tile:hover { border-color: var(--gold); text-decoration: none; }
.tile b { font-size: 17px; }
.spr.tile { --k: .32; flex: none; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cols p { color: #cfc8e2; }

/* Item detail */
.crumbs { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.detail { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 30px; margin-bottom: 40px; }
.dmain .card { font-size: 15px; }
.vers .chips { margin-bottom: 10px; }
.facts { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.facts th { text-align: left; color: var(--muted); font-weight: 600; padding: 7px 12px 7px 0; vertical-align: top; white-space: nowrap; width: 1%; }
.facts td { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); }

@media (max-width: 900px) {
	.top { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
	.main { gap: 12px; font-size: 14px; }
	.search { width: 100%; margin-left: 0; }
	.anchors { position: static; }
	.dblayout { grid-template-columns: minmax(0, 1fr); }
	.dbside { position: static; max-height: none; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--edge); }
	.dbtoggle {
		display: flex; align-items: center; gap: 8px; width: 100%;
		padding: 10px 14px; border-radius: 10px; cursor: pointer;
		background: var(--panel); border: 1px solid var(--edge);
		color: var(--muted); font: 600 14px Inter, sans-serif;
	}
	.dbtoggle b { color: var(--gold2); }
	.dbtoggle::after { content: ""; margin-left: auto; border: 5px solid transparent; border-top-color: currentColor; border-bottom: 0; }
	.dbside.open .dbtoggle::after { transform: rotate(180deg); }
	.dblist { display: none; grid-template-columns: 1fr 1fr; gap: 0 16px; padding-top: 14px; }
	.dbside.open .dblist { display: grid; }
	.dblist .grp:first-child { grid-column: 1 / -1; }
	.block { grid-template-columns: 1fr; padding: 56px 18px; }
	.block > .stage { margin: -56px -18px 0; }
	.block h2 { font-size: 30px; }
	.egd, .boss, .fset, .sethead, .detail { grid-template-columns: 1fr; }
	.cols { grid-template-columns: 1fr; }
	.lootwall { grid-template-columns: repeat(3, 1fr); }
	.things { grid-template-columns: 1fr; }
	.stage .spr { --k: 1 !important; }
	.hero-top .stage { height: 640px; }
	.hero-copy { top: 4%; }
	.tagline { font-size: 20px; }
}

.block > p, .block > .center { grid-column: 1 / -1; }
.final .copy { justify-self: center; margin-top: -30px; }

/* The item card that pops up over item links. */
#tip { position: fixed; z-index: 100; width: 340px; pointer-events: none; display: none; }
#tip.open { display: block; }
#tip { padding-top: 12px; }
#tip .card { box-shadow: 0 0 0 1px var(--dk), inset 0 0 0 1px var(--dk), 0 18px 50px rgba(0,0,0,.75); }

/* Talent trees */
.tree[data-href] { cursor: pointer; transition: transform .15s, border-color .15s; }
.tree[data-href]:hover { transform: translateY(-2px); border-color: var(--tc); }
.tree h3 a { color: inherit; }
.tjump { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 30px; }
.tjump a { padding: 7px 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tc) 60%, var(--edge)); color: var(--tc); font-weight: 700; background: color-mix(in srgb, var(--tc) 12%, var(--panel)); }
.tjump a:hover { text-decoration: none; background: color-mix(in srgb, var(--tc) 25%, var(--panel)); }
.tree-page { display: grid; grid-template-columns: 420px 1fr; gap: 32px; padding: 24px; margin-bottom: 36px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--tc) 45%, var(--edge)); border-radius: 18px; scroll-margin-top: 120px; }
.tree-page h2 { color: var(--tc); }
.tgrid {
	display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(7, 1fr);
	gap: 6px; align-self: start; aspect-ratio: 352 / 720; padding: 22px 14px;
	background-size: cover; border-radius: 14px; image-rendering: pixelated;
	border: 1px solid color-mix(in srgb, var(--tc) 40%, #000);
}
.tal { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default; }
.tal img { width: 56px; height: 56px; border-radius: 10px; border: 2px solid color-mix(in srgb, var(--tc) 70%, #000); background: #0c0915; box-shadow: 0 4px 10px rgba(0,0,0,.6); }
.tal.cap img { width: 64px; height: 64px; border-color: var(--gold); box-shadow: 0 0 16px -2px var(--gold); }
.tal:hover img { border-color: #fff; }
.tal .tr { position: absolute; top: 2px; right: 8px; min-width: 18px; padding: 0 4px; border-radius: 6px; background: #0c0915; border: 1px solid var(--tc); font: 700 11px/16px Inter, sans-serif; text-align: center; }
.tal .tl { margin-top: 3px; font: 600 10.5px/1.15 Inter, sans-serif; text-align: center; color: #e9e4f5; text-shadow: 0 1px 3px #000; }
.tal .tt { display: none; }
.tcard { background: #17122a; border: 2px solid var(--tc, var(--gold)); border-radius: 12px; padding: 12px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.75); font-size: 14px; }
.tcard .tn { font: 700 17px Inter, sans-serif; color: #fff; }
.tcard .tk { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.tcard .treq { font-size: 12px; color: #ff9a7a; margin-bottom: 6px; }
.tcard p { margin: 0; color: #3ee6a0; }
.tcard b, .trow p b { color: #fff; }
.tlinks .card { max-width: 420px; margin: 16px 0 6px; }
.trows { margin-top: 18px; display: grid; gap: 8px; }
.trow { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--bg2); }
.trow img { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.trow p { margin: 2px 0 0; font-size: 14px; color: #cfc8e2; }
@media (max-width: 900px) { .tree-page { grid-template-columns: 1fr; } .tgrid { max-width: 420px; } }
@media (max-width: 700px) {
	.tbl.rules th:first-child { width: 40%; }
	.tbl.rules td:first-child { white-space: normal; }
	.boss { padding: 14px; gap: 10px; }
	.bossinfo { min-width: 0; }
	.bosspic { height: 170px; }
	.bosspic .spr { --k: .55; }
	.boss h2 { font-size: 24px; }
	.boss .tag { overflow-wrap: anywhere; letter-spacing: 0; }
	.boss .tbl { font-size: 12px; table-layout: auto; }
	.boss .tbl th { font-size: 10px; letter-spacing: 0; }
	.boss .tbl td, .boss .tbl th { padding: 5px 3px; }
	.boss .tbl td:first-child, .boss .tbl th:first-child { width: 30px; padding-left: 0; }
	.boss .tbl td:last-child, .boss .tbl th:last-child { padding-right: 0; }
	.boss .tbl .ic.sm { width: 28px; height: 28px; }
	.boss .tbl td:nth-child(2) { overflow-wrap: anywhere; }
}

/* Talent popups: the unique and the tome ranks. */
.tcard p.tx { color: #e8d6a8; margin-top: 6px; }
.trow p.tx { color: #e8d6a8; }
.tcard p.tx b, .trow p.tx b { color: var(--gold2); }

/* Tomes */
.tomecard { border-left: 4px solid var(--tc); }
.tomecard h3 { color: var(--tc); }
.tomecard .ic { --rc: var(--tc); }
