.pbwp,
.pbwp-modal,
.pbwp-empty {
	--pbwp-accent: #4fea9f;
	--pbwp-on: #16161c;
	--pbwp-card: #2a2a34;
	--pbwp-card2: #232329;
	--pbwp-field: #1d1d23;
	--pbwp-text: #fff;
	--pbwp-muted: #8f92aa;
	--pbwp-line: rgba(255, 255, 255, .07);
	--pbwp-line2: rgba(255, 255, 255, .12);
	--pbwp-rar: #9aa3b5;
	--pbwp-r: var(--pbst-r, 16px);
}

.pbwp *,
.pbwp-modal *,
.pbwp-empty * {
	box-sizing: border-box;
}

.pbwp [hidden],
.pbwp-modal [hidden],
.pbwp-modal[hidden] {
	display: none !important;
}

.pbwp button,
.pbwp-modal button {
	font: inherit;
}

[data-rarity="uncommon"] { --pbwp-rar: #5fb4ff; }
[data-rarity="rare"] { --pbwp-rar: #4f7dff; }
[data-rarity="epic"] { --pbwp-rar: #b45fff; }
[data-rarity="legendary"] { --pbwp-rar: #ffb02e; }
[data-rarity="pack"] { --pbwp-rar: #4fea9f; }

.pbwp__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
}

.pbwp--carousel .pbwp__grid {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	scrollbar-width: thin;
}

.pbwp--carousel .pbwp-tile {
	flex: 0 0 200px;
	scroll-snap-align: start;
}

.pbwp-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 0;
	border: 1px solid var(--pbwp-line);
	border-radius: var(--pbwp-r);
	background: linear-gradient(180deg, var(--pbwp-card, #2a2a34) 0%, var(--pbwp-card2, #232329) 100%);
	color: var(--pbwp-text);
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	animation: pbwp-in .45s cubic-bezier(.22, 1, .36, 1) both;
	animation-delay: calc(var(--pbwp-i, 0) * 45ms);
	transition: transform .25s cubic-bezier(.22, 1, .36, 1), border-color .25s ease, box-shadow .25s ease;
}

@keyframes pbwp-in {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to { opacity: 1; transform: none; }
}

.pbwp-tile:hover,
.pbwp-tile:focus-visible {
	transform: translateY(-4px);
	border-color: var(--pbwp-rar);
	box-shadow: 0 18px 36px rgba(0, 0, 0, .45);
	outline: none;
}

.pbwp-tile__media {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	isolation: isolate;
	background: radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, .05) 0%, transparent 60%), #17171c;
	border-bottom: 2px solid var(--pbwp-rar);
}

.pbwp-tile__glow {
	position: absolute;
	left: 50%;
	top: 58%;
	width: 80%;
	height: 80%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--pbwp-rar);
	opacity: .2;
	filter: blur(32px);
	z-index: -1;
	transition: opacity .3s ease;
}

.pbwp-tile:hover .pbwp-tile__glow {
	opacity: .34;
}

.pbwp-tile__floor {
	position: absolute;
	left: 50%;
	bottom: 12%;
	width: 60%;
	height: 12px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: #000;
	opacity: .45;
	filter: blur(8px);
	z-index: -1;
}

.pbwp-tile__img {
	width: 86%;
	height: 86%;
	object-fit: contain;
	filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5));
	transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}

.pbwp-tile:hover .pbwp-tile__img {
	transform: scale(1.06) rotate(-2deg);
}

.pbwp-tile__ph {
	font-size: 44px;
	color: var(--pbwp-rar);
	opacity: .55;
	transition: opacity .3s ease;
}

.pbwp-tile__spin {
	position: absolute;
	inset: 5%;
	background-repeat: no-repeat;
	background-position: 0 0;
	opacity: 0;
	filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5));
	transition: opacity .35s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
	pointer-events: none;
}

.pbwp-tile.has-spin .pbwp-tile__spin {
	opacity: 1;
}

.pbwp-tile:hover .pbwp-tile__spin {
	transform: scale(1.05);
}

.pbwp-tile.has-spin .pbwp-tile__img,
.pbwp-tile.has-spin .pbwp-tile__ph {
	opacity: 0;
}

.pbwp-tile__badge,
.pbwp-tile__3d {
	position: absolute;
	top: 8px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 800;
	backdrop-filter: blur(6px);
}

.pbwp-tile__badge {
	left: 8px;
	background: var(--pbwp-accent);
	color: var(--pbwp-on, #16161c);
}

.pbwp-tile__3d {
	right: 8px;
	background: rgba(10, 10, 14, .62);
	border: 1px solid rgba(255, 255, 255, .1);
	color: #fff;
}

.pbwp-tile__body {
	display: grid;
	gap: 3px;
	padding: 10px 12px 12px;
	min-width: 0;
}

.pbwp-rar {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	justify-self: start;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: var(--pbwp-rar);
}

.pbwp-rar i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--pbwp-rar);
	box-shadow: 0 0 8px var(--pbwp-rar);
}

