.rb-stack {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.rb-shell {
	--rb-green: #2f6f4e;
	--rb-green-dark: #1e4d36;
	--rb-surface: #ffffff;
	width: 100%;
	max-width: none;
	margin: 0 0 1.4rem;
}

.rb-shell__hero {
	width: 100%;
	min-height: 300px;
	border-radius: 0;
	background-color: var(--rb-green-dark);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	box-shadow: 0 8px 28px rgba(30, 77, 54, 0.14);
}

.rb-shell__hero--empty {
	background:
		linear-gradient(135deg, rgba(30, 77, 54, 0.95), rgba(47, 111, 78, 0.75)),
		linear-gradient(45deg, rgba(232, 185, 35, 0.2), transparent);
}

.rb-shell__nav {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.65rem;
	max-width: 1200px;
	margin: 0.85rem auto 0;
	padding: 0 1rem;
}

.rb-shell__nav-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--rb-green);
	border-radius: 999px;
	background: var(--rb-surface);
	color: var(--rb-green-dark);
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 3px 12px rgba(30, 77, 54, 0.08);
}

.rb-shell__nav-link:hover,
.rb-shell__nav-link:focus,
.rb-shell__nav-link--active {
	background: var(--rb-green);
	color: #fff;
}

@media (max-width: 720px) {
	.rb-shell__hero {
		min-height: 220px;
	}

	.rb-shell__nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Col·lecció: verd, blanc, groc */
.rb-collection {
	--rb-green: #2f6f4e;
	--rb-green-dark: #1e4d36;
	--rb-green-soft: #e8f2ec;
	--rb-yellow: #e8b923;
	--rb-yellow-bright: #f5d547;
	--rb-yellow-soft: #fdf8e4;
	--rb-surface: #ffffff;
	--rb-surface-muted: #f4faf6;
	--rb-border: #c5ddd0;
	--rb-text: #1a2e24;
}

.rb-collection__title {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--rb-green-dark);
	letter-spacing: -0.02em;
}

@media (min-width: 783px) {
	.rb-collection__title {
		font-size: 2rem;
	}
}

.rb-collection .rb-notice {
	border-radius: 10px;
	border-color: var(--rb-border);
}

.rb-collection .rb-notice--error {
	border-color: #e0a0a0;
}

.rb-collection .rb-filters {
	background: var(--rb-surface);
	border: 1px solid var(--rb-border);
	border-radius: 14px;
	padding: 1.1rem 1.25rem 1.25rem;
	box-shadow: 0 4px 20px rgba(30, 77, 54, 0.07);
}

