/*
 * MorgarOTS template
 * The page ground is the pit of Morgaroth's lair on Goroma: cooled lava crust over molten seams, built from the real
 * Tibia 8.0 sprites of the client (lava 598-601, dirt floor 351-355), shown at 2x; the seams breathe and embers rise.
 * Pages are vellum, the three parts of the world have their own colours: Tibia moss, Morgar Bastion gold,
 * Void Reach violet. Alegreya SC for names and headings, Alegreya Sans for reading, Silkscreen (pixel font, crisp at 16 px) for numbers
 * of the game (levels, rates, players).
 */

@font-face { font-family: "Alegreya Sans"; src: url(../fonts/alegreya-sans-400.woff) format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(../fonts/alegreya-sans-400i.woff) format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(../fonts/alegreya-sans-500.woff) format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(../fonts/alegreya-sans-700.woff) format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url(../fonts/alegreya-sc-500.woff) format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url(../fonts/alegreya-sc-700.woff) format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url(../fonts/silkscreen.woff) format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
	--uncharted: #0d0807;   /* page ground: burnt rock of the pit */
	--map-sea: #12224a;     /* unexplored sea of the map pictures */
	--deep: #090505;        /* header, footer, buttons: obsidian */
	--head: #2a1410;        /* table heads: dried blood */
	--water: #a52a16;       /* Morgaroth red: hover, small lines on the pages */
	--ember: #f08a3c;       /* lava light: focus on the dark ground */
	--shore: #33201a;       /* lines on the dark ground */
	--mist: #cbbfb5;        /* text on the dark ground: ash */
	--mist-2: #93827a;      /* quiet text on the dark ground */
	--vellum: #e2d3b1;      /* pages (aged) */
	--vellum-2: #d4c299;    /* alternate rows */
	--vellum-3: #eee3c8;    /* fields */
	--ink: #2a2017;
	--ink-2: #6a5940;
	--rule: #a99263;
	--link: #1d4a8f;
	--moss: #5d8a3a;        /* Tibia, level 1-149 */
	--gold: #c08d2a;        /* Morgar Bastion, 150+ */
	--violet: #8a64d6;      /* Void Reach, 300+ */
	--danger: #a3321f;
	--ok: #4c7c2e;

	--font-text: "Alegreya Sans", "Segoe UI", Tahoma, sans-serif;
	--font-name: "Alegreya SC", Georgia, serif;
	--font-num: "Silkscreen", "Lucida Console", monospace;
	--wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
/* game numbers must read as numbers: lining figures everywhere (the font shorthand would reset them) */
* { font-variant-numeric: lining-nums !important; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background-color: var(--uncharted);
	color: var(--mist);
	font: 400 17px/1.55 var(--font-text);
	font-variant-numeric: lining-nums;
}

img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.sheet :focus-visible { outline-color: var(--water); }

/* ------------------------------------------------------------ the pit (fixed ground behind the pages) */

.pit {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
	background: var(--uncharted) url(../images/pit-base.jpg) center bottom / cover no-repeat;
	image-rendering: pixelated;
}
.pit-layer { position: absolute; inset: 0; background: center bottom / cover no-repeat; }
.pit-glow { image-rendering: auto; }
.pit-glow-a { background-image: url(../images/pit-glow-a.png); }
.pit-glow-b { background-image: url(../images/pit-glow-b.png); }
.pit-hot-a { background-image: url(../images/pit-hot-a.png); }
.pit-hot-b { background-image: url(../images/pit-hot-b.png); }
/* two groups of seams breathe out of step, like lava under the crust */
.pit-glow-a, .pit-hot-a { animation: pit-breathe 6.5s ease-in-out infinite alternate; }
.pit-glow-b, .pit-hot-b { animation: pit-breathe 9s ease-in-out -4.5s infinite alternate; }
@keyframes pit-breathe { from { opacity: 0.18; } to { opacity: 1; } }
.pit-embers { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
	.pit-layer { animation: none; opacity: 0.75; }
	.pit-embers { display: none; }
}

/* ------------------------------------------------------------ the artwork (background "art") */
/* the picture and its light layers share one stage: same size, same place, one slow zoom for all of them */

.pit.pit-art { background: #07060a; image-rendering: auto; }
.art-stage { position: absolute; inset: 0; transform-origin: 68% 36%; animation: art-zoom 46s ease-in-out infinite alternate; }
.art { position: absolute; inset: 0; background: 68% 38% / cover no-repeat; }
.art-base { background-image: url(../images/art-base.jpg); }
.art-lava { background-image: url(../images/art-lava.png); animation: art-lava 5.5s ease-in-out infinite alternate; }
.art-magic { background-image: url(../images/art-magic.png); animation: art-magic 2.8s ease-in-out infinite alternate; }
.art-eyes { background-image: url(../images/art-eyes.png); animation: art-eyes 4.6s linear infinite; }
@keyframes art-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes art-lava { from { opacity: 0.12; } to { opacity: 0.85; } }
@keyframes art-magic { from { opacity: 0.25; } to { opacity: 0.95; } }
@keyframes art-eyes { 0%, 100% { opacity: 0.5; } 6% { opacity: 1; } 9% { opacity: 0.65; } 12% { opacity: 1; } 55% { opacity: 0.85; } 70% { opacity: 0.55; } }
/* fog drifting over the rocks: a wide strip of a tileable picture moved by one tile, so it never jumps */
/* WWW 4: the fade of the fog is baked into the picture (no mask - its edge made two light bars over the picture) */
.art-fog { position: absolute; left: -1024px; right: 0; bottom: -4%; height: 62%; background: url(../images/art-fog.png?v=4) 0 100% / 1024px 512px repeat-x; opacity: 0.17;
	animation: art-fog 110s linear infinite; }
.art-fog-b { left: -1400px; bottom: -14%; height: 74%; background-size: 1400px 700px; opacity: 0.1; animation-duration: 170s; animation-direction: reverse; }
@keyframes art-fog { from { transform: translateX(0); } to { transform: translateX(1024px); } }
.art-fog-b { animation-name: art-fog-b; }
@keyframes art-fog-b { from { transform: translateX(0); } to { transform: translateX(1400px); } }
/* shade: dark where the text stands (left), dark at the top for the menu, darker on the inner pages */
.art-shade { position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(6, 5, 8, 0.9) 0%, rgba(6, 5, 8, 0.62) 32%, rgba(6, 5, 8, 0.12) 62%, rgba(6, 5, 8, 0) 80%),
		linear-gradient(rgba(6, 5, 8, 0.55), rgba(6, 5, 8, 0) 22%, rgba(6, 5, 8, 0) 78%, rgba(6, 5, 8, 0.6)); }
.bg-art:not(.is-home) .art-shade { background-color: rgba(6, 5, 8, 0.35); }
@media (min-width: 2200px) { .art-base { background-image: url(../images/art-base-4k.jpg); } }

/* ------------------------------------------------------------ the pixel diorama (background "pixel") */
/* one 16:9 stage that covers the screen; the canvas keeps its 1536x864 game pixels and is scaled without smoothing */

.pit.pit-pixel { background: #07060a; image-rendering: auto; }
.dio { position: absolute; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); transform: translate(-50%, -50%); }
.dio-canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.dio-glow { position: absolute; inset: 0; background: url(../images/dio-glow.png) 0 0 / 100% 100% no-repeat; mix-blend-mode: screen; opacity: 0.35; animation: dio-glow 2.6s ease-in-out infinite alternate; }
@keyframes dio-glow { from { opacity: 0.2; } to { opacity: 0.6; } }
.bg-pixel .art-shade { background:
	radial-gradient(60% 55% at 50% 42%, rgba(6, 5, 8, 0.55), rgba(6, 5, 8, 0) 75%),
	linear-gradient(rgba(6, 5, 8, 0.6), rgba(6, 5, 8, 0) 25%, rgba(6, 5, 8, 0) 75%, rgba(6, 5, 8, 0.65)); }
.bg-pixel:not(.is-home) .art-shade { background-color: rgba(6, 5, 8, 0.3); }
.bg-pixel.is-home .atlas { padding-top: 0; }
.bg-pixel.is-home .atlas-intro { min-height: calc(100vh - 170px); display: flex; flex-direction: column; justify-content: center; padding: 30px 0 60px; }
.bg-pixel.is-home .atlas-title { font-size: 46px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95); }
.bg-pixel.is-home .atlas-lead { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95); }
@media (prefers-reduced-motion: reduce) { .dio-glow { animation: none; } }
/* home: the first screen belongs to the picture (text on the dark left side), the maps of the world come below it */
.bg-art.is-home .atlas { padding-top: 0; }
.bg-art.is-home .atlas-intro { min-height: calc(100vh - 170px); display: flex; flex-direction: column; justify-content: center; padding: 30px 0 60px; }
.bg-art.is-home .atlas-title { font-size: 46px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9); }
.bg-art.is-home .atlas-lead { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95); }
@media (max-width: 760px) {
	.art-base { background-image: url(../images/art-base-s.jpg); }
	.art { background-position: 72% 40%; }
	.art-shade { background: linear-gradient(rgba(6, 5, 8, 0.7), rgba(6, 5, 8, 0.35) 40%, rgba(6, 5, 8, 0.75)); }
}
@media (prefers-reduced-motion: reduce) {
	.art-stage, .art-fog { animation: none; }
	.art-lava, .art-magic, .art-eyes { animation: none; opacity: 0.6; }
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--vellum); color: var(--ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.num { font-family: var(--font-num); font-weight: 400; letter-spacing: 0.02em; }

/* ------------------------------------------------------------ buttons */

.btn, input[type="submit"], input[type="button"], button.btn, .sheet button:not(.mp-plain) {
	display: inline-block;
	font: 500 16px/1.2 var(--font-text);
	padding: 8px 16px;
	border: 1px solid var(--deep);
	border-radius: 3px;
	background: var(--deep);
	color: var(--vellum);
	text-decoration: none;
	cursor: pointer;
}
.btn:hover, input[type="submit"]:hover, input[type="button"]:hover, .sheet button:not(.mp-plain):hover { background: var(--water); border-color: var(--water); }
.btn-light { background: var(--vellum); border-color: var(--vellum); color: var(--ink); }
.btn-light:hover { background: #fff7e3; border-color: #fff7e3; color: var(--ink); }
.btn-line { background: transparent; border-color: var(--mist-2); color: var(--vellum); }
.btn-line:hover { background: transparent; border-color: var(--vellum); }
.btn-big { font-size: 18px; padding: 11px 22px; }

/* ------------------------------------------------------------ header */

.masthead { background: var(--deep); border-bottom: 1px solid #3f1a10; box-shadow: 0 1px 0 rgba(240, 138, 60, 0.1), 0 10px 30px rgba(0, 0, 0, 0.55); position: relative; z-index: 20; }
.masthead-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.wordmark { display: flex; flex-direction: column; text-decoration: none; color: var(--vellum); padding: 10px 0; }
.wordmark-name { font: 700 30px/1 var(--font-name); letter-spacing: 0.01em; }
.wordmark-sub { font-size: 14px; color: var(--mist-2); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 18px; flex: 1; }
.nav-list { display: flex; list-style: none; margin: 0 auto 0 0; padding: 0; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
	display: block;
	font: 500 17px/1 var(--font-text);
	color: var(--mist);
	background: none;
	border: 0;
	padding: 10px 12px;
	text-decoration: none;
	cursor: pointer;
	border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--vellum); }
.nav-link.is-current { color: var(--vellum); border-bottom-color: var(--vellum); }
.nav-group > .nav-link::after {
	content: "";
	display: inline-block;
	width: 0; height: 0;
	margin-left: 7px;
	vertical-align: 3px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
}
.nav-sub {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	margin: 6px 0 0;
	padding: 6px 0;
	list-style: none;
	background: var(--vellum);
	border: 1px solid var(--rule);
	border-radius: 3px;
	z-index: 30;
}
.nav-group > button[aria-expanded="true"] + .nav-sub { display: block; }
.nav-sub a { display: block; padding: 7px 16px; color: var(--ink); text-decoration: none; }
.nav-ico, .nav-sub-title, .nav-close { display: none; }
.nav-sub a:hover, .nav-sub a[aria-current="page"] { background: var(--vellum-2); }

.lang { display: flex; border: 1px solid var(--shore); border-radius: 3px; overflow: hidden; }
.lang button { font: 500 14px/1 var(--font-text); background: none; border: 0; color: var(--mist-2); padding: 7px 9px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--shore); color: var(--vellum); }
.lang button:hover { color: var(--vellum); }

.nav-toggle { display: none; margin-left: auto; font: 500 16px/1 var(--font-text); color: var(--vellum); background: none; border: 1px solid var(--shore); border-radius: 3px; padding: 9px 14px; }

/* ------------------------------------------------------------ beta test notice */

.beta { background: #241a08; border-bottom: 1px solid #6b4f17; color: #ead9b0; font-size: 16px; }
.beta-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding-top: 9px; padding-bottom: 10px; }
.beta-tag { font: 700 16px/1.2 var(--font-name); color: #e6b34f; }
.rail-beta { color: #e6b34f; font-size: 15px; }
.sheet .notice.notice-beta { border-left-color: var(--gold); }

/* ------------------------------------------------------------ atlas (home) */

.atlas { padding: 44px 0 36px; }
.atlas-intro { max-width: 780px; }
.atlas-title { font: 700 40px/1.12 var(--font-name); color: var(--vellum); margin: 0 0 16px; letter-spacing: 0.005em; }
.atlas-lead { font-size: 19px; line-height: 1.55; color: var(--mist); margin: 0 0 24px; max-width: 64ch; }
.atlas-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 34px; }

.atlas-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; list-style: none; margin: 0; padding: 3px; background: var(--rule); border-radius: 3px; }
.region a { display: block; position: relative; height: 250px; overflow: hidden; text-decoration: none; color: var(--vellum); background: var(--map-sea); }
.region-map {
	position: absolute; inset: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 520px 320px;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	transition: transform 0.6s ease;
}
.region a:hover .region-map { transform: scale(1.04); }
.region-plate {
	position: absolute; left: 0; bottom: 0;
	display: flex; flex-direction: column;
	padding: 10px 16px 11px 14px;
	background: rgba(9, 5, 5, 0.88);
	border-left: 5px solid var(--moss);
	border-top-right-radius: 3px;
}
.region-bastion .region-plate { border-left-color: var(--gold); }
.region-void .region-plate { border-left-color: var(--violet); }
.region-name { font: 700 23px/1.1 var(--font-name); }
.region-level { font-size: 15px; color: var(--mist); margin-top: 2px; }
.region-level b { font: 400 16px/1 var(--font-num); color: var(--vellum); margin-left: 2px; }

/* ------------------------------------------------------------ layout */

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; align-items: start; padding-top: 28px; padding-bottom: 48px; }
.is-home .layout { padding-top: 8px; }

