/* The Shattered Realms -- MyAAC template. One dark look on purpose: the game and its banner are dark-first. */
:root {
	color-scheme: dark;
	--bg: #0b0c0f;
	--surface: #13151a;
	--surface-2: #191c22;
	--surface-3: #20242b;
	--line: #262a32;
	--line-soft: #1d2027;
	--text: #c3c8d0;
	--bright: #f2f4f7;
	--dim: #858b96;
	--muted: #5d636e;
	--stone: #ebe1ca;
	--gold: #d6a54e;
	--gold-hi: #e8bd6a;
	--gold-ink: #1d1406;
	--online: #6fcf8e;
	--offline: #e0707a;
	--display: "Marcellus", "Palatino Linotype", Georgia, serif;
	--ui: "Figtree", "Segoe UI", system-ui, sans-serif;
	--radius: 10px;
	--wrap: 1400px;
	/* resolved against this file, which sits beside images/ */
	--banner: url("images/banner.jpg");
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
	margin: 0;
	color: var(--text);
	font: 15px/1.65 var(--ui);
	-webkit-font-smoothing: antialiased;
}
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: #f3cf86; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(16px, 3vw, 40px); }

/* ---- Top bar ---- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(11, 12, 15, .82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.wordmark { font: 22px/1 var(--display); color: var(--stone); letter-spacing: .02em; white-space: nowrap; }
.wordmark:hover { color: var(--stone); }
.wordmark span { color: var(--gold); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a {
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--dim);
	font-weight: 500;
	font-size: 14px;
	white-space: nowrap;
	transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--bright); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--bright); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 8px 8px 0 0; }
.actions { display: flex; gap: 10px; }

/* ---- Buttons: our own, and every submit button MyAAC's pages render ---- */
.btn,
.content input[type="submit"],
.content input[type="button"],
.content button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 18px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--surface-2);
	color: var(--bright);
	font: 600 14px/1 var(--ui);
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:hover,
.content input[type="submit"]:hover,
.content input[type="button"]:hover,
.content button:hover { background: var(--surface-3); border-color: #343945; color: var(--bright); }
.btn:active { transform: translateY(1px); }
.btn.primary,
.content input[type="submit"] {
	border-color: transparent;
	background: linear-gradient(180deg, var(--gold-hi), var(--gold));
	color: var(--gold-ink);
	box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 18px rgba(214,165,78,.18);
}
.btn.primary:hover,
.content input[type="submit"]:hover { background: linear-gradient(180deg, #f0c979, var(--gold-hi)); color: var(--gold-ink); }
.btn.block { width: 100%; height: 44px; }

/* ---- Home hero: the banner, widened by a blurred copy of itself ---- */
.hero { position: relative; overflow: hidden; }
.hero::before {
	content: "";
	position: absolute;
	inset: -40px;
	background: var(--banner) center / cover no-repeat;
	filter: blur(36px) brightness(.45) saturate(1.2);
}
.hero-art {
	position: relative;
	z-index: 1;
	max-width: 1600px;
	margin: 0 auto;
	aspect-ratio: 1600 / 450;
	background: var(--banner) center / cover no-repeat;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, var(--bg));
}

.stats {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin: -38px 0 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--line);
	box-shadow: 0 20px 40px rgba(0,0,0,.45);
}
.stat { padding: 16px 20px; background: var(--surface); }
.stat dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; color: var(--bright); font-variant-numeric: tabular-nums; }
.stat dd small { font-size: 13px; font-weight: 500; color: var(--dim); margin-left: 6px; }
.stat-link { color: inherit; border-bottom: 1px dashed var(--muted); }
.stat-link:hover { color: var(--gold-hi); border-color: var(--gold); }
.live::before, .down::before {
	content: "";
	display: inline-block;
	width: 9px; height: 9px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--online);
	box-shadow: 0 0 0 4px rgba(111,207,142,.15);
	vertical-align: 2px;
}
.down::before { background: var(--offline); box-shadow: 0 0 0 4px rgba(224,112,122,.15); }

