/**
 * Binder + holder embed styles for profile timeline/messages/wall.
 * Forum keeps inline styles in ui-renderers.php; profile strips those before wp_kses.
 */
/* Profile scopes – mirror .bbp-topic-content / .bbp-reply-content centering */
.cf-profile-wrap .cf-timeline-item-content .cf-embed-holder-wrap,
.cf-profile-wrap .cf-timeline-comment-body .cf-embed-holder-wrap,
.cf-profile-wrap .cf-msg-bubble-content .cf-embed-holder-wrap,
.cf-profile-wrap .cf-wall-post-body .cf-embed-holder-wrap {
	display: block !important;
	margin-left: auto;
	margin-right: auto;
}
.cf-profile-wrap .cf-timeline-item-content .cf-embed-binder-outer,
.cf-profile-wrap .cf-timeline-comment-body .cf-embed-binder-outer,
.cf-profile-wrap .cf-msg-bubble-content .cf-embed-binder-outer,
.cf-profile-wrap .cf-wall-post-body .cf-embed-binder-outer {
	text-align: center;
}
.cf-profile-wrap .cf-timeline-item-content .cf-embed-holder-outer,
.cf-profile-wrap .cf-timeline-comment-body .cf-embed-holder-outer,
.cf-profile-wrap .cf-msg-bubble-content .cf-embed-holder-outer,
.cf-profile-wrap .cf-wall-post-body .cf-embed-holder-outer {
	display: block;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/*
 * Astra profile template (.cf-timeline-item-content img) forces max-width:100% + border-radius:6px on ALL images,
 * which breaks coin photos inside .cf-v4-circle (forum/modal use object-fit cover + 50% circle).
 * Higher specificity + !important so body-inline theme CSS cannot win.
 */
.cf-profile-page-wrap .cf-timeline-item-content .cf-v4-circle img,
.cf-profile-page-wrap .cf-timeline-comment-body .cf-v4-circle img,
.cf-profile-page-wrap .cf-msg-bubble-content .cf-v4-circle img,
.cf-profile-page-wrap .cf-wall-post-body .cf-v4-circle img {
	max-width: none !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	border-radius: 50% !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	display: block !important;
}

.cf-embed-private {
	padding: 14px;
	text-align: center;
	color: var(--cf-silver, #94a3b8);
	background: var(--cf-bg-card, #1b202f);
	border: 1px solid var(--cf-border, #2a3143);
	border-radius: 8px;
	direction: rtl;
}
.cf-embed-binder-outer {
	text-align: inherit;
}
.cf-embed-binder-outer .cf-binder-wrapper {
	display: inline-block;
	text-align: left;
	direction: ltr;
}
/* Desktop: natural binder size + centered (outer text-align:center from .cf-profile-wrap rules above). */
/* Mobile only: stretch embed to full column width. */
@media (max-width: 768px) {
	.cf-profile-page-wrap .cf-timeline-item-content .cf-embed-binder-outer,
	.cf-profile-page-wrap .cf-timeline-comment-body .cf-embed-binder-outer,
	.cf-profile-page-wrap .cf-wall-post-body .cf-embed-binder-outer,
	#bbpress-forums .bbp-reply-content .cf-embed-binder-outer,
	#bbpress-forums .bbp-topic-content .cf-embed-binder-outer {
		display: block;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}
	.cf-profile-page-wrap .cf-timeline-item-content .cf-embed-binder-outer .cf-binder-wrapper,
	.cf-profile-page-wrap .cf-timeline-comment-body .cf-embed-binder-outer .cf-binder-wrapper,
	.cf-profile-page-wrap .cf-wall-post-body .cf-embed-binder-outer .cf-binder-wrapper,
	#bbpress-forums .bbp-reply-content .cf-embed-binder-outer .cf-binder-wrapper,
	#bbpress-forums .bbp-topic-content .cf-embed-binder-outer .cf-binder-wrapper {
		display: block;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}
	/* Forum .cf-binder-book: do not set max-width here — .bbp-reply-content/.bbp-topic-content makes specificity higher
	   than the stadium block below and was overriding min(100%, 100vw − padding). Forum rules: @media stadium + vw cap. */
	.cf-profile-page-wrap .cf-timeline-item-content .cf-binder-embed .cf-binder-book,
	.cf-profile-page-wrap .cf-timeline-comment-body .cf-binder-embed .cf-binder-book,
	.cf-profile-page-wrap .cf-wall-post-body .cf-binder-embed .cf-binder-book {
		max-width: 100%;
		box-sizing: border-box;
	}
}
/* Theme timeline uses overflow-x:auto on embed wrappers — clips/shrinks binder grid on mobile. */
.cf-profile-page-wrap .cf-timeline-item-content .cf-embed-binder-outer,
.cf-profile-page-wrap .cf-timeline-item-content .cf-binder-wrapper.cf-binder-embed,
.cf-profile-page-wrap .cf-timeline-comment-body .cf-embed-binder-outer,
.cf-profile-page-wrap .cf-timeline-comment-body .cf-binder-wrapper.cf-binder-embed,
#bbpress-forums .bbp-reply-content .cf-embed-binder-outer,
#bbpress-forums .bbp-reply-content .cf-binder-wrapper.cf-binder-embed,
#bbpress-forums .bbp-topic-content .cf-embed-binder-outer,
#bbpress-forums .bbp-topic-content .cf-binder-wrapper.cf-binder-embed {
	overflow-x: visible !important;
}
/* Theme: .cf-timeline-item-content { overflow:hidden } clips wide binders — allow when embed present. */
@supports selector(:has(*)) {
	.cf-profile-page-wrap .cf-timeline-item-content:has(.cf-embed-binder-outer) {
		overflow: visible !important;
	}
	#bbpress-forums .bbp-reply-content:has(.cf-embed-binder-outer),
	#bbpress-forums .bbp-topic-content:has(.cf-embed-binder-outer),
	#bbpress-forums .coinfolio-topic-content-cell:has(.cf-embed-binder-outer) {
		overflow: visible !important;
	}
}
.bbp-topic-content .cf-embed-holder-wrap,
.bbp-reply-content .cf-embed-holder-wrap {
	display: block !important;
	margin-left: auto;
	margin-right: auto;
}
.bbp-topic-content .cf-embed-binder-outer,
.bbp-reply-content .cf-embed-binder-outer {
	text-align: center;
}
.cf-binder-embed .cf-binder-nav-left {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	position: relative;
	min-width: 0;
}
.cf-binder-embed .cf-binder-nav-left .cf-like-wrap-binder-embed {
	position: static;
	transform: none;
	flex-shrink: 0;
}
.cf-binder-embed .cf-binder-nav-left .cf-embed-progress-wrap {
	width: 72px;
	flex-shrink: 0;
}
.cf-binder-embed .cf-binder-nav-left .cf-embed-progress-wrap .cf-progress-bar-wrap {
	cursor: help;
}
.cf-binder-embed .cf-binder-nav {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
}
.cf-binder-embed .cf-binder-page-title-wrap {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: auto;
	pointer-events: none;
}
.cf-binder-embed .cf-binder-nav-right {
	flex: 0 0 auto;
}
.cf-binder-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 0;
	background: #111827;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid var(--cf-border, #2a3143);
}
.cf-binder-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.cf-binder-nav {
	align-self: stretch;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: nowrap;
	min-height: 40px;
	direction: ltr;
	width: 100%;
	max-width: 100%;
}
.cf-binder-nav-left {
	flex: 1;
	min-width: 0;
}
.cf-binder-nav-right {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}
.cf-binder-page-title-wrap {
	flex: 0 0 auto;
}
.cf-binder-page-title-label {
	color: var(--cf-gold, #d4af37);
	font-weight: 600;
	font-size: 14px;
	text-align: center;
}
.cf-binder-pagination .coinfolio-pagination-inner {
	direction: ltr;
	display: flex;
	flex-direction: row;
	align-items: center;
}
/* Forum binder view (ui-renderers): RTL page numbers inside LTR control bar */
.cf-binder-pagination .coinfolio-pagination-page-wrap {
	direction: rtl;
}
.cf-binder-wrapper[data-book-dir="ltr"] .cf-binder-pagination .coinfolio-pagination-page-wrap {
	direction: ltr;
}
.cf-binder-pagination .coinfolio-pagination-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--cf-gold, #d4af37);
	background: #242b3d;
	border: 1px solid var(--cf-border, #2a3143);
	border-radius: 0;
	font-size: 1.2rem;
	cursor: pointer;
}
.cf-binder-pagination .coinfolio-pagination-prev {
	border-radius: 6px 0 0 6px;
	border-right: none;
}
.cf-binder-pagination .coinfolio-pagination-next {
	border-radius: 0 6px 6px 0;
	border-left: none;
}
.cf-binder-pagination .coinfolio-pagination-btn:hover:not(:disabled) {
	color: #e2e8f0;
	background: rgba(212, 175, 55, 0.2);
	border-color: var(--cf-gold, #d4af37);
}
.cf-binder-pagination .coinfolio-pagination-btn:disabled {
	opacity: 0.45;
	cursor: default;
	color: #64748b;
}
.cf-binder-pagination .coinfolio-pagination-page-wrap {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	background: #242b3d;
	border: 1px solid var(--cf-border, #2a3143);
	border-left: none;
	border-right: none;
	padding: 0 8px 0 10px;
	height: 40px;
	box-sizing: border-box;
}
.cf-binder-pagination .cf-binder-page-input {
	width: 2.2em;
	min-width: 24px;
	padding: 6px 2px;
	font-size: 0.9rem;
	text-align: center;
	background: #242b3d;
	border: none;
	color: #e2e8f0;
	-moz-appearance: textfield;
}
.cf-binder-pagination .cf-binder-page-input:focus {
	outline: none;
	box-shadow: 0 0 0 1px var(--cf-gold, #d4af37);
}
.cf-binder-page-input::-webkit-outer-spin-button,
.cf-binder-page-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.cf-binder-pagination .cf-binder-page-sep {
	font-size: 0.88rem;
	color: var(--cf-silver, #94a3b8);
}
.cf-binder-pagination .cf-binder-page-total {
	font-size: 0.88rem;
	color: var(--cf-silver, #94a3b8);
}
.cf-binder-book {
	background: var(--cf-bg-card, #1b202f);
	border: 1px solid var(--cf-border, #2a3143);
	border-radius: 10px;
	padding: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	width: fit-content;
	max-width: 100%;
}
.cf-binder-grid.cf-binder-grid-portal-style {
	display: grid;
	width: max-content;
}
.cf-binder-slot {
	position: relative;
	width: var(--binder-slot-size, 150px);
	height: var(--binder-slot-size, 150px);
	min-width: var(--binder-slot-size, 150px);
	min-height: var(--binder-slot-size, 150px);
	max-width: var(--binder-slot-size, 150px);
	max-height: var(--binder-slot-size, 150px);
	padding: 0;
	border: none;
	background: transparent;
	border-radius: 0;
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	overflow: visible;
	box-sizing: border-box;
}
.cf-binder-slot.cf-binder-slot-empty-state {
	background: transparent;
	border: 1px dashed rgba(55, 65, 81, 0.4);
	border-radius: 8px;
}
.cf-binder-slot .cf-binder-holder-podium {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	box-sizing: border-box;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-holder,
.cf-binder-embed .cf-binder-holder-podium .cf-card-item {
	font-size: 0.92em;
	min-width: var(--binder-slot-size, 150px);
	min-height: var(--binder-slot-size, 150px);
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	aspect-ratio: 1/1;
	box-sizing: border-box;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-inner {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}
/* Desktop profile: do not override coin-row/coin-area (width:100% on coin-area made parent non-square → ellipse + clipped chrome). */
.cf-binder-embed .cf-binder-holder-podium .cf-v4-side {
	padding: 6px;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	background: var(--cf-bg-secondary, #1b202f) !important;
	border: 1px solid var(--cf-border-color, #2a3143);
	border-radius: 8px;
	box-shadow: var(--cf-shadow-elevation, 0 4px 12px rgba(0, 0, 0, 0.3));
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-gold .cf-v4-side {
	border-color: var(--cf-gold, #d4af37);
	box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-silver .cf-v4-side {
	border-color: #94a3b8;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-plat .cf-v4-side {
	border-color: #64748b;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-pall .cf-v4-side {
	border-color: #475569;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-other .cf-v4-side {
	border-color: #b45309;
}
.cf-binder-slot-empty {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-pill-metal,
.cf-binder-embed .cf-binder-holder-podium .cf-v4-pill.cf-v4-pill-metal {
	display: none !important;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-pill-grade {
	display: none !important;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-side {
	overflow: visible;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-flag-corner,
.cf-binder-embed .cf-binder-holder-podium .cf-v4-flag-lazy,
.cf-binder-embed .cf-binder-holder-podium .cf-v4-flag-corner-img {
	display: none !important;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
	width: 100%;
	max-width: 100%;
	text-align: center !important;
	display: block;
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-link.cf-v4-link-to-coin {
	padding: 2px;
	min-width: 18px;
	min-height: 18px;
	width: 18px;
	height: 18px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	top: 0;
	right: 0;
	transform: translate(50%, -50%);
	z-index: 16;
	background: var(--cf-gold, #d4af37);
	color: var(--cf-bg-primary, #141824);
	border: 1px solid var(--cf-gold, #d4af37);
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-link.cf-v4-link-to-coin:hover {
	background: rgba(212, 175, 55, 0.2);
	color: var(--cf-gold, #d4af37);
}
.cf-binder-embed .cf-binder-holder-podium .cf-v4-link.cf-v4-link-to-coin svg {
	width: 10px;
	height: 10px;
}
.cf-binder-embed.cf-binder-embed-wide-slots .cf-binder-holder-podium .cf-v4-pill-grade {
	display: inline-block !important;
}

/* Single holder embed (forum parity) */
.cf-embed-holder-wrap {
	display: inline-block;
	width: var(--cf-embed-holder-size, 220px);
	height: var(--cf-embed-holder-size, 220px);
	max-width: 100%;
	background: transparent;
	padding: 0;
	border: none;
	border-radius: 0;
	box-sizing: border-box;
}
.bbp-topic-content .cf-embed-holder-outer,
.bbp-reply-content .cf-embed-holder-outer {
	display: block;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}
.bbp-topic-content .cf-embed-holder-wrap,
.bbp-reply-content .cf-embed-holder-wrap {
	display: block !important;
	margin-left: auto;
	margin-right: auto;
}
.cf-embed-holder-wrap .cf-binder-holder-podium {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	box-sizing: border-box;
	background: none;
	border: none;
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-holder,
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-card-item {
	font-size: 0.92em;
	min-width: var(--cf-embed-holder-size, 220px);
	min-height: var(--cf-embed-holder-size, 220px);
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	aspect-ratio: 1/1;
	box-sizing: border-box;
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-inner {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-side {
	padding: 6px;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	background: var(--cf-bg-secondary, #1b202f) !important;
	border: 1px solid var(--cf-border-color, #2a3143);
	border-radius: var(--cf-border-radius-holder, 8px);
	box-shadow: var(--cf-shadow-elevation, 0 4px 12px rgba(0, 0, 0, 0.3));
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-title {
	font-size: 10px;
	text-align: center !important;
	width: 100%;
	display: block;
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-coin-area {
	min-height: 0;
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-circle {
	width: 88%;
	height: 88%;
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-flag-corner,
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-flag-lazy,
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-flag-corner-img {
	display: none !important;
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-gold .cf-v4-side {
	border-color: var(--cf-gold, #d4af37);
	box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-silver .cf-v4-side {
	border-color: #94a3b8;
	box-shadow: 0 0 10px rgba(148, 163, 184, 0.3);
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-plat .cf-v4-side {
	border-color: #64748b;
	box-shadow: 0 0 8px rgba(100, 116, 139, 0.25);
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-pall .cf-v4-side {
	border-color: #475569;
	box-shadow: 0 0 8px rgba(71, 85, 105, 0.25);
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-holder.cf-v4-metal-other .cf-v4-side {
	border-color: #b45309;
	box-shadow: 0 0 8px rgba(180, 83, 9, 0.25);
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-link.cf-v4-link-to-coin {
	padding: 2px;
	min-width: 18px;
	min-height: 18px;
	width: 18px;
	height: 18px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	top: 0;
	right: 0;
	transform: translate(50%, -50%);
	z-index: 16;
	background: var(--cf-gold, #d4af37);
	color: var(--cf-bg-primary, #141824);
	border: 1px solid var(--cf-gold, #d4af37);
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-link.cf-v4-link-to-coin:hover {
	background: rgba(212, 175, 55, 0.2);
	color: var(--cf-gold, #d4af37);
}
.cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-link.cf-v4-link-to-coin svg {
	width: 10px;
	height: 10px;
}

/* Desktop profile: non-square flex area + width/height % on .cf-v4-circle → ellipse; force square like gallery. */
@media (min-width: 769px) {
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-circle,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-circle {
		aspect-ratio: 1 / 1;
		height: auto !important;
		max-height: 100%;
		box-sizing: border-box;
	}
}

/*
 * Mobile profile + bbPress forum: same stadium rules (public profile “פעילות באתר” parity).
 * Pagination (.cf-binder-nav-right) stays visible — embed markup has no stadium page indicator.
 */
@media (max-width: 768px) {
	.cf-profile-page-wrap .cf-timeline-item-content .cf-embed-binder-outer,
	.cf-profile-page-wrap .cf-timeline-comment-body .cf-embed-binder-outer,
	.cf-profile-page-wrap .cf-wall-post-body .cf-embed-binder-outer {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
	#bbpress-forums .bbp-reply-content .cf-embed-binder-outer,
	#bbpress-forums .bbp-topic-content .cf-embed-binder-outer {
		width: 100%;
		max-width: min(100%, calc(100vw - 24px));
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
		/* Size for cqw — slot math tracks message column, not a distant desktop-wide flex ancestor */
		container-type: inline-size;
		container-name: cf-forum-binder-embed;
	}
	.cf-profile-page-wrap .cf-binder-embed.cf-binder-wrapper,
	#bbpress-forums .cf-binder-embed.cf-binder-wrapper {
		padding: 0;
		border: none;
		background: transparent;
		border-radius: 0;
		width: 100% !important;
		max-width: 100% !important;
		--binder-grid-gap: 6px;
	}
	/*
	 * Forum: avail width — fallback first, then container query when supported (100cqw = message column).
	 * --binder-slot-size MUST be set on .cf-binder-embed (wrapper) with !important to override PHP inline px.
	 */
	#bbpress-forums .cf-binder-embed.cf-binder-wrapper {
		--cf-binder-forum-avail-w: min(100%, calc(100vw - 24px));
	}
	@supports (container-type: inline-size) {
		#bbpress-forums .cf-binder-embed.cf-binder-wrapper {
			--cf-binder-forum-avail-w: min(100cqw, calc(100vw - 24px));
		}
	}
	#bbpress-forums .cf-binder-embed[data-cols='1'] {
		--binder-slot-size: min(150px, max(72px, calc(var(--cf-binder-forum-avail-w) - 24px))) !important;
	}
	#bbpress-forums .cf-binder-embed[data-cols='2'] {
		--binder-slot-size: min(150px, max(56px, calc((var(--cf-binder-forum-avail-w) - 20px) / 2 - 8px))) !important;
	}
	#bbpress-forums .cf-binder-embed[data-cols='3'] {
		--binder-slot-size: min(150px, max(48px, calc((var(--cf-binder-forum-avail-w) - 24px) / 3 - 8px))) !important;
	}
	#bbpress-forums .cf-binder-embed[data-cols='4'] {
		--binder-slot-size: min(150px, max(42px, calc((var(--cf-binder-forum-avail-w) - 28px) / 4 - 6px))) !important;
	}
	#bbpress-forums .cf-binder-embed[data-cols='5'] {
		--binder-slot-size: min(150px, max(36px, calc((var(--cf-binder-forum-avail-w) - 32px) / 5 - 6px))) !important;
	}
	/* Slot size from book width + column count (matches modal density; smaller coin). */
	.cf-profile-page-wrap .cf-binder-embed[data-cols='1'] .cf-binder-book {
		--binder-slot-size: min(var(--binder-slot-size, 150px), max(72px, calc(100% - 24px))) !important;
	}
	.cf-profile-page-wrap .cf-binder-embed[data-cols='2'] .cf-binder-book {
		--binder-slot-size: min(var(--binder-slot-size, 150px), max(56px, calc((100% - 20px) / 2 - 8px))) !important;
	}
	.cf-profile-page-wrap .cf-binder-embed[data-cols='3'] .cf-binder-book {
		--binder-slot-size: min(var(--binder-slot-size, 150px), max(48px, calc((100% - 24px) / 3 - 8px))) !important;
	}
	.cf-profile-page-wrap .cf-binder-embed[data-cols='4'] .cf-binder-book {
		--binder-slot-size: min(var(--binder-slot-size, 150px), max(42px, calc((100% - 28px) / 4 - 6px))) !important;
	}
	.cf-profile-page-wrap .cf-binder-embed[data-cols='5'] .cf-binder-book {
		--binder-slot-size: min(var(--binder-slot-size, 150px), max(36px, calc((100% - 32px) / 5 - 6px))) !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-main,
	#bbpress-forums .cf-binder-embed .cf-binder-main {
		flex: 1;
		min-height: 0;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		/* Default .cf-binder-main uses align-items:center → book stays max-content wide and clips in timeline. */
		align-items: stretch !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-nav-left,
	#bbpress-forums .cf-binder-embed .cf-binder-nav-left {
		display: none !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-nav,
	#bbpress-forums .cf-binder-embed .cf-binder-nav {
		display: flex !important;
		justify-content: center;
		align-items: center;
		flex-wrap: wrap;
		gap: 8px;
		padding: 2px 0 !important;
		flex-shrink: 0;
		position: relative;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-page-title-wrap,
	#bbpress-forums .cf-binder-embed .cf-binder-page-title-wrap {
		position: static;
		left: auto;
		transform: none;
		pointer-events: auto;
		flex: 0 0 auto;
		text-align: center;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-nav-right,
	#bbpress-forums .cf-binder-embed .cf-binder-nav-right {
		flex: 1 1 100%;
		display: flex !important;
		justify-content: center;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-book,
	#bbpress-forums .cf-binder-embed .cf-binder-book {
		background: linear-gradient(135deg, #0f1219 0%, #1a1f2e 100%);
		border: none;
		border-radius: 14px;
		padding: 6px;
		box-shadow:
			0 8px 32px rgba(0, 0, 0, 0.5),
			inset 0 1px 0 rgba(255, 255, 255, 0.03);
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		align-self: stretch !important;
		box-sizing: border-box;
		touch-action: pan-y pinch-zoom;
		flex: 1;
		min-height: 0;
		overflow: auto;
	}
	/* Forum: cap book to column; slots come from wrapper --binder-slot-size (no clip — avoid overflow-x:hidden). */
	#bbpress-forums .cf-binder-embed .cf-binder-book {
		max-width: min(100%, calc(100vw - 24px)) !important;
		overflow-x: visible !important;
		overflow-y: visible !important;
	}
	#bbpress-forums .cf-binder-embed .cf-binder-page {
		min-width: 0 !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-grid.cf-binder-grid-portal-style,
	#bbpress-forums .cf-binder-embed .cf-binder-grid.cf-binder-grid-portal-style {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		margin: 0 auto;
		justify-content: center;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-slot,
	#bbpress-forums .cf-binder-embed .cf-binder-slot {
		width: var(--binder-slot-size, 150px) !important;
		height: var(--binder-slot-size, 150px) !important;
		min-width: var(--binder-slot-size, 150px) !important;
		min-height: var(--binder-slot-size, 150px) !important;
		max-width: var(--binder-slot-size, 150px) !important;
		max-height: var(--binder-slot-size, 150px) !important;
		padding: 0 !important;
		margin: 0 !important;
		border-radius: 6px !important;
		display: flex !important;
		align-items: stretch !important;
		justify-content: stretch !important;
		overflow: visible !important;
		box-sizing: border-box !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-slot.cf-binder-slot-empty-state,
	#bbpress-forums .cf-binder-embed .cf-binder-slot.cf-binder-slot-empty-state {
		border-color: rgba(255, 255, 255, 0.06);
		background: rgba(255, 255, 255, 0.02);
		border-radius: 6px !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium,
	#bbpress-forums .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium {
		width: 100% !important;
		height: 100% !important;
		min-width: 0 !important;
		min-height: 0 !important;
		max-width: 100% !important;
		max-height: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
		flex: 1 1 0 !important;
		display: flex !important;
		align-items: stretch !important;
		justify-content: stretch !important;
		box-sizing: border-box !important;
		overflow: visible !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium .cf-v4-holder,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium .cf-card-item,
	#bbpress-forums .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium .cf-v4-holder,
	#bbpress-forums .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium .cf-card-item {
		padding: 0 !important;
		border: none !important;
		border-radius: 10px;
		background: transparent !important;
		box-shadow: none !important;
		min-width: 0 !important;
		min-height: 0 !important;
		width: 100% !important;
		height: 100% !important;
		max-width: 100% !important;
		max-height: 100% !important;
		aspect-ratio: 1/1 !important;
		box-sizing: border-box !important;
		flex: 1 1 0 !important;
		overflow: visible !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium .cf-v4-inner,
	#bbpress-forums .cf-binder-embed .cf-binder-slot .cf-binder-holder-podium .cf-v4-inner {
		width: 100% !important;
		height: 100% !important;
		min-width: 0 !important;
		min-height: 0 !important;
		box-sizing: border-box !important;
		overflow: visible !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-v4-link,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-v4-link {
		pointer-events: none !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-v4-link,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-v4-link {
		pointer-events: auto !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-title,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-pills,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-tags-side,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-tag,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-title,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-pills,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-tags-side,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-tag {
		display: none !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-v4-link,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-frame,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-in-album,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-watchlist-wrap-holder,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-v4-link,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-frame,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-in-album,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-front .cf-watchlist-wrap-holder {
		display: none !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-v4-link,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-v4-link {
		display: inline-flex !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-frame,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-in-album,
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-watchlist-wrap-holder,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-frame,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-in-album,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-back .cf-watchlist-wrap-holder {
		display: inline-flex !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-side,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-side {
		padding: 5px !important;
		box-sizing: border-box !important;
		width: 100% !important;
		height: 100% !important;
		min-width: 0 !important;
		min-height: 0 !important;
		border-radius: 10px !important;
		background: var(--cf-bg-secondary, #1b202f) !important;
		border: 1px solid var(--cf-border-color, #2a3143);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
		overflow: visible !important;
		justify-content: center !important;
		display: flex !important;
		flex-direction: column !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-coin-row,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-coin-row {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		width: 100% !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-coin-area,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-coin-area {
		max-width: 100% !important;
		width: 100% !important;
		flex: 1 !important;
		min-height: 0 !important;
		aspect-ratio: 1/1 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	.cf-profile-page-wrap .cf-binder-embed .cf-binder-holder-podium .cf-v4-circle,
	#bbpress-forums .cf-binder-embed .cf-binder-holder-podium .cf-v4-circle {
		width: 88% !important;
		height: 88% !important;
		max-width: 88% !important;
		max-height: 88% !important;
		border-radius: 50% !important;
	}
	/* Single holder embed on mobile: smaller frame, stadium-like coin (modal parity). */
	.cf-profile-page-wrap .cf-embed-holder-wrap,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap {
		--cf-embed-holder-size: min(220px, min(72vw, 280px));
	}
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-title,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-pills,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-tags-side,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-tag,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-title,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-title,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-pills,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-pills,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-tags-side,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-tags-side,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-tag,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-tag {
		display: none !important;
	}
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-v4-link,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-frame,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-in-album,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-watchlist-wrap-holder,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-v4-link,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-v4-link,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-frame,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-frame,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-in-album,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-like-wrap-holder-in-album,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-watchlist-wrap-holder,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-front .cf-watchlist-wrap-holder {
		display: none !important;
	}
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-v4-link,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-frame,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-in-album,
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-watchlist-wrap-holder,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-v4-link,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-v4-link,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-frame,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-frame,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-in-album,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-like-wrap-holder-in-album,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-watchlist-wrap-holder,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-back .cf-watchlist-wrap-holder {
		display: inline-flex !important;
	}
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-side,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-side,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-side {
		padding: 5px !important;
		justify-content: center !important;
		display: flex !important;
		flex-direction: column !important;
		overflow: visible !important;
		border-radius: 10px !important;
	}
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-coin-row,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-coin-row,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-coin-row {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		width: 100% !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-coin-area,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-coin-area,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-coin-area {
		max-width: 100% !important;
		width: 100% !important;
		flex: 1 !important;
		min-height: 0 !important;
		aspect-ratio: 1/1 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	.cf-profile-page-wrap .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-circle,
	#bbpress-forums .bbp-reply-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-circle,
	#bbpress-forums .bbp-topic-content .cf-embed-holder-wrap .cf-binder-holder-podium .cf-v4-circle {
		width: 88% !important;
		height: 88% !important;
		max-width: 88% !important;
		max-height: 88% !important;
		border-radius: 50% !important;
	}
}

/*
 * bbPress mobile only: message column must shrink like .cf-timeline-item-content so calc(100%) on .cf-binder-book matches public profile.
 */
@media (max-width: 768px) {
	#bbpress-forums .bbp-reply-content,
	#bbpress-forums .bbp-topic-content {
		min-width: 0;
		box-sizing: border-box;
	}
}