.sheet {
	background: var(--vellum);
	color: var(--ink);
	border: 1px solid var(--rule);
	border-radius: 3px;
	padding: 26px 32px 34px;
	min-width: 0;
}
.sheet-title { font: 700 32px/1.15 var(--font-name); margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); color: var(--ink); }
.sheet-body { overflow-wrap: break-word; }
.sheet-body > *:first-child { margin-top: 0; }

.sheet a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.sheet a:hover { color: var(--water); }
.sheet a.btn, .sheet a.btn:hover { color: var(--vellum); text-decoration: none; }
.sheet a.btn-light, .sheet a.btn-light:hover { color: var(--ink); }
.sheet h1, .sheet h2, .sheet h3 { font-family: var(--font-name); font-weight: 700; color: var(--ink); line-height: 1.2; }
.sheet h1 { font-size: 28px; margin: 26px 0 12px; }
.sheet h2 { font-size: 24px; margin: 28px 0 10px; }
.sheet h3 { font-size: 19px; margin: 22px 0 8px; }
.sheet p, .sheet ul, .sheet ol { max-width: 75ch; }
.sheet hr { border: 0; border-top: 1px solid var(--rule); margin: 22px 0; }
.sheet small, .sheet .small { font-size: 14px; }
.sheet b, .sheet strong { font-weight: 700; }
.sheet code, .sheet kbd { font: 15px/1.3 "Consolas", "Courier New", monospace; background: var(--vellum-2); padding: 1px 5px; border-radius: 2px; }