/* ---- Inner pages: a slim strip of the banner behind the page title ---- */
.page-head {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--line-soft);
}
.page-head::before {
	content: "";
	position: absolute;
	inset: -30px;
	background: var(--banner) center 40% / cover no-repeat;
	filter: blur(18px) brightness(.35) saturate(1.1);
}
.page-head .wrap { position: relative; padding-block: 40px 34px; }
.page-head h1 { margin: 0; font: clamp(28px, 4vw, 40px)/1.15 var(--display); color: var(--stone); text-wrap: balance; }
.page-status { margin: 6px 0 0; color: var(--dim); font-size: 14px; }

/* ---- Content layout ---- */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 28px;
	margin-top: 40px;
	align-items: start;
}
.is-page .layout { margin-top: 28px; }
.content, .sidebar { display: grid; gap: 20px; align-content: start; min-width: 0; }
.page-body.is-news { display: grid; gap: 20px; }

.card {
	background: linear-gradient(180deg, var(--surface-2), var(--surface) 160px);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}
.card-pad { padding: 22px 24px; }
.card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid var(--line-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dim);
}
.card-head a { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-title h2 { margin: 0; font: 26px/1.2 var(--display); color: var(--stone); }
.section-title a { font-size: 14px; font-weight: 600; }

/* ---- News ---- */
.post { padding: 26px 28px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.post h3 { margin: 0 0 12px; font: 28px/1.2 var(--display); color: var(--stone); text-wrap: balance; }
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body p, .post-body ul, .post-body ol { max-width: 72ch; }
.post-body li::marker { color: var(--gold); }
.post-link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; }

.tickers ul { list-style: none; margin: 0; padding: 4px 0; }
.tickers li {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 16px;
	padding: 10px 20px;
	border-bottom: 1px solid var(--line-soft);
	font-size: 14px;
}
.tickers li:last-child { border-bottom: 0; }
.tickers time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tickers span { color: var(--bright); }

/* ---- Sidebar ---- */
.form { display: grid; gap: 14px; }
.form label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--dim); }
.field,
.content input[type="text"],
.content input[type="password"],
.content input[type="email"],
.content input[type="number"],
.content input[type="search"],
.content select,
.content textarea {
	width: 100%;
	max-width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--bright);
	font: 15px var(--ui);
	transition: border-color .15s, box-shadow .15s;
}
.content input[type="text"],
.content input[type="password"],
.content input[type="email"],
.content input[type="number"],
.content select { width: auto; min-width: min(260px, 100%); }
.field { display: block; height: 44px; }
.field::placeholder { color: var(--muted); }
.field:focus,
.content input:focus,
.content select:focus,
.content textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,165,78,.15); }
.form-foot { display: flex; justify-content: space-between; font-size: 13px; }
.form-foot a { color: var(--dim); }
.form-foot a:hover { color: var(--bright); }
.account-box { display: grid; gap: 10px; }
.account-box p { margin: 0 0 4px; color: var(--dim); }
.account-box b { color: var(--bright); }

.facts { margin: 0; }
.facts div {
	display: flex;
	justify-content: space-between;
	padding: 11px 20px;
	border-bottom: 1px solid var(--line-soft);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; color: var(--bright); font-weight: 600; }

.ranks { list-style: none; margin: 0; padding: 6px 0; }
.ranks li {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr) 44px minmax(74px, auto);
	align-items: center;
	gap: 12px;
	padding: 9px 20px;
	font-variant-numeric: tabular-nums;
	transition: background-color .15s;
}
.ranks li:hover { background: var(--surface-3); }
/* The outfit image is 64x64 with the character in its bottom-right corner (outfit.php), so it
   is pinned by that corner in a box the height of the row. */
