/* 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");
	--zoom: 1;
}
/* Desktop is drawn at 80%: at 100% the site read as zoomed in. Phones keep 100%. Under
   zoom a vw is shrunk with it and screen measurements come back scaled, so anything built
   on either divides by --zoom (the login box below, and tooltip.js). */
@media (min-width: 1024px) { :root { --zoom: .8; } }
html { zoom: var(--zoom); }
/* The scrollbar's room is kept whether or not the page is long enough to scroll; otherwise
   the centred layout shifts sideways by half a scrollbar between a short page and a long one. */
html { scrollbar-gutter: stable; }

* { 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(44, 48, 56, .9);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid #3a3f49;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; 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); }
.topbar-status { margin: 0 auto 0 0; color: var(--dim); font-size: 14px; white-space: nowrap; }
.actions { display: flex; gap: 10px; }
/* The top bar's Log in box: a native popover, so a click outside it or Esc closes it. It sits
   under the button, which is the right end of .wrap, by the same padding .wrap uses. */
.login-pop {
	inset: 72px max(0px, calc((100vw / var(--zoom) - var(--wrap)) / 2)) auto auto;
	width: min(320px, calc(100vw / var(--zoom) - 32px));
	margin: 0 clamp(16px, 3vw, 40px) 0 0;
	padding: 20px;
	border: 1px solid #3a3f49;
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	box-shadow: 0 20px 40px rgba(0,0,0,.55);
}
/* .form sets display: grid, which would beat the browser's own hiding of a closed popover. */
.login-pop:not(:popover-open) { display: none; }

/* ---- Menu: a card left of the content, a scrolling row on narrow screens ---- */
.menu {
	position: sticky;
	top: 84px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px;
	scrollbar-width: none;
}
.menu a {
	padding: 10px 14px;
	border-radius: 8px;
	color: var(--dim);
	font-weight: 500;
	white-space: nowrap;
	transition: color .15s, background-color .15s;
}
.menu a:hover { color: var(--bright); background: rgba(255, 255, 255, .06); }
.menu a[aria-current="page"] { color: var(--bright); background: var(--surface-3); box-shadow: inset 3px 0 0 var(--gold); }

/* ---- 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; }

/* Found Guild / Start War under the guild list, and the admin's Delete under each View. */
.guild-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.guild-actions form { margin: 0; }
.guild-actions.guild-wars-link { margin: 16px 0 8px; }
.content .guild-actions input[type="submit"] { width: 160px; }
.guild-delete { margin: 6px 0 0; }
.content td:has(> .guild-delete) input[type="submit"] { width: 96px; }
.content .guild-delete input[type="submit"] { background: #6b2a2f; color: var(--bright); box-shadow: none; }
.content .guild-delete input[type="submit"]:hover { background: #8a343b; color: var(--bright); }

/* ---- 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; }

/* ---- Content layout ---- */
.layout {
	display: grid;
	grid-template-columns: 190px minmax(0, 1fr) 360px;
	gap: 28px;
	margin-top: 40px;
	align-items: start;
}
.is-page .layout { margin-top: 28px; }
/* Only the homepage has a sidebar; every other page gives its column to the content. */
@media (min-width: 901px) {
	.is-page .layout { grid-template-columns: 190px minmax(0, 1fr); }
	.is-page .menu { grid-row: auto; }
}
.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); }

.download-soon { margin: 32px 0; text-align: center; font: 28px/1.3 var(--display); color: var(--stone); }

/* ---- Character search (theme characters.form.html.twig) ---- */
.char-search { margin: 0 0 24px; }
.page-body .char-search-title { margin: 0 0 12px; font-size: 22px; }
.char-search label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--dim); }
.char-search-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Highscores (theme highscores.html.twig) ---- */
.page-body .hs-title { margin: 0 0 16px; text-align: center; }
.hs-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); justify-content: center; gap: 16px; margin-bottom: 20px; }
.hs-filters label { display: grid; gap: 6px; color: var(--dim); font-size: 13px; font-weight: 500; }
.content .hs-filters select { width: 100%; min-width: 0; }
.hs-layout { display: flex; align-items: flex-start; gap: 24px; }
.hs-main { flex: 1; min-width: 0; }
.hs-pager { display: flex; justify-content: flex-end; gap: 16px; margin: 12px 0 0; font-size: 14px; }
.hs-side { flex: 0 0 180px; display: grid; gap: 16px; }
.hs-box { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.hs-box-head { padding: 10px 12px; background: var(--surface-3); color: var(--bright); font-weight: 600; font-size: 14px; }
.hs-box a { display: block; padding: 5px 12px; font-size: 14px; color: var(--text); }
.hs-box a:first-of-type { padding-top: 10px; }
.hs-box a:last-child { padding-bottom: 10px; }
.hs-box a:hover, .hs-box a[aria-current="page"] { color: var(--gold-hi); }
@media (max-width: 760px) {
	.hs-layout { flex-direction: column; align-items: stretch; }
	.hs-side { flex-basis: auto; }
}

/* ---- Character page (characters.html.twig, character.js) ---- */
/* minmax(0, 1fr): an auto column would grow to the scrolling tab row and push the page sideways. */
.char-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.char-page .card-head { gap: 12px; }
.char-empty { margin: 0; color: var(--dim); font-style: italic; }

/* Header card. 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: 1x1, 2x2 and 3x3 outfits stand in one spot. */
.char-hero { display: flex; align-items: center; gap: 24px; padding: 22px 24px; }
.char-hero-outfit {
	position: relative;
	flex: none;
	width: 128px;
	height: 128px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: radial-gradient(circle at 50% 60%, var(--surface-3), var(--bg));
	overflow: hidden;
}
.char-hero-outfit img { position: absolute; right: 28px; bottom: 20px; max-width: none; transform: scale(2); transform-origin: right bottom; image-rendering: pixelated; }
.char-hero-text { flex: 1; min-width: 0; }
.char-hero-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-body .char-hero-name h1 { margin: 0; font-size: clamp(26px, 4vw, 36px); line-height: 1.15; overflow-wrap: anywhere; }
.char-hero-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; color: var(--dim); font-size: 16px; }
.char-hero-line span:first-child { color: var(--bright); font-weight: 600; }
.char-hero-line i { font-style: normal; color: var(--muted); }
.char-hero-guild { margin: 6px 0 0; color: var(--dim); font-size: 14px; }
.char-hero-admin { align-self: flex-start; height: 34px; font-size: 13px; }
.char-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--dim); }
.char-badge.is-online { color: var(--online); border-color: rgba(111,207,142,.35); background: rgba(111,207,142,.08); }
.char-badge.is-online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--online); }
.char-badge.is-premium { color: var(--gold-hi); border-color: rgba(214,165,78,.4); background: rgba(214,165,78,.1); }
.char-badge.is-banished { color: var(--offline); border-color: rgba(224,112,122,.4); background: rgba(224,112,122,.08); }

