/* biome-ignore-all lint/style/noDescendingSpecificity: the chip, card and pill rules read top to bottom; the later, more general ones are deliberate */
/* The tier chips, trait cards and pills (muses/filters.js), on the gallery
   and the sales wall. Each page sets the colors (--card, --gold and the rest). */
.tiers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.chip {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	min-height: 44px;
	padding: 10px 16px;
	font: 500 15px / 1.2 var(--sans);
	color: var(--bone);
	background: var(--card);
	border: 1px solid rgba(224, 179, 90, 0.22);
	border-radius: 999px;
	cursor: pointer;
	transition:
		background-color 0.15s,
		border-color 0.15s,
		color 0.15s;
}
.chip small {
	font: 400 12px var(--mono);
	color: var(--dim);
}
.chip[aria-pressed="true"] {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--void);
}
.chip[aria-pressed="true"] small {
	color: rgba(5, 4, 3, 0.7);
}
.chip[aria-pressed="true"] .tier {
	background: none;
	-webkit-text-fill-color: var(--void);
	color: var(--void);
}
.chip:disabled {
	opacity: 0.6;
	cursor: default;
}
@media (hover: hover) {
	.chip:not(:disabled):not([aria-pressed="true"]):hover {
		border-color: var(--gold);
	}
}

/* The traits: a card each, always open, in a row that scrolls sideways. */
.w-wrap {
	position: relative;
	margin: 0 calc(-1 * var(--pad));
}
.widgets {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(78vw, 260px);
	align-items: start;
	gap: 12px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--pad);
	padding: 2px var(--pad) 6px;
	scrollbar-width: none;
}
.widgets::-webkit-scrollbar {
	display: none;
}
.w {
	position: relative;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 12px 10px;
	border-radius: 22px;
	background: var(--card);
	box-shadow: inset 0 0 0 1px rgba(224, 179, 90, 0.14);
	transition: box-shadow 0.15s;
}
.w.on {
	box-shadow: inset 0 0 0 1px rgba(224, 179, 90, 0.55);
}
.w header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 0 6px;
	min-height: 28px;
}
.w h2 {
	margin: 0;
	font: 600 21px / 1.2 var(--serif);
	color: var(--gold-hi);
}
.w-n {
	font: 400 12px var(--mono);
	color: var(--gold);
}
.w-clear {
	margin-left: auto;
	padding: 0;
	font: 500 13px var(--sans);
	color: var(--soft);
	background: none;
	border: 0;
	text-decoration: underline;
	text-decoration-color: rgba(224, 179, 90, 0.5);
	text-underline-offset: 3px;
	cursor: pointer;
}
.w.fold:not(.open):not(.finding) .f-list {
	max-height: calc(6 * 44px);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 55%, transparent);
	mask-image: linear-gradient(#000 55%, transparent);
}
.w.open .f-list,
.w.finding .f-list {
	max-height: 320px;
}
.w-all {
	align-self: start;
	min-height: 36px;
	padding: 0 8px;
	font: 500 14px var(--sans);
	color: var(--gold-hi);
	background: none;
	border: 0;
	cursor: pointer;
}
.w-all::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 8px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: translateY(-3px) rotate(45deg);
}
.w.open .w-all::after {
	transform: translateY(0) rotate(-135deg);
}
.w.finding .w-all {
	display: none;
}
.w-nav {
	position: absolute;
	top: 50%;
	z-index: 1;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--gold);
	border: 0;
	color: var(--void);
	cursor: pointer;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}
.w-nav svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.w-nav.prev {
	left: 4px;
}
.w-nav.next {
	right: 4px;
}
.w-nav[hidden] {
	display: none;
}
@media (hover: none) {
	.w-nav {
		display: none;
	}
}
@media (min-width: 760px) {
	.w-wrap {
		margin: 0;
	}
	.widgets {
		padding: 2px 0 6px;
		scroll-padding: 0;
	}
}
.f-search {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 14px;
	background: var(--card-hi);
	border: 1px solid rgba(224, 179, 90, 0.18);
}
.f-search:focus-within {
	border-color: var(--gold);
}
.f-search svg {
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: var(--soft);
	stroke-width: 1.8;
	stroke-linecap: round;
}
.f-search input {
	flex: 1;
	min-width: 0;
	height: 46px;
	padding: 0;
	font: 400 16px var(--sans);
	color: var(--bone);
	background: none;
	border: 0;
	outline: 0;
}
.f-search input::placeholder {
	color: var(--dim);
}
.f-list {
	flex: 1;
	min-height: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	align-content: start;
	gap: 2px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.f-list label {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 42px;
	padding: 0 8px;
	box-sizing: border-box;
	border-radius: 12px;
	cursor: pointer;
}
@media (hover: hover) {
	.f-list label:hover {
		background: var(--card-hi);
	}
}
.f-list input {
	appearance: none;
	width: 22px;
	height: 22px;
	flex: none;
	margin: 0;
	border-radius: 6px;
	border: 1.5px solid rgba(239, 230, 210, 0.35);
	display: grid;
	place-content: center;
	cursor: pointer;
}
.f-list input::before {
	content: "";
	width: 11px;
	height: 6px;
	border: solid var(--void);
	border-width: 0 0 2px 2px;
	transform: translateY(-1px) rotate(-45deg);
	opacity: 0;
}
.f-list input:checked {
	background: var(--gold);
	border-color: var(--gold);
}
.f-list input:checked::before {
	opacity: 1;
}
.f-list input:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}
.f-list span {
	flex: 1;
	min-width: 0;
	overflow-wrap: break-word;
}
.f-list small {
	font: 400 14px var(--mono);
	color: var(--soft);
}
.f-list .off {
	opacity: 0.6;
	cursor: default;
}
.w .none {
	margin: 0;
	padding: 4px 8px;
	color: var(--dim);
}
.f-list li[hidden] {
	display: none;
}

.pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.pills:empty {
	display: none;
}
.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 8px 0 14px;
	border-radius: 999px;
	font: 500 14px var(--sans);
	color: var(--gold-hi);
	background: rgba(224, 179, 90, 0.1);
	border: 1px solid rgba(224, 179, 90, 0.35);
	cursor: pointer;
}
.pill small {
	color: var(--dim);
	font: 400 12px var(--mono);
}
.pill::after {
	content: "\00d7";
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	font-size: 16px;
	color: var(--soft);
}
@media (hover: hover) {
	.pill:hover {
		border-color: var(--gold);
	}
}

/* A value's lowest listing, when the page has one (the sales wall's listed view). */
.fl:empty {
	display: none;
}
.chip .fl,
.f-list .fl {
	color: var(--gold);
}
.f-list .fl {
	font-size: 12px;
	white-space: nowrap;
}