/* MyAAC tables and forms inside the page */
.sheet table { border-collapse: collapse; max-width: 100%; }
.sheet td, .sheet th { padding: 6px 9px; vertical-align: top; text-align: left; }
.sheet tr.white td, .sheet tr.white th, .sheet td.white, .sheet .white { color: var(--vellum); }
.sheet tr.white a, .sheet .white a { color: var(--vellum); }
.sheet tr.white td { font-weight: 500; }
.sheet .TableContainer { margin: 0 0 20px; width: 100%; }
.sheet .TableContainer table { width: 100%; }
.sheet .CaptionContainer { display: block; }
.sheet .CaptionInnerContainer { position: relative; }
.sheet .CaptionInnerContainer > span { display: none; }
.sheet .CaptionContainer .Text {
	background: var(--head);
	color: var(--vellum);
	font: 700 18px/1.2 var(--font-name);
	padding: 9px 12px;
	border-radius: 3px 3px 0 0;
}
.sheet .InnerTableContainer { border: 1px solid var(--rule); border-top: 0; }
.sheet .InnerTableContainer > table > tbody > tr:nth-child(odd) > td, .sheet .InnerTableContainer > table > tr:nth-child(odd) > td { background: var(--vellum-2); }
.sheet .TableContentContainer { width: 100%; }
.sheet .LabelV { font-weight: 700; width: 160px; white-space: nowrap; }
.sheet .LabelV span { white-space: nowrap; }
.sheet .TableShadowContainerRightTop, .sheet .TableShadowRightTop, .sheet .TableBottomShadow,
.sheet .TableBottomLeftShadow, .sheet .TableBottomRightShadow, .sheet .TableShadowContainer { display: none; }
.sheet .FormFieldError, .sheet .red, .sheet .error { color: var(--danger); }

