/* fixed vertical metrics: the file's hhea / typo metrics disagree, so Chrome and Firefox placed the text at different heights;
   these center capitals in the line box in every browser (cap height 70%: 95% - 70% = 25%), lines stay 1.2em at line-height normal */

/* ====================================================================== */
/* Font                                                                   */
/* ====================================================================== */

@font-face {
	font-family: "Nocturne";
	src: url("../images/NocturneSerif-Regular.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: block;
	ascent-override: 95%;
	descent-override: 25%;
	line-gap-override: 0%;
}

/* ====================================================================== */
/* Design tokens (colors, glows, viewport unit)                           */
/* ====================================================================== */

:root {
	--heat: 46, 160, 90;
	box-sizing: border-box;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	--bg: url(../images/tileBg2.png) #05171b;
	--bgT: url(../images/tileBg3.png);
	--fg: #ecebf3;
	--mut: #acaab9;
	--card: #173f408e;
	--card2: #15282e;
	--line: #383d38;
	--line2: #313f4180;
	--hi: #1d3b2e86;
	--sel: #3d3f3385;
	--text: #ffe8c4;
	--textDark: #bead91;
	--acc: #ffe8c4;
	--boxLine: #484e44;
	--thickShadow:
		-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
		-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
	--glow: 0 0 2px #cab99d, 0 0 5px #cab99d, 0 0 10px #cab99d, 0 0 20px #cab99d;
	--smallGlow: 0 0 2px #cab99d, 0 0 4px #cab99d, 0 0 5px #cab99d;
	--weakGlow: 0 0 5px #cab99d, 0 0 15px #cab99d;
	--glowBox: drop-shadow(0 0 2px #e0c18fed);
	--minW: 800px;
	--vw: calc(max(100vw, var(--minW)) / 100);
}

/* ====================================================================== */
/* Base: links, scrollbars, html / body                                   */
/* ====================================================================== */

a.pk:hover {
	text-shadow: var(--glow);
}

.sizer {
	min-width: var(--minW);
}

* {
	scrollbar-color: #8a7f6c transparent;
	scrollbar-width: thin;
}

html {
	scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
	font-family: "Nocturne", serif;
	margin: 0;
	color: var(--text);
  --bodyShadow: -1px -1px 0 #0000007a,
		1px -1px 0 #0000007a,
		-1px 1px 0 #0000007a,
		1px 1px 0 #0000007a;
	text-shadow: var(--bodyShadow);
	background-color: black;
	font-size: 15px;
	line-height: normal;
}

button {
    font: inherit;
}

@media (pointer: coarse) {
	body {
		height: 2000px;
	}
}

.tn > img {
	width: 38px;
	margin: -8px;
	margin-right: 0;
	margin-bottom: 0px;
}

/* ====================================================================== */
/* Typography & text helpers                                              */
/* ====================================================================== */

h1 {
	font-size: 1.2em;
	font-weight: normal;
	margin: 0;
	margin-left: 1em;
	margin-bottom: 4px;
}

.idForge {
	width: 100%;
	font-size: 14px;
}
.idForge th,
.idForge td {
	padding: 2px 4px;
	border-color: var(--line2);
    border-left: 0;
    border-right: 0;
}
.idForge td.idUp {
	color: #9fe0a0;
}
.idForge tr.idCur {
	background: var(--sel);
}
.idForge .l {
	text-align: left;
	white-space: normal;
}

small,
.ldNote,
#disclaimer {
	white-space: pre-line;
	font-size: 90%;
	line-height: normal;
}

p.m,
small,
.idText,
#disclaimer {
	color: var(--mut);
}

p.m {
	margin: 0 0 10px;
	display: none;
}

/* ====================================================================== */
/* Page layout: card grid, character card                                 */
/* ====================================================================== */

.grid2 {
	width: calc(30.1 * var(--vw));
	display: inline-block;
	flex-shrink: 0;
	max-height: 100%;
	padding-right: 10px;
	box-sizing: border-box;
	padding-left: calc(1 * var(--vw));
}

.grid2 > *:first-child {
	padding-bottom: 0;
}

/* the notice at the bottom of the column when it doesn't scroll, at the end of its contents when it does */
.grid2 {
	display: flex;
	flex-direction: column;
}

.grid2 > * {
	flex-shrink: 0;
}

.grid2 > #disclaimer {
	margin-top: auto;
}

#mainWrapper {
	position: relative;
}

/* the other tabs: the same, in the .tabContainer */
.tabContainer {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.tabContainer > * {
	flex-shrink: 0;
}

.tabContainer > #disclaimer {
	margin-top: auto;
}

.card {
	padding: 10px 8px;
}

.card.pc .row {
	position: relative;
	z-index: 2;
}

.tierLic {
	font-weight: bold;
}

.tierLic .si {
    margin-right: 4px;
}

/* the character card's background: the symbol of the character's faction (app.js: --faction), faint, behind everything on the card */
.card.pc::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--faction, none) 72% / contain no-repeat;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
    filter: brightness(0.45);
}

.card .bt {
	padding: calc(0.4 * var(--vw)) calc(0.8 * var(--vw));
}

/* ====================================================================== */
/* Form controls & tables                                                 */
/* ====================================================================== */

select,
input {
	width: 100%;
	box-sizing: border-box;
	padding: 6px;
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--fg);
	font: inherit;
}
[hidden] {
	display: none !important;
}

table {
	border-collapse: collapse;
	width: 100%;
}

th,
td {
	border: 1px solid var(--line);
	padding: 4px 8px;
	text-align: center;
	white-space: nowrap;
}

.movText {
	color: #c1b197;
	font-size: 0.9em;
	display: inline-block;
	margin-right: 0.5em;
}

/* the labels in the stat rows (Bld beside HP, the combat stats): no taller than the line, or the row grows and the rows under it sit lower */
#gt td .movText,
#gt2 td .movText {
	line-height: 1;
}

/* ====================================================================== */
/* Character sheet: growth table, spider chart, recruit list              */
/* ====================================================================== */

#gt {
	position: absolute;
	left: 7.85%;
	top: calc(22.2 * var(--vw));
	font-size: calc(1.25 * var(--vw));
	line-height: 180%;
	width: auto;
}

#gt td,
#gt2 td {
	padding: 0;
	border: 0 solid transparent;
	text-align: right;
	white-space: nowrap;
	border-right-width: calc(2.2 * var(--vw));
	border-bottom-width: calc(0.46 * var(--vw));
	box-sizing: content-box;
	width: calc(6.7 * var(--vw));
	cursor: pointer;
}
.spider-chart-container {
	position: absolute;
	left: 24.4%;
	top: calc(22.6 * var(--vw));
	width: 9.35%;
	aspect-ratio: 1 / 1;
	line-height: 0;
}

/* the combat stats' chart (app.js renderCombatSpider): under the stats' one, as #gt2 is under #gt (39 - 22.2 vw lower) */
.spider-chart-container.spider2 {
    top: calc(38.87 * var(--vw));
}
.spider-chart-container.spider2[hidden] {
	display: none;
}

/* the Builder button (index.html #bdb, styled as Create a build: .pk.bcCreate): under the spider chart, as wide */
#bdb {
    position: absolute;
    left: 24.8%;
    top: calc(33 * var(--vw));
    width: 8.8%;
    box-sizing: border-box;
    text-align: center;
    z-index: 2;
    padding: 4px 0px;
    font-size: 16px;
    line-height: 160%;
}

.lrs .lr,
.idSec .lr {
    height: 2em;
    aspect-ratio: 1.25 / 1;
	margin: 1px 3px;
	vertical-align: middle;
}

.recruitContainer {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
}

.recruitContainer > span {
	flex-basis: 17em;
	max-width: calc(33% - 5px);
	margin: 0;
}

.rgFast .recruitContainer > span {
    max-width: calc(50% - 5px);
}

/* the combat stats under the stats (app.js renderCombatStats: the builder and build tabs): Phys / Mys, Prt, AS, Rsl, Hit, Avo, Crit, Ddg */
#gt2 {
	position: absolute;
	left: 7.85%;
	top: calc(38.5 * var(--vw));
	font-size: calc(1.25 * var(--vw));
	line-height: 180%;
	width: auto;
}
#gt2[hidden] {
	display: none;
}

td#g-total {
	position: absolute;
	top: calc(-2.7 * var(--vw));
	left: calc(8.9 * var(--vw));
}

div#abil {
	padding-bottom: 0;
}

summary::marker {
	margin-right: 4px;
}

/* an info link (app.js infoLink): the label with an info icon, as a link; open, the text under it */
.infoLink > summary {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	cursor: pointer;
	color: var(--text);
	text-decoration: underline dotted;
	text-underline-offset: 2px;
	font-size: 0.9em;
}
.infoLink > summary::-webkit-details-marker {
	display: none;
}
.infoLink > summary:hover,
.infoLink > summary:focus-visible {
	text-shadow: var(--smallGlow);
}
.infoLink .infoIc {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}
.infoLink[open] > summary {
	margin-bottom: 2px;
}

#gt td:empty,
#gt2 td:empty {
	display: none;
}

td.l {
	text-align: left;
}

td.pl {
	white-space: normal;
	max-width: calc(30vw);
}

td.d {
	color: var(--mut);
}
td.bb {
	background: var(--hi);
}
td select {
	padding: 3px;
	min-width: 80px;
}
.ok {
	color: var(--text);
}

/* ====================================================================== */
/* Skill lists & popup links (.arrowLink, .skItem)                        */
/* ====================================================================== */

.sk {
	margin: 12px 2px;
	margin-bottom: 16px;
}
.sk.nr {
	background: rgba(229, 72, 77, 0.16);
	border-color: #e5484d;
	color: #e5484d;
}
.sk.nr .rk {
	color: #e5484d;
}
.sh {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
	justify-content: space-between;
}
.sh select {
	width: auto;
	min-width: 90px;
}
select.bb {
	background: var(--hi);
	color: var(--fg);
}

.sk ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.searchIcon {
	display: flex;
	margin-left: auto;
}

.searchIcon svg {
	width: 1em;
	margin-right: 0.5em;
}

.sk li {
	display: flex;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--line);
}

.sk li summary {
	padding: 0.3em 0;
}

/* links to the item popup that stand in for expandable rows: same arrow as a summary */
.arrowLink {
	display: list-item;
	list-style: disclosure-closed inside;
	color: inherit;
	white-space: normal;
	padding-top: 1px;
	padding-bottom: 1px;
}

small a.arrowLink {
	text-decoration: underline dotted; /* like small details summary */
}
/* a popup link that starts with an icon (a weapon's combat art, the weapons with an art): icon first, then the arrow */
.arrowLink > :is(img, .sw):first-child {
	float: left;
}
/* ...or the icon alone, no arrow (a weapon's combat art in the weapon tables, the weapons with an art) */
.arrowLink.noArrow {
	list-style: none;
}

.pl .skItem.arrowLink .si {
	margin-right: 0;
}

/* a popup link with no icon of its own: an info badge (a circled i, like the rank badges) instead of the arrow */
a.arrowLink:not(:has(img, .sw, .si, .rk)) {
	list-style: none;
	text-decoration-style: dotted; /* where these links are underlined (small text) */
	text-underline-offset: 0.15em;
}
a.arrowLink:not(:has(img, .sw, .si, .rk))::before {
	content: "i";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	/* the letter at 0.9em; the circle kept at its size (1.0125em of the link text) */
	width: 1.125em;
	height: 1.125em;
	margin-right: 4px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 0.9em;
	font-weight: bold;
	vertical-align: 0.1em;
	vertical-align: text-bottom;
}

.arrowLink:not(:first-child):not(.skItem),
.acqLoc:not(:first-child):not(.acqInline > .acqLoc) {
	padding-top: 2px;
}
/* combat arts and blaze skills in the character's skill lists: the whole row opens the popup */
.sk li a.skItem {
	flex: 1;
	padding: 0.3em 0;
}
.sk li a.skItem > .sw {
	float: left; /* like summary>.sw: icon first, then the arrow */
	margin-right: 4px;
}
/* the combat art / ability icon after the arrow: 1px up, centred on the name */
.sk li a.skItem > img.si {
	vertical-align: text-bottom;
}

.dk img {
	filter: hue-rotate(220deg) contrast(1.5);
}

.dkI {
	filter: hue-rotate(235deg) contrast(1.4) saturate(1.8);
}

.sk li .rk {
	margin-right: 6px;
	margin-left: 2px;
}

.sk li .lrt .rk {
	margin-top: 0;
	margin-bottom: 0;
	vertical-align: middle;
}

/* ====================================================================== */
/* Icons, rank badges, chips                                              */
/* ====================================================================== */

.rk {
	flex: none;
	position: relative;
	box-sizing: border-box;
	border: 1px solid var(--text);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75em;
	color: var(--text);
	line-height: 1.5em;
	aspect-ratio: 1 / 1;
	height: 1.5em;
}

small .rk b {
	color: #ffe8c4;
}

.mountName {
	white-space: nowrap;
}

.rk:empty {
	visibility: hidden;
	width: 3px;
	border: 0;
}

.rk i {
	position: absolute;
	right: -5px;
	bottom: -5px;
	width: 13px;
	height: 13px;
	color: var(--text);
	font-style: normal;
	font-size: 13px;
	line-height: 15px;
	text-align: center;
	font-weight: 700;
}

.ln .rk {
	width: 1.8em;
	height: 1.8em;
	font-size: 10px;
	margin: 0;
}

.art-skill {
	text-align: right;
}

.skill > *,
.art-skill > *,
.requirementsWrapper > *,
.smallRequirements > * {
	vertical-align: text-bottom;
}

:is(#cmn, #mtb) .pk.tabIc {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
:is(#cmn, #mtb) .pk.tabIc .si {
	height: 1em;
	width: 1em;
	margin: 0;
	object-fit: contain;
	margin-left: -0.3em;
}

.si {
	height: 1.2em;
	width: 1.2em;
	vertical-align: text-bottom;
}

.pl .si,
.arrowLink .si,
.giftContainer .si {
	margin-right: 6px;
}

.ln .si {
	height: 20px;
}

.chp {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin: 2px 4px;
	vertical-align: middle;
}

.chp .si {
    margin-right: 0;
}

.idSec .acqFull .loc {
    color: var(--mut);
}

.sw {
	position: relative;
	flex: none;
	display: inline-flex;
}

.bn {
	position: absolute;
	right: 0px;
	top: 0px;
	background: rgba(0, 0, 0, 0.67);
	color: var(--text);
	font-style: normal;
	font-size: max(6px, 0.6vw);
	font-weight: 700;
	border-radius: 50%;
	z-index: 1;
	aspect-ratio: 1;
	border: 1px solid var(--text);
	width: 1.67em;
	line-height: 1.67em;
	text-align: center;
}

/* ====================================================================== */
/* Skill list headers (boon / bane)                                       */
/* ====================================================================== */

/* learned skill list header: skill icon (boon / bane) + name */
/* name in spaced small caps, then a line fading out to the right; --hc is the header colour: boon gold (glowing), bane blue,
   neutral the normal text */
.skHead {
	--hc: var(--textDark);
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 4px 0 6px;
	margin-bottom: 2px;
	padding-bottom: 0;
}
.skHead .si {
	height: 1.35em;
	width: 1.35em;
}
.skHead b {
	color: var(--hc);
	font-variant: small-caps;
	letter-spacing: 0.08em;
	font-size: 1.08em;
	white-space: nowrap;
}

/*.skHead::after {
	content: "";
	flex: 1;
	height: 1px;
	margin-left: 4px;
	background: linear-gradient(to right, var(--hc), transparent);
	opacity: 0.45;
}*/

.skHead.boonH {
	--hc: #e3cf9b;
}

.boonH li .rk, .boonH .rk i {
	color: #e3cf9b;
	border-color: #e3cf9b
}

.baneH li .rk, .baneH .rk i {
	color: #b8c2c8;
	border-color: #b8c2c8;
}

.skHead.boonH b {
	text-shadow:
		0 0 4px rgba(227, 207, 155, 0.4),
		0 0 8px rgba(227, 207, 155, 0.2);
}
.skHead.boonH::after {
	opacity: 0.7;
	box-shadow: 0 0 4px rgba(227, 207, 155, 0.35);
}
.skHead.baneH {
	--hc: #b8c2c8;
}

.idChip .lmItem {
	overflow: visible;
}

.idChip .lmItem.lmClass {
    margin-top: 4px;
    margin-bottom: 4px;
}

.li0 {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
}

.sk li {
	align-items: flex-start;
}

.sk li:first-child a {
	padding-top: 0;
}

.br {
	flex-basis: 100%;
	height: 0;
}

.ds {
	white-space: pre-line;
}

summary {
	cursor: pointer;
}

.st {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	color: var(--mut);
}
.st b {
	color: var(--fg);
}
.boon,
.bane {
	padding: 1px 8px;
	background: #f1efe6;
}
.boon {
	color: #b8860b;
}
.bane {
	color: #1e3a8a;
}

/* ====================================================================== */
/* Rows & ability boxes                                                   */
/* ====================================================================== */

.row {
	padding-left: 10px;
	font-size: max(12px, min(1em, calc(1.25 * var(--vw))));
	line-height: normal;
}

.row:not(:first-child) {
    filter: drop-shadow(0 0 1px black);
}

.row:first-child {
	padding-left: 0;
	font-size: calc(2 * var(--vw));
	line-height: 120%;
}

.row:first-child button {
	text-shadow:
		var(--thickShadow),
		0 0 2px #cab99d,
		0 0 5px #cab99d,
		0 0 10px #cab99d,
		0 0 20px #cab99d;
    width: 100%;
}

.row small {
	white-space: pre-line;
	display: inline-block;
}

.abilityDescription {
	display: block;
	padding-bottom: 2px;
}

.abilityDescription:not(.abilityDescription ~ .abilityDescription) {
	margin-top: 2px;
}

.abilityDescription:last-child {
	margin-bottom: 8px;
	border-bottom: 1px solid var(--line);
}

.namedAbility:last-child .abilityDescription {
	margin-bottom: 0;
}

.ab .sk {
    padding: 0;
    margin: 0;
}

.ab .st {
	margin-top: 0;
}

.ab {
	margin: 8px 0;
	margin-bottom: 16px;
}

.ab .lmItem {
    vertical-align: baseline;
}

.abGrp:first-child>.ab {
    margin-top: 4px;
}

.bcCols .abGrp:first-child>.ab {
    margin-top: 8px;
}

.sk:nth-child(2) {
    margin-top: 10px;
}

/* ability icons in the ability boxes (ability, equippable, class mastery / inherent, mount): 4px before the name */
.ab img.si {
	margin-right: 4px;
	vertical-align: text-bottom;
}
/* class inherent abilities: one per line, the description below the name */
.ab .abLine {
	margin-top: 6px;
}

/* ====================================================================== */
/* Buttons & modal frame (.pk, .mb, .mh)                                  */
/* ====================================================================== */

.pk {
	box-sizing: border-box;
	padding: 0.4vw 1vw;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	background: transparent;
	border: 0;
	pointer-events: all;
}

#md {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 9;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 12px;
	box-sizing: border-box;
}

.mountHeader,
.likedFood {
	width: 1px;
	padding-left: 2px;
	padding-right: 2px;
	min-width: auto !important;
}

.mountName {
	padding-right: 2px;
}

.likedFood .si {
	height: 1.4em;
	width: 1.4em;
}

.likedTaste {
	padding-left: 2px;
	padding-right: 2px;
}

.mountHeader .mi {
	margin: 0 !important;
}

.mb {
	background: #142324;
	background-image: url(../images/listCenter2.png);
	background-position: center center;
	width: 100%;
	max-height: 100%;
	background-size: 100%;
	display: flex;
	flex-direction: column;
	position: relative;
	box-sizing: border-box;
	min-height: 50%;
}

.rcCont svg {
	vertical-align: middle;
}

.mb > * {
	z-index: 1;
	position: relative;
}

.mb:before {
	content: "";
	position: absolute;
	top: 0;
	width: 100%;
	height: 50%;
	left: 0;
	background-image: url(../images/listTop.png);
	background-repeat: no-repeat;
	background-position: top center;
	background-size: 100%;
}

.mb:after {
	content: "";
	position: absolute;
	bottom: 0;
	width: 100%;
	height: 50%;
	left: 0;
	background-image: url(../images/listBottom.png);
	background-repeat: no-repeat;
	background-position: bottom center;
	background-size: 100%;
}

.divider {
	background-image: url(../images/dividerT.png);
    filter: drop-shadow(1px 1px 0px #0A15178A);
	height: 4px;
    background-size: cover;
    margin-top: 2px;
    margin-bottom: 6px;
}

.calcTitle {
	margin-left: 1em;
	color: var(--textDark);
    font-variant: small-caps;
    letter-spacing: 0.08em;
    font-size: 1.08em;
    white-space: nowrap;
	font-weight: bold;
}

.ab .idGrowth {
	margin: 0;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--line);
}

#mtl {
	padding-right: 10px;
}

/* the looking glass of the search fields (and the Ability finder's field, .finderIc) */
:root {
	--searchGlass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 122.879 119.799' fill='%23757575'%3E%3Cpath d='M49.988,0h0.016v0.007C63.803,0.011,76.298,5.608,85.34,14.652c9.027,9.031,14.619,21.515,14.628,35.303h0.007v0.033v0.04 h-0.007c-0.005,5.557-0.917,10.905-2.594,15.892c-0.281,0.837-0.575,1.641-0.877,2.409v0.007c-1.446,3.66-3.315,7.12-5.547,10.307 l29.082,26.139l0.018,0.016l0.157,0.146l0.011,0.011c1.642,1.563,2.536,3.656,2.649,5.78c0.11,2.1-0.543,4.248-1.979,5.971 l-0.011,0.016l-0.175,0.203l-0.035,0.035l-0.146,0.16l-0.016,0.021c-1.565,1.642-3.654,2.534-5.78,2.646 c-2.097,0.111-4.247-0.54-5.971-1.978l-0.015-0.011l-0.204-0.175l-0.029-0.024L78.761,90.865c-0.88,0.62-1.778,1.209-2.687,1.765 c-1.233,0.755-2.51,1.466-3.813,2.115c-6.699,3.342-14.269,5.222-22.272,5.222v0.007h-0.016v-0.007 c-13.799-0.004-26.296-5.601-35.338-14.645C5.605,76.291,0.016,63.805,0.007,50.021H0v-0.033v-0.016h0.007 c0.004-13.799,5.601-26.296,14.645-35.338C23.683,5.608,36.167,0.016,49.955,0.007V0H49.988L49.988,0z M50.004,11.21v0.007h-0.016 h-0.033V11.21c-10.686,0.007-20.372,4.35-27.384,11.359C15.56,29.578,11.213,39.274,11.21,49.973h0.007v0.016v0.033H11.21 c0.007,10.686,4.347,20.367,11.359,27.381c7.009,7.012,16.705,11.359,27.403,11.361v-0.007h0.016h0.033v0.007 c10.686-0.007,20.368-4.348,27.382-11.359c7.011-7.009,11.358-16.702,11.36-27.4h-0.006v-0.016v-0.033h0.006 c-0.006-10.686-4.35-20.372-11.358-27.384C70.396,15.56,60.703,11.213,50.004,11.21L50.004,11.21z'/%3E%3C/svg%3E");
}

input[type="search"] {
	max-width: 250px;
	min-width: 150px;
	background-image: var(--searchGlass);
	background-size: 1em;
	background-position: 0.3em 0.3em;
	background-repeat: no-repeat;
	padding-left: 1.55em !important;
}

.mh {
	/* height of a one-line header: the min-height, or a tab button (#cmn .pk: min 1.8vw, text min(18px, max(14px, 1.1vw)) * 130%,
       0.18vw padding and 2px border top and bottom) plus this padding when that is taller (small screens); the close button uses it */
	--tabH: max(1.8vw, min(18px, max(14px, 1.1vw)) * 1.3 + 0.36vw + 4px);
	--mhLine: max(3.3vw + 1px, var(--tabH) + 0.88vw + 2px);
	display: flex;
	gap: 4px;
	align-items: center;
	min-height: calc(3.3vw + 1px);
	flex-shrink: 0;
	padding-bottom: calc(0.4vw + 2px);
	padding-top: 0.48vw;
	box-sizing: border-box;
	padding-left: 1vw;
	padding-right: 1vw;
	background-image: url(../images/listTop.png);
	background-repeat: no-repeat;
	background-position: top center;
	background-size: 100%;
	position: relative;
	margin-bottom: -2px;
	z-index: 2;
}

.mainWrapper a.lmItem {
	white-space: normal !important;
}

.noRecruitPath .rt {
	filter: grayscale(1) brightness(0.7) contrast(1.5);
}

.noRecruitPath .bt {
	color: var(--mut);
}

.mh input {
	flex: 1;
}
.mh .pk {
	width: auto;
}

.mountSelectionGrowth {
	width: calc(100% + 8px);
	margin: 0px -4px;
}

.mountSelectionGrowth tr {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
}

.mountSelectionGrowth td {
	border: 0;
	color: var(--text);
}

/* ====================================================================== */
/* Tiles & pickers (.tg, .tile, .im)                                      */
/* ====================================================================== */

.tg {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 6px;
}
.tg.w {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 25em), 1fr));
}

.tg.tgbt {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20em), 1fr));
}

.tilebt .idArea {
    float: right;
    margin-left: 6px;
}

.wrap {
	margin: auto;
	position: relative;
	line-height: normal;
	flex-grow: 1;
	transform-origin: center top;
	top: 50%;
	transform: translate(0, -50%);
}

.tile {
	padding: 6px;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	font-size: 16px;
	line-height: normal;
}

.tg:not(.w) .tile {
	text-align: center;
	padding: 0;
}

/* character picker: the faction symbol behind the character (app.js renderClassTileHtml: --faction), in the look of the card's (.card.pc::before) */
.tilech {
	isolation: isolate;
}
.tile .tFaction {
	position: absolute;
	inset: 0;
	background: var(--faction, none) left top / auto 100% no-repeat;
	transform: translate(-20%, -20%);
	opacity: 0.8;
	filter: brightness(0.4);
	pointer-events: none;
	z-index: -1;
}