.rb-collection .rb-filters__actions .button,
.rb-collection .rb-collection__toolbar .button {
	background: var(--rb-green);
	border-color: var(--rb-green-dark);
	color: #fff;
	border-radius: 10px;
	padding: 0.45rem 1.1rem;
	font-weight: 600;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.rb-collection .rb-filters__actions .button:hover,
.rb-collection .rb-collection__toolbar .button:hover {
	background: var(--rb-green-dark);
	border-color: #163828;
	color: #fff;
}

.rb-collection .rb-filters__actions .button-secondary,
.rb-collection .rb-collection__toolbar .button-secondary {
	background: var(--rb-surface);
	color: var(--rb-green-dark);
	border: 2px solid var(--rb-green);
}

.rb-collection .rb-filters__actions .button-secondary:hover,
.rb-collection .rb-collection__toolbar .button-secondary:hover {
	background: var(--rb-yellow-soft);
	color: var(--rb-green-dark);
	border-color: var(--rb-yellow);
}

.rb-collection .rb-panel {
	border-radius: 14px;
	border-color: var(--rb-border);
	background: var(--rb-surface-muted);
	box-shadow: 0 2px 12px rgba(30, 77, 54, 0.05);
}

.rb-notice {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	background: #fff8e6;
	border: 1px solid #f0d090;
}

.rb-notice--error {
	background: #ffecec;
	border-color: #e0a0a0;
}

.rb-notice--info {
	background: var(--rb-green-soft, #e8f2ec);
	border-color: var(--rb-border, #c5ddd0);
	color: var(--rb-text, #1a2e24);
}

/* Avisos d'importació CSV (classes WP admin reutilitzades al frontend) */
.rb-home--settings .notice {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin: 0 0 1rem;
	border-left-width: 4px;
	border-left-style: solid;
}

.rb-home--settings .notice-success {
	background: var(--rb-green-soft, #e8f2ec);
	border-color: var(--rb-border, #c5ddd0);
}

.rb-home--settings .notice-warning {
	background: #fff8e6;
	border-color: #f0d090;
}

.rb-home--settings .notice-error {
	background: #ffecec;
	border-color: #e0a0a0;
}

.rb-admin-csv {
	margin-bottom: 1.5rem;
}

.rb-auth-gate__message,
.rb-auth-gate__hint {
	margin: 0;
	line-height: 1.5;
}

.rb-auth-gate__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 0.75rem;
	margin: 0.75rem 0 0;
	align-items: center;
}

.rb-auth-gate__lost {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
}

.rb-auth-gate__hint {
	margin-top: 0.75rem;
	font-size: 0.88rem;
}

.rb-auth-panels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem 2rem;
	margin-top: 0.5rem;
	align-items: start;
}

.rb-auth-panel {
	position: relative;
	background: var(--rb-surface, #fff);
	border: 1px solid var(--rb-border, #c5ddd0);
	border-radius: 12px;
	padding: 1.1rem 1.2rem 1.25rem;
	box-shadow: 0 2px 12px rgba(30, 77, 54, 0.06);
}

.rb-auth-panel--disabled {
	opacity: 0.92;
}

.rb-auth-panel__title {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-auth-form .rb-field {
	margin-bottom: 0.75rem;
}

.rb-auth-form .rb-field--checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-direction: row;
}

.rb-auth-form .rb-field--checkbox span {
	margin: 0;
}

.rb-auth-form .rb-field--checkbox input {
	width: auto;
}

.rb-auth-form__submit {
	margin: 0.5rem 0 0;
}

.rb-auth-captcha-hint,
.rb-auth-pass-hint {
	margin: -0.35rem 0 0.5rem;
	font-size: 0.82rem;
}

.rb-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rb-auth-login .rb-auth-panels {
	margin-top: 0;
}

.rb-filters__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.75rem 1rem;
	align-items: end;
}

.rb-filters__field span,
.rb-field span {
	display: block;
	font-size: 0.85rem;
	margin-bottom: 0.25rem;
}

.rb-filters__field select,
.rb-filters__field input[type="text"],
.rb-field input[type="text"],
.rb-field input[type="email"],
.rb-field input[type="password"],
.rb-field input[type="file"],
.rb-field select,
.rb-field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: #fff;
}

.rb-filters__field--checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.rb-filters__field--checkbox span {
	margin: 0;
}

.rb-field-row {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.75rem 1rem;
}

.rb-field-row--checks {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.rb-field--block {
	grid-column: 1 / -1;
}

.rb-form-section {
	margin: 0 0 1.25rem;
	padding: 1rem 1.15rem;
	border: 1px solid var(--rb-border, #c5ddd0);
	border-radius: 12px;
	background: var(--rb-surface, #fff);
	box-shadow: 0 2px 12px rgba(30, 77, 54, 0.06);
}

.rb-form-section--photos {
	background: linear-gradient(180deg, #f8fdf9 0%, var(--rb-surface, #fff) 100%);
}

.rb-form-section--alt {
	background: var(--rb-surface-muted, #f4faf6);
}

.rb-form-section__title {
	margin: 0 0 0.85rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--rb-green, #2f6f4e);
	font-size: 1.08rem;
	font-weight: 700;
	color: var(--rb-green-dark, #1e4d36);
	letter-spacing: 0.02em;
}

.rb-gallery-social {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0.7rem 0 0.4rem;
}

.rb-gallery-social__count {
	font-weight: 600;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-gallery-comments {
	margin-top: 0.6rem;
	border-top: 1px solid var(--rb-border, #c5ddd0);
	padding-top: 0.65rem;
}

.rb-gallery-comments__list {
	list-style: none;
	margin: 0 0 0.65rem;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}

.rb-gallery-comments__item {
	display: flex;
	gap: 0.4rem;
	align-items: baseline;
}

.rb-gallery-comments__form {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.rb-gallery-comments__form input[type="text"] {
	flex: 1;
	min-width: 0;
}

.rb-gallery__load-more {
	margin: 0.75rem 0 0;
	text-align: center;
}

.rb-gallery-activity__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
}

.rb-gallery-activity__item {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
	align-items: baseline;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--rb-border, #c5ddd0);
	border-radius: 10px;
	background: var(--rb-surface, #fff);
}

.rb-gallery-activity__text {
	flex: 1 1 260px;
}

.rb-field--inline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.rb-field--inline span {
	margin: 0;
}

.rb-panel {
	padding: 1rem 1.25rem;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	background: #fafafa;
}

.rb-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.rb-delete-form--single {
	margin-top: 0.65rem;
}

.rb-button-danger {
	background: #c83737 !important;
	border-color: #a42b2b !important;
	color: #fff !important;
}

.rb-table-wrap {
	overflow-x: auto;
	border-radius: 14px;
	border: 1px solid var(--rb-border, #c5ddd0);
	box-shadow: 0 6px 28px rgba(30, 77, 54, 0.09);
	background: var(--rb-surface, #fff);
}

.rb-collection-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	color: var(--rb-text, #1a2e24);
}

.rb-collection-table th,
.rb-collection-table td {
	border: 1px solid var(--rb-border, #c5ddd0);
	padding: 0.65rem 0.75rem;
	vertical-align: middle;
}

.rb-collection-table thead th {
	background: linear-gradient(165deg, var(--rb-green, #2f6f4e) 0%, var(--rb-green-dark, #1e4d36) 100%);
	color: #fff;
	font-weight: 600;
	border-color: rgba(255, 255, 255, 0.12);
	text-align: left;
}

.rb-collection-table tbody tr:nth-child(even) {
	background: var(--rb-surface-muted, #f4faf6);
}

.rb-collection-table tbody tr {
	transition: background 0.12s ease;
}

.rb-collection-table tbody tr:hover {
	background: var(--rb-yellow-soft, #fdf8e4);
}

.rb-col-sortable {
	white-space: nowrap;
}

.rb-sort-link {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	color: inherit;
	text-decoration: none;
	border-radius: 6px;
	margin: -0.2rem -0.35rem;
	padding: 0.2rem 0.35rem;
	transition: color 0.12s ease, background 0.12s ease;
}

.rb-sort-link:hover {
	color: var(--rb-yellow-bright, #f5d547);
	background: rgba(255, 255, 255, 0.1);
}

.rb-sort-link:focus-visible {
	outline: 2px solid var(--rb-yellow-bright, #f5d547);
	outline-offset: 2px;
}

.rb-sort-ind {
	font-size: 0.75em;
	opacity: 0.95;
}

.rb-item-title-link {
	color: var(--rb-green-dark, #1e4d36);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.12s ease;
}

.rb-item-title-link:hover {
	color: var(--rb-green, #2f6f4e);
	text-decoration: underline;
	text-decoration-color: var(--rb-yellow, #e8b923);
}

.rb-item-title-link:focus-visible {
	outline: 2px solid var(--rb-yellow, #e8b923);
	outline-offset: 2px;
	border-radius: 4px;
}

.rb-actions {
	white-space: nowrap;
}

.rb-actions .rb-inline-form {
	display: inline-block;
	margin: 0 0.25rem 0 0;
	vertical-align: middle;
}

.rb-actions .button-small,
.rb-actions .rb-btn-dup {
	padding: 0.28rem 0.65rem;
	font-size: 0.82rem;
	border-radius: 8px;
	font-weight: 600;
}

.rb-actions .button-small {
	background: var(--rb-green, #2f6f4e);
	border-color: var(--rb-green-dark, #1e4d36);
	color: #fff;
}

.rb-actions .button-small:hover {
	background: var(--rb-green-dark, #1e4d36);
	color: #fff;
	border-color: #163828;
}

.rb-actions .rb-btn-dup {
	background: var(--rb-surface, #fff);
	color: var(--rb-green-dark, #1e4d36);
	border: 2px solid var(--rb-border, #c5ddd0);
}

.rb-actions .rb-btn-dup:hover {
	background: var(--rb-yellow-soft, #fdf8e4);
	border-color: var(--rb-yellow, #e8b923);
	color: var(--rb-green-dark, #1e4d36);
}

/* Inventari: especificitat alta (.rb-collection-table …) per damunt de CSS antic en cache o del tema. */
.rb-collection-table .rb-col-thumb {
	width: 168px;
	box-sizing: border-box;
	vertical-align: middle;
}

.rb-collection-table .rb-inv-thumb-link {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	color: inherit;
	border-radius: 6px;
	vertical-align: middle;
	transition: box-shadow 0.15s ease;
}

.rb-collection-table .rb-inv-thumb-link:hover .rb-inv-thumb {
	box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.55);
}

.rb-collection-table .rb-inv-thumb-link:focus-visible {
	outline: 3px solid var(--rb-yellow, #e8b923);
	outline-offset: 2px;
}

.rb-collection-table .rb-inv-thumb {
	display: inline-block;
	width: 150px;
	height: 84px;
	overflow: hidden;
	line-height: 0;
	vertical-align: middle;
	border-radius: 8px;
	background: var(--rb-green-soft, #e8f2ec);
	border: 1px solid var(--rb-border, #c5ddd0);
}

.rb-collection-table .rb-inv-thumb-img {
	width: 150px;
	height: 84px;
	max-width: none;
	object-fit: cover;
	display: block;
}

.rb-collection-table .rb-inv-thumb--empty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 150px;
	height: 84px;
	font-size: 0.9rem;
	color: #6a7a72;
}

@media (min-width: 783px) {
	.rb-collection-table .rb-inv-thumb {
		height: auto;
	}

	.rb-collection-table .rb-inv-thumb-img {
		width: 150px;
		height: auto;
		max-width: none;
		object-fit: unset;
	}

	.rb-collection-table .rb-inv-thumb--empty {
		height: auto;
		aspect-ratio: 16 / 9;
	}
}

.rb-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 782px) {
	.rb-collection-table .rb-table-col--optional {
		display: none;
	}

	.rb-collection-table thead .rb-col-sortable,
	.rb-collection-table thead .rb-col-thumb {
		font-size: 0.82rem;
	}

	.rb-collection-table th,
	.rb-collection-table td {
		padding: 0.5rem 0.45rem;
	}

	.rb-collection-table .rb-col-thumb {
		width: 158px;
	}
}

.rb-gallery-field {
	margin-top: 0.5rem;
}

.rb-gallery-field__title {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.rb-gallery-field__hint {
	font-size: 0.85rem;
	margin: 0.35rem 0;
	color: #444;
}

.rb-item-hero-title {
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 1.2;
	margin: 0.5rem 0 1rem;
	text-align: center;
}

@media (min-width: 783px) {
	.rb-item-hero-title {
		font-size: 2.1rem;
		margin-bottom: 1.25rem;
	}
}

.rb-gallery-layout {
	margin: 0.75rem 0 0.5rem;
}

.rb-gallery-layout__primary {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
}

.rb-gallery-layout__primary-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	max-width: 100%;
}

.rb-gallery-layout__primary-btn {
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	display: block;
	line-height: 0;
}

.rb-gallery-layout__primary-img {
	display: block;
	width: 100%;
	max-width: 400px;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	border: 1px solid #ccc;
}

@media (min-width: 783px) {
	.rb-gallery-layout__primary-img {
		max-width: 800px;
	}
}

.rb-gallery-layout__secondary {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem 1rem;
	align-items: start;
}

@media (min-width: 783px) {
	.rb-gallery-layout__secondary {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		gap: 0.5rem;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 0.2rem 0 0.45rem;
		max-width: 100%;
		-webkit-overflow-scrolling: touch;
		scrollbar-gutter: stable;
	}

	.rb-gallery-layout__secondary-item {
		flex: 0 0 auto;
	}

	.rb-gallery-layout__secondary-img {
		width: auto;
		max-width: none;
		height: 84px;
		max-height: 84px;
		aspect-ratio: 16 / 9;
		object-fit: cover;
	}
}

.rb-gallery-layout__secondary-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin: 0;
}

.rb-gallery-layout__secondary-btn {
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	display: block;
	line-height: 0;
}

.rb-gallery-layout__secondary-img {
	display: block;
	width: 100%;
	max-width: 200px;
	height: auto;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid #ccc;
}

.rb-gallery-primary-choice {
	display: flex;
	gap: 0.35rem;
	align-items: center;
	justify-content: center;
	margin-top: 0.35rem;
	font-size: 0.85rem;
}

.rb-gallery-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	margin: 0.5rem 0;
	padding: 0;
}

.rb-gallery-grid__item {
	margin: 0;
}

.rb-gallery-grid__thumb {
	display: block;
	width: 160px;
	height: 90px;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid #ccc;
}

.rb-gallery-grid__preview {
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	display: block;
}

.rb-gallery-grid__remove-toggle {
	display: flex;
	gap: 0.35rem;
	align-items: center;
	margin-top: 0.35rem;
	font-size: 0.85rem;
}

.rb-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0;
	z-index: 99999;
}

.rb-lightbox.is-open {
	display: flex;
}

.rb-lightbox__img {
	width: 100vw;
	max-width: 100%;
	max-height: 100vh;
	object-fit: contain;
}

.rb-lightbox__close {
	position: absolute;
	right: 1rem;
	top: 1rem;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 4px;
	width: 2rem;
	height: 2rem;
	font-size: 1.4rem;
	line-height: 1.5rem;
	cursor: pointer;
}

.rb-delete-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 1rem;
}

.rb-delete-modal.is-open {
	display: flex;
}

.rb-delete-modal__panel {
	background: #fff;
	max-width: 460px;
	width: 100%;
	padding: 1rem 1.2rem;
	border-radius: 8px;
}

.rb-delete-modal__panel h3 {
	margin-top: 0;
	margin-bottom: 1rem;
}

.rb-delete-modal__actions {
	display: flex;
	gap: 0.5rem;
	justify-content: flex-end;
}

/* Railbase – Inici (escriptori) */
.rb-home .muted {
	color: #5a6b62;
	font-size: 0.9rem;
}

.rb-home__toolbar {
	margin: 0;
}

.rb-home__toolbar .button {
	margin-right: 0.5rem;
}

.rb-home__tagline {
	margin: 0.85rem 0 0;
	max-width: min(280px, 100%);
	font-size: 1rem;
	font-style: italic;
	line-height: 1.45;
	color: var(--rb-text, #1a2e24);
	text-align: center;
}

.rb-home__social-links {
	list-style: none;
	margin: 0.65rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	justify-content: center;
	max-width: min(280px, 100%);
}

.rb-home__social-links a {
	font-weight: 600;
	color: var(--rb-green-dark, #1e4d36);
	text-decoration: none;
	border-bottom: 2px solid var(--rb-yellow, #e8b923);
}

.rb-home__social-links a:hover {
	color: var(--rb-green, #2f6f4e);
}

.rb-account-settings__title {
	margin-top: 0;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-account-settings__intro {
	margin-top: 0.35rem;
}

.rb-account-settings h4 {
	margin: 1.25rem 0 0.5rem;
	font-size: 1rem;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-account-settings .rb-field--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	flex-direction: row;
}

.rb-account-settings .rb-field--checkbox span {
	margin: 0;
}

.rb-account-settings .rb-field--checkbox input {
	width: auto;
	margin-top: 0.15rem;
}

.rb-home__hero {
	display: flex;
	flex-wrap: wrap;
	gap: 1.75rem 2rem;
	align-items: flex-start;
	padding: 1.25rem 1.35rem;
	background: var(--rb-surface-muted, #f4faf6);
	border: 1px solid var(--rb-border, #c5ddd0);
	border-radius: 14px;
	box-shadow: 0 4px 20px rgba(30, 77, 54, 0.07);
}

.rb-home__avatar-wrap {
	flex: 0 0 auto;
	max-width: 100%;
}

.rb-home__avatar-frame {
	width: min(200px, 40vw);
	height: min(200px, 40vw);
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid var(--rb-green, #2f6f4e);
	background: var(--rb-green-soft, #e8f2ec);
	box-shadow: 0 6px 24px rgba(30, 77, 54, 0.12);
}

.rb-home__avatar-frame--empty {
	display: flex;
	align-items: center;
	justify-content: center;
}

.rb-home__avatar-placeholder {
	font-size: clamp(2.5rem, 10vw, 4rem);
	font-weight: 700;
	color: var(--rb-green-dark, #1e4d36);
	line-height: 1;
}

.rb-home__avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rb-home__profile {
	flex: 1 1 220px;
	min-width: 0;
}

.rb-home__display-name {
	margin: 0 0 0.25rem;
	font-size: clamp(1.75rem, 4vw, 2.35rem);
	font-weight: 700;
	color: var(--rb-green-dark, #1e4d36);
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.rb-home__login {
	margin: 0 0 1rem;
}

.rb-home__stats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem 1.25rem;
	margin: 0;
}

.rb-home__stat {
	margin: 0;
}

.rb-home__stat dt {
	margin: 0 0 0.25rem;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--rb-green-dark, #1e4d36);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.rb-home__stat dd {
	margin: 0;
	font-size: 1.65rem;
	font-weight: 700;
	color: var(--rb-text, #1a2e24);
}

.rb-home__stats-note {
	margin: 0.75rem 0 0;
	line-height: 1.45;
}

.rb-home__social {
	margin-top: 0.25rem;
}

.rb-home__relationships {
	margin-top: 1rem;
	margin-bottom: 1.5rem;
}

.rb-layouts {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rb-border, #c5ddd0);
}

.rb-home__social-intro {
	margin-top: 0;
	line-height: 1.5;
}

.rb-home__follow-row {
	margin: 1rem 0 1.25rem;
}

.rb-home__follow-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.65rem 1rem;
}

.rb-home__follow-field {
	flex: 1 1 200px;
	max-width: 100%;
	margin: 0;
}

.rb-home__subheading {
	margin: 1.25rem 0 0.5rem;
	font-size: 1.05rem;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-home__friends-list {
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
}

.rb-home__friend-item {
	display: grid;
	grid-template-columns: 40px 1fr auto auto;
	align-items: center;
	gap: 0.5rem 0.75rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--rb-border, #c5ddd0);
}

.rb-home__friend-item:last-child {
	border-bottom: 0;
}

.rb-home__friend-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--rb-green-soft, #e8f2ec);
	flex-shrink: 0;
}

.rb-home__friend-avatar-img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	display: block;
}

.rb-home__friend-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-weight: 700;
	font-size: 1rem;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-home__friend-name {
	font-weight: 600;
	min-width: 0;
}

.rb-home__friend-news-slot {
	justify-self: end;
	min-width: 2.5rem;
	text-align: right;
}

.rb-home__friend-news {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.3;
	background: var(--rb-yellow, #e8b923);
	color: var(--rb-text, #1a2e24);
	white-space: nowrap;
}

.rb-home__friend-action {
	margin: 0;
	justify-self: end;
}

.rb-home__friend-action-select {
	max-width: 11rem;
	font-size: 0.9rem;
}

@media (max-width: 520px) {
	.rb-home__friend-item {
		grid-template-columns: 40px 1fr;
		grid-template-rows: auto auto;
	}

	.rb-home__friend-news-slot {
		grid-column: 2;
		justify-self: start;
		text-align: left;
	}

	.rb-home__friend-action {
		grid-column: 1 / -1;
		justify-self: stretch;
	}

	.rb-home__friend-action-select {
		max-width: 100%;
		width: 100%;
	}
}

.rb-home__alerts {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
}

.rb-home__alert {
	padding: 0.75rem 1rem;
	margin-bottom: 0.5rem;
	border-radius: 10px;
	background: var(--rb-yellow-soft, #fdf8e4);
	border: 1px solid var(--rb-yellow, #e8b923);
	color: var(--rb-text, #1a2e24);
	line-height: 1.45;
}

.rb-home__alert:last-child {
	margin-bottom: 0;
}

/* —— Galeria (feed i compartir) —— */
.rb-gallery__intro {
	margin: 0 0 1.25rem;
	line-height: 1.5;
}

.rb-gallery__relationships {
	margin-bottom: 1.5rem;
}

.rb-gallery__rel-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.65rem 1rem;
	margin: 1rem 0;
}

.rb-gallery__rel-field {
	flex: 1 1 160px;
	margin: 0;
}

.rb-gallery__rel-list {
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
}

.rb-gallery__rel-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--rb-border, #c5ddd0);
}

.rb-gallery__rel-item:last-child {
	border-bottom: 0;
}

.rb-gallery__rel-name {
	font-weight: 600;
}

.rb-gallery__rel-badge {
	font-size: 0.8rem;
	padding: 0.15rem 0.5rem;
	border-radius: 6px;
	background: var(--rb-green-soft, #e8f4ec);
	color: var(--rb-green-dark, #1e4d36);
}

.rb-gallery__rel-badge--ignored {
	background: #f5e8e8;
	color: #6b2c2c;
}

.rb-gallery__section {
	margin: 2rem 0 0;
}

.rb-gallery__section > h3 {
	margin: 0 0 1rem;
	font-size: 1.2rem;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-gallery-feed {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}

.rb-gallery-feed__card {
	border: 1px solid var(--rb-border, #c5ddd0);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.rb-gallery-feed__header {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.75rem 1rem 0.5rem;
}

.rb-gallery-feed__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rb-green-soft, #e8f4ec);
	font-weight: 700;
	color: var(--rb-green-dark, #1e4d36);
}

.rb-gallery-feed__avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rb-gallery-feed__meta {
	min-width: 0;
}

.rb-gallery-feed__author {
	display: block;
	font-size: 0.95rem;
}

.rb-gallery-feed__date {
	font-size: 0.8rem;
}

.rb-gallery-feed__media {
	line-height: 0;
}

.rb-gallery-feed__zoom {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.rb-gallery-feed__img {
	width: 100%;
	height: auto;
	display: block;
}

.rb-gallery-feed__caption {
	padding: 0.75rem 1rem;
	font-size: 0.95rem;
	line-height: 1.45;
}

.rb-gallery-feed__source {
	padding: 0 1rem 0.85rem;
	margin: 0;
	font-size: 0.85rem;
}

.rb-gallery__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.rb-gallery-share {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px dashed var(--rb-border, #c5ddd0);
	font-size: 0.88rem;
}

.rb-gallery-share__status {
	margin: 0 0 0.35rem;
	color: var(--rb-green-dark, #1e4d36);
	font-weight: 600;
}

.rb-gallery-share__summary {
	cursor: pointer;
	color: var(--rb-green-dark, #1e4d36);
	font-weight: 600;
}

.rb-gallery-share__form {
	margin-top: 0.5rem;
}

.rb-gallery-share__form textarea {
	width: 100%;
	min-height: 4.5rem;
}

.rb-layouts__list {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}

.rb-layouts__item {
	margin: 0;
}

.rb-layouts__title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

.rb-layouts__thumb {
	margin-bottom: 0.5rem;
	border-radius: 8px;
	overflow: hidden;
}

.rb-layouts__thumb-img {
	width: 100%;
	height: auto;
	display: block;
}