.rank-outfit { position: relative; width: 44px; height: 40px; overflow: hidden; }
.rank-outfit img { position: absolute; right: -4px; bottom: -2px; max-width: none; width: 64px; height: 64px; image-rendering: pixelated; }
.pos {
	display: grid;
	place-items: center;
	width: 26px; height: 26px;
	border-radius: 6px;
	background: var(--surface-3);
	font-size: 12px;
	font-weight: 700;
	color: var(--dim);
}
.ranks li:first-child .pos { background: rgba(214,165,78,.16); color: var(--gold-hi); }
.who { min-width: 0; }
.who b { display: block; color: var(--bright); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.lvl { font-weight: 700; color: var(--bright); font-size: 15px; text-align: right; white-space: nowrap; }
.lvl small { font-weight: 500; color: var(--muted); font-size: 11px; margin-right: 4px; }

/* ---- MyAAC's own page markup (character lists, highscores, account pages) ---- */
/* The positioned ancestor for everything MyAAC places with position:absolute (the highscores
   outfits, the character page circle). On a phone .page-body scrolls sideways, and without
   this those images belong to the page instead of the scroller and stay put while the rows move. */
.page-body { position: relative; }
.page-body h1, .page-body h2, .page-body h3 { font-family: var(--display); font-weight: normal; color: var(--stone); }
.page-body table { border-collapse: collapse; max-width: 100%; }
.page-body td, .page-body th { color: var(--text); }
.page-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.page-body .white, .page-body .white a { color: var(--bright) !important; }
.page-body .red { color: var(--offline); }
.page-body .green { color: var(--online); }
.page-body b, .page-body strong { color: var(--bright); }
.page-body table[bgcolor], .page-body td[bgcolor], .page-body tr[bgcolor] { border-color: var(--line); }
.page-body td[bgcolor], .page-body tr[bgcolor] > td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }

