.MistLadderApp {
	--ladder-ink: #2d2117;
	--ladder-muted: #665747;
	--ladder-line: #b69c6d;
	--ladder-soft-line: #d8c9ab;
	--ladder-surface: #f6f0e3;
	--ladder-surface-strong: #e6d8bb;
	--ladder-accent: #76511f;
	--ladder-accent-hover: #4e3517;
	color: var(--ladder-ink);
	font-family: Verdana, Arial, Helvetica, sans-serif;
}

.MistLadderTabs {
	display: flex;
	gap: 4px;
	margin: 0 0 10px;
	border-bottom: 1px solid var(--ladder-line);
}

.MistLadderTabs a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 8px 14px;
	border: 1px solid transparent;
	border-bottom: 0;
	color: #513817;
	font-weight: bold;
	text-decoration: none;
}

.MistLadderTabs a:hover {
	background: #efe4cf;
	color: #2d2117;
}

.MistLadderTabs a[aria-current="page"] {
	margin-bottom: -1px;
	border-color: var(--ladder-line);
	background: var(--ladder-surface);
	color: #21160e;
}

.MistLadderTabs a:focus-visible,
.MistLadderFilters input:focus-visible,
.MistLadderFilters select:focus-visible,
.MistLadderClear:focus-visible,
.MistLadderSource a:focus-visible {
	outline: 2px solid #735019;
	outline-offset: 2px;
}

.MistLadderIntro {
	padding: 16px 18px;
	border: 1px solid var(--ladder-line);
	border-radius: 4px;
	background: var(--ladder-surface);
}

.MistLadderIntro h1 {
	margin: 0 0 7px;
	color: #24180f;
	font-size: 22px;
	line-height: 1.2;
	text-wrap: balance;
}

.MistLadderIntro p {
	max-width: 72ch;
	margin: 0;
	color: #4f4234;
	font-size: 12px;
	line-height: 1.55;
	text-wrap: pretty;
}

.MistLadderIntro .MistLadderTruth {
	margin-top: 9px;
	padding-top: 9px;
	border-top: 1px solid var(--ladder-soft-line);
	color: #453728;
}

.MistLadderFilters {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 9px;
	margin: 12px 0 0;
	padding: 12px;
	border: 1px solid var(--ladder-line);
	background: #e9ddc5;
}

.MistLadderFilters label {
	display: flex;
	flex: 1 1 145px;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
	color: #38291c;
	font-size: 11px;
	font-weight: bold;
}

.MistLadderFilters label > span {
	line-height: 1.25;
}

.MistLadderFilters label > small {
	color: #65533f;
	font-size: 9px;
	font-weight: normal;
	line-height: 1.35;
}

.MistLadderFilters input,
.MistLadderFilters select {
	box-sizing: border-box;
	width: 100%;
	min-height: 36px;
	padding: 7px 9px;
	border: 1px solid #927b56;
	border-radius: 3px;
	background: #fffdf8;
	color: #22170f;
	font: 12px/1.3 Verdana, Arial, Helvetica, sans-serif;
}

.MistLadderFilters input::placeholder {
	color: #685b4d;
	opacity: 1;
}

.MistLadderFilters .MistLadderSearch {
	flex-basis: 230px;
}

.MistLadderClear {
	min-height: 36px;
	padding: 7px 12px;
	border: 1px solid #70501f;
	border-radius: 3px;
	background: #fffaf0;
	color: #3c2b18;
	font: bold 11px/1.3 Verdana, Arial, Helvetica, sans-serif;
	cursor: pointer;
}

.MistLadderClear:hover {
	background: #f3e4c7;
}

.MistLadderResultBar {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 2px 7px;
	color: var(--ladder-muted);
	font-size: 11px;
}

.MistLadderResultBar strong {
	color: #352518;
}

.MistLadderTableWrap {
	overflow-x: auto;
	border: 1px solid #8f774f;
	background: #fffdf8;
}

.MistLadderTable {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	color: #302419;
	font-size: 11px;
}

.MistLadderTable th {
	padding: 9px 8px;
	border-bottom: 1px solid #70572f;
	background: #5a4327;
	color: #fff8e9;
	text-align: left;
	vertical-align: bottom;
}

.MistLadderTable th:nth-child(1) { width: 20%; }
.MistLadderTable th:nth-child(2) { width: 12%; }
.MistLadderTable th:nth-child(3) { width: 15%; }
.MistLadderTable th:nth-child(4) { width: 22%; }
.MistLadderTable th:nth-child(5) { width: 31%; }

.MistLadderTable td {
	padding: 8px;
	border-bottom: 1px solid var(--ladder-soft-line);
	background: #fffdf8;
	line-height: 1.4;
	vertical-align: top;
	overflow-wrap: anywhere;
}

.MistLadderTable tr:nth-child(even) td {
	background: #f3ecde;
}

.MistLadderTable tr:hover td {
	background: #eee0c6;
}

.MistLadderTable tr[hidden] {
	display: none;
}

.MistLadderItem {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
}

.MistLadderItemImage {
	box-sizing: content-box;
	flex: 0 0 48px;
	object-fit: contain;
	image-rendering: pixelated;
	border: 1px solid #a99167;
	border-radius: 3px;
	background: #3f3326;
}

.MistLadderItem strong,
.MistLadderTable td > strong {
	display: block;
	color: #25190f;
	font-size: 11px;
}