/* character picker: the character's boons in the bottom right of the tile */
.tile .tBoon {
	position: absolute;
	right: 2px;
	bottom: 2px;
	display: flex;
	gap: 1px;
	pointer-events: none;
	flex-wrap: wrap;
    flex-wrap: wrap-reverse;
    justify-content: flex-end;
}
.tile .tBoon .si {
	width: 16px;
	height: 16px;
	margin: 0;
	filter: drop-shadow(0 0 2px #000);
}

.displayNone {
	display: none !important;
}

.tg:not(.w) .tile b {
	position: absolute;
	top: 2.5%;
	text-shadow: var(--thickShadow);
	width: 100%;
	left: 0;
}

.tile.sel {
	background: var(--sel);
}

.im {
	width: 100%;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin-top: 10px;
}
.im img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.gh {
	margin: 14px 0 6px;
	font-weight: 700;
	color: var(--text);
}
.ln {
	font-size: 14px;
	margin-top: 3px;
	white-space: pre-line;
	color: var(--mut);
}

.tile > small {
	color: var(--mut);
}

/* ====================================================================== */
/* Portrait card & main section background                                */
/* ====================================================================== */

.pc {
	display: flex;
	align-items: flex-start;
	position: absolute;
	left: 6.38%;
	margin: 0;
	padding: 0;
	top: calc(5.96 * var(--vw));
	width: 27.03%;
	height: calc(13.05 * var(--vw));
	overflow: hidden;
}

.pf {
	flex: 1;
	min-width: 0;
	position: relative;
	height: 100%;
	pointer-events: none;
}
.pt {
	flex: none;
	width: calc(12 * var(--vw));
	cursor: pointer;
	position: absolute;
	right: 0;
	bottom: 0;
	height: 97%;
}
.pt .im {
	margin: 0;
	height: 100%;
	border-radius: 0;
}

/* the card's portrait fades out on its left side */
.pt .im img {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 15%);
	mask-image: linear-gradient(to right, transparent, #000 15%);
}

#cmc small:has(> details) + br {
	display: none;
}

summary .si {
	margin-right: 4px;
}

div#lt {
	flex-grow: 1;
	padding: 10px 8px;
	box-sizing: border-box;
	gap: 0.5em;
	padding-top: 0;
	max-height: 100%;
}

section {
	padding-left: 35%;
	padding-top: calc(8.7 * var(--vw));
	padding-right: 2.5%;
	padding-bottom: calc(2.2 * var(--vw));
	background: url(../images/background14.webp);
	background-repeat: no-repeat;
	background-size: 100%;
	position: relative;
	aspect-ratio: 1.85567;
	box-sizing: border-box;
}

.tn span:first-child {
	white-space: nowrap;
}

.ds a {
	color: inherit;
	text-decoration: underline dotted;
	cursor: pointer;
}

.ds small {
	margin-top: 5px;
	display: inline-block;
}

.card > .ab:first-child {
	margin-top: 0.3em;
}

/* ====================================================================== */
/* Tab containers & wrappers                                              */
/* ====================================================================== */

.tabContainer,
.gridcontainer {
	padding: 10px;
	padding-left: calc(1 * var(--vw));
	padding-right: calc(1 * var(--vw));
	padding-top: 0;
	position: relative;
	max-height: 100%;
	max-width: 100%;
	box-sizing: border-box;
	width: 100%;
}

.tabContainer,
.gridcontainer > * {
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-gutter: stable;
}

.tabContainer > *:first-child {
	padding-top: 0;
	margin-top: 12px;
}

.idForge .ef {
    margin: 0;
    margin-right: 4px;
    vertical-align: text-bottom;
    height: 1.2em;
    width: 1.2em;
}

.birdWrapper {
	width: fit-content;
}

.tabContainer .birdAnswer:first-child {
    margin-top: 0;
}

.tabContainer .birdAnswer:last-child {
    border-bottom: 0;
}

.tabContainer .birdAnswer {
    padding-left: 8px;
    padding-right: 8px;
    color: var(--fg);
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    margin-top: 8px;
}

.birdAnswer b {
    color: var(--text);
	border: 1px solid var(--line);
	padding: 4px 6px;
	display: inline-block;
	margin-top: 2px;
	font-weight: normal;
    margin-left: 6px;
}

.gridcontainer {
	padding: 0;
	display: flex;
}

#lineCover {
	content: "";
	background-image: url(../images/bgLineCover4.webp);
	background-size: 100%;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	position: absolute;
	pointer-events: none;
}

#basicStats {
	content: "";
	background-image: url(../images/basicStats.webp);
	background-size: 100%;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	position: absolute;
	pointer-events: none;
	background-repeat: no-repeat;
}

/* the combat stats' labels under the stats (app.js renderCombatStats: phys, or mys with a spell equipped) */
#basicStats.phys {
	background-image: url(../images/basicStats.webp), url(../images/combatStats.webp);
}

#basicStats.mys {
	background-image: url(../images/basicStats.webp), url(../images/combatStatsMys.webp);
}

.mainWrapper {
	/*display: flex;*/
	height: 100%;
	width: 100%;
	box-sizing: border-box;
}

.mainWrapper th {
	text-align: left;
}
.mainWrapper th,
.mainWrapper td {
	border-left: 0;
	border-right: 0;
}
.mainWrapper tr:first-of-type th,
.mainWrapper tr:first-of-type td {
	border-top-width: 0;
}
.mainWrapper tr:last-child th,
.mainWrapper tr:last-child td {
	border-bottom-width: 0;
}

/* class picker: allowed-skill icons on the name line, right aligned */
.tn {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.tn .al {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin-left: auto;
}

.tn .chp {
	margin: 0 0 0 6px;
}

.sks {
	display: flex;
	flex-wrap: wrap;
	padding: calc(0.5 * var(--vw));
	position: absolute;
	bottom: 0;
}

.noVertPadding {
	padding-top: 0;
	padding-bottom: 0;
}

.ski {
	display: inline-flex;
}

.ski.off {
	filter: brightness(0.4);
}

.ski .si {
    height: max(0.85em, calc(1.4 * var(--vw)));
    width: max(0.85em, calc(1.4 * var(--vw)));
	padding-right: calc(0.5 * var(--vw));
	padding-top: calc(0.5 * var(--vw));
}

.gm {
	color: #f3cc4b;
}

/* the sources of a lowered stat in the tooltip (app.js statBreakdownHtml): blue, as the cell's arrow (td.gm.dn) */
#tip .dn {
	color: #8B80FF;
}

#tip {
	position: fixed;
	z-index: 20;
	background: var(--bg);
	border: 1px solid var(--line);
	padding: 8px 10px;
	font-size: 14px;
	line-height: 1.35;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

#tip hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 4px 0;
}

td.gm {
	position: relative;
}

td.gm::after,
.mv.gm::after {
    content: "";
    position: absolute;
    right: calc(-0.8 * var(--vw));
    top: calc(0.8 * var(--vw));
    width: 0;
    height: 0;
    border-left: calc(0.3 * var(--vw)) solid transparent;
    border-right: calc(0.3 * var(--vw)) solid transparent;
    transform: translateY(-50%);
}

td.gm.up::after,
.mv.gm.up::after {
	border-bottom: calc(0.5 * var(--vw)) solid currentColor;
}

td.gm.dn::after {
	border-top: calc(0.5 * var(--vw)) solid currentColor;
}

/* a lowered stat (or growth): blue, the arrow pointing down (the arrow takes the colour: currentColor) */
td.gm.dn {
	color: #8B80FF;
}

.mv {
	cursor: pointer; /* (a click shows its breakdown, as the stats: app.js movBreakdownHtml) */
	position: absolute;
	top: calc(19.7 * var(--vw));
	left: calc(28 * var(--vw));
	text-align: right;
	width: calc(5 * var(--vw));
	font-size: calc(1.25 * var(--vw));
	line-height: 150%;
}

.chp .bn {
	font-size: 10px;
	padding: 1px;
	border-width: 1px;
	right: -5px;
	top: -5px;
}

/* ====================================================================== */
/* Card buttons, .bt buttons, .ci icons                                   */
/* ====================================================================== */

.cardButtons {
	position: absolute;
	display: flex;
	/*border: 2px solid var(--line);*/
	border-radius: 0;
	/*background: var(--bgT);*/
	padding: 0;
	width: 61%;
	top: calc(5.95 * var(--vw));
	z-index: 1;
	justify-content: center;
	left: 34.3%;
	pointer-events: none;
	line-height: calc(2.2 * var(--vw));
	height: calc(2.2 * var(--vw));
	line-height: max(1.4em, calc(2.2 * var(--vw)));
	height: max(1.4em, calc(2.2 * var(--vw)));
	margin-top: min(0px, 2.2 * var(--vw) - 1.4em);
	box-sizing: border-box;
}

.characterName .lr {
	margin-right: 4px;
	margin-top: 1px;
	margin-bottom: 1px;
}

.cardButtons > .pk {
	pointer-events: all;
	flex-grow: 1;
	margin-left: 0;
	margin-right: 0;
	font-size: max(15px, calc(1 * var(--vw)));
	flex-basis: 1%;
	white-space: nowrap;
	border-radius: 0;
	background: none;
	/*border: 2px solid transparent;
    margin: -2px;*/
	border: 0;
	padding-top: 0;
	padding-bottom: 0;
	text-align: center;
	padding-left: 0.4em;
	padding-right: 0.4em;
	text-decoration: none;
	border: 1px solid transparent;
    line-height: unset;
}

.idSec .si {
    margin-right: 4px;
}

.idSec .lr[data-ch] {
    margin-right: 4px;
}

.mountName .lmItem {
	white-space: normal;
}

/* the open tab looks like a .bt button (tiled background, rounded border); border-box, so it keeps its size */
.cardButtons > .pk.open,
#bdb.open { /* (the Builder button, while the builder tab is open) */
	text-shadow: var(--glow);
	background: #60593e5c !important;
	border: 1px solid var(--line);
}

.rcPath .rt {
	width: 4em;
	height: 4em;
	background-position: top center;
	background-size: 6em auto;
	cursor: auto;
}

.bt {
	border: 1px solid var(--line);
	background: var(--bgT);
	display: inline-block;
}

.skItem .sw {
	vertical-align: text-bottom;
	float: left;
}

.idChip .ci {
	margin-left: 0;
	margin-right: 2px;
}

.sc {
	margin-top: 8px;
}

.bt::before,
.compareButtons > .pk::before {
    content: "";
    display: inline-block;
    margin-right: 0.5em;
    border-left: 0.45em solid currentColor;
    border-top: 0.4em solid transparent;
    border-bottom: 0.4em solid transparent;
}

.bt.open::before {
	transform: rotate(90deg);
}

.wrapper {
	overflow: hidden;
	max-width: 100%;
	max-height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	min-width: var(--minW);
}

#md input {
	margin-left: auto;
}

.ci {
	height: calc(1.2em + calc(0.8 * var(--vw)));
	width: calc(1.2em + calc(0.8 * var(--vw)));
	object-fit: contain;
	vertical-align: middle;
	margin: calc(-0.4 * var(--vw));
	margin-right: 4px;
    image-rendering: pixelated;
}

/* the battalion / mount named in the Gambit / Mounted Ability header (app.js renderBuildCreator headLink): plain text, on the right */
.bcHeadLink {
	float: right;
	margin-right: 4px;
	font-variant: normal;
	letter-spacing: normal;
	font-weight: normal;
	font-size: 0.9em;
}
/* a box's title that is a link (the mount, app.js renderBuildCreator mountTitle): the header's look, underlined on hover */
.calcTitle a.bcTitleLink {
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-decoration: none;
	border: 0;
	padding: 0;
	margin-bottom: 0;
}
a.bcTitleLink:hover,
a.bcTitleLink:focus-visible {
	text-decoration: underline;
}
a.bcTitleLink .si {
	margin-right: 4px;
    vertical-align: text-bottom;
}

.bcHeadLink .si {
	margin-right: 3px;
}

button.pk.cn.bcAdd {
    float: right;
    padding: 2px;
    margin-top: -6px;
}

button.pk.cn.bcAdd .si {
    margin-right: 0;
}

.row .pk {
    display: flex;
    align-items: center;
}

.ci.mi {
	height: calc(1.2em + calc(0.4 * var(--vw)));
	width: calc(1.2em + calc(0.4 * var(--vw)));
	margin-left: calc(-0.2 * var(--vw));
	margin-right: calc(calc(0.2 * var(--vw)) + 4px);
}

/* compare views (characters, weapons, combat arts and magic) */
.bt.nb::before {
	content: none;
}

.skillContainer {
	float: left;
	vertical-align: middle;
}

.skillContainer > * {
	vertical-align: text-bottom;
}

summary > .si,
summary > .sw {
	float: left;
}

.modalTitle {
	display: flex;
	align-items: center;
	font-size: min(18px, max(14px, 1.1vw));
	white-space: nowrap;
	pointer-events: none;
    font-weight: bold;
}

.modalTitle>a {
    font-weight: normal;
}

.skillContainer .si {
	margin-right: 0;
}

/* ====================================================================== */
/* Compare modal (#cmp / #cmc): tables, details, headers                  */
/* ====================================================================== */

#cmp {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 9;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 12px;
	box-sizing: border-box;
}

#cmc,
#mc {
	overflow: auto;
	margin: 0 calc(1 * var(--vw));
	margin-bottom: calc(1 * var(--vw));
}

#mc > *:first-child {
	margin-top: 2px;
}

#cmc td,
#cmc th {
	border-color: var(--line);
	user-select: none;
}

.maxWidthColumn {
	width: calc(50 * var(--vw));
}

.maxWidthColumn details {
	display: inline-block;
	margin-right: 10px;
	padding: 0;
}

*[data-mt] {
	cursor: pointer;
}

#cmc .sk {
	padding: 0;
  margin: 0;
}

#cmc .sk li a.skItem {
    padding: 0;
}

#cmc .sk li .rk {
	display: none;
}

.modalabilities .growthCol {
	display: none;
}

.abilityColumn {
	width: calc(25 * var(--vw));
}

#cmc li {
	border: 0;
	padding: 1px 0;
}

#cmc details {
	padding: 0;
}

#cmc details:not(:first-child) {
	padding-top: 2px;
}

details {
	width: 100%;
}

details summary {
	width: 100%;
}

small details summary {
	text-decoration: underline dotted;
}

small details summary::marker {
	text-decoration: none;
}

#cmc small:not(:last-child) details:open {
	margin-bottom: 5px;
}

td.eff {
	padding: 0;
}

#cmc details:not(:first-of-type) {
	margin-top: 4px;
}

.eff,
.skill {
    text-align: right;
	white-space: nowrap !important;
}

img.ef {
	height: calc(8px + 1em);
	width: calc(8px + 1em);
	margin-top: 0.2em;
}

.nameField,
.equipName,
.art-name,
.classNameField {
	min-width: 11em;
}

/* the text is centered on the :before box (top 2px, bottom 0.55vw + 2px), the header keeps its height (4px + 0.7vw of padding) */
#cmc th {
	border: 0;
	height: calc(1.5 * var(--vw));
	padding-top: calc(2px + 0.075 * var(--vw));
	padding-bottom: calc(2px + 0.625 * var(--vw));
	position: relative;
	font-weight: normal;
	text-align: center;
	padding-left: 3px;
	padding-right: 3px;
	min-width: 2.5em;
}

#cmc tbody th {
	padding: 4px 8px;
}

#cmc tbody th:not(:empty):before,
#cmc tbody th:not(:first-child):before {
	height: calc(100% - 2px);
	top: 1px;
}

#cmc th:before,
#cmc th:not(:first-child):before {
	content: "";
	position: absolute;
	left: 2px;
	width: calc(100% - 4px);
	height: calc(100% - calc(0.55 * var(--vw)) - 4px);
	border: 2px #39484f solid;
	background-color: #192d34;
	top: 2px;
	box-sizing: border-box;
	z-index: -1;
}

/* ====================================================================== */
/* Modal tabs & header (#cmn): tab buttons, end caps, title, tools        */
/* ====================================================================== */

:is(#cmn, #mtb) .pk,
input[type="search"],
.tile,
.classModal .rc {
	border: 2px #39484f solid;
	background-color: #192d34;
	border-radius: 0;
}

.pk.cn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

#cmn .pk.cn.on,
input[type="search"]:focus,
#cmn .pk:hover,
.compareButtons > .pk:hover,
.tile.sel,
.classModal .rc.active {
	background-color: #3b453a;
	border-color: #60593e !important;
	outline: none;
}

#cmn .pk:hover select {
	background-color: #3b453a;
}

/* tabs (and the tab-style links to other views): no box, only the selected one has a background; the side padding leaves room
   for its end caps on every tab, so the tabs don't move when another one is selected */
:is(#cmn, #mtb) a.pk.cn[data-f],
#cmn a.pk.cn[data-view] {
	--capW: calc(var(--tabH) * 18 / 36);
	padding-left: var(--capW);
	padding-right: var(--capW);
	background-color: transparent;
	border-color: transparent;
	color: #d2c6af;
}
/* no glow when selected (.cn.on adds one): the page's normal dark outline; hovered tabs glow */
:is(#cmn, #mtb) a.pk.cn[data-f],
#cmn a.pk.cn[data-view] {
	text-shadow: inherit;
}
:is(#cmn, #mtb) a.pk.cn[data-f]:hover,
#cmn a.pk.cn[data-view]:hover {
	text-shadow: var(--glow);
}
:is(#cmn, #mtb) a.pk.cn.on[data-f],
#cmn a.pk.cn.on[data-view] {
	color: #fff4d9;
}

:is(#cmn, #mtb) a.pk.cn[data-f],
:is(#cmn, #mtb) a.pk.cn[data-view] {
	border-color: transparent !important;
	margin: 0 calc(-0.1 * var(--capW));
}

/* selected and hovered tab: buttonLeft end cap, buttonCenter stretched between the caps, the right cap is the left one mirrored
   (::after); the caps scale with the tab height (--tabH on .mh, the images are 20 x 36) and cover the border */
:is(#cmn, #mtb) a.pk.cn.on[data-f],
#cmn a.pk.cn.on[data-view],
.sppC .pk {
	position: relative;
	z-index: 0; /* the mirrored cap (z-index -1) stays above this background and below the text */
	border-color: transparent !important;
	background:
		url(../images/buttonLeft.png) left top / var(--capW) 100% no-repeat
			border-box,
		url(../images/buttonCenter.png) center / calc(100% - 2 * var(--capW) + 2px)
			100% no-repeat border-box;
}
:is(#cmn, #mtb) a.pk.cn.on[data-f]::after,
#cmn a.pk.cn.on[data-view]::after,
.sppC .pk::after {
	content: "";
	position: absolute;
	top: -2px;
	bottom: -2px;
	right: -2px;
	width: var(--capW);
	background: url(../images/buttonLeft.png) 0 0 / 100% 100% no-repeat;
	transform: scaleX(-1);
	z-index: -1;
	pointer-events: none;
}

#cmc thead {
	position: sticky;
	top: 0;
	z-index: 5;
	background: url(../images/headerBG.png);
	background-repeat: no-repeat;
	background-size: 100%;
	background-position: bottom;
	font-size: 16px;
}

#cmc th.class-skill {
	padding: 4px;
	vertical-align: top;
	padding-top: 8px;
}

/* The comparison modals' header: the title, the tabs, the max forge toggle and the sort bar + search are items of one wrapping row (#cmn and
   .mTabs are display: contents), in that order, so what doesn't fit goes to the next line from the end: first the sort bar and search
   (with the toggle when that is the one that doesn't fit), then the tabs go under the title. The tabs grow to fill the line (so the
   title is at its left and the tools at its right); an item on a line of its own is centered. The close button is in the top right
   corner: every line leaves room for it. */
#cmp .mh {
	flex-wrap: wrap;
	justify-content: center;
	padding-right: var(--mhLine);
}
#cmn,
#cmn .mTabs {
	display: contents;
}

#cmn .modalTitle {
	margin: 0 0.2em;
	flex: 0 0 auto;
	margin-right: auto; /* on a line of its own (the tabs went under it) it stays at the left, not centered with the other lines */
	/* its middle is the close button's middle: .mh pads 0.48vw at the top, so the row is the button height minus twice that */
	min-height: calc(var(--mhLine) - 0.96vw);
}
/* the tabs: inline, so text-wrap: balance gives the lines about equal lengths when they wrap (6 + 6 instead of 9 + 3); a tab keeps
   its place when selected (the caps are drawn outside its box) */
#cmn .mTabList {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
	text-wrap: balance;
}
#cmn .mTabList > a {
	display: inline-flex;
	vertical-align: middle;
	margin: 0 0.5px;
}
/* (max forge toggle +) sort bar + search: one item, natural width */
#cmn .mTools {
	display: flex;
	gap: 4px;
	flex: 0 1 auto;
	justify-content: center;
	align-self: center;
    align-items: flex-start;
}
/* a definite width (min / max 150 - 250px from input[type="search"]): with width auto the group was sized for a narrower box
   than the one it got, which pushed the search onto a second line */
#cmn .mTools input {
	flex: 0 1 auto;
    flex-basis: 200px;
	flex-grow: 1;
}
#cmn .mxToggle.mxOff {
	visibility: hidden;
	pointer-events: none;
}

.sr {
	cursor: pointer;
}

.smallRequirements:not(:first-child) {
	margin-left: calc(0.3 * var(--vw));
}

.smallRequirements {
	transform: scale(0.8);
	display: inline-block;
	transform-origin: left;
}

/* ====================================================================== */
/* Compare buttons & sort indicators                                      */
/* ====================================================================== */

.compareButtons {
	display: flex;
	position: absolute;
	width: 60%;
	top: calc(2.3 * var(--vw));
	z-index: 1;
	justify-content: center;
	left: 20%;
	pointer-events: none;
}

.compareButtons > .pk {
	margin: 0;
	font-size: max(14px, calc(1.1 * var(--vw)));
	padding: 0 calc(0.4 * var(--vw));
	flex-grow: 1;
	text-align: center;
	white-space: nowrap;
	text-decoration: none;
	border: 0;
	border-radius: 0;
	background: none;
	text-shadow: var(--glow);
	line-height: calc(2.2 * var(--vw));
	margin-left: -1px;
	border-left: 1px solid transparent;
	border-right: 1px solid transparent;
	position: relative;
}

.compareButtons > .pk:last-child {
	border-right-color: transparent !important;
}
.compareButtons > .pk:first-child {
	border-left-color: transparent !important;
}

.compareButtons > .pk:hover {
	z-index: 1;
}

.compareButtons > .pk:not(:last-child) {
	border-right: 1px solid var(--boxLine);
}

.sr.asc::after,
.sr.desc::after {
	content: "";
	display: inline-block;
	margin-left: 5px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	vertical-align: middle;
	margin-right: -13px;
	position: relative;
	z-index: 1;
	filter: drop-shadow(0 0 2px black);
}

.sr.asc::after {
	border-bottom: 6px solid currentColor;
}

.sr.desc::after {
	border-top: 6px solid currentColor;
}

.cn {
	width: auto;
	border: 1px solid var(--line);
}

.cn.on {
	background: var(--sel);
	text-shadow: var(--glow);
}

/* ====================================================================== */
/* Compare table cells, recruitment, supports (.rc, .rt, .sg)             */
/* ====================================================================== */

td.cav {
	height: 48px;
	width: 48px;
	min-width: 48px;
	padding: 0;
	background-size: cover;
	background-position: top;
	background-repeat: no-repeat;
}

.artEffect .lmItem {
	text-decoration: underline dotted;
	margin-left: 3px;
}

.mi.off {
	filter: grayscale(1) brightness(0.5);
}

/* the battalion selector's icon (app.js, the b_bt button): a painted icon, not pixel art */
.ci.mi.bti {
	image-rendering: auto;
}

.tn .ci.mi {
	height: 1.2em;
	margin: 0;
	margin-left: 4px;
	margin-top: -1px;
}

a {
	color: inherit;
  text-decoration: underline;
}

a:hover {
	text-shadow: var(--smallGlow);
}

#cmc .si {
	vertical-align: text-bottom;
}

#cmc td:first-child {
	text-align: left;
}

.class-skillList > div {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	min-width: 82px;
}

#disclaimer {
	font-size: 12px;
	width: 100%;
	text-align: center;
	color: #848691;
	padding: 2px;
    padding-top: 16px;
    box-sizing: border-box;
	text-wrap: balance;
}

#disclaimer a {
    pointer-events: all;
    color: var(--textDark);
    text-decoration: none;
}

#disclaimer a img {
    height: 1.2em;
	vertical-align: middle;
}

#disclaimer a.kofi {
    color: var(--text);
    font-size: 1.2em;
    display: block;
    border: 2px solid var(--line);
    width: fit-content;
    margin: 0 auto;
    padding: 4px 6px;
    background: var(--bgT);
    margin-top: 6px;
}

#disclaimer a.kofi:hover {
    background: var(--sel);
}

td.cav[data-ch],
td[data-cl] {
	cursor: pointer;
}

#btp,
#lgp {
	margin-top: 8px;
}

.rg th {
	white-space: nowrap;
}

.rg td {
	text-align: left;
}

/* the Fastest tab: the path's lord at the front of each cell, styled as a header; hidden until a small screen shows it (display: block) */
.fastPath {
	display: none;
	margin-bottom: 6px;
	padding: 2px 8px;
	border: 2px solid #39484f;
	background-color: #192d34;
	text-align: center;
	font-weight: normal;
	user-select: none;
}

.rc {
	display: inline-flex;
	gap: 6px;
	margin-right: 10px;
	cursor: pointer;
}

.rc.rcPath {
	cursor: auto;
}

.rc.rcPath .rcCont small {
	margin-top: 4px;
}

.rt {
	display: inline-block;
	height: 3em;
	width: 3em;
	background-size: 4.875em auto;
	background-position: -1em top;
	background-repeat: no-repeat;
	flex: none;
}

.sg {
	width: auto;
}

.sg th,
.sg td {
	padding: 0;
	min-width: 26px;
	height: 26px;
	text-align: center;
	font-size: 11px;
}

.weaponDescription,
.itemSource{
	min-width: 12em;
}

.sgh {
	width: 28px;
	height: 36px;
	background-size: auto 50px;
	background-position: top;
	background-repeat: no-repeat;
	cursor: pointer;
}

.sgr {
	white-space: nowrap;
	text-align: left;
	padding: 0 6px;
	cursor: pointer;
}

.sgr .rt {
	width: 20px;
	height: 24px;
	vertical-align: middle;
	margin-right: 6px;
}