.sheet input[type="text"], .sheet input[type="password"], .sheet input[type="email"], .sheet input[type="number"],
.sheet input[type="search"], .sheet input:not([type]), .sheet select, .sheet textarea {
	font: 16px/1.3 var(--font-text);
	color: var(--ink);
	background: var(--vellum-3);
	border: 1px solid var(--rule);
	border-radius: 3px;
	padding: 6px 9px;
	max-width: 100%;
}
.sheet input:focus, .sheet select:focus, .sheet textarea:focus { outline: 2px solid var(--water); outline-offset: 0; border-color: var(--water); }

/* MyAAC message boxes (tools/css/messages.css) */
.sheet .note, .sheet .success, .sheet .warning, .sheet .error.box {
	border-radius: 3px;
}

/* news */
.news { margin: 0 0 30px; padding: 0 0 26px; border-bottom: 1px solid var(--rule); }
.news:last-of-type { border-bottom: 0; }
.news-title { font: 700 26px/1.2 var(--font-name); margin: 0 0 4px !important; }
.news-meta { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }
.news-body { font-size: 18px; line-height: 1.6; }
.news-body > *:first-child { margin-top: 0; }
.news-hidden { opacity: 0.6; }
.sheet .tickers { margin: 0 0 30px; padding: 0; list-style: none; max-width: none; }
.tickers li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.tickers time { color: var(--ink-2); font-size: 15px; }