.pbwp-rar em {
	font-style: normal;
}

.pbwp-tile__name {
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pbwp-tile__type {
	font-size: 11.5px;
	color: var(--pbwp-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pbwp__expand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: 40px;
	margin-top: 12px;
	border-radius: 12px;
	border: 1px dashed var(--pbwp-line2);
	background: transparent;
	color: var(--pbwp-muted);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease;
}

.pbwp__expand:hover {
	color: var(--pbwp-text);
	border-color: var(--pbwp-accent);
}

.pbwp__expand i {
	transition: transform .2s ease;
}

.pbwp__expand.is-open i {
	transform: rotate(180deg);
}

.pbwp-empty {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding: 16px;
	border-radius: var(--pbwp-r);
	border: 1px dashed var(--pbwp-line2);
	background: var(--pbwp-field, #1d1d23);
	color: var(--pbwp-muted);
}

.pbwp-empty__icon {
	flex: 0 0 48px;
	height: 48px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	background: var(--pbwp-accent);
	color: var(--pbwp-on, #16161c);
	font-size: 24px;
}

.pbwp-empty__text {
	display: grid;
	gap: 2px;
	flex: 1;
	min-width: 200px;
	font-size: 13px;
	line-height: 1.5;
}

.pbwp-empty__text b {
	color: var(--pbwp-text);
	font-size: 14px;
}

.pbwp-empty__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 40px;
	padding: 0 16px;
	border-radius: 12px;
	background: var(--pbwp-accent);
	color: var(--pbwp-on, #16161c);
	font-weight: 800;
	font-size: 13px;
	text-decoration: none;
}

.pbwp-empty__btn:hover {
	color: var(--pbwp-on, #16161c);
	text-decoration: none;
	filter: brightness(1.1);
}

html.pbwp-lock,
html.pbwp-lock body {
	overflow: hidden;
}

.pbwp-modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	color: var(--pbwp-text);
}

.pbwp-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 6, 10, .8);
	backdrop-filter: blur(6px);
}

.pbwp-modal__win {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	width: min(1080px, 100%);
	height: min(620px, calc(100vh - 40px));
	border-radius: calc(var(--pbwp-r) + 4px);
	overflow: hidden;
	background: var(--pbwp-field, #1d1d23);
	border: 1px solid var(--pbwp-line2);
	box-shadow: 0 40px 100px rgba(0, 0, 0, .65);
	animation: pbwp-pop .25s cubic-bezier(.22, 1, .36, 1);
}

@keyframes pbwp-pop {
	from { transform: translateY(14px) scale(.98); opacity: 0; }
	to { transform: none; opacity: 1; }
}

.pbwp-modal__x {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	border: 1px solid var(--pbwp-line2);
	background: rgba(10, 10, 14, .55);
	color: var(--pbwp-text);
	font-size: 22px;
	display: grid;
	place-items: center;
	cursor: pointer;
}

.pbwp-stage {
	position: relative;
	min-height: 0;
	overflow: hidden;
	isolation: isolate;
	background: radial-gradient(90% 80% at 50% 60%, #2f2f39 0%, #141418 75%);
}

.pbwp-stage::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
	background-size: 32px 32px;
	-webkit-mask-image: radial-gradient(circle at 50% 60%, #000 0%, transparent 70%);
	mask-image: radial-gradient(circle at 50% 60%, #000 0%, transparent 70%);
}

.pbwp-stage__glow {
	position: absolute;
	left: 50%;
	top: 55%;
	width: 55%;
	height: 55%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--pbwp-rar);
	opacity: .18;
	filter: blur(60px);
	z-index: -1;
	transition: background .3s ease;
}

.pbwp-stage::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 13%;
	width: 55%;
	height: 26px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: #000;
	opacity: .4;
	filter: blur(16px);
	z-index: -1;
}

.pbwp-stage__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	cursor: grab;
}

.pbwp-stage__canvas:active {
	cursor: grabbing;
}

.pbwp-stage__img {
	position: absolute;
	inset: 10%;
	width: 80%;
	height: 80%;
	object-fit: contain;
}

.pbwp-stage__state {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
	text-align: center;
	color: var(--pbwp-muted);
	font-weight: 700;
	pointer-events: none;
}

.pbwp-stage__hint {
	position: absolute;
	left: 16px;
	top: 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 11px;
	border-radius: 999px;
	background: rgba(10, 10, 14, .55);
	border: 1px solid var(--pbwp-line);
	font-size: 11.5px;
	color: var(--pbwp-muted);
	pointer-events: none;
}

.pbwp-stage__tools {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	display: flex;
	gap: 4px;
	padding: 5px;
	border-radius: 14px;
	background: rgba(10, 10, 14, .7);
	border: 1px solid var(--pbwp-line2);
	backdrop-filter: blur(8px);
	z-index: 3;
}

.pbwp-stage__tools button {
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--pbwp-muted);
	font-size: 19px;
	display: grid;
	place-items: center;
	cursor: pointer;
}

.pbwp-stage__tools button:hover {
	color: var(--pbwp-text);
	background: rgba(255, 255, 255, .08);
}

.pbwp-modal .pbwp-stage__tools button.is-on {
	color: var(--pbwp-accent);
}

.pbwp-side {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	overflow-y: auto;
	padding: 26px 22px 22px;
	border-left: 1px solid var(--pbwp-line);
	background: linear-gradient(180deg, var(--pbwp-card, #2a2a34) 0%, var(--pbwp-card2, #232329) 100%);
}

.pbwp-side__rar {
	align-self: flex-start;
	padding: 5px 10px 5px 8px;
	border-radius: 999px;
	background: rgba(10, 10, 14, .45);
	border: 1px solid var(--pbwp-line);
}

.pbwp-side__type {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: var(--pbwp-muted);
}

.pbwp-side__name {
	margin: -6px 0 0;
	padding-right: 40px;
	font-size: 24px;
	font-weight: 900;
	line-height: 1.15;
	color: var(--pbwp-text);
	overflow-wrap: anywhere;
}

.pbwp-side__desc {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: #c7c9d6;
	white-space: pre-line;
}

.pbwp-side__pack {
	display: grid;
	gap: 6px;
}

.pbwp-side__label {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .4px;
	text-transform: uppercase;
}

.pbwp-side__list {
	display: grid;
	gap: 6px;
}

.pbwp-pi {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border-radius: 12px;
	border: 1px solid var(--pbwp-line);
	background: rgba(255, 255, 255, .03);
	color: var(--pbwp-text);
	text-align: left;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}

.pbwp-pi:hover {
	border-color: var(--pbwp-line2);
	background: rgba(255, 255, 255, .06);
}

.pbwp-modal .pbwp-pi.is-active {
	border-color: var(--pbwp-accent);
	background: rgba(255, 255, 255, .07);
}

.pbwp-pi__dot {
	flex: 0 0 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--pbwp-rar);
	box-shadow: 0 0 10px var(--pbwp-rar);
}

.pbwp-pi__text {
	display: grid;
	flex: 1;
	min-width: 0;
	line-height: 1.25;
}

.pbwp-pi__text b {
	font-size: 13px;
	font-weight: 800;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pbwp-pi__text em {
	font-style: normal;
	font-size: 11.5px;
	color: var(--pbwp-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pbwp-pi__3d {
	font-size: 16px;
	color: var(--pbwp-muted);
}

.pbwp-modal .pbwp-pi.is-active .pbwp-pi__3d {
	color: var(--pbwp-accent);
}

.pbwp-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}

.pbwp-tile-stat {
	display: grid;
	justify-items: start;
	gap: 2px;
	padding: 11px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid var(--pbwp-line);
}

.pbwp-tile-stat i {
	font-size: 16px;
	color: var(--pbwp-muted);
}

.pbwp-tile-stat b {
	font-size: 17px;
	font-weight: 900;
}

.pbwp-tile-stat span {
	font-size: 11px;
	color: var(--pbwp-muted);
}

.pbwp-modal .pbwp-tile-stat.is-up i,
.pbwp-modal .pbwp-tile-stat.is-up b {
	color: var(--pbwp-accent);
}

.pbwp-side__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	height: 44px;
	border-radius: 12px;
	background: var(--pbwp-accent);
	color: var(--pbwp-on, #16161c);
	font-weight: 800;
	font-size: 13.5px;
	text-decoration: none;
	transition: filter .2s ease;
}

.pbwp-side__link:hover {
	color: var(--pbwp-on, #16161c);
	text-decoration: none;
	filter: brightness(1.1);
}

@media (max-width: 860px) {
	.pbwp-modal {
		padding: 0;
	}

	.pbwp-modal__win {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(260px, 46vh) minmax(0, 1fr);
		width: 100%;
		height: 100%;
		border-radius: 0;
	}

	.pbwp-side {
		border-left: 0;
		border-top: 1px solid var(--pbwp-line);
	}

	.pbwp-stage__hint {
		display: none;
	}
}

@media (max-width: 480px) {
	.pbwp__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