.sgx {
	background: var(--line);
}

a.lr {
	position: relative;
	height: 38px;
	aspect-ratio: 1.5 / 1;
	display: inline-block;
	vertical-align: middle;
}

.lr,
.rt {
    background-color: #27444e59;
    border: 1px solid #3c4d5080;
    box-sizing: border-box;
    background-clip: border-box;
    background-origin: border-box;
}

a.lr {
	background-size: auto 100%;
	background-position: center;
	background-repeat: no-repeat;
}

a.lr .rk {
	background: rgba(0, 0, 0, 0.67);
	position: absolute;
	right: -5px;
	top: -2px;
	margin: 0;
	z-index: 1;
}

.lic {
	height: 1.3em;
	width: auto;
}

#cmc td {
	white-space: normal;
	border-left: 0;
	border-right: 0;
}

#cmc tbody > tr:first-child td {
	border-top: 0;
}

#cmc tbody > tr:last-child td {
	border-bottom: 0;
}

button#cmx {
	--dim: var(--mhLine);
	height: var(--dim);
	width: var(--dim);
	padding: 0;
	line-height: var(--dim);
	position: absolute;
	top: 0;
	right: 0;
	box-sizing: content-box;
	text-align: center;
}

/* ====================================================================== */
/* Close buttons                                                          */
/* ====================================================================== */

/* close buttons (compare modal, map, picker, item popup): a crimson box with a bronze border and a drawn cross, inset in the
   button so the whole corner stays clickable; on hover it glows and the cross turns (the square looks the same turned) */
#cmx,
#lmx,
#mx,
#idx,
#shx,
#sppX,
.bcClose {
	font-size: 0; /* the ✕ text: the cross is drawn below, aria-label names the button */
	color: transparent;
	text-shadow: none;
	background: none;
	border: 0;
}
#cmx::before,
#lmx::before,
#mx::before,
#idx::before,
#shx::before,
#sppX::before,
.bcClose::before {
	content: "";
	position: absolute;
	inset: 22%;
	box-sizing: border-box;
	border: 2px solid #60593e;
	background: #3a1d1d
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 2l6 6M8 2l-6 6' stroke='%23ffe8c4' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E")
		center / 62% no-repeat;
	transition:
		transform 0.15s,
		filter 0.15s,
		background-color 0.15s;
	pointer-events: none;
}
#cmx:hover::before,
#lmx:hover::before,
#mx:hover::before,
#idx:hover::before,
#shx:hover::before,
#sppX:hover::before,
.bcClose:hover::before,
#cmx:focus-visible::before,
#lmx:focus-visible::before,
#mx:focus-visible::before,
#idx:focus-visible::before,
#shx:focus-visible::before,
#sppX:focus-visible::before,
.bcClose:focus-visible::before {
	transform: rotate(90deg);
	filter: var(--glowBox);
	background-color: #4d2424;
}
/* the picker's button: a small square in the top right corner, on the first line of the header when it wraps (weapon tabs);
   the header keeps room for it on every line (#md .mh padding) */
#md .mh {
	padding-right: calc(1vw + var(--tabH) + 4px);
}
#mx {
	position: absolute;
	top: calc(0.48vw + (var(--mhLine) - 0.48vw - 0.4vw - 2px - var(--tabH)) / 2);
	right: 1vw;
	width: var(--tabH);
	height: var(--tabH);
	padding: 0;
}
#mx::before {
	inset: 8%;
}

@media screen and (max-width: 1100px) {
	#cmx::before,
	#lmx::before,
	#idx::before,
	#shx::before,
	#sppX::before {
		inset: 14%;
	}
}

/* small screens: the corner buttons are small (about 28px), so the box fills more of them */
@media screen and (max-width: 700px) {
	#cmx::before,
	#lmx::before,
	#idx::before,
	#shx::before,
	#sppX::before {
		inset: 8%;
	}
}

#cmn:empty {
	display: none;
}

input[type="search"],
:is(#cmn, #mtb) .pk {
	border-color: var(--boxLine);
	padding: 0.18vw 0.6vw;
	font-size: min(18px, max(14px, 1.1vw));
	white-space: nowrap;
	min-height: 1.8vw;
	text-decoration: none;
}

small.scrollSources {
    margin-left: 3px;
}

.rcCont small:last-child {
	display: block;
}

/* the support table's sortable header: the table modals' header cells (a framed box, the sort arrow from .sr) */
.supportTable thead th {
	position: relative;
	isolation: isolate;
	height: calc(1.5 * var(--vw));
	padding: 4px 8px;
	border: 0;
	font-weight: normal;
	text-align: center;
	user-select: none;
}

.supportTable thead th::before {
	content: "";
	position: absolute;
	inset: 2px;
	border: 2px #39484f solid;
	background-color: #192d34;
	box-sizing: border-box;
	z-index: -1;
}

.supportCh {
	background-size: 5em auto;
	background-position: -0.625em top;
	background-repeat: no-repeat;
	height: 2.5em;
	text-align: right;
	vertical-align: top;
	padding: 4px 8px;
	padding-top: 0.5em;
	width: 8em;
	text-shadow: var(--thickShadow);
}

div.supportCh {
	width: 15em;
}

*[data-ch] {
	cursor: pointer;
}

.supportCh a {
	margin-left: 3.5em;
	text-decoration: none;
}

.classModal {
	width: auto;
	margin: 0 auto;
}

.classModal td {
	white-space: normal;
    vertical-align: top;
}

.classModal td,
.classModal th {
	border: 0;
	padding: 0;
}

.rcCont {
	position: relative;
	z-index: 0;
}

.tilemt > div:first-of-type {
	margin-top: 15px;
}

small b,
small details:open,
.ln b {
	color: #c3c2ca;
}

.classModal .rcCont {
	position: relative;
	z-index: 1;
	overflow: hidden;
	white-space: nowrap;
	flex-shrink: 1;
	text-align: left;
	text-overflow: ellipsis;
}

.classModal .rc {
	display: flex;
	position: relative;
	padding-left: 0;
	margin-right: 8px;
	margin-bottom: 4px;
	line-height: 2em;
	gap: 4px;
	margin-left: 8px;
	padding-right: 8px;
}

.classModal .ci {
	margin: 0;
	height: 2em;
	width: 2em;
	line-height: 1px;
}

.classListMovement {
	transform: scale(0.55);
	position: absolute;
	left: 0;
	top: 0;
	transform-origin: top left;
	display: flex;
	flex-direction: column;
	height: calc(1.818 * 2em);
	justify-content: space-between;
}

.classListWeaponTypes {
	position: absolute;
	top: 0;
	right: 0;
	line-height: 1px;
	transform: scale(0.55);
	transform-origin: top right;
	max-height: calc(1.818 * 2em);
}

.rc[data-v="Commoner"] .classListWeaponTypes,
.rc[data-v="Noble"] .classListWeaponTypes {
	display: none;
}

.classListMovement .si {
	vertical-align: top;
}

.classListMovement > *[data-l="Infantry"] {
	display: none;
}

.classModal td,
.classModal th {
	border: 0;
}

/* ====================================================================== */
/* Site search (.gsSearch)                                                */
/* ====================================================================== */

.gsSearch {
	pointer-events: all;
	left: 4%;
	top: calc(var(--vw) * 2);
	position: absolute;
	z-index: 3;
	width: 14%;
}
.gsSearch input {
	max-width: none;
	min-width: 0;
	width: 100%;
}

/* site search frame: searchboxRepeat tiled across, searchboxRight as the right end and mirrored as the left end (square, as tall as
   the box; the images are opaque, so the ends simply cover the tiles); the input is transparent on top of it */
.gsSearch {
	background: url(../images/searchboxRepeat.png) left center / auto 100%
		repeat-x;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}
.gsSearch::before,
.gsSearch::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	aspect-ratio: 1;
	background: url(../images/searchboxRight.png) 0 0 / 100% 100% no-repeat;
	pointer-events: none;
}
.gsSearch::before {
	left: 0;
	transform: scaleX(-1);
}
.gsSearch::after {
	right: 0;
}
.gsSearch #gsi,
.gsSearch #gsi:focus {
	position: relative;
	z-index: 1;
	background-color: transparent;
	border-color: transparent !important;
	/* roomier than the other search boxes; the magnifier moves in with the text, clear of the corner art */
	padding: calc(0.45 * var(--vw)) calc(1.2 * var(--vw));
	padding-left: 2em !important;
	background-position: 0.7em center;
}
/* focused: the box is brightened (as brightness(1.2)), not the results dropdown (#gsr) inside it, so no filter on .gsSearch itself:
   its end pieces and the input get the filter; the tiled frame gets a color-dodge layer of rgb(43,43,43), which multiplies it by 1.2 */
.gsSearch:focus-within {
	background-image: linear-gradient(rgb(43, 43, 43), rgb(43, 43, 43)), url(../images/searchboxRepeat.png);
	background-size: 100% 100%, auto 100%;
	background-repeat: no-repeat, repeat-x;
	background-position: 0 0, left center;
	background-blend-mode: color-dodge, normal;
}
.gsSearch:focus-within::before,
.gsSearch:focus-within::after,
.gsSearch:focus-within #gsi {
	filter: brightness(1.2);
}

#gsr {
	position: absolute;
	top: 100%;
	left: 0;
	width: min(440px, 90vw);
	max-height: min(70vh, 520px);
	margin-top: 4px;
	overflow: auto;
	z-index: 20;
	background: #142324;
	border: 2px solid var(--boxLine);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
	text-align: left;
	text-shadow: none;
}

#gsr .locIc {
    margin-right: 0;
}

#gsr .gsClasses {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 6px;
	width: auto;
}

#gsr .gsClasses .rc {
	margin: 0;
	flex: 1 1 160px;
}

#gsr .gsChars {
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	padding: 6px;
}

.classModal th {
	padding-top: 12px;
	padding-bottom: 2px;
}

#cmn .mxToggle::before {
	content: "";
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-right: 6px;
	border: 2px solid var(--boxLine);
	background: #0b1416;
	vertical-align: middle;
}

#cmn .mxToggle.on::before {
	border-color: #60593e;
	background: #0b1416
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3' fill='none' stroke='%23ffe8c4' stroke-width='2'/%3E%3C/svg%3E")
		center / 90% no-repeat;
}

#cmc .bn {
	font-size: 10px;
	right: -10px;
	top: -5px;
}

.combatArt {
	min-width: 12em;
}

.mount-abilities {
	width: min(20vw, 300px);
}

.class-growth,
.class-skill,
.equipStat,
.weaponTrait {
	padding: 2px;
	font-size: 16px;
}

.class-growth small:not(.tableSv) {
	display: block;
}

#cmc th.class-skill {
	padding: 6px;
	vertical-align: top;
	padding-right: 12px;
}

#cmc th.class-skill .sw {
	line-height: 1.25vw;
	vertical-align: baseline;
}

#cmc th.class-skill img {
	height: 1.25vw;
	margin-right: -6px;
}

.class-requirements {
	text-align: left;
}

.class-requirements > div:first-child {
	display: flex;
	justify-content: space-between;
	white-space: nowrap;
}

.class-requirements > small:first-of-type {
	display: block;
}

.characterName {
    padding-left: 0;
}

td.characterName a {
	text-decoration: none;
	font-weight: bold;
    vertical-align: middle;

}
td.characterName {
	text-align: left;
	white-space: nowrap !important;
	padding-top: 0;
	padding-bottom: 0;
}

.rcAllP {
	margin: 0 0 12px; /* at the top of the recruitment tab, above the paths */
	font-size: 16px;
	line-height: 140%;
}
/* a ▶ in front of a button's text (Full recruitment list, Highlight all places) */
.rcArrow {
	display: inline-block; /* the link's underline doesn't carry into an inline block */
	margin-right: 6px;
	font-size: 0.75em;
}
/* the item popup's "Highlight all N locations on map" (a small info link), next to its "How to get" heading */
.idMapAll {
	display: inline-block;
	margin-left: 10px;
	color: var(--text);
    max-width: calc(100% - 16px - 130px); /* Make it fit with the map image on small screens */
}
.idMapAll > a.arrowLink {
	display: inline-block; /* not a list item here: on the heading's line */
}

.grid2 .sk {
	padding-left: 0;
}

.giftList {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	flex-wrap: wrap;
	align-items: flex-start;
	margin-top: 8px;
}

@media screen and (max-width: 1600px) {
	.giftList {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (max-width: 1200px) {
	.giftList {
		grid-template-columns: repeat(2, 1fr);
	}

	.largeV {
		display: none;
	}
}

.giftContainer h1:not(:first-child) {
	margin-top: 12px;
}

/* an item button with a note (starting equipment's conditions): the button, then the note under it */
.giftItem {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
}
.giftItem > small {
	color: var(--mut);
	font-size: 0.8em;
	padding: 0 4px;
}

.sv {
	display: none;
}

.dottedUnder {
	text-decoration: underline dotted;
}

.rcPath b a {
	padding-top: 3px;
	padding-bottom: 3px;
}

.rcPath {
	display: flex;
	margin: 0 0 8px;
}

.classNameField b {
	margin-right: 4px;
}

a.itemLink {
	text-decoration: underline dotted;
	text-underline-offset: 2px;
	cursor: pointer;
}

a.itemLink:hover {
	color: var(--text);
}

.idNote + .idNote {
	margin-top: 8px;
}

.lmItem .si {
	margin-right: 4px;
	vertical-align: text-bottom;
}

.lmItem {
	vertical-align: text-bottom;
}

.skill {
    padding-left: 2px;
    padding-right: 2px;
}

.weaponTrait,
.spellTrait,
.equipTrait,
.equipStat {
	padding-left: 4px;
	padding-right: 4px;
	white-space: nowrap !important;
}

.tableSv {
	display: none;
	overflow: hidden;
	text-overflow: ellipsis;
    font-size: 12px;
}

#sortBar {
	display: none;
}

.sortToggle {
	flex-basis: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font: inherit;
	background: transparent;
	border: 0;
	outline: none;
	color: inherit;
	padding: 0 4px;
	cursor: pointer;
}

.sortArrow {
	transition: transform 0.15s;
}

#sortBar.open .sortArrow {
	transform: rotate(180deg);
}

#sortBar { position: relative; }
#sortBar .sortMenu { display: none; }
#sortBar.open .sortMenu {
	display: flex;
	flex-direction: column;
	position: absolute;
	top: calc(100% + 3px);
	left: -2px;
	z-index: 20;
	min-width: calc(100% + 4px);
	box-sizing: border-box;
	padding: 2px;
	background: #192d34;
	border: 2px solid #39484f;
	box-shadow: 0 4px 10px #000a;
    max-height: 60vh;
    overflow: auto;
}
#sortBar .sortChip { text-align: left; white-space: nowrap; }
#sortBar .sortChip:hover {
    background-color: #3b453a !important;
}

.flex-break {
	flex-basis: 100%;
	height: 0;
}

.sortChip {
	font: inherit !important;
	background: transparent !important;
	outline: none !important;
	border: 0 !important;
	color: inherit !important;
	padding: 2px 7px !important;
	cursor: pointer !important;
	flex-basis: 1px !important;
	width: auto !important;
	min-width: auto !important;
	max-width: none !important;
	height: auto !important;
	min-height: auto !important;
	max-height: none !important;
}

.giftContainer small {
	font-weight: normal;
}

.sortChip::after {
	content: "";
	position: absolute;
}

.sortChip.asc::after {
	content: " ▲";
}

.sortChip.desc::after {
	content: " ▼";
	visibility: visible;
}

.art-skill {
	white-space: nowrap !important;
}

select.sortSel {
	background: none;
	border: 0;
	max-width: 100%;
	font: inherit;
	background: #192d34;
	border-radius: 0;
	outline: none;
	padding: 2px;
}

#sortBar label {
	display: flex;
	white-space: nowrap;
	align-items: center;
	gap: 6px;
}

#cmc td:first-child b {
	white-space: normal;
}

.lmItem.lmClass .ci {
    margin-left: 0;
    vertical-align: text-bottom;
}

.idSec .chp .bn {
    right: -8px;
	transform: scale(0.9);
	transform-origin: top right;
}

.noMatch {
    font-size: 16px;
    margin-left: 1em;
}

/* ====================================================================== */
/* World map popup (map.js)                                               */
/* ====================================================================== */

/* ---------- world map popup (map.js) ---------- */
a.loc,
.idText .lmItem,
.idReq .lmItem,
.idSec .lmItem {
	text-decoration: underline dotted;
	text-underline-offset: 2px;
	cursor: pointer;
}

#lmp {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 15;
	display: flex;
	justify-content: center;
	padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 12px;
	box-sizing: border-box;
}
#lmp .mb {
	height: 100%;
}
#lmn {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	width: 100%;
	padding-right: max(2em + 0.7vw - 1vw, 3.3 * var(--vw) + 1px - 1vw);
}
#lmn .pk,
#lmf .pk {
	border: 2px solid var(--boxLine);
	background-color: #192d34;
	border-radius: 0;
	padding: 0.18vw 0.6vw;
	font-size: min(18px, max(14px, 1.1vw));
	white-space: nowrap;
	text-decoration: none;
}
#lmn .pk.on,
#lmn .pk:hover,
#lmf .pk.on,
#lmf .pk:hover,
#lmd .pk:hover {
	background-color: #3b453a;
	border-color: #60593e;
}
#lmn .pk.lmOff {
	opacity: 0.45;
}
#lmx {
	--dim: max(30px + 0.48vw, 3.3 * var(--vw) + 1px);
	position: absolute;
	top: 0;
	right: 0;
	height: var(--dim);
	width: var(--dim);
	padding: 0;
	text-align: center;
	font-size: max(16px, 1.2 * var(--vw) + 1px);
}

.tilemt .si {
    height: 1.2em;
    margin-right: 4px;
}

.lmShot {
    display: block;
    width: 200px;
    height: auto;
    object-fit: cover;
    margin: 0 0 2px 6px;
    float: right;
    max-width: 35%;
    aspect-ratio: 1;
    z-index: -1;
    position: relative;
	top: -4px;

/*-webkit-mask-image: 
	radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%),
	radial-gradient(circle at 20% 30%, black 0%, transparent 50%),
	radial-gradient(circle at 80% 40%, black 0%, transparent 45%),
	radial-gradient(circle at 30% 75%, black 0%, transparent 55%),
	radial-gradient(circle at 70% 70%, black 0%, transparent 50%);

mask-image: 
	radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%),
	radial-gradient(circle at 20% 30%, black 0%, transparent 50%),
	radial-gradient(circle at 80% 40%, black 0%, transparent 45%),
	radial-gradient(circle at 30% 75%, black 0%, transparent 55%),
	radial-gradient(circle at 70% 70%, black 0%, transparent 50%);

-webkit-mask-composite: source-over;
mask-composite: add;*/
    border: 1px solid var(--line);
    background-color: #1c2d30;
    padding: 4px;
    box-sizing: border-box;
}
.lmShot[hidden] {
    display: none;
}

#lmf {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	padding: 4px calc(1 * var(--vw));
	font-size: 13px;
	display: none;
} /*Disabled */
#lmf .lmGroup {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	align-items: center;
}
#lmf .pk {
	font-size: 13px;
	padding: 1px 6px 1px 2px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
}
#lmf .pk:not(.on) {
	opacity: 0.45;
	background-color: transparent;
}
#lmf .pk img {
	height: 18px;
}

.lmFindText .loc {
    color: var(--text);
}

#lmb {
	flex: 1;
	min-height: 0;
	display: flex;
	gap: 8px;
	margin: 0 calc(1 * var(--vw)) calc(1 * var(--vw));
	padding-top: 4px;
}
#lmv {
	flex: 1;
	min-width: 0;
	position: relative;
	overflow: hidden;
	background: #e8f3f6;
	border: 2px solid var(--boxLine);
	touch-action: none;
	cursor: grab;
	user-select: none;
}
#lmv.drag {
	cursor: grabbing;
}
#lmw {
	position: absolute;
	left: 0;
	top: 0;
	transform-origin: 0 0;
}
#lmk {
	position: absolute;
	inset: 0;
}

/* the dashed lines from a selected posthouse to the posthouses it connects to */
.lmLines {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: visible;
    filter: drop-shadow(1px 1px 0px black) drop-shadow(0 0 1px black);
}

.lmLines line {
	stroke: #f2e6b8;
	stroke-width: 2;
	stroke-dasharray: 7 6;
	stroke-linecap: round;
	opacity: 0.85;
	vector-effect: non-scaling-stroke;
}

.idText .lmItem {
    vertical-align: baseline;
}

.lmSec .srcK .lmItem {
    vertical-align: baseline;
}

/* the map picture as tiles (map.js updateTiles): each placed and sized in percent of the map */
#lmt {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
/* the overlay tiles (markers drawn over everything): above the pins (their z-index goes up to 5), clicks go through to the pins */
#lmo {
	position: absolute;
	inset: 0;
	z-index: 10;
	pointer-events: none;
}
#lmt img, #lmo img {
	position: absolute;
	display: block;
	max-width: none;
	user-select: none;
}

.lmm {
	-webkit-touch-callout: none; /* no link menu / preview when a pin is held (iOS) */
	text-decoration: none;
	-webkit-user-drag: none;
	position: absolute;
	width: var(--pin, 26px);
	height: var(--pin, 26px);
	padding: 0;
	border: 0;
	background: none;
	transform: translate(-50%, -50%);
	cursor: pointer;
	/*filter: drop-shadow(0 1px 2px #000);*/
}
/* the pin's icon (its background-image comes from the category: map.js pinClass) is drawn by the ::before, so it can be styled on its own */
.lmm::before {
	content: "";
	position: absolute;
	inset: 0;
	background: center / contain no-repeat;
	pointer-events: none;
}
.lmm:not(.on):hover {
	z-index: 2;
	transform: translate(-50%, -50%) scale(1.25);
}
.lmm.on {
	z-index: 3;
	width: calc(var(--pin, 26px) * 1.45);
	height: calc(var(--pin, 26px) * 1.45);
	border-radius: 50%;
	box-shadow:
		0 0 0 3px #ffe8c4,
		0 0 14px 4px #e0c18f;
	background-color: rgba(0, 0, 0, 0.45);
}

#lmd .idSelect {
    display: none;
}

.lmm.lmmBig {
	width: calc(var(--pin, 26px) * 1.35);
	height: calc(var(--pin, 26px) * 1.35);
}

.lmm.lmmBig.on {
	width: calc(var(--pin, 26px) * 1.35 * 1.45);
	height: calc(var(--pin, 26px) * 1.35 * 1.45);
}

.lmAlso {
	margin-right: 4px;
}

a.loc,
a.lmItem,
a.itemLink,
.giftBtn {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
    vertical-align: text-bottom;
}

a.lmItem {
	white-space: normal;
}

.lmm.off {
  --pin: var(--pinOff);
}

.lmm.p-base,
.lmm.p-capital {
	width: calc(var(--pin, 26px) * 1.65);
	height: calc(var(--pin, 26px) * 1.65);
}

.lmm.p-base.on,
.lmm.p-capital.on {
	width: calc(var(--pin, 26px) * 1.65 * 1.45);
	height: calc(var(--pin, 26px) * 1.65 * 1.45);
}

.lmm.lmmMid {
	width: calc(var(--pin, 26px) * 1.2);
	height: calc(var(--pin, 26px) * 1.2);
}

.lmm.lmmMid.on {
	width: calc(var(--pin, 26px) * 1.2 * 1.45);
	height: calc(var(--pin, 26px) * 1.2 * 1.45);
}
#lmz {
	position: absolute;
	right: 8px;
	top: 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	z-index: 4;
}
#lmz .pk {
	width: 32px;
	height: 32px;
	padding: 0;
	text-align: center;
	font-size: 18px;
	border: 2px solid var(--boxLine);
	background-color: #192d34;
}
#lmd {
	width: max(30vw, 300px);
	flex: none;
	overflow: auto;
	padding: 4px 8px;
	box-sizing: border-box;
	font-size: 15px;
    scrollbar-gutter: stable;
}
/* the location's own picture: behind everything at the top of the panel, fading out downwards (it scrolls with the panel) */
#lmd {
	position: relative;
	isolation: isolate;
	container-type: inline-size; /* cqw: the panel's width */
}
#lmd .lmLocImg {
    position: absolute;
    top: 0px;
    left: 0;
    width: calc(100% - min(200px, 35cqw) - 10px); /* the panel (with its 8px padding) minus the map picture's width, 8px for the padding on the picture's side and 4px between the two */
    height: min(200px, 35cqw); /* as tall as the map picture (.lmShot: 200px wide at most, 35% of the panel, square) */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(#000 20%, transparent);
    mask-image: linear-gradient(#000 20%, transparent);
}
#lmd h2 {
    margin-top: 7px;
    font-variant: small-caps;
    font-weight: bold;
    text-shadow: var(--weakGlow);
	margin-bottom: 4px;
    filter: drop-shadow(1px 1px 1px black);
}

#lmd h2 .lmRegion {
    text-shadow: var(--bodyShadow);
}
/* the divider under the location's name stops at the map picture (a block formatting context gets narrower beside a float) */
#lmd > .divider {
	display: flow-root;
}
/* the region next to the location's name */
.lmRegion {
	color: var(--textDark);
	font-size: 0.65em;
	font-weight: normal;
	margin-left: 4px;
}
/* the picture floats right: the panel always reaches its bottom edge, even when the text is shorter */
#lmd::after {
	content: "";
	display: block;
	clear: both;
}
.lmMeta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	color: var(--mut);
	margin-left: 0.3em;
    filter: drop-shadow(1px 1px 1px black);
}
.lmCat {
	display: inline-flex;
	align-items: flex-start;
	gap: 3px;
	color: var(--text); /* the place's type and its icon in the normal text colour (the region next to it stays muted) */
}
/* the type and the region as links (map.js: a click lists every place of that type / in it): their text colours, underlined on hover */
a.lmCat {
	text-decoration: none;
	color: var(--text); /* (as .lmCat: the link's colour would win) */
}
.lmRegion a {
	text-decoration: none;
	color: inherit;
}
a.lmCat:hover,
a.lmCat:focus-visible,
.lmRegion a:hover,
.lmRegion a:focus-visible {
	text-decoration: underline;
	outline: none;
}
.lmCat img {
	height: 18px;
	aspect-ratio: 1 / 1;
}

.lmDesc {
    filter: drop-shadow(1px 1px 1px black);
}