/* Tabs */
.char-tabs { display: flex; gap: 4px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); scrollbar-width: none; }
.char-tabs[hidden] { display: none; }
.content .char-tabs button { flex: 1 0 auto; height: 38px; border: 0; background: none; color: var(--dim); font-weight: 600; box-shadow: none; }
.content .char-tabs button:hover { color: var(--bright); background: rgba(255,255,255,.05); }
.content .char-tabs button[aria-selected="true"] { color: var(--bright); background: var(--surface-3); box-shadow: inset 0 -2px 0 var(--gold); }
.char-panel { display: grid; gap: 20px; align-content: start; }
.char-panel[hidden] { display: none; }

/* Overview: the main column, then equipment and highlights beside it */
.char-overview { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.char-col { display: grid; gap: 20px; min-width: 0; }
.char-side .eq-window { width: 100%; display: flex; flex-direction: column; align-items: center; }
.facts dd small { color: var(--muted); font-weight: 500; }
.char-profile p { margin: 0; overflow-wrap: anywhere; }
.content .card-head-link { height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: var(--gold-hi); font: 600 13px/1 var(--ui); letter-spacing: 0; text-transform: none; }
.content .card-head-link:hover { background: none; color: #f3cf86; }

.char-vitals { display: grid; gap: 14px; }
.char-bar-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.char-bar-label span:first-child { color: var(--bright); font-weight: 600; }
.char-bar-track { height: 10px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 1px 3px rgba(0,0,0,.6); overflow: hidden; }
.char-bar-fill { height: 100%; border-radius: 999px; }
.char-bar-fill.is-health { background: linear-gradient(180deg, #e0707a, #b8434e); }
.char-bar-fill.is-mana { background: linear-gradient(180deg, #6f9be0, #3f68b0); }

.char-mastery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.content .char-mastery-tile {
	display: grid;
	justify-items: center;
	gap: 2px;
	height: auto;
	padding: 12px 8px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg);
	box-shadow: none;
	color: var(--dim);
	font: 500 13px/1.3 var(--ui);
	white-space: normal;
}
.content .char-mastery-tile:hover { border-color: var(--gold); background: var(--surface-2); color: var(--bright); }
.char-mastery-tile img, .char-skill-top img { width: 32px; height: 32px; image-rendering: pixelated; }
.char-mastery-tile b { color: var(--bright); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Skills */
.char-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.char-skill { --tier: var(--muted); padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.char-skill.is-apprentice { --tier: #6fcf8e; }
.char-skill.is-adept { --tier: #6f9be0; }
.char-skill.is-master { --tier: #b58cf0; }
.char-skill.is-grandmaster { --tier: var(--gold-hi); border-color: rgba(214,165,78,.45); background: linear-gradient(180deg, rgba(214,165,78,.1), var(--bg) 70%); }
.char-skill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.char-tier { padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--tier) 45%, transparent); border-radius: 4px; color: var(--tier); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.char-skill-name { color: var(--dim); font-size: 13px; font-weight: 600; }
.char-skill-name em { margin-left: 4px; color: var(--gold); font-size: 11px; font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.char-skill-value { color: var(--bright); font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.char-skill-value small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }

/* Deaths and victims */
.char-list { list-style: none; margin: 0; padding: 0; }
.char-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 20px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.char-list li:last-child { border-bottom: 0; }
.char-list time { flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Quests */
.char-quests { list-style: none; margin: 0; padding: 0; }
.char-quests > li { border-bottom: 1px solid var(--line-soft); }
.char-quests > li:last-child { border-bottom: 0; }
.char-quests summary { display: flex; align-items: center; gap: 12px; padding: 11px 20px; cursor: pointer; list-style: none; }
.char-quests summary::-webkit-details-marker { display: none; }
.char-quests summary:hover { background: var(--surface-2); }
.char-quest-name { flex: 1; color: var(--bright); font-weight: 600; }
.char-quest-progress { width: 90px; height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.char-quest-progress span { display: block; height: 100%; background: var(--gold); }
.char-quests summary small { min-width: 34px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.char-quests details ul { margin: 0; padding: 4px 20px 14px 40px; font-size: 14px; }
.char-quests details li.is-done { color: var(--online); }
.char-quests details li.is-active { color: var(--bright); }
.char-quests details li.is-locked { color: var(--muted); }

/* Collection */
.char-collection-tools { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.char-filter { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.content .char-filter button { height: 32px; padding: 0 12px; border: 0; background: none; box-shadow: none; color: var(--dim); font-size: 13px; }
.content .char-filter button[aria-pressed="true"] { background: var(--surface-3); color: var(--bright); }
.content input.char-collection-search { width: min(260px, 100%); height: 40px; }
.char-collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.char-collection li { display: grid; justify-items: center; gap: 2px; padding: 10px 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); text-align: center; }
.char-collection li[hidden] { display: none; }
.char-collection b { color: var(--bright); font-size: 13px; font-weight: 600; }
.char-collection small { color: var(--muted); font-size: 11px; }
.char-collection-art { position: relative; width: 80px; height: 80px; overflow: hidden; }
.char-collection-art img { position: absolute; right: 8px; bottom: 0; max-width: none; transform: scale(2); transform-origin: right bottom; image-rendering: pixelated; }
.char-collection li.is-locked .char-collection-art { opacity: .3; filter: grayscale(1); }
.char-collection li.is-locked b { color: var(--dim); }
.char-collection-none { margin-top: 12px; }

/* Stats charts: one series each, in the theme's gold; grid and axes stay recessive. */
.char-stats { display: grid; gap: 20px; }
.char-chart { position: relative; min-height: 60px; }
.char-chart svg { display: block; max-width: none; overflow: visible; }
.char-chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.char-chart-zero { stroke: var(--line); stroke-width: 1; }
.char-chart-label { fill: var(--muted); font: 11px var(--ui); font-variant-numeric: tabular-nums; }
.char-chart-bar { fill: var(--gold); pointer-events: none; }
.char-chart-bar.is-loss { fill: var(--offline); }
.char-chart-hit { fill: transparent; }
.char-chart-hit:hover + .char-chart-bar { fill: var(--gold-hi); }
.char-chart-line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.char-chart-cross { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.char-chart-dot { fill: var(--gold-hi); stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.char-chart-tip { position: absolute; z-index: 2; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-3); color: var(--text); font-size: 13px; line-height: 1.4; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.char-chart-tip[hidden] { display: none; }
.char-chart-tip b { color: var(--bright); }
.char-chart-tip small { color: var(--muted); }
.char-stats-table summary { cursor: pointer; border-bottom: 0; }
.char-stats-table[open] summary { border-bottom: 1px solid var(--line-soft); }
.char-stats-table .online-table { border: 0; border-radius: 0; }

@media (max-width: 900px) {
	.char-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	.char-hero { flex-direction: column; text-align: center; }
	.char-hero-name, .char-hero-line { justify-content: center; }
	.char-hero-line { gap: 2px 12px; }
	.char-hero-line i { display: none; }
	.char-hero-admin { align-self: center; }
	.char-mastery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.char-list li { flex-direction: column; gap: 2px; }
}

/* 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. */
.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); }

.war-table { margin-bottom: 26px; }
.war-table .col-score { width: 1%; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }
.war-table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.war-inline { display: inline-block; margin-left: 6px; }
.war-message { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-3); }
.war-declare { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.war-note { margin: 12px 0 26px; font-size: 13px; 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; }
.discord-members { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.discord-members li { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-avatar { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--line-soft); }
.discord-avatar img { display: block; border-radius: 50%; }
.discord-avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); background: var(--online); }
.discord-avatar.idle::after { background: #f0b232; }
.discord-avatar.dnd::after { background: #f23f43; }
.discord-more { color: var(--dim); font-size: 13px; }

/* ---- 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(4, 1fr); gap: 12px; margin-bottom: 32px; }
.wiki-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 14px 10px 16px;
	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: 17px/1.2 var(--display); color: var(--stone); text-align: center; }
.wiki-tile:hover .wiki-tile-label { color: var(--gold-hi); }
.wiki-tile-art { display: grid; place-items: center; height: 96px; }
.wiki-tile img { max-width: 100%; height: auto; image-rendering: pixelated; }
@media (max-width: 800px) { .wiki-tiles { grid-template-columns: repeat(3, 1fr); } }
@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%; }

/* ---- Item Level calculator (plugins/shattered-itemcalc) ---- */
.calc-intro { margin: 0 0 18px; color: var(--dim); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; align-items: start; }
.calc-window { gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.calc-head { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); background: var(--surface-3); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.calc-body { display: grid; gap: 14px; padding: 18px; }
.content .calc-body input[type="number"],
.content .calc-body select { width: 100%; }
.calc-result { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.calc-result-label { font-size: 13px; font-weight: 500; color: var(--dim); }
.calc-result output { font: 34px/1.1 var(--display); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.calc-result small { color: var(--muted); font-size: 12px; }
.calc-attrs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.calc-attrs li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line-soft); }
.calc-attrs li:first-child { border-top: 0; }
.calc-attrs b { color: var(--gold-hi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-attrs .calc-locked { color: var(--muted); }
.calc-attrs .calc-locked b { color: var(--muted); font-weight: 500; }
.calc-attrs .calc-empty { color: var(--muted); }

/* ---- 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); }

/* 1280 rather than 1080 since the menu column took 218px from the content. */
@media (max-width: 1280px) {
	.layout { grid-template-columns: 190px minmax(0, 1fr); }
	.menu { grid-row: span 2; }
	.sidebar { grid-column: 2; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
	.page-body { overflow-x: auto; }
}
@media (max-width: 900px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { grid-column: auto; }
	.menu { grid-row: auto; }
	.menu { position: static; flex-direction: row; overflow-x: auto; }
	.menu a { padding: 8px 12px; font-size: 14px; }
	.menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
}
@media (max-width: 760px) {
	.wide-only { 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 { gap: 16px; }
}
/* Wordmark, status and Log in come to 414px at the sizes above: under that the status
   drops to its number and the wordmark shrinks, so a 360px phone does not scroll sideways. */
@media (max-width: 440px) {
	.narrow-hide { display: none; }
	.wordmark { font-size: 17px; }
}
@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; }

/* The guild page's Guild Bank section (shattered_guild.html.twig). */
.guild-bank { margin: 20px 0; }
.guild-bank h4 { margin: 20px 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.guild-bank-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.guild-bank-stats > div { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 8px; }
.guild-bank-stats strong { display: block; margin-top: 4px; font-size: 18px; color: var(--gold-hi); }
.guild-bank-label { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.guild-bank-picks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.guild-bank-picks li > span { display: inline-block; min-width: 82px; color: var(--dim); }
.guild-bank-picks li.is-locked { opacity: .5; }
.guild-bank-table { margin-top: 4px; }
.guild-bank-when { white-space: nowrap; color: var(--dim); }
.guild-bank-detail { color: var(--dim); }
.guild-bank-note { margin: 18px 0 0; font-size: 13px; color: var(--dim); }

/* The Statistics page (plugins/shattered-statistics). */
.stat-tabs { margin-bottom: 20px; }
.stat-tabs a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px; border-radius: 8px; color: var(--dim); font-weight: 600; }
.stat-tabs a:hover { color: var(--bright); background: rgba(255,255,255,.05); }
.stat-tabs a[aria-current="page"] { color: var(--bright); background: var(--surface-3); box-shadow: inset 0 -2px 0 var(--gold); }
.hl-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 0 0 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.hl-totals > div { padding: 14px 18px; background: var(--surface); }
.hl-totals dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hl-totals dd { margin: 4px 0 0; font-size: 20px; font-weight: 600; color: var(--bright); font-variant-numeric: tabular-nums; }
.hl-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 24px/1.2 var(--display); color: var(--gold-hi); }
.hl-heading .hl-icon { width: 20px; height: 20px; }
.hl-subhead { margin-top: 32px; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.hl-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); text-align: center; }
.page-body .hl-card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font: 700 11px/1.3 var(--ui); letter-spacing: .03em; white-space: nowrap; text-transform: uppercase; color: var(--stone); }
.hl-icon { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--offline); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* outfit.php draws the outfit in the bottom-right of a 64x64 canvas, as ots.me did, so a
   one-tile outfit is pulled back by half a tile to sit in the middle. */
.hl-outfit { display: grid; place-items: center; width: 64px; height: 64px; }
.hl-outfit img { max-width: none; width: 64px; height: 64px; translate: -8px -2px; image-rendering: pixelated; }
.hl-outfit .hl-icon { width: 28px; height: 28px; stroke: var(--muted); }
.hl-crest { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(214,165,78,.4); border-radius: 8px; background: rgba(214,165,78,.1); font: 22px/1 var(--display); color: var(--gold-hi); }
.hl-name { max-width: 100%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-name a { color: var(--bright); }
.hl-name a:hover { color: var(--gold-hi); }
.hl-value { font-size: 13px; font-weight: 600; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.hl-when { font-size: 11px; color: var(--muted); }
.hl-none { font-size: 13px; color: var(--muted); }
.hl-card.is-empty { background: var(--surface); }

/* ---- Account page menu (MyAAC's account.management.html.twig) ----
   MyAAC styles it inline as black text on config.ini's lightborder, which in this theme is
   near-black, and floats it in a 150px column. The id in every selector is what outranks
   that inline <style>. Redrawn as the site menu's card; the page only shows it on
   account/manage, so its first link, My Account, is always the current one. */
#account-manage { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; padding: 0; }
#account-manage > #one, #account-manage > #two { float: none; width: auto; margin: 0; padding: 0; }
#account-manage .vertical-menu {
	position: sticky;
	top: 84px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px;
	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;
}
#account-manage .vertical-menu::before {
	content: "Account";
	padding: 8px 14px 10px;
	margin: 0 -8px 6px;
	border-bottom: 1px solid var(--line-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dim);
}
#account-manage .vertical-menu a {
	padding: 9px 14px;
	border-radius: 8px;
	background: none;
	color: var(--text);
	font-weight: 500;
	white-space: nowrap;
	transition: color .15s, background-color .15s;
}
#account-manage .vertical-menu a:hover { color: var(--bright); background: rgba(255, 255, 255, .06); }
#account-manage .vertical-menu a:first-child { color: var(--bright); background: var(--surface-3); box-shadow: inset 3px 0 0 var(--gold); }
#account-manage .vertical-menu a:last-child { margin-top: 6px; position: relative; color: var(--offline); }
#account-manage .vertical-menu a:last-child::before { content: ""; position: absolute; inset: -4px 6px auto; border-top: 1px solid var(--line-soft); }
#account-manage .vertical-menu a:last-child:hover { background: rgba(224, 112, 122, .1); }
@media (max-width: 760px) {
	#account-manage { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	#account-manage .vertical-menu { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
	#account-manage .vertical-menu::before { display: none; }
	#account-manage .vertical-menu a { padding: 8px 12px; font-size: 14px; }
	#account-manage .vertical-menu a:first-child { box-shadow: inset 0 -2px 0 var(--gold); }
	#account-manage .vertical-menu a:last-child { margin: 0 0 0 auto; }
	#account-manage .vertical-menu a:last-child::before { display: none; }
}
