.smb-rpg-wrap { margin: 0 0 2em; }

.smb-rpg {
	display: grid;
	grid-template-columns: repeat(var(--smb-cols, 3), minmax(0, 1fr));
	gap: var(--smb-gap, 40px);
	transition: opacity .2s ease;
}
.smb-rpg-wrap.is-loading .smb-rpg { opacity: .5; }

/* Card */
.smb-rpg__card {
	background: var(--smb-card-bg, #fff);
	border-radius: var(--smb-radius, 6px);
	box-shadow: var(--smb-shadow, 0 1px 6px rgba(0,0,0,.08));
	overflow: hidden;
	display: flex;
	transition: box-shadow .2s ease;
}
.smb-rpg__card:hover { box-shadow: var(--smb-shadow-hover, 0 4px 18px rgba(0,0,0,.14)); }

.smb-rpg__link {
	display: flex;
	flex-direction: column;
	width: 100%;
	color: inherit;
	text-decoration: none !important;
}
.smb-rpg__link:focus-visible { outline: 2px solid var(--smb-btn-bg, currentColor); outline-offset: 3px; }

.smb-rpg__media {
	aspect-ratio: var(--smb-ratio, 3/4);
	overflow: hidden;
	background: rgba(0,0,0,.06);
}
.smb-rpg__img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	display: block;
}

.smb-rpg__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 2.2em 1.9em 2em;
}
.smb-rpg__title {
	margin: 0 0 .5em;
	font-size: 1.35em;
	line-height: 1.25;
	font-weight: 600;
	color: var(--smb-title, #3d4451);
}
.smb-rpg__excerpt {
	margin: 0 0 1.4em;
	font-size: 1.05em;
	line-height: 1.6;
	color: var(--smb-text, #555);
}

/* Button: pinned to the bottom so buttons line up across a row */
.smb-rpg__button {
	align-self: flex-start;
	margin-top: auto;
	display: inline-block;
	padding: .6em 1.3em;
	border-radius: calc(var(--smb-radius, 6px) * .75);
	background: var(--smb-btn-bg, #3d4451);
	color: var(--smb-btn-text, #fff);
	font-size: .95em;
	font-weight: 600;
	line-height: 1.2;
	transition: filter .2s ease;
}
.smb-rpg__link:hover .smb-rpg__button { filter: brightness(1.12); }

/* Shuffle */
.smb-rpg__actions { text-align: center; margin-top: 2em; }
.smb-rpg-wrap .smb-rpg__shuffle {
	appearance: none;
	background: transparent;
	border: 2px solid var(--smb-btn-bg, #3d4451);
	color: var(--smb-btn-bg, #3d4451);
	border-radius: calc(var(--smb-radius, 6px) * .75);
	padding: .65em 1.6em;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
.smb-rpg-wrap .smb-rpg__shuffle:hover,
.smb-rpg-wrap .smb-rpg__shuffle:focus-visible {
	background: var(--smb-btn-bg, #3d4451);
	color: var(--smb-btn-text, #fff);
}
.smb-rpg-wrap .smb-rpg__shuffle:focus-visible { outline: 2px solid var(--smb-btn-bg, #3d4451); outline-offset: 3px; }
.smb-rpg-wrap .smb-rpg__shuffle:disabled { opacity: .6; cursor: wait; }

/* Responsive */
@media (max-width: 900px) {
	.smb-rpg { grid-template-columns: repeat(var(--smb-cols-tablet, 2), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.smb-rpg { grid-template-columns: repeat(var(--smb-cols-mobile, 1), minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
	.smb-rpg, .smb-rpg__card, .smb-rpg__button, .smb-rpg__shuffle { transition: none; }
}