.lmDesc,
.lmHint,
.lmFindText {
	color: var(--mut);
	margin: 8px 0;
	text-wrap: balance;
}
.lmSec {
	margin: 10px 0;
}
/* the sections (battalions, shops, items, ...) start below the map picture, not beside it; the description above them, the framed repair box and, on an item's
   search, the "Found at" list wrap around it */
#lmd .lmSec:not(.lmRepair, .lmFound) {
	clear: both;
}
/* the "Found at" list wraps around the picture: its divider narrows beside it (a block of its own), the rows' lines stop at the picture's edge and run full width below it */
#lmd .lmFound .divider {
	display: flow-root;
}
/* Part 3 town repair materials: first in the panel, framed and tinted so they stand out */
.lmSec.lmRepair {
	display: flow-root; /* a framed box next to the picture (.lmShot) narrows beside it, its border does not run under it */
	padding: 6px 10px 8px;
	border: 2px solid #8a7440;
	background: rgba(255, 213, 154, 0.09);
	box-shadow: inset 0 0 12px rgba(255, 213, 154, 0.08);
}
.lmRepair > b {
	color: #ffd59a;
}
.lmRepair .lmQty {
	color: #ffe8c4;
	font-weight: bold;
}
.lmSec ul {
	list-style: none;
	margin: 2px 0 0;
	padding: 0;
}
.lmSec li {
	padding: 2px 0;
	border-bottom: 1px solid var(--line);
	display: flex;
	align-items: center;
	gap: 4px;
}


.lmAlsoIc {
    height: calc(1.3em + 4px);
    width: auto;
    margin-right: 4px;
    vertical-align: bottom;
    margin-left: -8px;
    margin-top: -2px;
    margin-bottom: -2px;
}

.lmCols {
	display: flex;
	gap: 10px;
}

.classNameField .ci {
    vertical-align: text-bottom;
}

.lmCols > .lmSec {
	flex: 1;
	margin: 0;
}
.lmIc {
	height: 20px;
	width: 20px;
	object-fit: contain;
}

.idChip .lmIc {
    vertical-align: text-bottom;
    margin-right: 4px;
}

#lmd .pk {
	border: 2px solid var(--boxLine);
	background-color: #192d34;
	padding: 0 6px;
	margin: 2px 0;
	display: inline-block;
	text-decoration: none;
}

.lmFind .pk.clearFind {
	border: 0;
	padding: 0 4px;
    margin-left: auto !important;
	aspect-ratio: 1 / 1;
    display: flex !important;
    align-items: center;
}

@media (max-width: 600px), (orientation: portrait) {
	#lmb {
		flex-direction: column;
	}
	#lmd {
		width: auto;
		height: 38%;
	}
	#lmf {
		flex-wrap: nowrap;
		overflow-x: auto;
	}
	#lmf .lmGroup {
		flex-wrap: nowrap;
	}
}

.acqInline {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
    flex-direction: column;
}

.acqInline .acqLoc {
	white-space: nowrap;
}

.acqLoc .lmItem {
	text-decoration: dotted underline;
}

/* item popup: a source's whole description, under its map link */
.acqFull {
	margin: 1px 0 6px;
}
.acqFull .acqLead {
	color: var(--text);
}
.acqFull:last-child {
	margin-bottom: 0;
}

/* a location's shops one under the other, each the whole width, with its items in columns (as many as fit at least as wide as the longest item name) */
.lmShopGrid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lmShopGrid > .lmSec {
	margin: 0;
}

.lmShopGrid > .lmSec > ul {
	columns: 2 200px; /* two columns at most (one when the panel is narrower than two) */
	column-gap: 14px;
}

.lmShopGrid > .lmSec > ul > li {
	break-inside: avoid;
}

/* a location's battalions in columns like its shops' items */
.lmBattalions > ul {
	columns: 2 200px; /* two columns at most (one when the panel is narrower than two) */
	column-gap: 14px;
}

.lmBattalions > ul > li {
	break-inside: avoid;
	display: flex;
	align-items: center;
	gap: 5px; /* the rank in front of the battalion, on one line with it */
}

.idSec[data-sec="classes"] .idChip .lmClass .ci {
	width: 1.55em;
	height: 1.55em;
	margin: -0.15em;
	margin-right: 4px;
    vertical-align: text-bottom;
}

.lmPrice {
	margin-left: 6px;
}

/* the Vandahl Trading Co.'s list (stock and trades), in the shop grid like the other shops */
/* a trade: the item (and its stock) on the first line, what it costs below it, on the right */
/* the Vandahl Trading Co.'s list in two columns wherever it is (in the shop grid, or on its own where the location has no shop lists) */
.lmVx > ul {
	columns: 2 200px;
	column-gap: 14px;
}
.lmVx > ul > li {
	break-inside: avoid;
}

/* the travelling merchants' lists in two columns too (Gift merchant, Oren's merchants, ...) */
.lmMerchant > ul {
	columns: 2 200px;
	column-gap: 14px;
}
.lmMerchant > ul > li {
	break-inside: avoid;
}
/* the price (and stock) of a merchant's item floats right (the row is the whole width of its column) */
/* a stock line's note: on the next line under the item (the icon is 20px and the gap 4px: it lines up with the name) */
.lmStoreRow {
	display: block;
	width: 100%;
}
.lmRowNote {
	display: block;
	margin: -1px 0 2px 24px;
	line-height: 1.25;
}
.lmMerchant .lmIconRow,
.lmStore .lmIconRow {
	width: 100%;
	box-sizing: border-box;
}
.lmMerchant .lmIconRow > span:last-child:not(:first-child),
.lmStore .lmIconRow > span:last-child:not(:first-child) {
	margin-left: auto;
	text-align: right;
	white-space: nowrap;
}
.lmVx .lmIconRow {
	flex-wrap: wrap;
	align-items: flex-start;
}
.lmVx .lmIconRow {
	width: 100%;
	box-sizing: border-box;
}
/* a trade: the item and its stock on the first line with the chapter it unlocks on the right, what it costs on the next line */
.lmVx .lmIconRow > .vxName {
	flex: 0 1 auto; /* the name and its stock; the chapter sits on the right of that line when it fits, else on the line below, still on the right */
	min-width: 0;
}
.lmVx .lmIconRow > .vxCh {
	margin-left: auto;
	text-align: right;
	white-space: nowrap;
}
.lmVx .lmIconRow > .vxCost {
	flex: 0 0 100%;
}
.vxMat {
	white-space: nowrap; /* a material and its amount stay together; the line breaks between materials */
}

.srcK {
	color: var(--mut);
	font-size: 0.9em;
	white-space: normal;
	font-weight: normal;
}

.locIc {
	height: 1.2em;
	width: 1.2em;
	object-fit: contain;
	vertical-align: text-bottom !important;
	margin-right: 2px;
}

/* a location link: the icon always on the left, the name (.locT) wraps beside it instead of being cut off */
a.loc {
	display: inline-flex;
	max-width: 100%;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
    vertical-align: text-bottom;
    align-items: center;
}

a.loc > .locIc {
	flex: none;
}

a.loc > .locT {
	min-width: 0;
	overflow-wrap: anywhere;
}

.lmPing {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 3px solid #ffe8c4;
	box-shadow: 0 0 10px #e0c18f;
	transform: translate(-50%, -50%);
	animation: lmPing 1.2s ease-out 3 both;
	pointer-events: none;
}

.dropsContainer {
	display: flex;
	flex-wrap: wrap;
}

.dropsContainer > .idChip {
    min-width: calc(50% - 10px);
    box-sizing: border-box;
}

.lmPing2 {
	animation-delay: 0.4s;
}

@keyframes lmPing {
	0% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 1;
	}
	100% {
		transform: translate(-50%, -50%) scale(3.4);
		opacity: 0;
	}
}

#lmk.finding .lmm:not(.hit):not(.on),
.lmm.wrongPath::before {
	filter: contrast(0.5);
}

.lmm.hit {
	z-index: 2;
	border-radius: 50%;
	box-shadow: 0 0 0 3px #c30000, 0 0 0 6px #ffe8c4;
	background-color: rgba(0, 0, 0, 0.35);
}

.lmSearch {
	position: relative;
	margin-left: auto;
	flex: 1;
	max-width: 400px;
	min-width: 150px;
}

.lmSearch input[type="search"] {
	max-width: none;
	width: 100%;
}

.foodLikers .ci.mi {
    margin: 0;
    margin-right: 4px;
    height: 1.2em;
    width: 1.2em;
    vertical-align: text-bottom;
}

#lmr {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 20;
	max-height: min(60vh, 420px);
	overflow: auto;
	background: #142324;
	border: 2px solid var(--boxLine);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.lmRes {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	cursor: pointer;
	font-size: 15px;
}

.lmResName {
    min-width: 40%;
}

.lmRes.act,
.lmRes:hover {
	background: #3b453a;
}

.lmRes .lmResName {
	flex: 1;
}

.lmRes .lmIc,
.lmRes .locIc {
	height: 20px;
	width: 20px;
}

.lmNone {
	color: var(--mut);
	cursor: default;
}
.lmm.off {
  filter: contrast(0.3) brightness(1.1) saturate(1.5);
}
/* fixed to the map's scale (--pinOff, map.js apply), whatever the category or selection */

.lmm.off.on {
	opacity: 1;
	filter: grayscale(1);
	box-shadow:
		0 0 0 2px #9a9a9a,
		0 0 10px 3px rgba(160, 160, 160, 0.6);
	outline: 2px dashed #ffe8c4;
	outline-offset: 3px;
	background-color: rgba(0, 0, 0, 0.45);
}

.lmFind {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	padding: 6px 8px;
	margin: 4px 0 8px;
	border: 2px solid var(--boxLine);
	background: #192d34;
}

.lmLink,
.lmBack {
	text-decoration: none;
}

.lmBack {
    width: 100%;
}

.lmLink {
    flex-shrink: 0.1;
}

.lmOffTab {
	opacity: 0.5;
}

#lmd mark {
	background: #60593e;
	color: inherit;
	padding: 0 2px;
}

summary a.loc {
	display: inline-flex;
}

.lmFindText {
	margin: 2px 0 0;
}

.acqTrade .lmItem {
    vertical-align: baseline;
}

/* map list rows built by iconRow (map.js): the item link (icon inside it), then a note that wraps on its own */
.lmIconRow {
	display: flex;
	align-items: center;
	gap: 4px;
}
/* a long note (e.g. a trade's materials) wraps instead of running out of the panel; its links stay whole */
.lmIconRow,
.lmIconRow > span:not(.lmIconLink) {
	min-width: 0;
}
.lmIconRow .srcK {
	white-space: normal;
}
/* item links inside a note (a trade's materials): icon at the note's text size, on its line */
.lmIconRow .srcK .lmIconLink {
	gap: 2px;
    vertical-align: bottom;
}
.lmIconRow .srcK .lmIc {
	width: 1em;
	height: 1em;
}
/* an item link with its icon inside (map.js hl): the icon centred on the name, the name wrapping beside it */
.lmIconLink {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.lmIconLink > img {
	flex: none;
}
a.lmIconLink:hover {
	text-decoration: none; /* a flex box doesn't pass it on: the name below gets it */
}
a.lmIconLink:hover > span {
	text-decoration: underline dotted;
}

.lmIconRow small {
	color: var(--mut);
}

.itemSource .lmItem,
.magicSource .lmItem {
  white-space: normal;
}

.scrollSources .si {
	margin-right: 2px;
    vertical-align: text-bottom;
}

.idSec .loc {
    color: var(--text);
}

#lma {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
}

/* ====================================================================== */
/* Item popup (#idp)                                                      */
/* ====================================================================== */

#idp,
#shp,
#spp {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 18;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 12px;
	box-sizing: border-box;
}

#md,
#shp,
#cmp,
#lmp,
#idp,
#spp {
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

#idp .mh {
    background: transparent;
    min-height: 37px;
    box-sizing: content-box;
    padding: 15px 0;
    margin: 0 15px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
}

body #idx {
    width: 32px;
    height: 32px;
    top: 17px;
    right: 2px;
}

#idx::before {
	inset: 0;
}

#idc>*:first-child {
    margin-top: 10px;
}

#idp {
	padding: calc(env(safe-area-inset-top, 0px) + 12px) 6px 12px;
}

#idp .mb {
	width: min(560px, 100%);
	min-width: min(360px, 100%);
	min-height: min(176px, 100%);
	max-height: min(90vh, 100%);
	/* the box is nine pieces (images/popup, slices: left 168, right 168, top 88, bottom 88): the corners keep their size, the edges and the middle stretch; every stretched piece reaches 1px under its neighbours (the corners are drawn on top), so a rounding step while resizing leaves no gap */
	background:
		url(../images/popup/top-left.webp) left top / 168px 88px no-repeat,
		url(../images/popup/top-right.webp) right top / 168px 88px no-repeat,
		url(../images/popup/bottom-left.webp) left bottom / 168px 88px no-repeat,
		url(../images/popup/bottom-right.webp) right bottom / 168px 88px no-repeat,
		url(../images/popup/top-center.webp) left 167px top / calc(100% - 334px) 89px no-repeat,
		url(../images/popup/bottom-center.webp) left 167px bottom / calc(100% - 334px) 89px no-repeat,
		url(../images/popup/middle-left.webp) left top 87px / 169px calc(100% - 174px) no-repeat,
		url(../images/popup/middle-right.webp) right top 87px / 169px calc(100% - 174px) no-repeat,
		url(../images/popup/center.webp) left 167px top 87px / calc(100% - 334px) calc(100% - 174px) no-repeat,
		linear-gradient(#151d1c, #151d1c) 8px 8px / calc(100% - 16px) calc(100% - 16px) no-repeat; /* the background colour, 8px in from every side (under the pieces) */
}
#idp .mb::before,
#idp .mb::after {
	content: none; /* (the old top and bottom pictures of .mb) */
}

#shp .mh,
#spp .mh {
	padding-right: calc(3.3 * var(--vw) + 6px);
	background: none;
	margin-bottom: 0;
}

#shp .mh::before,
#spp .mh::before {
	content: "";
	bottom: calc(0.4vw);
	border-bottom: 1px solid var(--line);
	width: calc(100% - 2vw);
	position: absolute;
	left: 1vw;
}

#idp .mb:before,
#shp .mb:before,
#spp .mb:before {
	background-image: url(../images/listBottom.png);
	transform: scaleY(-1);
	background-position: bottom center;
}

.idHead {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 18px;
    margin-right: 40px;
    margin-left: 5px;
}

.idHead span {
	line-height: 1px;
}

.idHead span>* {
    line-height: normal;
}

.idHead .si,
.idHead .ci {
	height: 32px;
	width: 32px;
	margin: 0;
	object-fit: contain;
    filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.3));
}

.idStats .idEff b {
	display: flex;
	gap: 2px;
	align-items: center;
}
.idStats .idEff img.ef {
    height: 1.6em;
    width: 1.6em;
    margin: auto;
}

.idHead small {
	color: var(--mut);
	font-size: 13px;
    font-weight: normal;
}

.idHead h1 small {
	margin-left: 3px;
}

.idHead h1 {
    margin: 0;
    font-size: 1em;
    font-weight: bold;
    line-height: normal;
}

#idx,
#shx,
#sppX {
	--dim: calc(3.3 * var(--vw) + 1px);
	position: absolute;
	top: 0;
	right: 0;
	height: var(--dim);
	width: var(--dim);
	padding: 0;
	text-align: center;
}

#idc {
    overflow: auto;
    font-size: 15px;
    margin-bottom: 8px;
    padding-bottom: 12px;
    padding-right: 13px;
    margin-right: 7px;
    padding-left: 20px;
}

.idStats {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 4px 0 8px;
}

.idStats span {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 50px;
	padding: 2px 4px;
	box-sizing: border-box;
    border: 2px solid #39484fc4;
    background: #192d34c7;
    justify-content: center;
}

.skDet .idStats span {
	padding: 2px;
}

.idStats small {
	color: var(--mut);
	font-size: 11px;
}

.idWeapons {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 4px 0 8px;
}

.idWeapon {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 2px 4px;
	border: 2px solid #39484f;
	background: #192d34;
}

.idWeapon .idStats {
	margin: 0;
	gap: 2px;
}

.idWeapon .idStats span {
	border: 0;
	min-width: 26px;
}

.lmSec.lmRepair .divider {
    height: 0;
    border-bottom: 1px solid var(--line);
}

.idWeapon .si {
	float: left;
	width: 20px;
	height: 20px;
}

/* class / mount growths in the popup: the tables' small-screen cells, side by side */
.idGrowth {
	display: grid;
	margin: 4px 0 8px;
	grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
	border: 0;
}
.idGrowth>span {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	padding: 3px 1px;
	font-size: 14px;
	line-height: 115%;
}

.idGrowth small {
	color: var(--mut);
	font-size: 11px;
}

.idSec .idGrowth>span {
    flex-grow: 1;
    padding-left: 2px;
    padding-right: 2px;
    max-width: 20%;
}
.idSec .idGrowth {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
}

/* class picker: weapon tabs (the Classes comparison tabs) between the title and the search; the header wraps when they don't fit */
#md .mh {
	flex-wrap: wrap;
}
#mtb {
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
	justify-content: center;
	flex: 1 1 auto;
}
#mtb:empty {
	display: none;
}
#mtb a.pk {
	cursor: pointer;
	user-select: none;
}
@media screen and (max-width: 700px) {
	#mtb .pk.tabIc .tabT {
		display: none;
	}
	#mtb .pk.tabIc .si {
		height: 1.4em;
		width: 1.4em;
		margin-left: 0;
	}
}

td.gm::after {
    right: auto;
    top: auto;
    margin-top: 4px;
    border-right-width: 0.35em;
    border-left-width: 0.35em;
    border-bottom-width: 0.35em !important;
    margin-left: 2px;
}

/* ====================================================================== */
/* Screenshot share page (share.js)                                       */
/* ====================================================================== */

/* the skill screenshot page (share.js, /share-screenshots/): the skill list to tick, the screenshots and the Turnstile check */
#shp[hidden] {
	display: none;
}
#shp .mb {
	width: min(1100px, 100%);
	min-height: 0;
	max-height: min(90vh, 100%);
}
#shp #shq {
	margin-left: auto;
}
/* only the list scrolls: the intro above it and the send box below it stay in place */
#shp .mb {
	height: min(90vh, 100%);
}
#shc {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 4px calc(1 * var(--vw)) calc(1 * var(--vw));
}
#shl {
	flex: 1;
	min-height: 0;
	overflow: auto;
	border-bottom: 1px solid var(--line);
}
.shIntro {
	margin: 6px 0 10px;
	max-width: 70em;
}
.shList {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 4px 12px;
	margin: 6px 0 14px;
}
.shItem {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	padding: 3px 4px;
	border-top: 1px solid var(--line);
	cursor: pointer;
	text-align: left;
}
.shItem input[type="checkbox"] {
	flex: none;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}
.shItem span {
	flex: 1;
	align-items: flex-start;
	overflow: hidden;
}
.shItem small {
	max-width: 100%;
}
.shItem b {
	font-weight: normal;
}
.shItem:hover {
	background: rgba(255, 255, 255, 0.04);
}
.shItem span {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.shItem small {
	opacity: 0.7;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.shItem .si {
	margin: 0;
	flex: none;
}
#shf {
	flex: none;
	padding: 8px 0 0;
}
.shRow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 4px 0;
}
#sht:empty {
	display: none;
}
/* Add screenshots / Send: the game's button (the selected tab's end caps and middle, the right cap the left one mirrored) */
.pk.shBtn {
	--capW: 18px;
	position: relative;
	z-index: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	min-width: 120px;
	padding: 0 calc(var(--capW) + 8px);
	border: 0;
	color: #fff4d9;
	font-size: 16px;
	letter-spacing: 0.04em;
	cursor: pointer;
	background:
		url(../images/buttonLeft.png) left top / var(--capW) 100% no-repeat,
		url(../images/buttonCenter.png) center / calc(100% - 2 * var(--capW) + 2px)
			100% no-repeat;
}
.pk.shBtn::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	width: var(--capW);
	background: url(../images/buttonLeft.png) 0 0 / 100% 100% no-repeat;
	transform: scaleX(-1);
	z-index: -1;
	pointer-events: none;
}
.pk.shBtn:hover:not(:disabled),
.pk.shBtn:focus-visible {
	text-shadow: var(--glow);
	filter: brightness(1.12);
}
.pk.shSend {
	min-width: 160px;
	font-size: 17px;
}
.pk.shBtn:disabled {
	filter: grayscale(0.7) brightness(0.7);
	opacity: 0.7;
	cursor: default;
}
.shOk {
	color: #9fd49f;
}
.shBad {
	color: #e5484d;
}

.magicSource,
.artLearners {
    padding: 2px;
}

.magicSource .lrs {
    display: block;
}

.magicSource .lrs:not(:first-child) {
	margin-top: 2px;
}


.menuSmall {
	display: none !important;
}

@media screen and (max-width: 1000px) { 
	.compareButtons {
		width: 63%;
		left: 18.5%;
		transform: scaleX(0.95);
	}
}

@media screen and (max-width: 950px) { 
	.compareButtons {
		width: 67%;
		left: 16.5%;
		transform: scaleX(0.9);
	}
}

@media screen and (max-width: 900px) { 
	.compareButtons {
		width: 71%;
		left: 14.5%;
		transform: scaleX(0.85);
	}
}

@media screen and (max-width: 850px) { 
	.compareButtons {
		width: 75%;
		left: 12.5%;
		transform: scaleX(0.8);
	}
}

@media screen and (max-width: 800px) { 
	.compareButtons {
		width: 78%;
		left: 11%;
		transform: scaleX(0.77);
	}
}

/*@media screen and (max-width: 850px) { 
	.menuSmall {
		display: block;
	}
	.menuLarge {
		display: none;
	}
	.menuLarge2 {
		display: block;
	}
	.moreMenuLarge2 {
		display: none;
	}
}*/

/*@media screen and (max-width: 650px) { 
	.menuSmall {
		display: block;
	}
	.menuLarge {
		display: none;
	}
	.menuLarge2 {
		display: none;
	}
	.moreMenuLarge2 {
		display: block;
	}
}*/

@media screen and (max-width: 600px) {
	.idGrowth span {
		font-size: 12px;
	}
	.idGrowth small {
		font-size: 10px;
	}
}

.idReq {
	margin: 4px 0;
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.idReq small {
	color: var(--mut);
	margin-right: 4px;
}

.idText {
	margin: 6px 0;
	white-space: normal;
}

.idSec {
	margin: 10px 0 0;
	display: flow-root; /* a section's box narrows beside the map picture (.idMapShot) instead of running under it */
}

/* the section a link opened the popup for (data-focus): a glow that fades out */
.idSec.idFlash {
	animation: idFlash 1.8s ease-out;
}
@keyframes idFlash {
	0%,
	25% {
		background: rgba(255, 213, 154, 0.16);
		box-shadow:
			0 0 0 4px rgba(255, 213, 154, 0.16),
			0 0 14px rgba(255, 213, 154, 0.35);
	}
	100% {
		background: transparent;
		box-shadow:
			0 0 0 4px transparent,
			0 0 14px transparent;
	}
}
@media (prefers-reduced-motion: reduce) {
	.idSec.idFlash {
		animation-duration: 3s;
		animation-timing-function: steps(1, end);
	}
}

.idSec h3 {
	font-size: 14px;
	font-weight: normal;
	color: var(--mut);
	margin: 0 0 4px;
	border-bottom: 1px solid var(--line2);
}

.levelButton {
	border: 1px solid var(--line);
	background: rgba(0, 0, 0, 0.5);
	border-radius: 99em;
	width: fit-content;
	padding: 0.25em 0.6em;
	color: var(--textDark);
}

.levelButton b {
	color: var(--text);
}

.lmReqDesc {
    margin-top: -6px;
}

.levelButton.unusable {
	color: var(--mut);
	font-weight: bold;
}

small .idText .loc {
    color: var(--mut);
}

table.gambitArea td.x::before {
	content: "";
	background-color: rgba(255, 16, 16, 0.8);
	border: 1px solid rgba(255, 148, 148, 0.8);
    width: 100%;
    height: 100%;
	box-sizing: border-box;
	display: block;
}

table.gambitArea td.o::before {
	content: "";
	background-color: rgba(255, 255, 255, 1);
	border: 1px solid rgba(0, 0, 0, 1);
    width: 10px;
    height: 10px;
    margin: 0px;
	box-sizing: border-box;
	border-radius: 99px;
	display: block;
}

.gambitSupport table.gambitArea td.x::before {
	background-color: rgba(133, 255, 63, 0.8);
	border-color: rgba(199, 255, 185, 0.8);
}

.gambitDefense table.gambitArea td.x::before {
	background-color: rgba(63, 63, 255, 0.8);
	border-color: rgba(123, 123, 255, 0.8);
}

.idChip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 2px 7px 2px 0;
}

a.lmItem {
	text-decoration: none;
}

a.lmItem:hover {
	text-decoration: underline dotted;
}

.idLikedByMounts .ci.mi {
    width: 1.2em;
    height: 1.2em;
    margin-left: 0;
    margin-right: 4px;
}

.idLikedMountFood .idChip,
.idLikedByMounts .idChip {
    min-width: min(50% - 10px, 10em);
    box-sizing: border-box;
}

.idLikedMountFoodList {
    max-height: max(5em, 25vh);
    overflow: auto;
}

.tierSel {
    font-size: inherit;
    padding: 1px 2px;
    width: 4em;
    color: inherit;
    border: transparent;
    min-width: auto;
}

.boonCol {
	padding-left: 2px;
	padding-right: 2px;
	grid-column: span 3 !important;
}

@media screen and (max-width: 1250px) {
	.fv {
		display: none;
	}

	.sv {
		display: inline-block;
	}

	#cmp.modalfastest thead {
		display: table-header-group;
        position: sticky;
	}

	#cmp.modalfastest thead {
		display: table-header-group;
        position: sticky;
	}

	#cmp.modalfastest thead th:first-child {
		display: none;
	}

	#cmp.modalfastest tr {
		display: grid;
        align-items: start;
		grid-template-columns: repeat(4, 1fr);
		padding-top: 2px;
		padding-bottom: 2px;
	}
	
    #cmp.modalfastest tr {
        border-bottom: 0;
    }
	
    #cmp.modalfastest td {
        border: 0;
    }

	#cmp.modalfastest tbody th,
	#cmp.modalfastest tbody td[colspan] {
        grid-column: span 4;
	}

	#cmp.modalfastest td:not(td[colspan]) .recruitContainer > span {
		max-width: 100%;
	}
}