/* ------------------------------------------------------------ MorgarOTS pages (about, systems, download, updates) */

.sheet .lead { font-size: 19px; line-height: 1.55; color: var(--ink); margin: 0 0 22px; }

.regions { display: grid; gap: 14px; margin: 0 0 8px; }
.region-card { padding: 4px 0 4px 18px; border-left: 4px solid var(--moss); }
.region-card-bastion { border-left-color: var(--gold); }
.region-card-void { border-left-color: var(--violet); }
.sheet .region-card h3 { margin: 0 0 4px; font-size: 21px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.region-card h3 .band { font: 400 16px/1.2 var(--font-text); color: var(--ink-2); }
.region-card h3 .band .num { color: var(--ink); }
.region-card p { margin: 0; }

.sheet table.facts { width: 100%; max-width: 760px; margin: 6px 0 12px; border-top: 1px solid var(--rule); }
.facts th, .facts td { border-bottom: 1px solid var(--rule); padding: 8px 10px; vertical-align: top; }
.facts tbody th { width: 34%; font-weight: 500; color: var(--ink-2); }
.facts thead th { background: var(--head); color: var(--vellum); font-weight: 500; }
.facts .num { font-size: 16px; }
.facts.commands tbody th { width: 150px; white-space: nowrap; }
.facts.soul tbody th { width: auto; white-space: nowrap; color: var(--ink); }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }

.sheet ol.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 2px 0 12px 44px; }
.steps li::before {
	content: counter(step);
	position: absolute; left: 0; top: 0;
	width: 30px; height: 30px;
	display: flex; align-items: center; justify-content: center;
	font: 400 16px/1 var(--font-num);
	color: var(--vellum); background: var(--deep); border-radius: 50%;
}

.sheet .toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 16px; }

.download-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 4px 0 26px; padding: 18px 20px; background: var(--vellum-2); border-radius: 3px; }
.download-meta { margin: 0; color: var(--ink-2); }
.sheet .notice { padding: 12px 16px; background: var(--vellum-2); border-left: 4px solid var(--danger); }

.update { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--rule); }
.update:last-child { border-bottom: 0; }
.sheet .update-title { font: 700 21px/1.3 var(--font-name); margin: 0 0 8px; }
.update-v { display: inline-block; font-size: 16px; color: var(--vellum); background: var(--deep); border-radius: 3px; padding: 3px 7px 2px; margin-right: 8px; vertical-align: 2px; }
.update-current .update-v { background: var(--moss); }
.update ul { margin: 0; padding-left: 20px; }
.update li { margin: 4px 0; }
.update-short { padding-bottom: 10px; margin-bottom: 10px; }
.sheet .update-short .update-title { font: 500 18px/1.3 var(--font-text); margin: 0; }
.update-short .update-v { padding: 2px 6px 1px; }

/* ------------------------------------------------------------ rail */

.rail { display: flex; flex-direction: column; gap: 22px; min-width: 0; background: rgba(9, 5, 5, 0.9); border: 1px solid var(--shore); border-radius: 3px; padding: 20px 20px 2px; }
.rail-box { padding: 0 0 20px; border-bottom: 1px solid var(--shore); }
.rail-box:last-child { border-bottom: 0; }
.rail-title { font: 700 20px/1.2 var(--font-name); color: var(--vellum); margin: 0 0 12px; }
.rail-line { margin: 6px 0; font-size: 16px; }
.rail-line a { color: var(--vellum); text-decoration-color: var(--mist-2); text-underline-offset: 2px; }
.rail-line a:hover { text-decoration-color: var(--vellum); }
.rail-quiet { color: var(--mist-2); }
.rail .num { color: var(--vellum); }