.myaac-table { width: 100%; border-spacing: 0 !important; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.myaac-table > thead > tr > th,
.myaac-table > thead > tr > td { padding: 10px 12px !important; text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.myaac-table > tbody > tr > td { padding: 9px 12px !important; border-top: 1px solid var(--line-soft); }

.TableContainer { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.TableContainer .CaptionContainer { background: var(--surface-3); border-bottom: 1px solid var(--line-soft); }
.TableContainer .CaptionContainer .Text {
	padding: 12px 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dim);
}
.TableContainer [class^="CaptionEdge"],
.TableContainer [class^="CaptionBorder"],
.TableContainer [class^="CaptionVertical"],
.TableShadowContainerRightTop, .TableShadowRightTop,
.TableShadowContainer, .TableBottomShadow, .TableBottomLeftShadow, .TableBottomRightShadow { display: none !important; }
.TableContainer table { width: 100%; }
.TableContainer .InnerTableContainer { padding: 12px 16px; }
.TableContentContainer, .TableContent, .TableContentAndRightShadow { background: none !important; border: 0 !important; }
.TableContent td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.LabelV, .LabelV120, .LabelV150, .LabelV200 { color: var(--dim); font-weight: 600; padding-right: 16px; white-space: nowrap; }
.LabelH, .LabelH td { color: var(--dim); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.Odd, .Even { background: none !important; }
.InnerTableButtonRow td { padding-top: 12px; }

.SmallBox { margin: 0 0 20px; }
.SmallBox [class^="BoxFrame"], .SmallBox .AttentionSign { display: none; }
.SmallBox .MessageContainer, .SmallBox .ErrorMessage, .SmallBox .Message {
	padding: 12px 16px;
	border-radius: 8px;
	background: rgba(224,112,122,.08);
	border: 1px solid rgba(224,112,122,.35);
	color: var(--bright);
	background-image: none !important;
}
.FormFieldError { color: var(--offline); }

/* ---- Character page: outfit and the in-game equipment window ---- */
/* The outfit image (outfit.php) is at least 64x64 with the outfit in its bottom-right corner,
   the way the client anchors a sprite bigger than one tile. So it is pinned by that corner and
   doubled from it: a 1x1 character, a 2x2 one and a 3x3 one all stand in the same spot. */
/* Over the right-hand end of the Character Information rows, which only ever hold short
   values; a float would push the whole table down below it. */
.char-outfit {
	position: absolute;
	z-index: 1;
	top: 78px;
	right: 44px;
	width: 112px;
	height: 112px;
	border: 2px solid var(--line);
	border-radius: 50%;
	background: var(--surface-3);
	overflow: hidden;
}
.char-outfit img { position: absolute; right: 20px; bottom: 12px; max-width: none; transform: scale(2); transform-origin: right bottom; image-rendering: pixelated; }

.char-profile { margin-top: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.char-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.char-profile-head h3 { margin: 0; font-size: 20px; }
.char-profile-head .btn { height: 32px; padding: 0 14px; font-size: 13px; }
.char-profile p { margin: 0; overflow-wrap: anywhere; }
.char-profile-empty { color: var(--dim); font-style: italic; }

/* The client's slot grid and sprites (inventory.otui), in the site's own dark card style.
   Grid positions and sprite sizes are source pixels times --u, a whole number so the
   pixel art stays crisp; the frame and slots are plain CSS in the site's colours. */
.char-equipment-cell { width: 1%; padding-left: 16px; }
.eq-window {
	--u: 2px;
	width: max-content;
	padding: 14px 16px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(180deg, var(--surface-2), var(--surface));
	box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}
.eq-head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.eq-visibility { margin: 0; }
.content .eq-eye {
	height: 28px;
	padding: 0 10px;
	gap: 6px;
	border-radius: 999px;
	font: 600 12px/1 var(--ui);
	letter-spacing: 0;
	text-transform: none;
	color: var(--dim);
	background: var(--bg);
	box-shadow: none;
}
.content .eq-eye[aria-pressed="true"] { color: var(--online); border-color: rgba(111,207,142,.35); }
.content .eq-eye:hover { color: var(--bright); }
.eq-hidden .eq-grid { opacity: .35; filter: grayscale(1); }
.eq-hidden-note { margin: -4px 0 10px; color: var(--dim); font-size: 12px; font-style: italic; text-align: center; }
.eq-grid { position: relative; width: calc(108 * var(--u)); height: calc(145 * var(--u)); }
.eq-slot {
	position: absolute;
	left: calc(var(--col) * 37 * var(--u));
	top: calc(var(--top) * var(--u));
	width: calc(34 * var(--u));
	height: calc(34 * var(--u));
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--bg);
	box-shadow: inset 0 2px 6px rgba(0,0,0,.55);
	transition: border-color .15s;
}
.eq-slot:hover { border-color: #3a3f4a; }
.eq-item { position: absolute; left: calc(var(--u) - 1px); top: calc(var(--u) - 1px); width: calc(32 * var(--u)); height: calc(32 * var(--u)); max-width: none; image-rendering: pixelated; }
.eq-empty { opacity: .35; }
.eq-count { position: absolute; right: 3px; bottom: 1px; color: var(--bright); font: 700 13px/1 var(--ui); text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.eq-skull { position: absolute; left: calc(12 * var(--u)); top: calc(128 * var(--u)); width: calc(11 * var(--u)); image-rendering: pixelated; }
@media (max-width: 560px) { .eq-window { --u: 1px; } }

/* ---- Homepage intro ---- */
.intro { margin: 0; }
.intro h2 { margin: 0 0 10px; font: 26px/1.2 var(--display); color: var(--stone); }
.intro p { margin: 0 0 10px; max-width: 72ch; }
.intro p + p { color: var(--dim); font-size: 14px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---- Live on Twitch ---- */
.streams { margin-bottom: 28px; }
.streams .section-title { margin-bottom: 14px; }
.stream-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.stream-tile { display: block; color: var(--text); }
.stream-tile:hover { color: var(--text); }
.stream-thumb { position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-3); transition: border-color .15s, transform .15s; }
.stream-tile:hover .stream-thumb { border-color: var(--gold); transform: translateY(-2px); }
.stream-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stream-live, .stream-viewers { position: absolute; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.stream-live { top: 8px; left: 8px; background: #e0303c; color: #fff; letter-spacing: .06em; text-transform: uppercase; }
.stream-viewers { bottom: 8px; left: 8px; background: rgba(0,0,0,.7); color: var(--bright); }
.stream-tile b { display: block; color: var(--bright); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream-tile:hover b { color: var(--gold-hi); }
.stream-tile small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--dim); font-size: 13px; line-height: 1.4; }

/* ---- Who is online ---- */
.online-count { margin: 0 0 14px; color: var(--dim); }
.online-empty { margin: 0; color: var(--dim); }
.online-table { width: 100%; border: 1px solid var(--line); border-radius: 8px; border-collapse: separate !important; border-spacing: 0; overflow: hidden; }
.online-table th, .online-table td { padding: 9px 12px; text-align: left; border-top: 1px solid var(--line-soft); }
.online-table thead th { border-top: 0; background: var(--surface-3); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.online-table thead a { color: var(--dim); white-space: nowrap; }
.online-table thead a:hover, .online-table th[aria-sort] a { color: var(--bright); }
.online-table .sort-arrow { margin-left: 6px; font-size: 10px; color: var(--gold); }
.online-table .col-level { width: 1%; text-align: right; font-variant-numeric: tabular-nums; }
.online-table .col-vocation { color: var(--dim); }
.online-table tbody tr:hover td { background: var(--surface-2); }

/* ---- Boosted today ---- */
.boosted { list-style: none; margin: 0; padding: 6px 0; }
.boosted li { display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.boosted li + li { border-top: 1px solid var(--line-soft); }
.boosted img { flex: none; image-rendering: pixelated; }
.boosted div { min-width: 0; }
.boosted small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.boosted b { display: block; color: var(--bright); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boosted span { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; }
.boosted em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--online); }

/* ---- Discord card ---- */
.discord { display: grid; gap: 14px; }
.discord-guild { display: flex; align-items: center; gap: 12px; min-width: 0; }
.discord-guild img { flex: none; border-radius: 12px; }
.discord-guild b { display: block; color: var(--bright); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-guild small { display: block; margin-top: 2px; color: var(--dim); font-size: 13px; }
.discord-guild .live::before { width: 8px; height: 8px; margin-right: 6px; box-shadow: 0 0 0 3px rgba(111,207,142,.15); vertical-align: 1px; }

/* ---- Wiki ---- */
.wiki { display: grid; gap: 28px; }
.wiki section { scroll-margin-top: 80px; }
.wiki h2 { margin: 0 0 10px; font-size: 24px; }
.wiki p, .wiki ul, .wiki ol { max-width: 72ch; margin: 0 0 10px; }
.wiki li::marker { color: var(--gold); }
.wiki code { padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--bright); font-size: .92em; }
.wiki-back { margin: 0 0 18px; font-size: 14px; font-weight: 600; }
.wiki-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 32px; }
.wiki-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 18px 12px 22px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface-2);
	transition: border-color .15s, background .15s, transform .15s;
}
.wiki-tile:hover { border-color: var(--gold); background: var(--surface-3); transform: translateY(-2px); }
.wiki-tile-label { font: 20px/1.2 var(--display); color: var(--stone); }
.wiki-tile:hover .wiki-tile-label { color: var(--gold-hi); }
.wiki-tile-art { display: grid; place-items: center; height: 128px; }
.wiki-tile img { max-width: 100%; height: auto; image-rendering: pixelated; }
@media (max-width: 560px) { .wiki-tiles { grid-template-columns: repeat(2, 1fr); } }
.wiki-table { width: 100%; border: 1px solid var(--line); border-radius: 8px; border-collapse: separate !important; border-spacing: 0; overflow: hidden; margin-bottom: 10px; }
.wiki-table th, .wiki-table td { padding: 9px 12px; text-align: left; border-top: 1px solid var(--line-soft); }
.wiki-table tr:first-child > * { border-top: 0; }
.wiki-details { margin: 6px 0 10px; }
.wiki-details summary { cursor: pointer; font-weight: 600; color: var(--gold-hi); margin-bottom: 10px; }
.wiki-details .wiki-table { font-size: 14px; }
.wiki-details { overflow-x: auto; }
.wiki-table thead th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-3); }
.wiki-table tbody th { color: var(--dim); font-weight: 600; width: 40%; }

/* ---- Footer ---- */
.footer { margin-top: 56px; border-top: 1px solid var(--line-soft); }
.footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-block: 24px 32px;
	font-size: 13px;
	color: var(--muted);
}
.footer a { color: var(--dim); }

@media (max-width: 1080px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
	.page-body { overflow-x: auto; }
}
@media (max-width: 760px) {
	.actions .btn:not(.primary) { display: none; }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
	.post { padding: 22px 20px; }
	.card-pad { padding: 18px; }
	.wordmark { font-size: 19px; }
	.topbar .wrap { flex-wrap: wrap; gap: 8px 16px; padding-block: 10px; }
	.nav { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- In-game item tooltip (tooltip.js, a port of OTCLIENT game_itemtooltip) ---- */
/* Colours, grouping and the 8-way black outline are the client's; the frame is the site's. */
.shtip {
	position: fixed;
	z-index: 50;
	max-width: 380px;
	padding: 7px 10px 9px;
	border: 1px solid #3a3f4a;
	border-radius: 6px;
	background: rgba(12, 13, 17, .96);
	box-shadow: 0 10px 30px rgba(0,0,0,.6);
	color: #fff;
	font: 700 12px/1.35 Tahoma, Verdana, "Segoe UI", sans-serif;
	text-align: center;
	text-shadow: -1px -1px 0 #000, 0 -1px 0 #000, 1px -1px 0 #000, -1px 0 0 #000, 1px 0 0 #000, -1px 1px 0 #000, 0 1px 0 #000, 1px 1px 0 #000;
	pointer-events: none;
	white-space: nowrap;
}
.shtip[hidden] { display: none; }
.shtip-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; }
.shtip-weight { justify-self: start; padding-top: 1px; color: var(--bright); font-size: 10px; }
.shtip-name { font-size: 12px; }
.shtip-sprite { justify-self: end; width: 32px; height: 32px; margin: -2px -4px -8px 0; image-rendering: pixelated; }
.shtip-rule { width: 33%; height: 1px; margin: 4px auto; background: #7a7a7a80; box-shadow: none; }
.shtip-group > * + * { margin-top: 0; }
.shtip-line { text-align: center; }
.shtip-stats span + span { margin-left: 4px; }
.shtip-bar { margin-right: 4px; }
.shtip-pairs { display: inline-grid; grid-template-columns: auto auto; column-gap: 4px; text-align: left; }
.shtip-pairs .shtip-value { text-align: right; }
.shtip-pairs .shtip-flush { grid-column: 1 / -1; width: 0; white-space: nowrap; }
.shtip-sizer { height: 0; overflow: hidden; visibility: hidden; }
.shtip-pairs-none .shtip-flush { width: auto; text-align: center; }
.shtip-pairs-none { display: block; text-align: center; }
/* SOCKET_WIDTH/HEIGHT 12x10, SOCKET_GAP 2 and SOCKET_ROW_GAP 3 in itemtooltip.lua: the icons at
   their own size, never scaled. */
.shtip-sockets { display: flex; justify-content: center; gap: 2px; padding: 2px 0; }
.shtip-sockets + .shtip-sockets { padding-top: 3px; }
.shtip-sockets img { width: 12px; height: 10px; image-rendering: pixelated; }
.eq-slot[data-tooltip] { cursor: help; }