@media screen and (max-width: 1000px) {
	.row {
		padding-left: 0;
	}
}

@media screen and (max-width: 1000px) and (max-aspect-ratio: 205 / 100) {
	/* Move the entire page to the left so it fits on the screen even as the right side starts getting cut off*/
	.wrapper {
		transform: scale(1.04);
		transform-origin: left center;
	}

	.wrap {
		transform-origin: left top;
		left: calc(-3 * var(--vw) * var(--scale));
	}

	.gsSearch {
		top: calc(var(--vw) * 1.5);
		left: 4%;
	}
}


@media screen and (max-width: 1000px) and (min-aspect-ratio: 205 / 100) {
	.sks {
        padding: calc(0.3 * var(--vw)) 0.8vw;
	}

	.ski .si {
		height: max(0.8em, calc(1.4 * var(--vw)));
		width: max(0.8em, calc(1.4 * var(--vw)));
	}

	.row:first-child {
		margin-bottom: -0.2em;
	}

	.row {
		padding-left: 0;
	}

	.cardButtons {
		transform: none;
	}

	#shc {
		flex-direction: row;
	}

	#shc > * {
		box-sizing: border-box;
		flex-basis: 33%;
	}
	
	#mainWrapper {
        font-size: 14px;
	}

	.wrapper {
		--wrapperScale: 1.15;
		transform: scale(var(--wrapperScale));
		--wrapperLeft: calc(16px * 6 / var(--wrapperScale));
		padding-left: calc(
			var(--wrapperLeft) + calc(50 * var(--vw)) * (var(--wrapperScale) - 1)
		);
		margin-top: calc(-1.2 * var(--vw));
		transform-origin: center;
	}

	section {
		padding-right: 4%;
	}

	.wrap {
		/*left: calc((100vw / 100vh - (185 / 100)) * 16px * 3.5 * 1.083 / var(--scale));*/ /* Center the wrapper as we are aligning left*/
		transform-origin: left top;
	}

	.gsSearch {
		left: calc(-1 * var(--wrapperLeft) / var(--scale) + 7px);
		top: calc(var(--vw) * 5.5);
		width: calc(
			var(--wrapperLeft) / var(--scale) + calc(2 * var(--vw) + 3.3vw) - 12px
		);
	}

	.compareButtons {
		left: calc(-1 * var(--wrapperLeft) / var(--scale) + 7px);
		width: calc(
			var(--wrapperLeft) / var(--scale) + calc(2 * var(--vw) + 3.3vw) - 12px
		);
		flex-direction: column;
        height: 87%;
		gap: 6px;
		top: calc(var(--vw) * 5.5);
		transform: none;
	}

	.compareButtons::before {
		content: "";
		min-height: 34px;
		flex-shrink: 0;
	}
	.compareButtons::after {
		content: "";
		flex: 1 1 0; /* Can grow, and can shrink all the way to 0 if space is needed */
		max-height: 34px;
	}

	.compareButtons > .pk {
        --bHeight: max(6.5vh, 1.65em);
		font-size: calc(11.5px / var(--scale));
		border: 0 !important;
		background: #192d34;
		max-height: var(--bHeight);
		background: url(../images/buttonInactiveBG5.png) !important;
		background-size: 100% 100% !important;
		text-shadow: none;
		filter: drop-shadow(0.1em 0.1em 0.1em rgba(0, 0, 0, 120));
		text-align: left;
        padding-left: 20%;
        width: 8.2em;
        margin-left: auto;
        margin-right: 0.5em;
        display: flex;
        align-items: center;
	}

	.compareButtons > .pk:hover,
	.compareButtons > .pk:focus {
		text-shadow: var(--glow);
	}
}

/*@media screen and (max-width: 1280px) {
  :is(#cmn, #mtb) .pk.tabIc .tabT { display: none; }
  :is(#cmn, #mtb) .pk.tabIc .si { 
    height: 1.4em; width: 1.4em; object-fit: contain; 
      margin-left: 0;
  }
}*/

@media screen and (max-width: 1100px) {
	#cmc .itemDesc {
		display: none;
	}

	.pathSfx {
		display: none;
	}

.blaze-name {
    padding-top: 2px;
    padding-bottom: 0;
}
.blaze-kind {
    padding-bottom: 2px;
    padding-top: 0;
	color: var(--mut);
	font-size: 0.9em;
}

	.mh {
		background: url(../images/dividerT.png);
    	filter: drop-shadow(1px 1px 0px #0A15178A);
		background-repeat: no-repeat;
		background-size: calc(100% - 2vw);
		background-position: bottom;
		margin-bottom: 0;
	}
	:is(#cmn, #mtb) .pk.tabIc {
		padding-left: 4px;
		padding-right: 4px;
	}

	.mb:before {
		background-image: url(../images/listBottom.png);
		transform: scaleY(-1);
		background-position: bottom center;
	}

	#cmc thead {
		display: none;
	}
	#sortBar:not(:empty) {
		display: flex;
		flex-wrap: wrap;
		gap: 4px;
		justify-content: flex-end;
	}

	#cmp.modalgrowths .characterName ,
	#cmp.modalbasestats .characterName  {
        grid-column: span 24;
	}

	#cmp.modalgrowths .growthCol,
	#cmp.modalbasestats .growthCol {
        min-height: 40px;
        grid-column: span 6;
	}

	#cmp.modalfastest th:not(:empty):before {
		height: 100%;
	}

	#cmc tr {
		display: grid;
		grid-template-columns: repeat(48, 1fr);
        align-items: start;
		padding-top: 2px;
		padding-bottom: 2px;
		border-bottom: 1px solid var(--line);
	}
	
	#cmc tr td {
		height: 100%;
	}

	.collapseEmpty:empty {
		display: none;
	}

	#cmc thead > tr {
		padding-bottom: 0.7vw;
	}

	#cmc th:not(:empty):before {
		height: calc(100% - 0.55vw);
	}

	#cmc th {
		padding-bottom: 4px;
	}
	#cmc td.battalionRank {
        grid-column: span 5 !important;
	}
	#cmc td.battalionArea {
		grid-column: 30 / 37 !important;
		grid-row: 1 !important;
	}
	#cmc td.battalionGambit {
		grid-column: 21 / 30 !important;
		grid-row: 1 !important;
	}

	#cmc td.battalionLocation {
        grid-column: 37 / 61 !important;
        grid-row: 1 / 3 !important;
    }

	/* rows are grids here, so the cells are blocks: the fixed header height would cut the text (a table cell only grows) */
	#cmc tbody th {
		height: auto;
	}

	/* (:where keeps the exclusion from adding specificity: this rule must stay weaker than the column classes like .colRowFull) */
	#cmc table :where(table:not(.gambitArea)) tr > * {
		grid-column: span 6;
		max-width: none !important;
		width: auto !important;
	}

	#cmc tr > *.characterName {
		overflow: hidden;
		text-overflow: ellipsis;
	}

    #cmp.modalWr tr {
        border-bottom: 0;
    }

	#cmc tr > .weaponTrait {
		grid-column: span 4;
	}

	#cmc tr > .spellTrait,
	#cmc tr > .equipTrait {
		grid-column: span 4;
	}
	#cmc tr > .equipCost {
		grid-column: span 5;
	}
	/* equipment: the stats are one line under the name row (the cells stay for the sort buttons) */
	#cmc tr > .equipStat {
		display: none;
	}
	#cmc tr > td.equipDetail {
		display: block;
	}

	.weaponDescription,
	.magicDescription {
		padding-top: 0;
	}

	.classModal tr {
		display: flex;
		flex-wrap: wrap;
	}

	.classModal td {
		flex-basis: max(33.3%, min(50%, 200px));
	}

	.classModal td:empty {
		display: none;
	}

	#cmc tr:last-child {
		border-bottom-width: 0;
	}

	#cmc tr > td {
		border-width: 0;
		box-sizing: border-box;
	}
	#cmc tr > td:empty {
		padding: 0;
	}

	#cmc thead {
		position: relative;
	}

	#cmc tr > .col1 {
		grid-column: span 3;
	}

	#cmc tr > .col1plus {
		grid-column: span 4;
	}

	#cmc tr > .cols5 {
		grid-column: span 5;
	}

    #cmc tr > td.blaze-name {
        grid-column: span 15;
    }

    #cmp.modalblaze tr > .cols5 { /* (the six numbers: 7 each, 42, now that the crit is gone: the row is the character, type and name (42) and these) */
		grid-column: span 7;
        padding: 2px;
    }

	#cmc tr > .col2 {
		grid-column: span 6;
	}

	#cmc tr > .col3 {
		grid-column: span 9;
	}

	#cmp.modalWm tr > .likedFood {
		grid-column: span 3 !important;
	}

	.mountHeader,
	.likedFood {
		width: auto;
	}

	#cmp.modalWm tr > .mountName {
		grid-column: span 19;
	}

	#cmc tr > .cols10 {
		grid-column: span 10;
	}

	#cmc tr > .cols11 {
		grid-column: span 11;
	}

	#cmc tr > .col4 {
		grid-column: span 12;
	}

	#cmc tr > .col5 {
		grid-column: span 15;
	}

	#cmc tr > .col6 {
		grid-column: span 18;
	}

	#cmc tr > .cols19 {
		grid-column: span 19;
	}

	#cmc tr > .cols20 {
		grid-column: span 20;
	}

	#cmc tr > .col7 {
		grid-column: span 21;
	}

	#cmc tr > .col8 {
		grid-column: span 24;
	}

	#cmc tr > .col9 {
		grid-column: span 27;
	}

	#cmc tr > .col10 {
		grid-column: span 30;
	}

	#cmc tr > .col42 {
		grid-column: span 42;
	}

	#cmc tr > .newRow {
		grid-column: 1 / 7;
	}

	#cmc tr > .newRow.weaponTrait,
	#cmc tr > .newRow.spellTrait { /* (a trait that starts the row is as wide as the others: 4 columns, the .newRow above is 6) */
		grid-column: 1 / 5;
	}

	#cmc tr > .colHalf {
		grid-column: span 12;
	}

	#cmc tr > .colRow {
		grid-column: span 24;
	}

	#cmc tr > .colThirdRow {
		grid-column: span 36;
	}

	#cmc tr > .newRow.colHalf {
		grid-column: 1 / 13;
	}

	#cmc tr > .colRowFull {
		grid-column: span 48;
	}

	#cmc tr > .newRow.colRow {
		grid-column: 1 / 25;
	}

	#cmc tr > .newRow.colThirdRow {
		grid-column: 1 / 37;
	}

	#cmc .dmgT {
		display: none;
	}

	.tableSv .sv {
		display: inline-block;
	}
	#cmc tr .tableSv:not(.inline) {
		display: block;
	}
	#cmc tr .tableSv.inline {
		display: inline;
	}

	#cmc tr.halfRow {
		grid-template-columns: repeat(36, 1fr);
		width: 50%;
		display: inline-grid;
	}

	#cmp.modalWg tr {
		grid-template-columns: repeat(84, 1fr);
	}

	#cmc tr > .class-growth {
		grid-column: span 4;
	}

	#cmc tr > .class-total {
		grid-column: span 5;
	}

	#cmp.modalWg.modalabilities .col8 {
		grid-column: span 28;
	}

	#cmp.modalWc tr,
	#cmp.modalWm tr {
		grid-template-columns: repeat(60, 1fr);
	}

	/* class list: the license is 8 columns, its other 2 go to the skills */
	#cmp.modalWc tr > .classLicense {
		grid-column: span 8;
	}
	#cmp.modalWc tr > .class-skillList {
		grid-column: span 17;
	}

	#cmc .class-requirements {
		grid-column: 46 / 61 !important;
		grid-row: 1 !important;
	}

	#cmc tr > .mount-abilities {
		grid-column: span 20;
	}

	td.pl {
        max-width: none;
		width: auto;
	}

	#cmc .mount-location {
		grid-column: 37 / 61 !important;
		grid-row: 1 !important;
        max-width: none;
		width: auto;
	}

	#cmc tr > .art-trait {
		grid-column: span 4;
		padding-left: 2px;
		padding-right: 2px;
	}
	#cmc tr > .art-name {
		grid-column: span 18;
	}

	#cmc tr > .art-skill {
		grid-column: span 6;
		padding-left: 2px;
		padding-right: 2px;
	}

	#cmc tr > .blaze-effect {
		grid-column: span 51;
	}
	#cmc tr > .blaze-unlock {
		grid-column: span 21;
		text-align: right;
	}

	#cmc tr > .blaze-kind {
        grid-column: span 12;
	}
}

@media screen and (max-width: 1100px) and (min-width: 700px) {
	#cmp tr > .combatArt {
        grid-column: 25 / 34;
        grid-row: 1;
	}
	#cmp tr > .itemSource,
	#cmp tr > .magicSource {
        grid-column: 34 / 49;
        grid-row: 1 / 4;
		vertical-align: top;
        height: 100%;
	}
	#cmp tr > .weaponDescription {
    	grid-column: span 33;
	}
	/* magic: the 6 spell traits (4 columns each) and the description are 24 columns wide, the source gets the rest of the 48 */
	#cmp tr > .magicSource {
        grid-column: 25 / 49;
	}
	#cmp tr > .magicDescription {
    	grid-column: span 24;
	}
	/* blaze arts (84 columns): the character, the type icon and the six numbers (7 each) span rows 1 and 2; the name is on row 1 with its kind under it;
	   row 3 is the effect (63) and the unlock (21) */
	#cmp.modalblaze tr > .characterName {
		grid-column: 1 / 25;
		grid-row: 1 / 3;
	}
	#cmp.modalblaze tr > .col1 {
		grid-column: 25 / 28;
		grid-row: 1 / 3;
	}
	#cmp.modalblaze tr > .blaze-name {
		grid-column: 28 / 43;
		grid-row: 1;
	}
	#cmp.modalblaze tr > .blaze-kind {
		grid-column: 28 / 43;
		grid-row: 2;
	}
	#cmp.modalblaze tr > .cols5 {
		grid-row: 1 / 3;
	}
	#cmp.modalblaze tr > .cols5:nth-child(4) { grid-column: 43 / 50; }
	#cmp.modalblaze tr > .cols5:nth-child(5) { grid-column: 50 / 57; }
	#cmp.modalblaze tr > .cols5:nth-child(6) { grid-column: 57 / 64; }
	#cmp.modalblaze tr > .cols5:nth-child(7) { grid-column: 64 / 71; }
	#cmp.modalblaze tr > .cols5:nth-child(8) { grid-column: 71 / 78; }
	#cmp.modalblaze tr > .cols5:nth-child(9) { grid-column: 78 / 85; }
	#cmp.modalblaze tr > .blaze-effect {
		grid-column: 1 / 64;
		grid-row: 3;
	}
	#cmp.modalblaze tr > .blaze-unlock {
		grid-column: 64 / 85;
		grid-row: 3;
	}

	/* arts: 50 columns, half each. The left side is 25: row 1 the name (15), effective (4) and skill (6); row 2 the five stats (cost, might, hit, crit,
	   range) 5 each, each in its own place whether the others have a value or not; row 3 the effect. Who can use it (weapons / learned by) is the
	   other 25 columns at the right over the three rows */
	#cmp.modalWt tr {
		grid-template-columns: repeat(50, minmax(0, 1fr));
	}
	#cmp.modalWt tr > .art-name {
		grid-column: 1 / 16;
		grid-row: 1;
	}
	#cmp.modalWt tr > .eff {
		grid-column: 16 / 20 !important;
		grid-row: 1;
	}
	#cmp.modalWt tr > .art-skill {
		grid-column: 20 / 26;
		grid-row: 1;
	}
	#cmp.modalWt tr > .art-trait {
		grid-row: 2;
	}
	#cmp.modalWt tr > .art-trait:nth-child(4) { grid-column: 1 / 6; }
	#cmp.modalWt tr > .art-trait:nth-child(5) { grid-column: 6 / 11; }
	#cmp.modalWt tr > .art-trait:nth-child(6) { grid-column: 11 / 16; }
	#cmp.modalWt tr > .art-trait:nth-child(7) { grid-column: 16 / 21; }
	#cmp.modalWt tr > .art-trait:nth-child(8) { grid-column: 21 / 26; }
	#cmp.modalWt tr > .colRowFull {
		grid-column: 1 / 26;
		grid-row: 3;
	}
	#cmp.modalWt tr > .colRowFull:last-child {
		grid-column: 26 / 51;
		grid-row: 1 / 4;
	}

	/* mounts: 60 columns. The left side is 45 wide, the nine stat cells (the stats and the total, empty ones keep their place) 5 each. First row: the
	   icon (3), name (14), liked food (3), liked taste (8) and the mount skills (17); the sources in the 15 columns after them over both rows */
	#cmp.modalWm tr > .mountHeader {
		grid-column: 1 / 3;
		grid-row: 1;
	}
	#cmp.modalWm tr > .mountName {
		grid-column: 3 / 18;
		grid-row: 1;
	}
	#cmp.modalWm tr > .likedFood {
		grid-column: 18 / 21;
		grid-row: 1;
	}
	#cmp.modalWm tr > .col3:not(.likedFood) {
		grid-column: 21 / 29;
		grid-row: 1;
	}
	#cmp.modalWm tr > .mount-abilities {
		grid-column: 29 / 46;
		grid-row: 1;
	}
	#cmp.modalWm tr > .class-growth {
		grid-column: span 5;
	}
	#cmc td.mount-location {
		grid-column: 46 / 61 !important;
		grid-row: 1 / 3 !important;
	}

	/* weapons (not magic): equal columns (a 1fr column grows with its content), 52 of them: the left side is 35 wide so the seven traits (the six
	   and the curse) are 5 each, and the sources are the 17 after it. First row: the name (20), effective (4), skill (6) and the cost (5, last in
	   the row but placed at its end); third row: the description with the combat art at its right (the description has the whole row without one) */
	#cmp.modalWw:not(.modalWk) tr {
		grid-template-columns: repeat(52, minmax(0, 1fr));
	}
	#cmp.modalWw:not(.modalWk) tr > .nameField {
		grid-column: span 20;
	}
	#cmp.modalWw:not(.modalWk) tr > .weaponTrait {
		grid-column: span 5;
	}
	#cmp.modalWw:not(.modalWk) tr > .newRow.weaponTrait {
		grid-column: 1 / 6;
	}
	#cmp.modalWw:not(.modalWk) tr > .weaponCost {
		grid-column: 31 / 36;
		grid-row: 1;
	}
	#cmp.modalWw:not(.modalWk) tr > .weaponDescription {
		grid-column: 1 / 21;
		grid-row: 3;
	}
	#cmp.modalWw:not(.modalWk) tr > .combatArt {
		grid-column: 21 / 36;
		grid-row: 3;
	}
	#cmp.modalWw:not(.modalWk) tr:has(> .combatArt:empty) > .weaponDescription {
		grid-column: 1 / 36;
	}
	#cmp.modalWw:not(.modalWk) tr > .itemSource {
		grid-column: 36 / 53;
		grid-row: 1 / 4;
	}
	/* the characters' abilities: the character on the left, the equippable abilities and arts next to it, both over all the rows, and the
	   personal ability, bloodmark, blaze ability and blaze art stacked in the last column (the blaze ability above the blaze art) */
	#cmp.modalWg.modalabilities tr > .characterName {
		grid-column: 1 / 29;
		grid-row: 1 / span 4;
	}
	#cmp.modalWg.modalabilities tr > .abEquip {
		grid-column: 29 / 57;
		grid-row: 1 / span 4;
	}
	#cmp.modalWg.modalabilities tr > .abPersonal { grid-column: 57 / 85; grid-row: 1; }
	#cmp.modalWg.modalabilities tr > .abCrest { grid-column: 57 / 85; grid-row: 2; }
	#cmp.modalWg.modalabilities tr > .abBlazeAbility { grid-column: 57 / 85; grid-row: 3; }
	#cmp.modalWg.modalabilities tr > .abBlazeArt { grid-column: 57 / 85; grid-row: 4; }
	/* abilities: two halves of 24 columns: the name and skill on the left with the effect under them, who learns it on the right over both rows */
	#cmp.modalWa tr > .art-name {
		grid-column: 1 / 19;
		grid-row: 1;
	}
	#cmp.modalWa tr > .art-skill {
		grid-column: 19 / 25;
		grid-row: 1;
	}
	#cmp.modalWa tr > .colRowFull {
		grid-column: 1 / 25;
		grid-row: 2;
	}
	#cmp.modalWa tr > .colRowFull.artLearners {
		grid-column: 25 / 49;
		grid-row: 1 / 3;
	}
	/* equipment: the name and, under it, the stats line (24 columns); weight (4) and cost (5) beside them over both rows, so the two rows are 33 wide as the weapons' (the source starts after them) */
	#cmp.modalWe tr > .equipName {
		grid-column: 1 / 25;
		grid-row: 1;
	}
	#cmp.modalWe tr > .equipDetail {
		grid-column: 1 / 25;
		grid-row: 2;
	}
	#cmp.modalWe tr > .equipTrait {
		grid-column: 30 / 34;
		grid-row: 1 / 3;
		align-self: center;
	}
	#cmp.modalWe tr > .equipCost {
		grid-column: 25 / 30;
	}

	#cmc tr > .nameField {
		grid-column: span 14;
	}

	#cmc tr > .skill {
		grid-column: span 6;
		padding-left: 2px;
		padding-right: 2px;
	}

	#cmc tr > .eff {
		grid-column: span 4 !important;
	}
}

/* the growths and base stats tables between 901 and 1100px: one row, the name and the 11 stat cells (the stats, Total, Weighted) */
@media screen and (min-width: 901px) and (max-width: 1100px) {
	:is(#cmp.modalgrowths, #cmp.modalbasestats) #cmc tr {
		grid-template-columns: repeat(60, 1fr);
	}

	:is(#cmp.modalgrowths, #cmp.modalbasestats) #cmc tr > .characterName {
		grid-column: span 16;
	}

	:is(#cmp.modalgrowths, #cmp.modalbasestats) #cmc tr > .growthCol {
		grid-column: span 4;
	}
}

@media screen and (max-width: 900px) {
	/* the Weighted column of the growths and base stats tables (shown above 900px) */
	.weightedCol {
		display: none !important;
	}

	#mainWrapper::before {
		content: "";
		background-image: url(../images/bgLineCover4.webp);
		background-size: 100%;
		width: 100%;
		height: 100%;
		left: 0;
		top: 0;
		position: absolute;
	}
}