.MistLadderItem small,
.MistLadderTable td > small {
	display: block;
	margin-top: 3px;
	color: #645545;
	font-size: 10px;
}

.MistLadderItem .MistLadderBadge {
	display: inline-block;
	width: fit-content;
	margin-top: 5px;
	padding: 2px 5px;
	border: 1px solid #8b682d;
	border-radius: 2px;
	background: #f5df9b;
	color: #563b13;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.2;
	text-transform: uppercase;
}

.MistLadderRequirement {
	white-space: nowrap;
}

.MistLadderEffect {
	color: #403225;
}

.MistLadderAmmoPair {
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr);
	align-items: center;
	gap: 7px;
	margin-top: 7px;
	padding: 6px;
	border: 1px solid #c2ab82;
	border-radius: 3px;
	background: #f0e5d0;
}

.MistLadderAmmoPair > span {
	min-width: 0;
}

.MistLadderAmmoImage {
	box-sizing: content-box;
	flex: 0 0 36px;
	object-fit: contain;
	image-rendering: pixelated;
	border: 1px solid #a99167;
	border-radius: 3px;
	background: #3f3326;
}

.MistLadderAmmoPair small,
.MistLadderAmmoPair strong,
.MistLadderAmmoPair a {
	display: block;
}

.MistLadderAmmoPair small {
	color: #685744;
	font-size: 9px;
}

.MistLadderAmmoPair strong {
	margin-top: 1px;
	color: #362513;
}

.MistLadderAmmoPair a {
	margin-top: 3px;
	color: #533815;
	font-size: 9px;
	font-weight: bold;
	white-space: nowrap;
}

.MistLadderSources {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.MistLadderSource {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.MistLadderMonsterImage,
.MistLadderSourceFallback {
	box-sizing: border-box;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	object-fit: contain;
	border: 1px solid #a99167;
	border-radius: 3px;
	background: #3b3025;
	image-rendering: pixelated;
}

.MistLadderSourceFallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #f6e7c8;
	font-weight: bold;
}

.MistLadderSource strong,
.MistLadderSource small {
	display: block;
}

.MistLadderSource a {
	color: #533815;
	font-weight: bold;
}

.MistLadderSource a:hover {
	color: #24170d;
}

.MistLadderSource small {
	margin-top: 2px;
	color: #665646;
	font-size: 10px;
}

.MistLadderMoreSources {
	padding-left: 47px;
	color: #5b4c3e;
	font-size: 10px;
}

.MistLadderMoreSources summary {
	cursor: pointer;
	font-weight: bold;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.MistLadderSources--More {
	margin-top: 8px;
	font-size: 11px;
}

.MistLadderUnavailable {
	padding: 8px;
	border: 1px solid #a77762;
	border-radius: 3px;
	background: #f5e1d7;
	color: #4b271d;
}

.MistLadderUnavailable strong,
.MistLadderUnavailable span {
	display: block;
}

.MistLadderUnavailable span {
	margin-top: 3px;
	font-size: 10px;
	line-height: 1.4;
}

.MistLadderEmpty {
	padding: 20px;
	border: 1px solid var(--ladder-line);
	border-top: 0;
	background: #fffdf8;
	text-align: center;
}

.MistLadderEmpty strong,
.MistLadderEmpty span {
	display: block;
}

.MistLadderEmpty span {
	margin-top: 5px;
	color: var(--ladder-muted);
}

.MistLadderGenerated {
	margin: 8px 2px 0;
	color: #665747;
	font-size: 9px;
	text-align: right;
}

@media (max-width: 760px) {
	.MistLadderTabs a {
		flex: 1 1 0;
		justify-content: center;
		padding-inline: 8px;
	}

	.MistLadderFilters label,
	.MistLadderFilters .MistLadderSearch {
		flex-basis: calc(50% - 6px);
	}

	.MistLadderClear {
		flex: 1 1 100%;
	}

	.MistLadderResultBar {
		flex-direction: column;
		gap: 3px;
	}

	.MistLadderTableWrap {
		overflow: visible;
		border: 0;
		background: transparent;
	}

	.MistLadderTable,
	.MistLadderTable tbody {
		display: block;
	}

	.MistLadderTable thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		clip-path: inset(50%);
	}

	.MistLadderTable tr {
		display: block;
		margin-bottom: 9px;
		border: 1px solid #9e845a;
		background: #fffdf8;
	}

	.MistLadderTable td,
	.MistLadderTable tr:nth-child(even) td,
	.MistLadderTable tr:hover td {
		display: grid;
		grid-template-columns: minmax(105px, 32%) 1fr;
		gap: 10px;
		padding: 8px;
		border-bottom: 1px solid #ded0b4;
		background: #fffdf8;
		white-space: normal;
	}

	.MistLadderTable td::before {
		content: attr(data-label);
		color: #55432f;
		font-size: 10px;
		font-weight: bold;
	}

	.MistLadderTable td:last-child {
		border-bottom: 0;
	}
}

@media (max-width: 440px) {
	.MistLadderIntro {
		padding: 13px;
	}

	.MistLadderFilters label,
	.MistLadderFilters .MistLadderSearch {
		flex-basis: 100%;
	}

	.MistLadderTable td,
	.MistLadderTable tr:nth-child(even) td,
	.MistLadderTable tr:hover td {
		display: block;
	}

	.MistLadderTable td::before {
		display: block;
		margin-bottom: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.MistLadderApp *,
	.MistLadderApp *::before,
	.MistLadderApp *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