.status { display: flex; align-items: center; gap: 9px; font: 700 18px/1 var(--font-text); margin: 0 0 10px; color: var(--vellum); }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: #7d8597; }
.status.is-online .status-dot { background: #6fbf4a; box-shadow: 0 0 0 3px rgba(111, 191, 74, 0.22); }
.status.is-offline .status-dot { background: #c2553f; }

.rates { margin: 14px 0 12px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 7px; }
.rates div { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dotted var(--shore); padding-bottom: 3px; }
.rates dt { font-size: 15px; color: var(--mist-2); }
.rates dd { margin: 0; color: var(--vellum); font-size: 16px; }

.top-list { list-style: none; margin: 0 0 10px; padding: 0; }
.top-list li { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--shore); }
.top-list li:last-child { border-bottom: 0; }
.top-list a { color: var(--vellum); text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list a:hover { text-decoration: underline; }
.top-voc { grid-column: 1; grid-row: 2; font-size: 14px; color: var(--mist-2); }
.top-list .lvl { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 16px; }

.lvl-tibia { color: #9fcf74 !important; }
.lvl-bastion { color: #e6b34f !important; }
.lvl-void { color: #b89bf0 !important; }

/* ------------------------------------------------------------ footer */

.footer { background: var(--deep); border-top: 1px solid var(--shore); color: var(--mist-2); font-size: 15px; }
.footer-row { padding-top: 26px; padding-bottom: 30px; }
.footer-name { font: 700 20px/1 var(--font-name); color: var(--vellum); margin: 0 0 8px; }
.footer-note { margin: 0 0 8px; max-width: 70ch; }
.footer-meta { margin: 0; }
.footer a { color: var(--mist); }

/* ------------------------------------------------------------ small screens */

@media (max-width: 1080px) {
	.masthead-row { flex-wrap: wrap; gap: 0 18px; }
	.nav-toggle { display: inline-block; }
	.nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 4px 0 18px; }
	.nav.is-open { display: flex; }
	.nav-list { flex-direction: column; margin: 0; }
	.nav-link { width: 100%; text-align: left; padding: 11px 4px; border-bottom: 1px solid var(--shore); }
	.nav-link.is-current { border-bottom-color: var(--shore); text-decoration: underline; text-underline-offset: 4px; }
	.nav-sub { position: static; margin: 4px 0 8px; border-radius: 3px; }
	.nav-download { align-self: flex-start; }
	.lang { align-self: flex-start; }
	.layout { grid-template-columns: 1fr; }
	.rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 28px; }
	.rail-box { border-bottom: 0; }
}

@media (max-width: 760px) {
	body { font-size: 16px; }
	.wrap { padding: 0 16px; }
	.atlas { padding: 28px 0 24px; }
	.atlas-title { font-size: 30px; }
	.atlas-lead { font-size: 17px; }
	.atlas-map { grid-template-columns: 1fr; }
	.region a { height: 150px; }
	.sheet { padding: 20px 16px 26px; }
	.sheet-title { font-size: 26px; }
	.sheet .LabelV { width: auto; white-space: normal; }
	.sheet-body { overflow-x: auto; }
	.tickers li { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
	.region-map { transition: none; }
	.region a:hover .region-map { transform: none; }
}

/* ------------------------------------------------------------ outfits on the MyAAC pages (outfit.php) */

.sheet td > img[src^="outfit.php"] { position: static !important; margin: -14px -6px -10px -14px !important; width: 56px; height: 56px; image-rendering: pixelated; }
.page-characters .sheet-body { position: relative; }
.char-outfit { position: absolute; right: 64px; top: 56px; z-index: 1; width: 112px; height: 112px; background: var(--uncharted); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.char-outfit img { width: 128px; height: 128px; margin: -24px 0 0 -24px; image-rendering: pixelated; }

/* ------------------------------------------------------------ WWW 4: character page, highscores, houses, addons, tasks */

.sheet .lvl-tibia { color: #3f6d22 !important; }
.sheet .lvl-bastion { color: #8f630c !important; }
.sheet .lvl-void { color: #6040b0 !important; }
.btn-small, .sheet a.btn-small, .sheet button.btn-small { font-size: 14px; padding: 4px 11px; }
.sheet button.mp-plain { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer; }
.sheet button.mp-plain:hover { color: var(--water); }

.char-admin { margin: 0 0 10px; font-size: 14px; }
.char-head { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; }
.char-portrait { flex: none; width: 104px; height: 104px; overflow: hidden; border: 1px solid var(--rule); border-radius: 3px;
	background: radial-gradient(circle at 55% 62%, #3a2016 0, #1a0f0b 58%, var(--uncharted) 100%); }
.char-portrait img { display: block; width: 128px; height: 128px; max-width: none; margin: -22px 0 0 -22px; image-rendering: pixelated; }
.char-id { min-width: 0; }
.sheet .char-name { font-size: 30px; margin: 0 0 6px; }
.char-name small { font: 400 14px/1.3 var(--font-text); color: var(--ink-2); }
.char-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; }
.char-level { font-weight: 700; }
.char-level .num { font-size: 18px; }
.char-voc { color: var(--ink-2); }
.char-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; }
.char-status .status-dot { width: 9px; height: 9px; }
.char-status.is-online { color: var(--ok); }
.char-status.is-online .status-dot { background: #5fae3a; box-shadow: 0 0 0 3px rgba(95, 174, 58, 0.2); }
.char-status.is-offline { color: #8a4a3c; }
.char-status.is-offline .status-dot { background: #b5503b; }
.sheet .char-h { font-size: 20px; margin: 26px 0 8px; }
.char-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 30px; align-items: start; }
.char-grid .char-h { margin-top: 0; }
.sheet table.char-facts { max-width: none; margin: 0; }
.char-facts tbody th { width: 30%; }
.char-list tbody th.char-when { width: 150px; white-space: nowrap; font-size: 15px; }
.char-facts input[type="text"] { width: 100%; font-size: 14px !important; }
.char-inline { display: inline; margin: 0; }
.char-yes { color: var(--ok); font-weight: 700; }
.char-no { color: var(--danger); font-weight: 700; }
.acc-badge { display: inline-block; font-weight: 700; padding: 1px 9px; border-radius: 3px; font-size: 15px; }
.acc-badge.is-premium { background: #8f630c; color: #fff4d6; }
.acc-badge.is-free { background: var(--vellum-2); color: var(--ink-2); border: 1px solid var(--rule); }
.acc-note { margin-left: 8px; color: var(--ink-2); }

/* the inventory of the game client: amulet, weapon, ring | helmet, armor, legs, boots | backpack, shield, ammo */
.char-eq-box { min-width: 150px; }
.eq { display: inline-flex; gap: 4px; padding: 8px; background: #2b2520; border: 1px solid #120e0b; border-radius: 3px;
	box-shadow: inset 1px 1px 0 #4a4037, inset -1px -1px 0 #17120e, 0 1px 0 rgba(255, 255, 255, 0.35); }
.eq-col { display: flex; flex-direction: column; gap: 4px; }
.eq-side { padding-top: 18px; }
.eq-slot { width: 36px; height: 36px; padding: 1px; background: #141110; border: 1px solid; border-color: #0b0908 #4f453c #4f453c #0b0908; }
.eq-slot img { display: block; width: 32px; height: 32px; max-width: none; image-rendering: pixelated; }
.eq-skull { margin: 8px 0 0; }

.sheet .char-sign-img { margin: 0 0 8px; max-width: none; }
.char-sign-img img { display: block; max-width: 100%; height: auto; image-rendering: auto; border-radius: 2px; }
.char-sign-links summary { cursor: pointer; color: var(--link); font-weight: 500; margin: 0 0 8px; }
.char-sign-links[open] summary { margin-bottom: 10px; }

.sheet table.char-table { width: 100%; border-top: 1px solid var(--rule); }
.char-table th, .char-table td { border-bottom: 1px solid var(--rule); padding: 8px 10px; vertical-align: middle; }
.char-table thead th { background: var(--head); color: var(--vellum); font-weight: 500; }
.char-table tbody tr:nth-child(even) td { background: rgba(212, 194, 153, 0.55); }
.char-table tr.is-current td { background: rgba(192, 141, 42, 0.16); }
.char-table td small { color: var(--ink-2); }
.char-table td.char-act { text-align: right; width: 1%; white-space: nowrap; }
.char-search { margin-top: 30px; }

@media (max-width: 760px) {
	.char-head { gap: 12px; }
	.char-portrait { width: 84px; height: 84px; }
	.char-portrait img { margin: -30px 0 0 -30px; }
	.sheet .char-name { font-size: 24px; }
	.char-grid { grid-template-columns: 1fr; }
	.char-facts tbody th { width: 40%; }
}

/* houses, highscores, addons, tasks: rows of buttons (towns, categories) */
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--vellum-3); color: var(--ink) !important; text-decoration: none !important; font-weight: 500; font-size: 15px; line-height: 1.25; }
.pill small { color: var(--ink-2); font-size: 13px; }
.pill:hover { border-color: var(--water); color: var(--water) !important; }
.pill.is-on { background: var(--head); border-color: var(--head); color: var(--vellum) !important; }
.pill.is-on small { color: var(--mist-2); }
.pill-small { padding: 3px 10px; font-size: 14px; }
.table-scroll { width: 100%; overflow-x: auto; }
.sheet th.r, .sheet td.r { text-align: right; }
.house-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; }
.house-filter-label { color: var(--ink-2); font-size: 15px; margin: 0 2px 0 6px; }
.house-filter-label:first-child { margin-left: 0; }
.sheet .house-town { margin: 0 0 10px; }
.house-town small { font: 400 15px var(--font-text); color: var(--ink-2); margin-left: 6px; }
.house-free { color: var(--ok); font-weight: 500; }
.sheet .house-how { margin-top: 18px; padding: 12px 14px; background: rgba(192, 141, 42, 0.12); border-left: 3px solid var(--gold); max-width: none; }
.house-back { margin: 0 0 6px; font-size: 15px; }
.sheet .house-name { margin-top: 0; }
.house-img img { image-rendering: pixelated; border: 1px solid var(--rule); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sheet .hs-title { margin: 6px 0 10px; }
.hs-title small { font: 400 16px var(--font-text); color: var(--ink-2); margin-left: 6px; }
.hs-table td { vertical-align: middle; }
.hs-table .hs-rank { width: 1%; color: var(--ink-2); }
.hs-table .hs-outfit, .hs-table .hs-outfit-h { width: 52px; padding: 0 4px; }
.hs-table .hs-name a { font-weight: 700; }
.hs-table .hs-name .char-status { margin-left: 4px; vertical-align: 1px; }
.hs-table .hs-value { font-size: 17px; }
.hs-table tr.hs-top-1 .hs-rank .num { color: #a87a12; font-size: 18px; }
.hs-table tr.hs-top-2 .hs-rank .num { color: #7b7f86; font-size: 17px; }
.hs-table tr.hs-top-3 .hs-rank .num { color: #95542a; font-size: 17px; }
.hs-pages { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; }
.hs-page { color: var(--ink-2); }
.sheet .hs-note { margin-top: 14px; color: var(--ink-2); }

/* outfits and addons */
.ao-how { background: rgba(212, 194, 153, 0.45); border: 1px solid var(--rule); border-radius: 3px; padding: 14px 18px 4px; margin: 0 0 22px; }
.ao-how ol.steps { margin: 0 0 6px; }
.ao-how p.small { color: var(--ink-2); max-width: none; }
.ao-circle { margin: 0 0 26px; }
.sheet .ao-circle-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 21px; margin: 0 0 12px; padding-left: 12px; border-left: 4px solid var(--moss); }
.ao-bastion .ao-circle-title { border-left-color: var(--gold); }
.ao-void .ao-circle-title { border-left-color: var(--violet); }
.ao-circle-title .band { font: 400 16px/1.2 var(--font-text); color: var(--ink-2); }
.ao-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ao-card { background: var(--vellum-3); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; min-width: 0; }
.ao-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.ao-looks { display: flex; gap: 6px; flex: none; }
.ao-looks figure { margin: 0; width: 70px; text-align: center; }
.ao-looks img { display: block; width: 70px; height: 70px; object-fit: contain; object-position: 50% 100%; image-rendering: pixelated;
	background: radial-gradient(circle at 50% 70%, #3a2016 0, #1a0f0b 62%, var(--uncharted) 100%); border: 1px solid var(--rule); border-radius: 3px; padding: 3px; }
.ao-looks figcaption { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.sheet .ao-name { font-size: 19px; margin: 0 0 2px; }
.ao-sub { margin: 0; font-size: 14px; color: var(--ink-2); }
.ao-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sheet .ao-stage h5 { font: 700 14px/1.2 var(--font-text); margin: 0 0 4px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.sheet ul.ao-items { list-style: none; margin: 0; padding: 0; }
.ao-items li { display: flex; align-items: center; gap: 4px; font-size: 13px; line-height: 1.15; margin: 0 0 4px; }
.ao-items img { flex: none; width: 32px; height: 32px; image-rendering: pixelated; background: #2b2520; border: 1px solid #120e0b; border-radius: 2px; }
.ao-items .num { font-size: 13px; }
.sheet .ao-mons, .sheet .ao-br { margin: 10px 0 0; font-size: 14px; max-width: none; }
.ao-mons span, .ao-br span { color: var(--ink-2); }
.sheet .ao-sum { margin: 0; font-size: 15px; }
.sheet .ao-more { margin: 10px 0 0; }
.ao-grid-classic { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* hunting tasks */
.tk-group { margin: 0 0 24px; }
.tk-group h2 small { font: 400 16px var(--font-text); color: var(--ink-2); margin-left: 6px; }
.tk-table td { vertical-align: middle; }
.tk-table .tk-name small { color: var(--ink-2); }
.tk-mons { min-width: 220px; }
.tk-mon { display: inline-flex; align-items: center; gap: 4px; margin: 2px 10px 2px 0; text-decoration: none !important; color: var(--ink) !important; font-size: 15px; }
.tk-mon:hover span { color: var(--water); text-decoration: underline; }
.tk-pic { flex: none; width: 40px; height: 40px; background-repeat: no-repeat; background-size: 1280px auto; image-rendering: pixelated; }
.tk-kills small, .tk-reward small { color: var(--ink-2); }
.tk-reward { white-space: nowrap; }
.tk-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 3px; white-space: nowrap; }
.tk-leech { background: #7b1f1f; color: #ffe9df; }
@media (max-width: 760px) {
	.ao-grid, .ao-grid-classic { grid-template-columns: 1fr; }
	.ao-stages { grid-template-columns: 1fr 1fr; }
}

/* WWW 5: steps of the classic addons on the Outfits page, killer outfits */
.ao-steps { margin-top: .6rem; border-top: 1px solid rgba(122, 84, 16, .25); padding-top: .5rem; }
.ao-steps > summary { cursor: pointer; color: #7a5410; font-weight: 700; list-style: none; }
.ao-steps > summary::-webkit-details-marker { display: none; }
.ao-steps > summary::before { content: '\25B8'; display: inline-block; margin-right: .4rem; transition: transform .15s; }
.ao-steps[open] > summary::before { transform: rotate(90deg); }
.ao-steps .steps { margin: .5rem 0 .4rem; padding-left: 1.3rem; font-size: .93em; }
.ao-steps .steps li { margin: .25rem 0; }
.ao-grid-killers .ao-killer { border-color: rgba(150, 30, 20, .7); background-image: linear-gradient(180deg, rgba(160, 30, 20, .13), rgba(160, 30, 20, .03)); }
.ao-grid-killers .ao-killer .ao-name { color: #8f1a10; }