@media screen and (max-width: 700px) {
	.recruitContainer > span {
		max-width: none;
		flex-basis: max(15em, 50% - 5px);
		width: auto;
	}

	#cmc tr {
		grid-template-columns: repeat(36, 1fr);
	}

	#cmc tr > .colRow,
	#cmc tr > .colThirdRow,
	#cmc tr > .colRowFull {
		grid-column: span 36;
	}

	#cmc tr > .newRow.colHalf {
		grid-column: 1 / 19;
	}

	#cmc tr > .newRow.colRow,
	#cmc tr > .newRow.colThirdRow {
		grid-column: 1 / 37;
	}

	#cmc tr.halfRow {
		width: 100%;
	}

	#cmp.modalWg tr {
		grid-template-columns: repeat(42, 1fr);
	}

	#cmp.modalWg.modalabilities .col8 {
		grid-column: span 42;
	}

	#cmp.modalWc tr {
		grid-template-columns: repeat(30, 1fr);
	}

	/* weapons & magic and scrolls: 32 columns, so the traits (4 columns each, Might too: it starts the row) fill whole rows
       (8 weapon traits = 32) */
	#cmp.modalWw tr,
	#cmp.modalscrolls tr {
		grid-template-columns: repeat(32, 1fr);
	}
	#cmp.modalWw tr > .newRow.weaponTrait,
	#cmp.modalscrolls tr > .newRow.weaponTrait {
		grid-column: 1 / 5;
	}
	/* weapons (not magic): 30 columns, in fixed rows. 1: the name (18), effective (4) and skill (8); 2: the six traits (4 each, the durability 6) and the curse (4);
	   3: the combat art (23) with the cost (7) at its end, which keeps its place without either; then the description and the sources */
	#cmp.modalWw:not(.modalWk) tr {
		grid-template-columns: repeat(30, 1fr);
	}
	#cmp.modalWw:not(.modalWk) tr > .nameField {
		grid-column: span 18;
	}
	#cmp.modalWw:not(.modalWk) tr > .skill {
		grid-column: span 8;
	}
	#cmp.modalWw:not(.modalWk) tr > .weaponTrait {
		grid-column: span 4;
	}
	#cmp.modalWw:not(.modalWk) tr > .newRow.weaponTrait {
		grid-column: 1 / 5;
	}
	#cmp.modalWw:not(.modalWk) tr > .weaponDur {
		grid-column: span 6;
	}
	#cmp.modalWw:not(.modalWk) tr > .weaponCurse {
		grid-column: span 4;
	}
	#cmp.modalWw:not(.modalWk) tr > .colRow,
	#cmp.modalWw:not(.modalWk) tr > .colThirdRow,
	#cmp.modalWw:not(.modalWk) tr > .colRowFull {
		grid-column: span 30;
	}
	#cmp.modalWw:not(.modalWk) tr > .newRow.colRow,
	#cmp.modalWw:not(.modalWk) tr > .newRow.colThirdRow {
		grid-column: 1 / 31;
	}
	#cmp.modalWw:not(.modalWk) tr > .combatArt {
		grid-column: 1 / 24;
		grid-row: 3;
	}
	#cmp.modalWw:not(.modalWk) tr > .weaponCost {
		grid-column: 24 / 31;
		grid-row: 3;
	}
	/* items with a flavor (fish, meat, vegetables, ...): name and flavor on one row, 27 + 9 = 36 */
	#cmc tr:has(> .itemFlavor) > .col10 {
		grid-column: span 27;
	}

	/* name, effective and skill requirement on one row: 20 + 4 + 8 = 32 (the 36 column spans were 18 + 6 + 12) */
	#cmp.modalWw tr > .nameField {
		grid-column: span 20;
	}
	#cmp.modalWw tr > .eff {
		grid-column: span 4;
	}
	#cmp.modalWw tr > .skill {
		grid-column: span 8;
	}
	#cmp.modalWw tr > .colRow,
	#cmp.modalWw tr > .colThirdRow,
	#cmp.modalWw tr > .colRowFull,
	#cmp.modalscrolls tr > .colRow,
	#cmp.modalscrolls tr > .colThirdRow,
	#cmp.modalscrolls tr > .colRowFull {
		grid-column: span 32;
	}
	
	#cmp.modalboons tr > .colRowFull {
		grid-column: span 42;
	}

	#cmp.modalWw tr > .newRow.colHalf,
	#cmp.modalscrolls tr > .newRow.colHalf {
		grid-column: 1 / 17;
	}
	#cmp.modalWw tr > .newRow.colRow,
	#cmp.modalWw tr > .newRow.colThirdRow,
	#cmp.modalscrolls tr > .newRow.colRow,
	#cmp.modalscrolls tr > .newRow.colThirdRow {
		grid-column: 1 / 33;
	}

	/* magic: 30 columns, the 6 spell traits (Might, Hit, Crit, Range, Uses, Weight) 5 columns each; name 18 + effective 4 + skill 8 = 30 */
	#cmp.modalWk tr {
		grid-template-columns: repeat(30, 1fr);
	}
	#cmp.modalWk tr > .spellTrait {
		grid-column: span 5;
	}
	#cmp.modalWk tr > .newRow.spellTrait {
		grid-column: 1 / 6;
	}
	#cmp.modalWk tr > .nameField {
		grid-column: span 18;
	}
	#cmp.modalWk tr > .colRow,
	#cmp.modalWk tr > .colThirdRow,
	#cmp.modalWk tr > .colRowFull {
		grid-column: span 30;
	}
	#cmp.modalWk tr > .newRow.colHalf {
		grid-column: 1 / 16;
	}
	#cmp.modalWk tr > .newRow.colRow,
	#cmp.modalWk tr > .newRow.colThirdRow {
		grid-column: 1 / 31;
	}

	/* equipment: 30 columns; the name and, under it, the stats line are 19 wide, weight (5) and cost (6) beside them over both rows */
	#cmp.modalWe tr {
		grid-template-columns: repeat(30, 1fr);
	}
	/* (before the cells' own places: the stats line and the source are colRowFull too, and the later rule wins) */
	#cmp.modalWe tr > .colRow,
	#cmp.modalWe tr > .colThirdRow,
	#cmp.modalWe tr > .colRowFull {
		grid-column: span 30;
	}
	#cmp.modalWe tr > .equipName {
		grid-column: 1 / 20;
		grid-row: 1;
	}
	#cmp.modalWe tr > .equipDetail {
		grid-column: 1 / 20;
		grid-row: 2;
	}
	#cmp.modalWe tr > .equipTrait {
		grid-column: 26 / 31;
		grid-row: 1 / 3;
		align-self: center;
	}
	#cmp.modalWe tr > .equipCost {
		grid-column: 20 / 26;
	}

	/* mounts: 36 columns, so the nine stat cells (the stats and the total) are 4 each: the first row is the icon (3), name (17), liked food (4)
	   and liked taste (12), then the stats, then the mount skills and the sources side by side, 18 each */
	#cmp.modalWm tr {
		grid-template-columns: repeat(36, minmax(0, 1fr));
	}

	#cmp.modalWm tr > .col3 {
		grid-column: span 12;
	}
	#cmp.modalWm tr > .col3.likedFood {
		grid-column: span 3 !important; /* (the one before, in the 1100 px rules, is important too) */
	}

	#cmp.modalWm tr > td.col3 {
		padding: 4px 2px;
	}

	#cmp.modalWm tr > .mountName {
        grid-column: span 18;
	}

	#cmc .mount-location {
		grid-column: span 18 !important;
		grid-row: auto !important;
        padding: 2px 0px;
	}

	#cmc tr > .mount-abilities {
        max-width: none;
		width: auto;
		grid-column: span 18;
	}

	#cmc tr > .class-growth {
		grid-column: span 4;
	}
	#cmp.modalWm tr > td.class-growth {
		grid-column: span 4; /* (not the 3 of the class lists) */
	}

	#cmc tr > td.class-growth {
		grid-column: span 3;
		font-size: 12px;
		line-height: 100%;
	}

	#cmc tr > .class-mov {
		grid-column: span 4;
	}

	#cmc tr > td.class-mov {
		font-size: 1em;
	}

	/* class list: Mov is on the right of the name row and the skills row (4 columns, two rows), so those two share the other 26 */
	#cmp.modalWc tr > .class-mov {
		grid-column: 27 / 31;
		grid-row: 1 / 3;
		align-self: center;
	}
	#cmp.modalWc tr > .classNameField {
		grid-column: span 18;
	}
	#cmp.modalWc tr > .classLicense {
		grid-column: span 8;
	}
	#cmp.modalWc tr > .class-skillList {
		grid-column: span 26;
	}

	#cmc .class-requirements {
		grid-column: span 15 !important;
		grid-row: auto !important;
	}

	#cmc tr > .class-skillList {
		grid-column: span 27;
	}

	#cmc tr > .blaze-effect {
        grid-column: span 42;
        grid-row: 4;
	}

	#cmc tr > .blaze-character {
		grid-column: 1 / 15 !important;
		grid-row: 4;
		text-align: right;
		padding: 0;
	}

	#cmc tr > .blaze-kind {
        grid-column: span 21;
	}

    #cmp.modalblaze tr > .cols5 { /* (the six numbers: 7 each, 42, the whole width of their row) */
        grid-column: span 7;
        padding: 2px;
    }
	/* blaze arts (42 columns): the character (20) and the type icon (3) span rows 1 and 2, the name (19) is beside them with its kind under it; row 3 the six
	   numbers (7 each), row 4 the effect (28, two thirds) and the unlock (14) */
	#cmp.modalblaze tr > .characterName {
		grid-column: 1 / 21;
		grid-row: 1 / 3;
	}
	#cmp.modalblaze tr > .col1 {
		grid-column: 21 / 24;
		grid-row: 1 / 3;
	}
	#cmp.modalblaze tr > .blaze-name {
		grid-column: 24 / 43;
		grid-row: 1;
	}
	#cmp.modalblaze tr > .blaze-kind {
		grid-column: 24 / 43;
		grid-row: 2;
	}
	#cmp.modalblaze tr > .cols5 {
		grid-row: 3;
	}
	#cmp.modalblaze tr > .cols5:nth-child(4) { grid-column: 1 / 8; }
	#cmp.modalblaze tr > .cols5:nth-child(5) { grid-column: 8 / 15; }
	#cmp.modalblaze tr > .cols5:nth-child(6) { grid-column: 15 / 22; }
	#cmp.modalblaze tr > .cols5:nth-child(7) { grid-column: 22 / 29; }
	#cmp.modalblaze tr > .cols5:nth-child(8) { grid-column: 29 / 36; }
	#cmp.modalblaze tr > .cols5:nth-child(9) { grid-column: 36 / 43; }
	#cmp.modalblaze tr > .blaze-effect {
		grid-column: 1 / 29;
		grid-row: 4;
	}
	#cmp.modalblaze tr > .blaze-unlock {
		grid-column: 29 / 43;
		grid-row: 4;
	}

	#cmc tr > .art-trait {
		grid-column: span 6;
	}

	#cmc tr > .art-name {
		grid-column: span 30;
	}
	/* arts: 30 columns, so both rows fill the width: the name (20), effective (4) and skill (6), then the five traits (cost, might, hit, crit, range) 6 each */
	#cmp.modalWt tr {
		grid-template-columns: repeat(30, minmax(0, 1fr));
	}
	#cmp.modalWt tr > .art-name {
		grid-column: span 23;
	}
	#cmp.modalWt tr > .art-skill,
	#cmp.modalWt tr > .art-trait {
		grid-column: span 6;
	}
	#cmp.modalWt tr > .colRow,
	#cmp.modalWt tr > .colThirdRow,
	#cmp.modalWt tr > .colRowFull {
		grid-column: span 30;
	}

	#cmc td.battalionName {
        grid-column: span 17 !important;
        max-width: none;
	}

	#cmp.modalWb td.class-growth {
        grid-column: span 4 !important;
        grid-row: 3 !important;
	}

	#cmc td.battalionRank {
        grid-column: span 6 !important;
	}
	#cmc td.battalionGambit {
        grid-column: 1 / 13 !important;
        grid-row: 2 !important;
	}
	#cmp.modalWb table.gambitArea {
		margin-left: auto;
	}

	#cmc td.battalionArea {
		grid-column: 13 / 24 !important;
        grid-row: 2 !important;
	}

	#cmc td.battalionLocation {
        grid-column: 24 / 37 !important;
        grid-row: 1 / 3 !important;
    }
}

@media screen and (max-width: 700px) and (orientation: portrait) {
	.wrapper {
		transform: scale(1.1);
		transform-origin: left center;
	}

	#mainWrapper::before {
		display: none;
	}

	section {
		padding-right: 6.3%;
	}

    .cardButtons {
        width: 64%;
        justify-content: flex-start;
        transform: scaleX(0.92);
        transform-origin: left center;
    }
}

@media screen and (max-width: 600px) and (orientation: portrait) and (max-aspect-ratio: 5 / 6) {
	.notMobilePortrait {
		display: none;
	}

	.tg {
		grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
	}

	.gsSearch {
        left: 6%;
        top: calc(var(--vw) * 1.5);
        width: 27.5%;
	}
	
	.pk {
		box-sizing: border-box;
		padding: 0.5vw 2vw;
		color: var(--text);
		font: inherit;
		text-align: left;
		cursor: pointer;
		pointer-events: all;
	}

	.mxToggle {
        margin: 0 calc(0.2em + -1 * (var(--mhLine) - 1vw)) 0 0.2em;
	}

	#lineCover {
		display: none !important;
	}

	.mainWrapper {
		padding-top: calc(var(--vw) * 5.9);
		font-size: 14px;
	}

	.singleColumn .mainWrapper {
		padding-top: calc(var(--vw) * 12.5);
	}

	.singleColumn.builder:not(.splitColumns) .mainWrapper {
        padding-top: calc(var(--vw) * 6.2);
	}

	.singleColumn.builder .tabContainer > *:first-child {
		margin-top: 0;
	}

	.wrapper {
		transform: scale(1.6);
	}

	/* (the compare buttons sit above the card: the page moves down by half their room, --cbSpace from index.html scaleToFit, at the page's scale, so it is centred
	   with them; not a padding, which would move what is placed in it) */
	.wrap {
		--cbCentre: 1; /* (scaleToFit measures the buttons' room only where this is set: this layout) */
		left: calc(-5.2 * var(--vw) * var(--scale));
		top: calc(50% + var(--cbSpace, 0px) * var(--scale, 1) / 2);
	}

	.tabContainer {
		margin-left: calc(30 * var(--vw));
		width: calc(100% - 30 * var(--vw));
	}

	.singleColumn .tabContainer {
		margin-left: 0;
		width: 100%;
        z-index: 1;
        padding-left: 16px;
        padding-right: 16px;
	}

	.singleColumn:not(.builder) .tabContainer {
        background: #05171b;
	}

	.singleColumn .tabContainer .scGrid {
		margin-left: 50%;
		min-height: calc(14 * var(--vw));
    	justify-content: space-between;
	}

	.singleColumn .tabContainer .scCell {
    	flex-basis: 25%;
	}

	.singleColumn .tabContainer .scCell:first-child {
    	flex-basis: 50%;
	}
	
	.singleColumn .tabContainer .scCell:first-child .scLine {
		margin-right: auto;
		margin-left: 4px;
		gap: 10px;
	}

	.grid2 {
		margin-top: calc(var(--vw) * 24);
	}
	.grid2 > *:first-child {
		padding-top: 0;
	}

	/* the frame in three pieces (1800 wide): the top (658 high) and the bottom (440) at their own size, the center (272 high) repeated between them in ::before.
	   The height follows the screen: square on a 3 / 5 screen (what it was made for), taller in proportion on a taller one (--screenRatio: the screen's height / width,
	   index.html scaleToFit); never less than the top and the bottom together */
	section {
		background-image: url(../images/background-4-3-6-top.png), url(../images/background-4-3-6-bottom.png);
		background-size: 100% auto, 100% auto;
		background-position: left top, left bottom;
		background-repeat: no-repeat;
		padding-right: 32.5%;
		padding-top: calc(6.7 * var(--vw));
		aspect-ratio: auto;
		height: calc(100 * var(--vw) * 3 / 5 * var(--screenRatio, 5 / 3) * 0.95);
		min-height: calc(100 * var(--vw) * (658 + 440) / 1800);
		padding-left: 5%;
	}
	section::before {
		content: "";
		position: absolute;
		z-index: -1;
		pointer-events: none;
		left: 0;
		width: 100%;
		/* (from the width, as the pieces scale with it: the section is 100 --vw wide; a pixel into the top and the bottom piece each, so no seam shows) */
		top: calc(100 * var(--vw) * 658 / 1800 - 1px);
		bottom: calc(100 * var(--vw) * 440 / 1800 - 1px);
		background: url(../images/background-4-3-6-center.png) left top / 100% auto repeat-y;
	}

	.cardButtons {
        left: 34.5%;
		top: calc(2.2 * var(--vw));
        width: 32%;
		margin-top: 0;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px;
        transform: none;
	}

	.cardButtons > .pk {
		height: 1.5em;
		line-height: 1.5em;
        min-width: calc(50% - 2px);
        text-align: left;
        flex: 0;
	}

	#lt > .sk:first-child {
		margin-top: 6px;
	}

	.compareButtons {
		gap: 6px;
		transform: translateY(-87%);
		flex-wrap: wrap-reverse;
        left: 5.5%;
        width: 61.8%;
		top: calc(-0.8 * var(--vw));
	}

    .compareButtons > .pk {
        font-size: 14.5px;
        border: 0 !important;
        background: url(../images/buttonInactiveBG5.png) !important;
        background-size: 100% 100% !important;
        text-shadow: none;
        line-height: 1.45em;
        padding: 0;
        flex-grow: 0;
        aspect-ratio: 4.4 / 1;
        height: 1.45em;
        filter: drop-shadow(0.1em 0.1em 0.1em rgba(0, 0, 0, 120));
    }

	.compareButtons > .pk:hover,
	.compareButtons > .pk:focus {
		text-shadow: var(--glow);
	}
}

@media screen and (max-width: 500px) {
	.recruitContainer > span {
		flex-basis: 100%;
	}
} /* drag and drop on the screenshot page: a dashed frame and a label over the box while files are dragged over it */
.shDrop {
	display: none;
}
#shp .mb.shOver .shDrop {
	display: flex;
	position: absolute;
	inset: 8px;
	z-index: 5;
	align-items: center;
	justify-content: center;
	border: 2px dashed #d2c6af;
	background: rgba(20, 35, 36, 0.85);
	color: #fff4d9;
	font-size: 22px;
	letter-spacing: 0.04em;
	pointer-events: none;
}
/* the class / mount popup's Select button (the game button, .shBtn) */
.idSelect {
    margin-left: auto;
}

.modalWt .lmClass,
.idReq .lmClass {
    margin-top: 4px;
    margin-bottom: 4px;
    margin-right: 4px;
    display: inline-block;
    overflow: visible;
    vertical-align: baseline;
}

/* ====================================================================== */
/* Spoiler blur & Part II / III question                                  */
/* ====================================================================== */

/* Part II / III spoilers (app.js tagSpoilers): blurred until that part is enabled; not inside an item popup a link opened */
/* the blur is an overlay inside the element (backdrop-filter), so it stays within its box; a row is blurred cell by cell */
html:not(.sp2) [data-spoil="2"]:not(tr),
html:not(.sp3) [data-spoil="3"]:not(tr) {
	position: relative;
	cursor: pointer;
}
/* a row: one overlay over the whole row (its ::after, the row is its containing block), not one for each cell: a backdrop-filter is costly, on a phone most of all */
html:not(.sp2) tr[data-spoil="2"],
html:not(.sp3) tr[data-spoil="3"] {
	cursor: pointer;
	position: relative;
}
html:not(.sp2) tr[data-spoil="2"]::after,
html:not(.sp3) tr[data-spoil="3"]::after {
	content: "Tap to reveal (Part\00a0III)";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	/* (the label, centred over the whole row: the text of the overlay is not blurred by its own backdrop-filter) */
	display: flex;
	align-items: center;
	align-items: safe center; /* (a label taller than a small element, a link: it starts from the top, its first line whole, instead of being cut at both ends) */
	justify-content: center;
	justify-content: safe center;
	box-sizing: border-box;
	padding: 0 8px;
	text-align: center;
	white-space: normal;
	overflow: hidden;
	font-size: 90%;
	font-weight: normal;
	color: var(--fg);
	text-shadow: 0 0 3px #000, 0 0 6px #000;
}
html:not(.sp2) tr[data-spoil="2"]::after {
	content: "Tap to reveal (Part\00a0II)";
}
@media (hover: hover) and (pointer: fine) {
	html:not(.sp2) tr[data-spoil="2"]::after {
		content: "Click to reveal (Part\00a0II)";
	}
	html:not(.sp3) tr[data-spoil="3"]::after {
		content: "Click to reveal (Part\00a0III)";
	}
}
/* a character's row (recruiting, growths, the support list): like the character icons */
html:not(.sp2) tr[data-spoil="2"][data-spoil-ch]::after,
html:not(.sp3) tr[data-spoil="3"][data-spoil-ch]::after {
	-webkit-backdrop-filter: blur(8px) grayscale(0.8);
	backdrop-filter: blur(8px) grayscale(0.8);
}
html:not(.sp2) [data-spoil="2"]:not(tr)::after,
html:not(.sp3) [data-spoil="3"]:not(tr)::after {
	content: "Tap to reveal (Part\00a0III)";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	border-radius: inherit;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	/* (the label, "Click to reveal" / "Tap to reveal" by the input the device has, centred over the blur: the overlay's own text is not blurred by its backdrop-filter) */
	display: flex;
	align-items: center;
	align-items: safe center;
	justify-content: center;
	justify-content: safe center;
	box-sizing: border-box;
	padding: 0 8px;
	text-align: center;
	white-space: normal;
	overflow: hidden;
	font-size: 90%;
	font-weight: normal;
	color: var(--fg);
	text-shadow: 0 0 3px #000, 0 0 6px #000;
}
html:not(.sp2) [data-spoil="2"]:not(tr)::after {
	content: "Tap to reveal (Part\00a0II)";
}
@media (hover: hover) and (pointer: fine) {
	html:not(.sp2) [data-spoil="2"]:not(tr)::after {
		content: "Click to reveal (Part\00a0II)";
	}
	html:not(.sp3) [data-spoil="3"]:not(tr)::after {
		content: "Click to reveal (Part\00a0III)";
	}
}
/* the blur alone, no label: the character icons of the lists, the recruitment lists' portraits, a name inside a text, and what is inside another blurred thing (one label for each) */
html:not(.sp2) .lr[data-spoil="2"]::after,
html:not(.sp3) .lr[data-spoil="3"]::after,
html:not(.sp2) #cmp .rc[data-spoil="2"]::after,
html:not(.sp3) #cmp .rc[data-spoil="3"]::after,
.rcSpoil[data-spoil]::after,
[data-spoil]:not(tr) [data-spoil]::after,
tr[data-spoil] > [data-spoil]::after {
	content: "" !important;
}
/* a blurred How to get row beside the popup's map picture (.idMapShot, floated): its box narrows beside the picture, so the blur doesn't cover it */
html:not(.sp2) :is(.acqLoc, .acqFull)[data-spoil="2"],
html:not(.sp3) :is(.acqLoc, .acqFull)[data-spoil="3"] {
	display: flow-root;
}
tr[data-spoil] > * [data-spoil]::after {
	display: none;
} /* the row's cells already cover it (inside a cell: a cell that is a spoiler itself, the support list's character cell, keeps its blur) */
/* character icons: stronger, the face gives it away */
html:not(.sp2) .lr[data-spoil="2"]::after,
html:not(.sp3) .lr[data-spoil="3"]::after,
html:not(.sp2) .tilech[data-spoil="2"]::after,
html:not(.sp3) .tilech[data-spoil="3"]::after,
html:not(.sp2) .gsChars [data-spoil="2"]::after,
html:not(.sp3) .gsChars [data-spoil="3"]::after,
html:not(.sp2) #cmp.modalWr .rc[data-spoil="2"]::after,
html:not(.sp3) #cmp.modalWr .rc[data-spoil="3"]::after {
	-webkit-backdrop-filter: blur(8px) grayscale(0.8);
	backdrop-filter: blur(10px) grayscale(0.8);
}
/* the character select screen: the tiles are big portraits, so stronger still */
html:not(.sp2) #md .tilech[data-spoil="2"]::after,
html:not(.sp3) #md .tilech[data-spoil="3"]::after {
	-webkit-backdrop-filter: blur(16px) grayscale(0.8);
	backdrop-filter: blur(16px) grayscale(0.8);
}
/* a character's name inside a text (Creek in Nathan's recruitment): blurred in place, without the label */
.rcSpoil[data-spoil] {
	display: inline-block;
}
/* Creek and Nathan in the recruitment lists: the blur covers the portrait and the name only */
html:not(.sp2) .rc.rcPart[data-spoil="2"]::after,
html:not(.sp3) .rc.rcPart[data-spoil="3"]::after {
	display: none;
}
.rc.rcPart[data-spoil] .rcName {
	display: inline-block;
}
html:not(.sp2) .rc.rcPart[data-spoil="2"] .rt,
html:not(.sp3) .rc.rcPart[data-spoil="3"] .rt,
html:not(.sp2) .rc.rcPart[data-spoil="2"] .rcName,
html:not(.sp3) .rc.rcPart[data-spoil="3"] .rcName {
	position: relative;
}
html:not(.sp2) .rc.rcPart[data-spoil="2"] .rt::after,
html:not(.sp3) .rc.rcPart[data-spoil="3"] .rt::after,
html:not(.sp2) .rc.rcPart[data-spoil="2"] .rcName::after,
html:not(.sp3) .rc.rcPart[data-spoil="3"] .rcName::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	border-radius: inherit;
	-webkit-backdrop-filter: blur(8px) grayscale(0.8);
	backdrop-filter: blur(8px) grayscale(0.8);
}
.spoilOpen [data-spoil]:not(.acqSpoil)::after { /* (acqSpoil: a Part III use of the item, hidden also in a popup the item itself opened) */
	display: none;
}
.spoilMap [data-spoil]::after { /* (the map's Part III tab: nothing is hidden, not even a Part III use of an item) */
	display: none;
}
.spoilOpen tr[data-spoil]::after {
	display: none;
}

/* the Part II / III question (app.js askSpoilers): the item popup's look (#idp rules above), tab buttons */
#spp {
	z-index: 1000;
}
#spp[hidden] {
	display: none;
}
#spp .mb {
	width: min(480px, 100%);
	min-height: 0;
	max-height: min(90vh, 100%);
}
#spp .sppC {
	overflow: auto;
	padding: 6px calc(1.2 * var(--vw)) calc(1.2 * var(--vw));
	font-size: 15px;
	text-align: center;
}
#spp .sppC p {
	margin: 4px 0 12px;
	line-height: 1.45;
}
#spp .sppB {
	display: flex;
	flex-direction: column;
	gap: 6px;
	justify-content: flex-end;
}
/* the selected-tab look (the caps and centre above): the caps scale with the button height, as --tabH does on a tab */
.sppC .pk {
	--tabH: 3em;
	--capW: calc(var(--tabH) * 18 / 36);
	cursor: pointer;
	width: 250px;
	height: var(--tabH);
	margin: 0 auto;
	padding-left: var(--capW);
	padding-right: var(--capW);
	background-color: transparent;
	color: #fff4d9;
	text-shadow: inherit;
	text-align: center;
	border: 2px transparent solid;
}

#sppAll {
	transform: scale(0.9);
	width: 300px;
}

#sppThis {
	transform: scale(0.9);
	width: 220px;
}

.sppC .pk:hover,
.sppC .pk:focus-visible {
	text-shadow: var(--glow);
	outline: none;
}
/* item tiles (gifts, vegetables, fish, ores, meat, equipment lists): app.js renderItemTiles */
.itg[hidden] { display: none; }
.itg { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; padding: 6px; }
.itile { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; padding: 8px; text-align: left; color: inherit; text-decoration: none; border: 1px solid var(--line); position: relative; cursor: pointer; }
.itile[hidden] { display: none; }
.itile:hover, .itile:focus-visible { background: var(--sel); outline: none; }
.itile .itMain { display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }

.itile .itMain:hover {
  text-shadow: var(--bodyShadow);
}
.itile .itMain::after { content: ""; position: absolute; inset: 0; } /* the link covers the whole tile */
.itile .itMain:focus-visible { outline: none; }
.itile:has(.itMain:focus-visible) { background: var(--sel); outline: 2px solid var(--text); outline-offset: -2px; }
.itile .itHead { display: flex; align-items: center; gap: 6px; }
.itile .itHead b:first-of-type { margin-left: 2px;}
.itile .si { width: 24px; height: 24px; margin: 0; flex: none; object-fit: contain; }
.itile small { color: var(--mut); font-size: 12px; }
.itile .itDetail { color: var(--fg); margin-top: 2px; }
.itile .itLocs { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.itile .itLocs a { color: var(--text); }
.itile .itLocs .arrowLink { display: block; list-style: none; text-decoration: underline dotted; text-underline-offset: 2px; }
.itile .itLocs a.lmItem { text-decoration: underline dotted; text-underline-offset: 2px; }
.itile .itLocs a.lmItem .si { width: 1.2em; height: 1.2em; margin: 0 2px 0 0; object-fit: contain; vertical-align: text-bottom; }
.itLocs .acqLoc .srcK {
    margin-left: 3px;
}

/* items in the recruitment texts: app.js linkRecruitItems */
a.recItem { text-decoration: underline dotted; text-underline-offset: 2px; color: inherit; }
a.recItem .si { height: 1.2em; width: 1.2em; margin-right: 3px; vertical-align: text-bottom; }

.sr.bsort::before {
	content: "base ";
	font-size: 0.7em;
	opacity: 0.8;
}

#sortHint {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, calc(-100% + 6px));
	z-index: 10000;
	max-width: calc(100vw - 32px);
    border: 1px solid var(--line);
	padding: 6px 12px;
	background: var(--bgT);
	font-size: 14px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s, transform 0.2s;
}

#sortHint.show {
	opacity: 1;
	transform: translate(-50%, -100%);
}

/* the level links above the class growths (Charioteer, Elephant Rider) */
.tierLinks {
	margin: 4px 0 2px;
    display: flex;
    gap: 4px;
}

.tierLinks a {
	cursor: pointer;
}

.tierLinks a.on,
.scPlanBtn.on {
    text-shadow: var(--glow);
    background: #60593e5c !important;
    border: 1px solid var(--line);
}

.idPic {
	display: block;
    max-width: min(calc(100% - 10px), 300px);
	height: auto; /* (with the width and height attributes: the height follows the width, the proportions stay) */
	margin: 8px auto 0;
	border: 1px solid var(--line);
    background-color: #1c2d30;
	padding: 4px;
}

.supportPairedNote {
	white-space: nowrap;
}

.hrt {
    margin: 1px 2px 1px 3px;
	vertical-align: middle;
    height: 20px;
    width: 20px;
    color: var(--acc);
}
/* the requirements (items, coin flip, paralogue): after the paths, below a divider line */
.rcCont small.rcItems {
	display: block;
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px solid var(--line);
}

.rcCont small:has(+ .rcItems) {
	display: block;
}

/* the Boons tab: the skill icons centered */
.boonCol {
	text-align: center;
}

/** Tab sizes*/
@media screen and (max-width: 600px) {
	/* the tabs as a grid of thirds */
	#cmn .mTabList {
		display: flex;
		flex-wrap: wrap;
		max-width: none !important;
    	justify-content: flex-start;
        margin: 0 calc(0.2em + -1 * (var(--mhLine) - 1vw)) 0 0.2em; /* (under the title: the room for the close button is not needed) */
	}

	#cmn .mTabList>a {
		display: flex;
		margin: 0;
		flex-basis: 33.3333%;
    	justify-content: flex-start;
	}
	/* more tabs than fit in one row of thirds: the list is a block of its own under the title (its width in thirds is not known when the row is
	   filled, so it would be squeezed next to the title and wrap there) */
	#cmn .mTabList:has(> a:nth-child(4)) {
		flex-basis: 100%;
	}
	/* the sort bar and search always have a line of their own, centered on the whole header (the right margin takes back the room kept for the close button) */
	#cmn .mTools {
		flex-basis: 100%;
		margin-right: calc(-1 * (var(--mhLine) - 1vw));
	}

	#cmp.modalfastest thead {
    	display: none;
	}
	

	#cmp.modalfastest th {
    	display: none;
	}

	#cmp.modalfastest td {
    	grid-column: span 4;
	}

	.fastPath {
		display: block;
	}
}

@media screen and (max-width: 450px) {
	#mtb .pk {
		margin: 0 calc(-0.3 * var(--capW)) !important;
	}

	#mtb {
		margin-right: calc(-1vw - var(--tabH));
	}
}

@media screen and (max-width: 400px) {
	#cmn .mTabList>a {
		flex-basis: 50%;
	}
}

@media screen and (max-width: 300px) {
	#cmn .mTabList>a {
		flex-basis: 100%;
	}
}



table.gambitArea {
    width: auto;
}

html body table.gambitArea tr > td {
    padding: 0 !important;
    width: 10px !important;
    height: 10px !important;
    border: 0 !important;
	color: var(--mut) !important;
    line-height: 0 !important;
	padding: 1px !important;
    border: 1px solid var(--line) !important;
	box-sizing: content-box !important;
}

table.gambitArea tr {
    display: table-row !important;
}

/* a learnset entry's requirement (Lv. 45) after its name, inside its link */
.skNote {
	color: var(--mut);
	font-size: 0.8em;
	margin-left: 3px;
	white-space: nowrap;
}

/* the item popup's map picture (the map cropped to where the item is, a red dot on each place), beside its How to get list */
.idMapShot {
	float: right;
	margin-left: 6px;
	margin-bottom: 6px;
	margin-top: 10px;
}
.idMapShot img {
	display: block;
	width: 120px;
	height: 120px;
	background: #14282e;
    border: 1px solid var(--line);
    background-color: #1c2d30;
    padding: 4px;
}

/* a gambit's attack pattern picture in the popups (worker/gambit-images.js): sized by its width/height, 19 px a cell */
.idArea .gambitImg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* the Items list's All tab: a tile for each category with its number of items, the searches inside it under the tile (app.js renderItemOverview) */
.catGrid { 
	display: grid; 
	grid-template-columns: repeat(auto-fill, minmax(max(calc(25% - 10px), min(360px, 100%)), 1fr)); 
	gap: 6px; padding: 6px 6px 0; }
.catGrid[hidden] { display: none; }
.catGroup { 
	display: flex; flex-direction: column; gap: 4px; 
    padding: 4px;
	 position: relative; }
.catTile {
	display: flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	color: var(--text);
	text-decoration: none;
	/* the style of the map's tabs (#lmn .pk): a box, lighter when hovered or focused (the link covers the whole tile, so hovering the tile) */
	border: 2px solid var(--boxLine);
	background-color: #192d34;
	border-radius: 0;
	padding: 4px;
}
.catTile:hover, .catTile:focus-visible { background-color: #3b453a; border-color: #60593e; outline: none; }
.catTile .si { width: 24px; height: 24px; margin: 0; flex: none; object-fit: contain; }
.catTile small { color: var(--mut); font-size: 12px; margin-left: auto; }
.catSubs {
	display: flex; 
	flex-wrap: wrap; 
	margin-top: 2px;
	position: relative; z-index: 1;
    pointer-events: none;
    margin-left: -2px;
    margin-right: -2px; }
/* a type tile: the link is the wrapper (2px of padding, which is the space between tiles), the box inside it is what is drawn */
a.catSub {
    min-width: 50%;
    box-sizing: border-box;
    padding: 2px;
    color: var(--text);
    text-decoration: none;
    pointer-events: all;
}
a.catSub:focus-visible { outline: none; }
/* the box inside the link: a thin bordered box, lighter when hovered or selected (the count at its right end) */
.catSubIn {
	display: flex;
	align-items: center;
    align-content: center;
	height: 100%;
	box-sizing: border-box;
	border: 1px solid var(--line);
	padding: 1px 6px;
	line-height: 20px;
	font-size: 14px;
	white-space: nowrap;
}
.catSub:hover .catSubIn, .catSub:focus-visible .catSubIn, .catSub.on .catSubIn { background: var(--sel); }
.catSub small { color: var(--mut); margin-left: auto; padding-left: 8px; } /* (the box is a flex row now: the space before the count is a margin) */


.catSub .si {
    width: 18px;
    height: 18px;
    margin: 0 3px 0 0;
    object-fit: contain;
    vertical-align: top !important;
    line-height: 100%;
    margin-left: -4px;
	margin-right: 6px;
}
/* breadcrumb tab line (Items: All items -> Ores) */
.crumbSep { flex: none; margin: 0 6px; align-self: center; }
.modalTitle .crumbLink { pointer-events: auto; } /* (the Items link in the title is a tab: the selected tab's style, #cmn a.pk.cn.on[data-view]) */

.catOpts {
    padding: 6px;
    pointer-events: auto;
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 200px), 1fr));
    box-sizing: border-box;
    max-width: 100%;
}

.catOpts .catSubIn {
    border: 2px solid var(--boxLine);
    background-color: #192d34;
    font-size: 14px;
    line-height: 24px;
    overflow: hidden;
}

.catOpts .catSubIn .si {
    margin-left: -1px;
    margin-right: 4px;
}

#lmd>.divider {
    height: 6px;
}

.lmSec>.divider {
    height: 3px;
    margin-bottom: 4px;
}
/* item list view (Tiles / List toggle, app.js renderItemTiles): the same tiles laid out as table rows on shared columns */
.itView { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; }
.itHdr { display: none; } /* the list view's header: a table header like the modals' (#cmc thead / th) */
.itBtns { display: inline-flex; border: 1px solid var(--line); }
.itBtns button { all: unset; box-sizing: border-box; cursor: pointer; padding: 3px 12px; font-size: 13px; color: var(--mut); }
.itBtns button + button { border-left: 1px solid var(--line); }
.itBtns button:hover, .itBtns button:focus-visible { background: var(--sel); color: var(--text); }
.itBtns button[aria-pressed="true"] { background: var(--sel); color: var(--text); }
.itCell { display: none; }
@media screen and (min-width: 701px) {
	.itg.itl { grid-template-columns: minmax(170px, 1.2fr) repeat(var(--ic), minmax(56px, .5fr)) minmax(200px, 2fr) minmax(150px, 1fr); gap: 0; }
	.itl .itHdr { display: contents; }
	.itl .itHdr thead, .itl .itHdr tr { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
	.itl .itHdr th { display: block; }
	.itl .itile { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: start; gap: 0; border-width: 0 0 1px; padding: 0; }
	.itl .itile .itMain { display: grid; grid-template-columns: subgrid; grid-column: 1 / calc(var(--ic) + 3); align-items: start; gap: 0; }
	.itl .itile .itMain > * { padding: 6px 10px; }
	.itl .itile .itMain .itHead { grid-column: 1; }
	.itl .itile .itMain .itSub { display: none; }
	.itl .itile .itMain .itCell { display: block; grid-column: calc(var(--n) + 2); }
	.itl .itile .itMain .itDetail { grid-column: calc(var(--ic) + 2); margin-top: 0; }
	.itl .itile .itMain .idArea { grid-column: calc(var(--ic) + 2); }
	.itl .itile .itLocs { grid-column: calc(var(--ic) + 3); margin-top: 0; padding: 6px 10px; }
}
@media screen and (max-width: 700px) {
	.itl.itg { grid-template-columns: 1fr; }
}

/* a skill list row's details (app.js skillRowDetail), shown by the button at the end of the list */
.sk li .skDet { flex: 1 0 100%; padding: 2px 8px; padding-top: 0; padding-right: 0;}
.sk li .skDet[hidden] { display: none; }
.sk li .skDet .idText { margin: 0; font-size: 0.9em; 
    padding-bottom: 2px;}
.skExpand { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 2px; font-size: 13px; line-height: 1.4; cursor: pointer; background: transparent; 
	padding-right: 6px;
    color: var(--textDark); border: 1px solid var(--line); }
.skExpand:hover, .skExpand:focus-visible { background: var(--sel); }
.skExpand svg { width: 12px; height: 16px; fill: currentColor; flex: none; }
.skExpand .less, .skExpand[aria-expanded="true"] .more { display: none; }
.skExpand[aria-expanded="true"] .less { display: inline; }

.skDet .idStats span {
    flex-direction: row;
	min-width: auto;
    border: 0;
    background: transparent;
}

.skDet .idStats span:first-child {
    padding-left: 0;
}

.skDet .idStats span:last-child {
    padding-right: 0;
}

.skDet .idStats span>small {
    margin-right: 5px;
	line-height: normal;
}

.skDet .idStats {
    margin: 0;
}

/* the one button for all the lists: stays in view at the right of the first list's header while scrolling */
.skExpandBar { position: relative; top: 12px; right: -8px; z-index: 3; height: 0; display: flex; justify-content: flex-end; padding-right: 10px; pointer-events: none; }
.skExpandBar .skExpand { pointer-events: auto; height: 22px;}
/* a support that has a paired ending (A+): app.js renderSupportsTable */
.pairMark { color: #f0b9c4; white-space: nowrap; }
.likeNote {
	color: rgb(255, 71, 71);
	margin-left: 4px;
}
.giftContainer svg {
	height: 1em;
    vertical-align: top;
}
.giftContainer path {
	fill: currentColor;
}
.pairMark small { color: inherit; }

@media screen and (max-width: 600px) { .pairMark small { display: none; } }
.pairToggle {
	 margin: 2px 8px 2px 0;
	 padding: 8px 12px;
	 cursor: pointer;
	 color: var(--text);
	 border: 1px solid var(--line); 
}

.pairToggle::before {
	display: none;
}
.pairToggle:hover,
.giftList .pk:hover,
.pairToggle:focus-visible,
.giftList .pk:focus-visible,
.foodItem:hover {
	background: var(--sel);
}
/* the Stat calculator tab (app.js renderStatCalculator, hidden by STAT_CALC_TAB) */
#scb[hidden] { display: none; }
.statCalc select,
.buildPage select {
    width: auto;
	color: inherit;
	margin-right: 1px;
    height: 31px;
    padding: 2px;
	text-align: right;
}

select::-webkit-scrollbar {
  width: 4px;
}

select::-webkit-scrollbar-track {
  background-color: transparent;
  border: 0;
}

select::-webkit-scrollbar-thumb {
  background-color: #8a7f6c;
  border: 0;
}

.statCalc .scTop { margin: 4px 0 10px; }
.scTable th, .scTable td { text-align: center; padding: 3px 4px; }
.scTable tbody th { text-align: left; white-space: nowrap; }
.scIn {
	margin-right: 1px;
    height: 31px;
    width: 31px;
	padding: 0;
	 text-align: center; background: transparent; color: inherit; border: 1px solid var(--line); font: inherit; }
.scLv { font: inherit; 
}
.scConclusion { margin: 10px 0 4px; }
.scNext:empty { display: none; }
.scNext { margin: 4px 0; }
.scNote { margin: 4px 0 10px; padding: 6px 8px; border: 1px solid var(--line); }
.scNote:not(.reclassNote) {
    margin-top: 30px;
}
.scNote b { color: var(--text); }
/* the Stat calculator's up / down buttons and class lists (app.js statCalcStepper, .scDd) */
.scNum { display: inline-flex; align-items: center; vertical-align: middle;
    margin: 1px 2px; }
.scStepBtns { display: inline-flex; flex-direction: column; }
.scStep { font-size: 8px; line-height: 1; padding: 0; color: inherit; background: transparent; border: 1px solid var(--line); cursor: pointer;
    width: 19px;
    height: 15px; }
.scStep:last-child {
	margin-top: 1px;
}
.scStep:hover, .scStep:focus-visible { background: var(--sel); outline: none; }
.scIn { -moz-appearance: textfield; appearance: textfield; }
/* the entered stats' reset button, after the total (app.js renderStatCalculator) */
.scReset[hidden] { display: none; }
.scReset { width: 16px; height: 24px; padding: 0; margin-left: 4px; line-height: 1; flex: none; }
/* (shown: the same room on the total's left, the button's width and margin, so the total stays centred; the line's gap is on both sides) */
.scLine:has(> .scReset:not([hidden]))::before { content: ""; flex: none; width: 22px; }
.scIn::-webkit-inner-spin-button, .scIn::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.scDd { position: relative; display: inline-block; 
    vertical-align: text-bottom; }
.scDdBtn {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    vertical-align: text-bottom;
    border: 1px solid var(--line);
    padding-right: 4px;
    margin-right: 2px;
    padding-left: 0;
}

.scDd .ci.mi {
    margin-right: 3px;
    height: 1.3em;
    margin-left: 2px;
}

.scGrid:not(.scInputs) .scLine {
    border-bottom: 1px solid var(--line);
    /* (one height in every cell, the label one too, so the borders line up: with height: 100% they shrank unevenly, the Difference box being taller than the text) */
    height: 1.4em;
    flex: none;
}

.scLine .ci {
    pointer-events: none;
    margin-right: -8px !important;
    margin-top: -1px !important;
}

span.classPicker {
    display: flex;
    margin: 2px 0;
    gap: 4px 8px;
    justify-content: space-between;
    align-items: center;
}

span.scPath {
    display: block;
    width: fit-content;
}

.scDd .ci { height: 1.4em; width: auto; vertical-align: middle; margin-right: 0; }
.scDdBtn>.ci { margin-left: 0;}
.scDdList { box-sizing: border-box; position: absolute; z-index: 30; left: 0; top: 100%; display: block; min-width: 100%; max-height: 280px; overflow: auto; margin: 2px 0 0; padding: 2px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); }
.scDdList[hidden] { display: none; }
.scDdList .scOpt { display: flex; align-items: center; gap: 6px; padding: 3px 8px; white-space: nowrap; cursor: pointer; }
.scDdList .scOpt:hover, .scDdList .scOpt.on { background: var(--sel); }
.scDdList .scOpt:focus { background: var(--sel); outline: 1px solid var(--text); outline-offset: -1px; }
/* the reclass suggestions: a box for each tier (or the recruitment level), in a row that wraps (app.js statCalcSugGroups) */
.scSugGroups { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; }

@media screen and (max-width: 1000px) {
	.scSugGroups { gap: 8px 9px; }
}
.scSugHead { margin-bottom: 2px; 
    border-bottom: 1px solid var(--line);
    padding-bottom: 3px;
}
	.reclassHeader {
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1px;
    width: fit-content;
    margin-top: 8px;
	}
.scSug { display: block;}
.scSug .ci { height: 1.4em; width: auto; vertical-align: middle; margin-right: 2px; }
/* the description under an ability in the Characters list's Abilities tab (app.js abilityCell) */
.abilityDesc { display: block; color: var(--mut); line-height: 1.25; }
#cmc .abilityColumn > div { margin-bottom: 4px; }
#cmc .abilityColumn > div:last-child {
    margin-bottom: 0;
}

.abilityColumn .abilityDescription {
    border-bottom: 0;
}

.statCalc *:not(.scOpt):not(button)>.ci,
.scDd *:not(.scOpt):not(button)>.ci {
    margin: 0;
	margin-right: 3px;
	margin-left: -1px;
}
/* the Stat calculator's grid: a cell per stat (expected, typed, difference), as many to a row as fit */
.scGrid { 
    flex-wrap: wrap;
    display: flex; gap: 2px 0; margin: 8px 0; }
.scCell { display: flex; flex-direction: column; gap: 3px; }
/* the header cells (HP, Str, ...): as the support table's, a framed box */
.scHead { position: relative; isolation: isolate; display: block; padding: 4px 8px; font-weight: normal; text-align: center; white-space: nowrap; user-select: none;}
.scHead::before { content: ""; position: absolute; inset: 2px; border: 2px #39484f solid; background-color: #192d34; box-sizing: border-box; z-index: -1; }
.scLine { display: flex; justify-content: center; align-items: center; gap: 6px; height: 100%; }
.scLabels .scLine { justify-content: flex-start; }
.scLabels .scHead { visibility: hidden; } /* (the empty header of the label box: it only keeps the lines level with the others) */
.scLine small { color: var(--mut); }
.scExp, .scTyped, .scTypedW, .scFut { min-width: 2em; text-align: center; }
.scDiff, .scYours { min-width: 2.6em; text-align: center; } /* (Yours: shaded as its difference, app.js statCalcShade) */
.lmFound li { flex-wrap: wrap; }
.lmFound li .acqTrade { flex-basis: 100%; }
.lmWrongPath {
    flex-basis: calc(100% + 16px);
    color: #ffe8c4;
    background-color: rgba(255, 0, 0, 0.3);
    padding: 2px 5px;
    margin: 0 -8px;
}
.lmWrongPathT {font-weight: bold;}.idText.idUpgrade { margin-top: 0; }
/* the Battalions modal: the gambit's attack pattern floats right in its column */
.gmFloat { float: right; margin: 0 0 2px 6px; }
/* the builder tab: the sheet shows the typed stats (app.js builderStatsSync), without the growth bars */
body.builder #gt td { background: none !important; }
.tilebt .si { height: 1.2em; margin-right: 4px; }
/* the arrow that says the class button opens a list */
.scDdBtn::after { content: "\25be"; }
/* How to get (beside the map picture): its text runs on under the picture when the section is taller, instead of staying in a column next to it */
.idSec[data-sec="acquire"] { display: block; }
/* the correction editor (?bugReport=on, bugreport.js): the "Report a problem" button at the end of a character page's tab, and its form */
.bugReportP { margin: 14px 0 6px; text-align: right; margin-bottom: 0; padding-right: 0 !important;;
    display: inline-block;
    width: 100%;}
.brPanel { display: flex; flex-direction: column; gap: 10px; }
.brPanel h3, .brPanel h4 { margin: 0; font-weight: normal; }
.brPanel h3 { font-size: 16px; }
.brPanel input {
	width: auto;
}
.brPanel textarea, .brPanel input:not([type="checkbox"]), .brPanel select { font: inherit; color: var(--text); background: #14282e; border: 1px solid var(--boxLine); padding: 4px 6px; max-width: 100%; width: auto; }
.brPanel textarea { width: 100%; box-sizing: border-box; }
.brLabel, .brNotes, .brGrid label { display: flex; flex-direction: column; gap: 3px; }
.brLabel small { color: var(--mut); }
.brList { display: flex; gap: 4px; 
    flex-wrap: wrap;}
.brRow { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border: 1px solid var(--line); background: var(--card2); width: 22em;}
.brRow.brNew { border-color: #6fbf73; }
.brName, .brPrompt { flex: 1; min-width: 0; }
.brBird { align-items: flex-start; }
.brRow input[data-e="n"] { width: 12em; }
.brRow input[data-e="note"] { flex: 1; min-width: 8em; }
.brRoute { border: 1px solid var(--line); margin: 0; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
.brRoute legend { padding: 0 4px; }
.brGrid { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.brGrid input { width: 11em; }
.brGrid input[type="number"] { width: 5em; }
.brChk { display: flex; align-items: center; gap: 6px; }
.brAdd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 4px; }
.brAdd textarea { flex-basis: 100%; }
.brActs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.brMsg { color: var(--mut); }
.brRank { display: flex; flex-direction: column; gap: 3px; }
.brRank input[data-r] { width: 15em; }

/* the Arts list's Show upgraded: the values the upgrade changes (as in the popup's upgrade table) */
#cmc td.artUp {
	color: #9fe0a0;
}

/* the liked gifts tab (gift_d.js): the Part I / Part III buttons, the dislikes line, the favourite meals, temples and plays */
/* the Part I / Part III links: the level links' style (.tierLinks) */
.giftContainer .tierLinks {
	margin: 0 0 10px;
}

.giftBtn {
	padding: 4px 6px;
	text-decoration: none;
}

/* a gift button with its points inside, on the right */
.giftBtn.hasPts {
	display: flex;
	align-items: center;
}

.giftBtn .giftName {
	flex: 1;
	min-width: 0;
}
.giftBtn .giftPts {
	margin-left: auto;
	padding-left: 10px;
	color: color-mix(in srgb, #5edc7a var(--g, 0%), var(--mut)); /* the muted colour at 50 points, full green at 200 (--g, set by app.js itemButton) */
	max-height: none !important;
}
.giftDislikes,
.giftExtra {
	margin: 10px 0 0;
	color: var(--mut);
}
.giftDislikes b,
.giftExtra b {
	color: inherit;
	font-weight: bold;
	margin-right: 4px;
	color: var(--text);
}

.giftExtras {
	margin-top: 6px;
}

.giftDislikes .lmItem {
    vertical-align: baseline;
}

/* the meals' header pictures (Great / Good / Bad) and the food pictures under them (the liked gifts page) */
.foodHdr {
    display: block;
    height: 40px;
    width: auto;
    margin: 0;
    margin-bottom: -15px;
    z-index: 1;
    position: relative;
}
.idSec .foodHdr {
	margin-bottom: -9px;
}
.foodSect {
	margin-top: 16px;
}
.foodList {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}
.foodItem {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 120px;
	text-align: center;
	text-decoration: none;
    border: 1px solid var(--line);
    background: var(--bgT);
	padding: 4px;
}


.foodItem .foodHdr {
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: contain;
    height: auto;
    margin-bottom: -16px;
    height: 40px;
    width: auto;
}

.foodItem img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
}

.foodItem span {
    margin-top: -16px;
}

.giftHdr {
	display: block;
	height: 1.8em;
	width: auto;
    border: 1px solid var(--line);
}
.idSec .giftHdr {
	margin-bottom: -1px;
    height: 2em;
}
/* the points a gift adds to a character's support, inside the character icon (the gift popup) */
a.lr .lrPts {
    position: absolute;
    right: -6px;
    top: -2px;
    padding: 0 3px;
    color: color-mix(in srgb, #5edc7a var(--g, 0%), var(--mut)); /* muted at 50 points, full green at 200, as on the gift buttons */
    font-size: 10px;
    line-height: 1.35;
    text-decoration: none;
    pointer-events: none;
    filter: drop-shadow(0px 0px 1px black) drop-shadow(1px 1px 1px black);
}

/* the build creator at the top of the builder: the Create a build button, then the inventory, abilities and arts */
.bcCreateP {
	margin: 0 0 12px;
}

/* "Create a build": as the paired endings button (.pairToggle.bt): its background, border and hover */
.pk.bcCreate,
.pk.scPlanBtn {
    font-weight: bold;
	background: var(--bgT);
	border: 1px solid var(--line);
	padding: 8px 12px;
	color: var(--text);
	text-decoration: none; /* (a link) */
	display: inline-block;
}

.pk.scPlanBtn {
    font-weight: normal;
}

.pk.bcCreate:hover,
.pk.scPlanBtn:hover,
.pk.bcCreate:focus-visible,
.pk.scPlanBtn:focus-visible {
	background: var(--sel);
}

.buildPage .bcRow .si:not([alt="Scroll"]) {
	width: 1.4em;
	height: 1.4em;
}


.buildPage .bcRow .si[alt="Scroll"] {
	margin-left: 3px;
	width: 1em;
	height: 1em;
}

.bcRow,
.bcOpt {
    display: flex;
    gap: 4px;
    width: 100%;
    margin: 0 0 4px;
    padding: 4px;
    text-align: left;
    color: var(--text);
    font: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    box-sizing: border-box;
    border-bottom: 1px solid var(--line);
    align-items: center;
    padding-top: 0;
}

.bcRow:hover,
.bcOpt:hover,
.bcOpt.on { /* (.on: the entry the keys highlight in a list search, app.js) */
	border-color: var(--text);
}

.bcEmpty {
	color: var(--mut);
	font-style: italic;
}

.bcRow small,
.bcOpt small {
	color: var(--mut);
}

.bcTag {
	padding: 0 6px;
	border: 1px solid var(--line);
	border-radius: 99em;
}

/* an equipped item or spell on the build page (app.js bcEqIcon): images/equipped.png over the top left corner of its icon */
.bcEqIc {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
}

.bcEqMark {
    position: absolute;
    left: -0.33333em;
    top: -0.33333em;
    width: 1em;
    height: 1em;
    margin: 0;
    pointer-events: none;
}

.buildPage .namedAbility small {
    display: none;
}

.buildPage .lmItem {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
    display: block;
}

.scSum .scLine {
    gap: 0;
}

.bcFade {
    color: #cacaca;
}

.bcFade>* {
    filter: brightness(0.5) contrast(1.2) grayscale(0.6);
}

.bcPick {
    margin: 0 0 8px;
    padding: 4px;
    background: #121b1e;
    border: 2px solid var(--boxLine);
    margin-top: -5px;
}

.bcSearch {
	width: 100%;
	margin: 0 0 6px;
}

/* the list's top: the search box and the close button (app.js renderBuildCreator opts; the look of the other close buttons) */
.bcPickHead {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 6px;
}
.bcPickHead .bcSearch {
	flex: 1;
	min-width: 0;
	margin: 0;
	height: 28px; /* (the close button's) */
	box-sizing: border-box;
}
.bcClose {
	position: relative;
	flex: none;
	width: 28px;
	height: 28px;
	padding: 0;
	margin-left: auto;
}
.bcClose::before {
	inset: 0;
}

.bcOpts {
	max-height: 260px;
	overflow-y: auto;
}

.bcOpt[hidden] {
	display: none;
}

.bcMenu {
	display: flex;
	gap: 6px;
	margin: 0 0 6px;
}

.bcFixed {
	cursor: default;
}

.bcFixed:hover {
	border-color: var(--line);
}

.bcUses {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
    width: 4em;
    text-align: right;
}
/* a row's icon, name and requirement together (app.js renderBuildCreator: the inventory and the spells), the effectiveness and uses after it */
.bcLabel {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 70%;
}

.bcRow>.bcLabel {
    min-width: min-content;
	flex-basis: 70%;
    max-width: 100%;
}
/* a weapon's or spell's effectiveness icons (app.js renderBuildCreator eff / spellEff): on the right, just before its uses */
.bcEff {
	display: inline-flex;
	align-items: center;
	gap: 2px;
    margin-right: auto;
}
.bcEff + .bcUses {
	margin-left: 8px;
}

/* the build page: the items and spells on the left, the abilities and arts on the right (one column on a narrow screen) */
.bcCols {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 20px;
	align-items: start;
}

/* one column (a narrow page, the small portrait view): the two groups' boxes in one list, the spells and the bloodmark (.bcLate) after the abilities */
@media (max-width: 700px) {
	.bcCols {
		grid-template-columns: minmax(0, 1fr);
	}
	.bcCols .abGrp {
		display: contents;
	}
	.bcCols .ab.bcLate {
		order: 1;
	}

	.bcCols .ab {
		margin-bottom: 4px;
	}
}

.levelContainer {
	display: flex;
	gap: 2px;
	flex-direction: column;
	margin-right: 8px;
    justify-content: space-between;
}

.levelContainer>span {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.bcLevel {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
    flex-wrap: wrap;
}

/* the rows that cannot be changed open their popup */
.bcFixed[data-item] {
	cursor: pointer;
}

.bcFixed[data-item]:hover {
	border-color: var(--text);
}

/* the buttons at the top of the popup opened from the build page */
.bcPopupBar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px;
}

/* the rows of the modals' tables that open an item (app.js rowItemLink): the row is a link as a whole, a light gold overlay on hover */
#cmc tbody tr:is(:has(> :first-child a[data-item]), :has(> :first-child [data-ch]), :has(> [data-ch]:first-child)):not(.itile *) { cursor: pointer; }
@media (hover: hover) {
	#cmc tbody tr:is(:has(> :first-child a[data-item]), :has(> :first-child [data-ch]), :has(> [data-ch]:first-child)):hover > td {
		box-shadow: inset 0 0 0 100vmax rgba(212, 175, 55, 0.05);
	}
}
#cmc table[hidden] { display: none !important; }
/* equipment: the stats line is for the small views (the table has a column for each stat) */
td.equipDetail, th.equipDetail { display: none; }
/* the numbers of the stats line: regular text (the small line around them is smaller and muted) */
.equipNum { font-size: calc(1em / 0.9); color: var(--fg); }
/* a stat of the stats line: a box of its own, coloured like the column's cells (the style comes from the cell) */
.equipChip { display: inline-block; margin: 0 4px 2px 0; padding: 0 6px; }

/* the "More" menu of the compare buttons (index.html #moreMenu, app.js moreMenu) */
.moreMenu {
	position: fixed;
	z-index: 10;
	display: flex;
	flex-direction: column;
	min-width: 9em;
	padding: 3px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
    background: var(--bg);
    border: 1px solid var(--line);
}
.moreMenu[hidden] { display: none; }
.moreMenu a {
	padding: 6px;
	color: var(--text);
	font-size: 15px;
	text-decoration: none;
	white-space: nowrap;
}
.moreMenu a:hover,
.moreMenu a:focus-visible {
	background: #3b453a;
	outline: none;
}

/* the "More" button: a drop-down arrow (an svg in the button, in its text colour) after its name; it points up while the menu is open. Its glow is
   the button's: the text-shadow of the text, as drop-shadows (the same on the small screens' buttons, which only glow on hover) */
#mrb .moreArrow {
	display: inline-block;
	width: 0.6em;
	height: 0.36em;
	margin-left: 0.4em;
	vertical-align: middle;
	filter: drop-shadow(0 0 2px #cab99d) drop-shadow(0 0 5px #cab99d);
}
#mrb.open .moreArrow {
	transform: rotate(180deg);
}
@media screen and (max-width: 1000px) and (min-aspect-ratio: 205 / 100), screen and (max-width: 600px) and (orientation: portrait) and (max-aspect-ratio: 5 / 6) {
	#mrb .moreArrow {
		filter: none;
	}
	#mrb:hover .moreArrow,
	#mrb:focus .moreArrow {
		filter: drop-shadow(0 0 2px #cab99d) drop-shadow(0 0 5px #cab99d);
	}
}

/* the icons of the compare buttons and of the More menu (index.html .cbIcon) */
.cbIcon {
	height: 1.25em;
	width: 1.25em;
	object-fit: contain;
	margin-right: 0.3em;
    vertical-align: text-top;
}
.cbDots {
	height: 0.4em;
	width: 1.1em;
}
.moreMenu a .cbIcon {
	margin-right: 0.6em;
}

/* the characters' Ability finder tab (app.js renderModalFinder): the conditions on top, the matching characters under them */
.finder {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 8px 4px 6px;
}
.finderRow {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	max-width: 36em;
}
.finderRow select[data-fk="t"] {
	flex: 0 0 9.5em;
	width: 9.5em;
}
.finderRow [data-fk="v"] {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
}
/* a search field like the modal's (#cms: input[type="search"]), as wide as the row; its looking glass is .finderIc, which becomes the ability's icon */
.finderRow input[data-fk="v"] {
	max-width: none;
	background-image: none;
	/* as tall as the remove button beside it (.finderX): the row stretches it, its own padding and min-height no taller */
	align-self: stretch;
	min-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	box-sizing: border-box;
    font-size: 16px;
    line-height: normal;
	border-color: #39484f; /* (as .finder .pk; focused, the search fields' #60593e) */
}
/* the icon at the start of the field: the ability's, else the looking glass (app.js finderSetIcon) */
.finderIc {
	position: absolute;
	left: 0.3em;
	top: 50%;
	transform: translateY(-50%);
	width: 1.25em;
	height: 1.25em;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 1;
}
.finderIc:empty {
	background: var(--searchGlass) center / 1em no-repeat;
}
.finderIc img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
}
.finderBtns {
	display: flex;
	gap: 6px;
	margin-top: 2px;
}
.finder .pk {
	padding: 6px 10px;
	border: 2px solid #39484f;
	background-color: #192d34;
	color: inherit;
	cursor: pointer;
}
.finder .pk:hover {
	background-color: #3b453a;
	border-color: #60593e;
}
.finder .finderX {
	padding: 4px 9px;
}
.finderHint,
.finderCount {
	margin: 8px 4px;
	color: var(--mut);
}
/* the rows are grids on smaller screens: the character on a line of its own, the matched abilities as wide as fit beside each other under it */
@media screen and (max-width: 1100px) {
	#cmp.modalabilityfinder tr {
		grid-template-columns: repeat(auto-fit, minmax(13em, 1fr));
	}
	#cmp.modalabilityfinder tr > .finderChar {
		grid-column: 1 / -1;
	}
	#cmp.modalabilityfinder tr > .finderCell {
		grid-column: auto;
	}
}

/* the finder's results: a tile for each character (the face, the name, then what matched) */
.finderTiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
	gap: 8px;
	padding: 4px;
}
.finderTile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 8px 6px;
	border: 2px solid #39484f;
	background-color: #192d34;
	text-align: center;
	min-width: 0;
}

.modalabilityfinder .mb {
    min-height: 100%;
}

/* the Ability finder has its own fields: no modal search box (app.js filterModalContent ignores it there) */
#cmp.modalabilityfinder #cms {
	display: none;
}

.modalabilityfinder #cmc {
    flex: 1;
}

.finderTile a {
	text-decoration: none;
}

.finderTile[hidden] {
	display: none;
}
.finderHas {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 13px;
}
.finderBoon {
	display: flex;
	align-items: center;
	gap: 4px;
	background-color: rgba(255, 217, 0, 0.08);
	padding: 1px 6px;
}

/* the boon buttons: one with the boon icon for each skill, lit while that boon is a condition */
.finderBtns {
	flex-wrap: wrap;
}
.finder .finderBoonBtn {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 7px 3px 6px;
}
.finder .finderBoonBtn.on {
	background-color: #5a4a12;
	border-color: #c8a52a;
}

/* the whole finder tile opens the character: the name's link covers it, the links of what matched stay above that */
.finderTile {
	position: relative;
	cursor: pointer;
}
.finderTile:hover {
	background-color: #3b453a;
	border-color: #60593e;
}
.finderTile > b a::after {
	content: '';
	position: absolute;
	inset: 0;
}
.finderTile .finderHas a {
	position: relative;
	z-index: 1;
}

/* the ability suggestions under a finder field (icon, name, kind) */
.finderRow {
	position: relative;
}
.finderSuggest {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 20;
	max-height: 18em;
	overflow-y: auto;
	background-color: #11222a;
	border: 2px solid #39484f;
    margin-top: 4px;
}
.finderSuggest[hidden] {
	display: none;
}
.finderOpt {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 3px 8px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.finderOpt:hover,
.finderOpt.on {
	background-color: #3b453a;
}
.finderOpt small {
	margin-left: auto;
	color: var(--mut);
	white-space: nowrap;
}

/* the finder tiles' ability links: the icon stays in the line (not floated, as in the lists) */
.finderTile .arrowLink > :is(img, .sw):first-child {
	float: none;
}

/* a finder tile with a spoiler in it is blurred as a whole (app.js tagSpoilers): what is hidden inside it doesn't add its own blur */
.finderTile[data-spoil] [data-spoil]::after {
	display: none;
}
html:not(.sp2) .finderTile[data-spoil="2"][data-spoil-ch]::after,
html:not(.sp3) .finderTile[data-spoil="3"][data-spoil-ch]::after {
	-webkit-backdrop-filter: blur(8px) grayscale(0.8);
	backdrop-filter: blur(8px) grayscale(0.8);
}

/* the map's path tabs: the character's icon (the tab's background-image, map.js renderTabs) instead of "<Name>'s path" */
#lma .lmPathTab {
	min-width: 2.5em;
	height: 2em;
	padding: 0 0.4em;
	box-sizing: border-box;
    background-size: auto 100%;
	background-position: center top;
	background-repeat: no-repeat;
}

#lma .lmPathTab[data-area="Part 3"] {
    background-position: -0.4em top;
    padding-left: 2.4em;
}

#lma .lmPathTab.on {
	box-shadow: 0 0 0 2px #c8a52a;
    border-color: transparent;
    background-origin: border-box;
}

@media screen and (max-width: 1000px) {
	#bdb.pk {
		top: calc(32.6 * var(--vw));
        font-size: 12px;
		line-height: 100%;
	}
}

/* the Builder button on a small portrait screen: small, in the room under the spider chart (the narrow screen buttons are larger: .pk) */
@media screen and (max-width: 600px) and (orientation: portrait) and (max-aspect-ratio: 5 / 6) {
	/* (only on the abilities tab and the builder / build tabs, body.builder: the other tabs are one column, body.singleColumn, and cover where it is) */
	.singleColumn:not(.builder) #bdb {
		display: none;
	}

	.bcCreateP {
		margin: 8px;
		margin-left: 50%;
		margin-right: 0;
	}

	.pk.bcCreate {
		width: 100%;
	}
}

/* the builder and build tabs on a small portrait screen (app.js tabUpdate: body.splitColumns, as singleColumn): two columns as the abilities
   tab's, the side one (.bcSide: Create a build, or the level / recruitment / class path; the disclaimer at its bottom) where its ability column
   is, the rest (.bcMain) beside it. The page does not scroll, only .bcMain does: the left column stays where it is. Elsewhere they are one
   column, the side part on top. */
@media screen and (max-width: 600px) and (orientation: portrait) and (max-aspect-ratio: 5 / 6) {
	/* the build page's class path pickers: the tier above its class button */
	.buildPage span.classPicker {
		flex-direction: column;
		margin-bottom: 6px;
    	align-items: flex-start;
	}

	.splitColumns .mainWrapper {
		padding-top: calc(var(--vw) * 6);
	}

	.splitColumns .tabContainer {
		display: grid;
		grid-template-columns: calc(30.1 * var(--vw)) minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr) auto; /* (the side part, then the disclaimer; .bcMain beside both) */
		column-gap: 0; /* (the spacing as the abilities tab's: none on the container, the columns' own padding) */
		height: 100%;
		overflow: hidden;
		scrollbar-gutter: auto; /* (.tabContainer keeps room for a scrollbar, even not scrolling: the page would be that much narrower; .bcMain has its own) */
		margin-left: 0;
		width: 100%;
		background: none;
		padding: 0;
	}

	/* (the page's own box drops out: its two parts are the grid's items) */
	.splitColumns .tabContainer > .statCalc,
	.splitColumns .tabContainer > .buildPage {
		display: contents;
	}

	/* the left column, padded as .grid2 (the abilities tab's left column) */
	/* (it takes the room down to the disclaimer and scrolls when its content is taller: a short screen, a long class path) */
	.splitColumns .bcSide {
		grid-column: 1;
		grid-row: 1;
		margin-top: calc(var(--vw) * 24);
		padding-left: 16px;
		padding-right: 10px;
		min-height: 0;
		overflow-y: auto;
		overflow-x: hidden;
		scrollbar-width: thin;
	}

	/* (the build page: its side part starts lower) */
	.splitColumns .buildPage > .bcSide {
		margin-top: calc(var(--vw) * 40);
	}

	.splitColumns .tabContainer > #disclaimer {
		grid-column: 1;
		grid-row: 2;
		margin-top: 0;
		padding-left: calc(1 * var(--vw));
		padding-right: 10px;
	}

	/* the right column: the one that scrolls (padded as #lt, the abilities tab's right column) */
	.splitColumns .bcMain {
		grid-column: 2;
		grid-row: 1 / 3;
		padding: 0 8px 10px;
		box-sizing: border-box;
		min-height: 0;
		height: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		scrollbar-gutter: stable;
	}

	/* (the build page's two groups: one under the other in the narrow column) */
	.splitColumns .bcCols {
		grid-template-columns: minmax(0, 1fr);
	}
	.splitColumns .bcCols .abGrp {
		display: contents;
	}
	.splitColumns .bcCols .ab.bcLate {
		order: 1;
	}

	.splitColumns .bcLevel {
		flex-wrap: wrap;
	}
}

/* the builder tab (app.js renderStatCalculator): the side part (.bcSide: Create a build, the level and the stats) is the first row of the tab and does not scroll, the main part
   (.bcMain: the reclass finder and the growth calculator, the disclaimer at its end) below it is what scrolls. The tab itself does not scroll; its page box (.statCalc) drops out,
   as in the split columns */
.singleColumn.builder:not(.splitColumns) .tabContainer {
	overflow: hidden;
}
.singleColumn.builder:not(.splitColumns) .statCalc {
	display: contents;
}
.singleColumn.builder:not(.splitColumns) .bcSide {
	flex: none;
	margin-top: 12px; /* (what .tabContainer > :first-child had above the page) */
	position: relative;
	z-index: 2; /* (an open class list of it is over the main part) */
}
.singleColumn.builder:not(.splitColumns) .bcMain {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-gutter: stable;
}
@media screen and (max-width: 600px) and (orientation: portrait) and (max-aspect-ratio: 5 / 6) {
	.singleColumn.builder:not(.splitColumns) .bcSide {
		margin-top: 0; /* (its Create a build has its own margin here) */
	}
	.singleColumn.builder:not(.splitColumns) .bcMain {
    	background: #05171b;
	}
}
/* below 1100px, outside the small portrait layout: the tab scrolls as a whole, the side part with the rest */
@media screen and (max-width: 1099px) and (not ((max-width: 600px) and (orientation: portrait) and (max-aspect-ratio: 5 / 6))) {
	.singleColumn.builder:not(.splitColumns) .tabContainer {
		overflow-y: auto;
	}
	.singleColumn.builder:not(.splitColumns) .bcMain {
		flex: none;
		min-height: auto;
		overflow: visible;
		scrollbar-gutter: auto;
	}
}

/* the class at every level (app.js statCalcPlanHtml): a row for each level, scrolling */
.scPlanBox { margin: 6px 0; }

.scPlanBox .scPlanBtn:first-child {
    margin-right: 4px;
}

.scPlanWrap:not(.scResults) .gm { /* (the advanced mode table only: not the Yours / Expected / Difference one) */
    color: #f1f1f1;
    font-weight: bold;
}

.scPlanWrap { margin: 6px 0; border: 1px solid var(--line); max-width: 55em; }
.scPlan { border-collapse: collapse; width: 100%; }
.scPlan th, .scPlan td { padding: 2px; text-align: center; border-bottom: 1px solid var(--line); font-weight: normal; white-space: nowrap; }
.scPlan thead th { position: sticky; top: 0; z-index: 3; background: #192d34; }
.scPlan th.scPlanLv { text-align: left; }
.scPlan th.scPlanLv > * { vertical-align: middle; }
.scPlan th.scPlanLv .scDd { margin-right: 2px; }
.scPlan .scDdBtn { padding: 1px 2px; }
.scPlan .scDdBtn .ci { margin: 0; height: 1.5em; width: 1.5em; }
.scPlan tr.on { background: var(--sel); }
/* (an open class / mount list: the tab above the card's buttons (#bdb, z-index 2) while it is open, its own z-index only counts inside the tab) */
.tabContainer:has(.scDdList:not([hidden])) { z-index: 3; }
/* (fixed lists: a plan row's, and the split view's left column's: their own width, not the page's) */
.scDd[data-plan] .scDdList, .splitColumns .bcSide .scDdList { z-index: 60; width: max-content; min-width: 0; max-width: calc(100vw - 8px); box-sizing: border-box; }
.scPlan th.scPlanLv .scDd {
    margin-right: 2px;
}

/* the plan's levels before the recruitment level: shown, not selectable */
.scPlan tr.pre {
    color: var(--mut);
}
.scPlan tr.pre .scDd { padding: 0 2px; }

/* a mount's icon in the plan, in the colour of the mount (app.js STAT_CALC_MOUNT_COLOURS) */
.mTint { display: inline-block; line-height: 0; background: var(--mc); isolation: isolate; vertical-align: middle; border-radius: 3px; }
.scDdList .mTint,
.scDdList>*>.ci.mi {
	margin: -1px 0  -1px -6px !important;
}
.mTint .ci { mix-blend-mode: multiply; margin: 0 !important; vertical-align: top;}
.mTint.mWhite .ci { filter: brightness(1.15); }

.modeExplanation {
	display: inline-block;
	margin-left: 8px;
}

.scDdBtn .mi.off {
	opacity: 0.3;
}

.scPlan .scDdBtn .ci.mi {
    height: 1.3em;
    width: 1.3em;
}
/* the results (Yours, Expected, Difference, Future): the plan's table, the labels in the first column */
.scResults .scPlan th.scPlanLv { width: 1%; }
.scResults .scPlan td { height: 2em; }
.scResults .scPlan tr:last-child td, .scResults .scPlan tr:last-child th { border-bottom: 0; }

/* the item popup's text (#idc) and its picture (.idPicBox) side by side in #idw: the popup is wider when it has a picture; in portrait the picture goes under the text and #idw scrolls */
#idw { display: flex; flex-direction: row-reverse; align-items: stretch; min-height: 0; flex: 1 1 auto; overflow: hidden; }
#idw > #idc { flex: 1 1 0; min-width: 0; }
#idw > .idPicBox { flex: 0 0 auto; box-sizing: border-box; width: min(30%, 300px, calc((90vh - 75px) * var(--ar, 10) + 12px)); align-self: flex-start; max-width: max-content; /* (never larger than the picture itself) */ display: block; 
    padding: 4px 0 12px 12px;
	margin-right: -12px;
 } /* (the width follows the popup's height: --ar is the picture's width / height, from the data's imgRatio) */
#idw > .idPicBox .idPic { margin: 0 auto; max-width: min(100%, min(65vw, 65vh)); height: auto; box-sizing: border-box; }
#idp.hasPic .mb { width: min(820px, 100%); }

@media screen and (orientation: portrait), screen and (max-width: 700px) {
	#idp.hasPic .mb { width: min(560px, 100%); }
	#idp.hasPic #idw { flex-direction: column; align-items: stretch; overflow: auto; margin-bottom: 8px; }
	#idp.hasPic #idw > #idc { flex: 0 0 auto; overflow: visible; max-height: none; padding-bottom: 4px;}
	#idw > .idPicBox { flex: 0 0 auto; align-self: auto; width: auto !important; margin: auto; padding: 0 14px 6px 14px;}
	#idw > .idPicBox .idPic { height: auto; }
}

/* the item popup's picture in the text: in a wide view it is floated at the start of the text and the text flows around it (app.js adds the copy .idPicFloat);
   the box beside the text (.idPicBox) is the portrait view's, under the text (the opposite of the portrait media query above) */
.idPicFloat { display: none; }
@media screen and (orientation: landscape) and (min-width: 701px) {
	#idw > .idPicBox { display: none; }
	#idc > .idPicFloat { display: block; float: left; box-sizing: border-box; width: min(32%, 400px); margin: 10px 10px 8px 0; 
        aspect-ratio: var(--ar);}
	#idc > .idPicFloat .idPic { display: block; margin: 0; max-width: 100%; height: auto; box-sizing: border-box; }
}

/* the rating lists of a meal or a gift (.idRatings) stay one block next to the floated picture: all of them beside it, or all of them under it, never one of them
   wrapped around it and the others not */
.idRatings { display: flow-root; }

/* the first child of the text gets #idc>*:first-child's top margin; the floated picture (.idPicFloat, hidden in portrait) is the first child now, so the element after it gets it too */
#idc > .idPicFloat + * { margin-top: 10px; }

/* the popup's picture, large (app.js: a click on .idPic): over the popup, a click closes it */
#idp .idPic, .lmItemDetail .idPic { cursor: zoom-in; }
#idZoom { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; background: rgba(0, 0, 0, 0.82); cursor: zoom-out; }
#idZoom img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border: 1px solid var(--line); background: #142324; }

/* the vegetables, fish and meat lists (app.js renderModalFood): the name column wide enough for the icon and the longest name, the numbers narrow */
.foodName { min-width: 12em; white-space: nowrap; }
.foodTrait { padding-left: 4px; padding-right: 4px; white-space: nowrap !important; }

/* the food lists as tiles (app.js renderModalFood): the sort bar at every width, as it is on the small screens of the tables; the flavour small, after the name */
#cmp.modalTiles #sortBar:not(:empty) { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.itile .itFl { margin-left: auto; }

/* a place in a tile: the link is as tall as the line, aligned to its top (aligned to the text's bottom it stuck out below the line) */
.itile .itLocs .acqLoc a.loc { vertical-align: top; }

/* the food tiles: a place (with its chance) is one line, cut with an ellipsis */
.itile .acqLoc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    color: var(--mut);}
.itile .acqLoc :is(.srcK, a.loc) { white-space: inherit; }

/* the scroll sources in a list's cell: a block, so its left margin moves every line (on an inline box only the first line moved, and the next ones stuck out to its left) */
#cmc small.scrollSources { display: block; }

/* a weapon's note under its description (weapons.json note) */
.idText.idWeaponNote { color: var(--mut); font-size: 13px; }

/* the list of class minimums (app.js statCalcMinimumsHtml): the plan's table, the icon in the first column */
.scMinimums { margin-top: 2px; }
.scMins th.scPlanLv .ci { height: 1.5em; width: 1.5em; margin: 0; vertical-align: middle; }

.scMins .scMinName { margin-left: 4px; white-space: nowrap; vertical-align: middle; }

.normalLink {
	color: var(--text);
}

.youtubeEmbed {
	width: 100%;
	max-width: 450px;
	position: relative;
	aspect-ratio: 16 / 9;
}

.youtubeEmbed iframe {
top: 0;
left: 0;
width: 100%;
height: 100%;
position: absolute;
border: 0;
}

@media screen and (max-width: 700px) {
	.scMins .scMinName { display: none; }
}

.stbLevel>b {
	min-width: 8.5em;
    display: inline-block;
}

.mut {
	color: var(--mut);
}

.scSug small b {
	color: var(--fg);
}

.scSug .ci {
	height: 1.8em;
    width: auto;
    margin-right: 2px;
    margin-bottom: -0.3em !important;
}

.scSug {
	padding-bottom: 0.1em;
}

.scSug small {
    font-size: 0.95em;
    display: inline-block;
    margin-left: 2px;
}
/* a suggested class's skill requirements (app.js statCalcSugReqs), after its stat gains */
.scSug .requirementsWrapper, .scSug .smallRequirements { margin-left: 6px; white-space: nowrap; }

/* the class minimums table's sortable headers (app.js): a click sorts by the stat */
.scMins .scSortTh { cursor: pointer; user-select: none; }
.scMins .scSortTh[aria-sort="descending"]::after { content: " \25BC"; font-size: 0.7em; }
.scMins .scSortTh[aria-sort="ascending"]::after { content: " \25B2"; font-size: 0.7em; }
