/* Friends Mastodon Theme */

/* === Base === */
.friends-page {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color-scheme: light dark;
	color: light-dark(#282c37, #dadada);
	background: light-dark(#f2f5f7, #1e2028);
	overflow-wrap: break-word;
}

.friends-page *, .friends-page *::before, .friends-page *::after {
	box-sizing: border-box;
}

.friends-page a { color: light-dark(#563acc, #c4bbff); text-decoration: none; }
.friends-page a:visited { color: light-dark(#563acc, #c4bbff); }
.friends-page a:hover { text-decoration: underline; }
.friends-page img { max-width: 100%; height: auto; }
.friends-page h1, .friends-page h2, .friends-page h3, .friends-page h4 { margin: 0; }
.friends-page ul, .friends-page ol { margin: 0; padding: 0; }
.friends-page p { margin: 0 0 .8em; }
.friends-page p:last-child { margin-bottom: 0; }
.friends-page code, .friends-page pre { overflow: auto; font-size: 13px; }

/* === 3-Column Layout === */
/* body is the flex container; the 3 children are the columns */
body.friends-page {
	display: flex;
	align-items: flex-start;
	min-height: 100vh;
	padding-top: 32px; /* wp admin bar */
}

/* --- Left column: user card + search --- */
.mastodon-left-col {
	width: 285px;
	flex-shrink: 0;
	padding: 20px 16px;
	position: sticky;
	top: 32px;
	height: calc(100vh - 32px);
	overflow-y: auto;
	background: light-dark(#f2f5f7, #1e2028);
}

/* --- Center column: timeline --- */
.mastodon-center-col {
	flex: 1;
	min-width: 0;
	max-width: 630px;
	border-left: 1px solid light-dark(#d4dde8, #393f4f);
	border-right: 1px solid light-dark(#d4dde8, #393f4f);
	background: light-dark(#fff, #282c37);
	min-height: calc(100vh - 32px);
}

/* --- Right column: navigation sidebar --- */
.mastodon-right-col {
	width: 285px;
	flex-shrink: 0;
	position: sticky;
	top: 32px;
	height: calc(100vh - 32px);
	overflow-y: auto;
	background: light-dark(#f2f5f7, #1e2028);
	padding-bottom: 16px;
}

/* Sidebar close button (mobile only) */
.mastodon-sidebar-close {
	display: none;
	position: absolute;
	top: 10px;
	right: 12px;
	font-size: 24px;
	line-height: 1;
	color: light-dark(#606984, #9baec8);
	text-decoration: none;
	z-index: 1;
}

.mastodon-sidebar-close:hover {
	color: light-dark(#282c37, #fff);
	text-decoration: none;
}

/* Mobile overlay */
.mastodon-overlay { display: none; }

/* Mobile panel: collapsible compose + search (replaces left col on small screens) */
.mastodon-mobile-panel {
	display: none;
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
}

.mastodon-mobile-panel-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	cursor: pointer;
	color: light-dark(#282c37, #dadada);
	font-weight: 600;
	font-size: 14px;
	list-style: none;
}

.mastodon-mobile-panel-toggle::-webkit-details-marker { display: none; }
.mastodon-mobile-panel-toggle::marker { display: none; content: ""; }

.mastodon-mobile-panel-toggle img {
	width: 32px;
	height: 32px;
	border-radius: 4px;
}

.mastodon-mobile-panel-toggle span {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mastodon-mobile-panel-toggle .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	transition: transform .2s;
	color: light-dark(#606984, #9baec8);
}

.mastodon-mobile-panel[open] > .mastodon-mobile-panel-toggle .dashicons {
	transform: rotate(180deg);
}

.mastodon-mobile-panel-content {
	padding: 0 16px 12px;
}

@media (max-width: 1100px) {
	.mastodon-left-col {
		display: none;
	}
	.mastodon-mobile-panel {
		display: block;
	}
}

@media (max-width: 780px) {
	body.friends-page {
		display: block;
	}
	.mastodon-center-col {
		max-width: 100%;
		border: none;
		min-height: 0;
	}
	.mastodon-right-col {
		display: none;
		position: fixed;
		top: 32px;
		right: 0;
		width: 285px;
		height: calc(100vh - 32px);
		z-index: 20;
		box-shadow: -4px 0 16px rgba(0,0,0,.2);
	}
	.mastodon-right-col:target {
		display: block;
	}
	.mastodon-sidebar-close {
		display: block;
	}
	.mastodon-overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 15;
		background: rgba(0,0,0,.4);
		opacity: 0;
		pointer-events: none;
	}
	.mastodon-right-col:target ~ .mastodon-overlay {
		opacity: 1;
		pointer-events: auto;
	}
}

/* === Left Column === */
.mastodon-user-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 4px 16px;
	margin-bottom: 4px;
	text-decoration: none;
	border-radius: 8px;
	color: light-dark(#282c37, #dadada);
}

.mastodon-user-card:hover { background: light-dark(rgba(0,0,0,.04), rgba(255,255,255,.04)); text-decoration: none; }

.mastodon-user-card .mastodon-avatar,
.mastodon-user-card img {
	width: 46px;
	height: 46px;
	border-radius: 8px;
	display: block;
	flex-shrink: 0;
}

.mastodon-user-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mastodon-display-name {
	font-size: 15px;
	font-weight: 700;
	color: light-dark(#282c37, #dadada);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mastodon-handle {
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Compose box in left col */
.mastodon-compose-form {
	margin-bottom: 12px;
	background: light-dark(#fff, #282c37);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	padding: 10px 12px;
}

.mastodon-compose-form textarea {
	width: 100%;
	background: transparent;
	border: none;
	outline: none;
	resize: none;
	font-size: 14px;
	font-family: inherit;
	color: light-dark(#282c37, #dadada);
	min-height: 80px;
}

.mastodon-compose-form textarea::placeholder {
	color: light-dark(#606984, #9baec8);
}

.mastodon-compose-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid light-dark(#d4dde8, #393f4f);
}

.mastodon-compose-settings {
	color: light-dark(#606984, #9baec8);
	display: flex;
	align-items: center;
	margin-right: auto;
}

.mastodon-compose-settings:hover { color: light-dark(#563acc, #c4bbff); text-decoration: none; }

.mastodon-compose-submit {
	background: light-dark(#563acc, #6364ff);
	color: #fff;
	border: none;
	border-radius: 100px;
	padding: 6px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}

.mastodon-compose-submit:hover { background: light-dark(#4a30b0, #7475ff); }

/* @ mention dropdown */
.mastodon-mention-dropdown {
	position: absolute;
	z-index: 200;
	list-style: none;
	background: light-dark(#fff, #282c37);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,.15);
	padding: 4px 0;
	max-height: 220px;
	overflow-y: auto;
}

.mastodon-mention-dropdown li a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	color: light-dark(#282c37, #dadada);
	text-decoration: none;
}

.mastodon-mention-dropdown li a:hover,
.mastodon-mention-dropdown li.active a {
	background: light-dark(rgba(0,0,0,.04), rgba(255,255,255,.06));
	text-decoration: none;
}

.mastodon-mention-dropdown li a img {
	width: 24px;
	height: 24px;
	border-radius: 4px;
	flex-shrink: 0;
}

.mastodon-mention-name {
	font-size: 14px;
	font-weight: 600;
}

.mastodon-mention-handle {
	font-size: 12px;
	color: light-dark(#606984, #9baec8);
	margin-left: auto;
}

.mastodon-mention-no-results span {
	display: block;
	padding: 8px 12px;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	font-style: italic;
}

/* Search in left col */
.mastodon-search-form {
	width: 100%;
}

.mastodon-search-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.mastodon-search-wrap .form-icon {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: .8rem;
	height: .8rem;
	pointer-events: none;
}

.mastodon-search-input {
	width: 100%;
	background: light-dark(#eaedf1, #313543);
	border: 1px solid transparent;
	border-radius: 100px;
	padding: 8px 16px;
	font-size: 14px;
	font-family: inherit;
	color: light-dark(#282c37, #dadada);
	outline: none;
}

.mastodon-search-input:focus {
	border-color: light-dark(#563acc, #6364ff);
	background: light-dark(#fff, #282c37);
}

.mastodon-search-input::placeholder {
	color: light-dark(#606984, #9baec8);
}

/* === Center Column Header === */
.mastodon-col-header {
	z-index: 5;
	background: light-dark(rgba(255,255,255,.9), rgba(40,44,55,.9));
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
}

.mastodon-col-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	gap: 8px;
}

.mastodon-col-title-row h2,
.mastodon-col-title-row #page-title {
	font-size: 17px;
	font-weight: 700;
	color: light-dark(#282c37, #fff);
	letter-spacing: -.2px;
	margin: 0;
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mastodon-col-title-row #page-title a {
	color: light-dark(#282c37, #fff);
}

.mastodon-col-title-row #page-title a:hover { text-decoration: none; }

.mastodon-title-avatar {
	width: 24px;
	height: 24px;
	border-radius: 4px;
	vertical-align: middle;
	margin-right: 4px;
}

/* Mobile sidebar toggle */
.off-canvas-toggle {
	display: none;
	color: light-dark(#606984, #9baec8);
	padding: 4px 8px;
	border-radius: 100px;
	border: none;
	background: none;
	cursor: pointer;
	margin-right: 4px;
}

@media (max-width: 780px) {
	.off-canvas-toggle {
		display: inline-flex;
		align-items: center;
	}
	.mastodon-col-header {
		position: static;
	}
}

/* Chips area */
.mastodon-chips-area {
	padding: 12px 16px 14px;
	border-top: 1px solid light-dark(#d4dde8, #393f4f);
}

/* Hide the title headings inside the chips area — we've already shown the title above */
.mastodon-chips-area h2,
.mastodon-chips-area #page-title,
.mastodon-chips-area #author-header > h2,
.mastodon-chips-area #main-header > h2 {
	display: none;
}

/* === Chips === */
.friends-page .chip {
	display: inline-block;
	background: light-dark(rgba(86,58,204,.08), rgba(99,100,255,.15));
	border: none;
	border-radius: 100px;
	padding: 4px 12px;
	margin: 3px 2px;
	font-size: 13px;
	color: light-dark(#563acc, #c4bbff);
	line-height: 1.6;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.friends-page a.chip:visited { color: light-dark(#563acc, #c4bbff); }
.friends-page .chip:hover { background: light-dark(rgba(86,58,204,.15), rgba(99,100,255,.25)); text-decoration: none; }
.friends-page span.chip { cursor: default; }
.friends-page .chip.activitypub-follower-check.is-following {
	background: light-dark(#e4f6e8, rgba(46,160,67,.22));
	color: light-dark(#116329, #8ddb8c);
}
.friends-page .chip.activitypub-follower-check.is-not-following {
	background: light-dark(#fff4d6, rgba(210,153,34,.22));
	color: light-dark(#7a4d00, #eac55f);
}
.friends-page .chip.activitypub-follower-check.is-error {
	background: light-dark(#fde7e9, rgba(218,54,51,.22));
	color: light-dark(#8a2424, #ff9b9b);
}

/* Description text in author header chips area */
.mastodon-chips-area p {
	font-size: 14px;
	color: light-dark(#606984, #9baec8);
	margin-bottom: 10px;
}

/* === Timeline === */
.friends-page section.posts {
	padding: 0;
	margin: 0;
	background: light-dark(#fff, #282c37);
}

.friends-page .posts > .friends-empty-state {
	border-bottom: 1px solid light-dark(#c8d0db, #393f4f);
	background: light-dark(#fff, #282c37);
}

.friends-page .posts > .friends-empty-state > .card-body {
	padding: 20px 16px;
}

.friends-page .posts > .friends-empty-state h1 {
	font-size: 22px;
	line-height: 1.3;
	margin-bottom: 12px;
}

.friends-page .posts > .friends-empty-state ul,
.friends-page .posts > .friends-empty-state ol {
	margin: 0 0 .8em;
	padding-left: 1.25rem;
}

.friends-page .posts > .friends-empty-state li {
	margin-bottom: .6em;
}

/* === Individual Status Card === */
.friends-page .posts article.card {
	position: relative;
	padding: 16px 16px 16px 78px;
	border: none;
	border-bottom: 1px solid light-dark(#c8d0db, #393f4f);
	border-radius: 0;
	background: light-dark(#fff, #282c37);
	box-shadow: none;
	transition: background .1s;
}

.friends-page .posts article.card:hover {
	background: light-dark(#fafbfc, #2c3040);
}

.friends-page .posts article.card:last-child {
	border-bottom: none;
}

/* === Card Header (the <header class="entry-header card-header"> from the partial) === */
.friends-page .posts .card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 0;
	margin-bottom: 8px;
	gap: 8px;
}

/* Avatar: absolute on the left */
.friends-page .posts .card-header > div.avatar {
	position: absolute;
	left: 16px;
	top: 16px;
	flex-shrink: 0;
}

.friends-page .posts .card-header .avatar a,
.friends-page .posts .card-header .avatar .author-avatar {
	display: block;
}

.friends-page .posts .card-header .avatar img {
	width: 46px;
	height: 46px;
	max-width: none;
	border-radius: 8px;
	display: block;
}

.friends-page .posts .card-header .avatar img.avatar-overlay {
	position: absolute;
	bottom: -4px;
	right: -4px;
	width: 22px;
	height: 22px;
	border-radius: 4px;
	border: 2px solid light-dark(#fff, #282c37);
}

/* Post meta: author · timestamp on one line, Mastodon-style */
.friends-page .posts .post-meta {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0 6px;
	line-height: 1.4;
}

.friends-page .posts .author {
	font-weight: 700;
	font-size: 15px;
	color: light-dark(#282c37, #fff);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.friends-page .posts .author a {
	color: light-dark(#282c37, #fff);
	font-weight: 700;
}

.friends-page .posts .author a:hover { text-decoration: underline; }
.friends-page .posts .author strong { font-weight: 700; }

/* Separator dot between author and timestamp */
.friends-page .posts .author::after {
	content: ' ·';
	color: light-dark(#9baec8, #9baec8);
	font-weight: 400;
	margin-left: 2px;
}

.friends-page .posts .permalink {
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.friends-page .posts .permalink a { color: light-dark(#606984, #9baec8); }
.friends-page .posts .permalink a:hover { text-decoration: underline; }
.friends-page .posts .reading-time { color: light-dark(#606984, #9baec8); font-size: 13px; }

/* Overflow: the ··· post menu, right side of header row */
.friends-page .posts .overflow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	opacity: 0;
	transition: opacity .1s;
}

.friends-page .posts article.card:hover .overflow {
	opacity: 1;
}

.friends-page .collapse-post { display: none; }
.friends-page .posts:not(.all-collapsed) .teaser { display: none; }

/* === Post Title === */
.friends-page .posts .card-title {
	margin-bottom: 6px;
}

/* The header partial itself is now a direct child of <article> so it needs the same indent */
.friends-page .posts article.card > header.card-header {
	margin-bottom: 6px;
}

.friends-page .posts .card-title a {
	font-size: 16px;
	font-weight: 700;
	color: light-dark(#282c37, #fff);
	line-height: 1.4;
}

.friends-page .posts .card-title a:visited { color: light-dark(#282c37, #fff); }
.friends-page .posts .card-title a:hover { text-decoration: underline; }
.friends-page .posts h4 a { font-size: 15px; font-weight: 700; }

/* === Post Body === */
.friends-page .posts .card-body,
.friends-page .posts .entry-content {
	font-size: 15px;
	line-height: 1.7;
	color: light-dark(#282c37, #dadada);
	padding: 0;
}

.friends-page .posts .card-body p,
.friends-page .posts .entry-content p {
	margin: 0 0 .8em;
}

.friends-page .posts .card-body p:last-child,
.friends-page .posts .entry-content p:last-child {
	margin-bottom: 0;
}

.friends-page .posts .card-body img,
.friends-page .posts .entry-content img {
	max-width: 100%;
	border-radius: 8px;
	height: auto;
	margin: 8px 0;
	display: block;
}

/* Image gallery: grid layout for multiple images */
.friends-page .posts .card-body .friends-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 4px;
	border-radius: 8px;
	overflow: hidden;
	margin: 8px 0;
}

.friends-page .posts .card-body .friends-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
}

/* Single image in gallery: full width */
.friends-page .posts .card-body .friends-gallery.gallery-1 {
	grid-template-columns: 1fr;
}

/* 3 images: first image spans full width */
.friends-page .posts .card-body .friends-gallery.gallery-3 img:first-child {
	grid-column: 1 / -1;
}

/* === Post Footer / Action Bar === */
.friends-page .posts .card-footer,
.friends-page .posts footer.entry-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2px;
	padding: 0;
	border-top: none;
	background: transparent;
	margin-top: 12px;
}

.friends-page .posts .card-footer a,
.friends-page .posts .card-footer .btn-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: light-dark(#606984, #9baec8);
	font-size: 13px;
	padding: 5px 10px;
	border-radius: 100px;
	background: none;
	border: none;
	cursor: pointer;
	transition: color .1s, background .1s;
	text-decoration: none;
}

.friends-page .posts .card-footer a:hover,
.friends-page .posts .card-footer .btn-link:hover {
	color: light-dark(#563acc, #6364ff);
	background: light-dark(rgba(86,58,204,.08), rgba(99,100,255,.12));
	text-decoration: none;
}

.friends-page .posts .card-footer .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: text-bottom;
}

/* Reaction buttons */
.friends-page button.friends-reaction,
.friends-page button.friends-reaction-picker {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	border-radius: 100px;
	padding: 5px 10px;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	cursor: pointer;
	transition: color .1s, background .1s;
	font-family: inherit;
}

.friends-page button.friends-reaction:hover,
.friends-page button.friends-reaction-picker:hover {
	color: #ca8f04;
	background: light-dark(rgba(202,143,4,.1), rgba(202,143,4,.12));
}

.friends-page button.friends-reaction.pressed { color: #ca8f04; }

/* === Boost / Reblog Indicator === */
.friends-page .posts .reblogged-by,
.friends-page .posts .reblog-info {
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding-left: 30px;
}

/* Boost indicator: keep text light-weight to distinguish from post author */
.friends-page .posts .boosted {
	font-weight: 400;
}

.friends-page .activitypub-custom-emoji {
	display: inline-block;
	width: auto;
	max-width: 1.5em;
	height: 1em;
	max-height: 1em;
	margin: 0 0.05em;
	object-fit: contain;
	vertical-align: -0.15em;
}

/* Follow button on boosts: hidden by default, shown on hover (desktop only) */
.friends-page .posts .boosted .follow-button,
.friends-page .posts .boosted .follow-button span.name {
	display: none;
}

.friends-page .posts .boosted:hover .follow-button {
	display: inline;
}

@media (max-width: 780px) {
	.friends-page .posts .boosted:hover .follow-button {
		display: none;
	}
}

/* === Comments === */
.friends-page .comments-content {
	padding: 12px 0 12px 16px;
	margin: 12px 0;
	font-size: 14px;
}

.friends-page .comments-content textarea {
	max-width: 100%;
	box-sizing: border-box;
}

.friends-page .comments-content.closed { display: none; }
.friends-page .comments-content.open { display: block; }

.friends-page .comments-content h5 {
	font-size: 13px;
	font-weight: 700;
	color: light-dark(#606984, #9baec8);
	margin: 0 0 8px;
}

.friends-page .comments-content .comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.friends-page .comments-content .comment {
	padding: 6px 0;
	border-bottom: 1px solid light-dark(#e6ebf0, #393f4f);
}

/* === Right Column — Mastodon nav style === */
.mastodon-brand {
	padding: 14px 16px 10px;
	margin-bottom: 2px;
}

.mastodon-brand h2 {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.5px;
	color: light-dark(#563acc, #6364ff);
}

.mastodon-brand a { color: light-dark(#563acc, #6364ff); }
.mastodon-brand a:hover { text-decoration: none; }

.mastodon-right-nav {
	padding: 4px 0;
}

/* Keep sidebar dashicons from blowing up */
.mastodon-right-nav .dashicons,
.mastodon-right-col .dashicons {
	font-size: 16px !important;
	width: 16px !important;
	height: 16px !important;
	vertical-align: text-bottom;
	flex-shrink: 0;
}

/* Widget h5 headers (e.g. Refresh) — left-align with nav, no extra vertical padding */
.mastodon-right-col .friends-widget h5 {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px 0;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: light-dark(#282c37, #dadada);
}

/* h5 inside accordion summaries — summary already provides padding */
.mastodon-right-col .friends-widget .accordion-header h5,
.mastodon-right-col .friends-widget summary h5 {
	padding: 16px 0 6px;
	margin: 8px 0 0;
	border-top: 1px solid light-dark(#d9e1e8, #393f4f);
}

.mastodon-right-col .friends-widget .form-group {
	padding: 0 16px;
	margin-bottom: 8px;
}

.mastodon-right-customize {
	padding: 12px 16px 0;
	font-size: 12px;
}

.mastodon-right-customize a {
	color: light-dark(#606984, #9baec8);
	font-size: 12px;
}

/* Sidebar accordion section headers */
.friends-page .accordion,
.mastodon-right-col details {
	border: none;
	margin: 0;
	padding: 0;
}

.friends-page .accordion summary,
.friends-page .accordion .accordion-header {
	display: block;
	padding: 0 16px;
	font-size: 11px;
	font-weight: 700;
	color: light-dark(#606984, #9baec8);
	text-transform: uppercase;
	letter-spacing: .8px;
	cursor: pointer;
	list-style: none;
}

.friends-page .accordion summary::-webkit-details-marker { display: none; }
.friends-page .accordion summary::marker { display: none; content: ''; }

.friends-page .friends-widget .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	vertical-align: text-bottom;
}

/* Sidebar nav menu */
.friends-page .menu, .friends-page .menu-nav {
	list-style: none;
	padding: 0;
	margin: 0;
}

.friends-page .menu-item,
.friends-page .friend-list .menu-item {
	margin: 0;
}

.friends-page .menu-item a,
.friends-page .friend-list .menu-item a {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	color: light-dark(#282c37, #dadada);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: background .1s;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.friends-page .menu-item a:hover {
	background: light-dark(rgba(86,58,204,.06), rgba(99,100,255,.1));
	text-decoration: none;
}

.friends-page .friend-stats .menu-item a {
	font-size: 14px;
	padding: 7px 16px;
}

.friends-page .off-canvas-sidebar .description,
.friends-page .off-canvas-sidebar p,
.mastodon-right-col .description,
.mastodon-right-col p {
	font-size: 12px;
	color: light-dark(#606984, #9baec8);
	padding: 2px 16px;
	margin: 0 0 4px;
	line-height: 1.4;
}

/* === Inputs & Forms === */
.friends-page .form-input,
.friends-page input[type="text"] {
	background: light-dark(#eaedf1, #313543);
	border: 1px solid transparent;
	border-radius: 100px;
	padding: 8px 16px;
	font-size: 14px;
	font-family: inherit;
	color: light-dark(#282c37, #dadada);
	outline: none;
}

.friends-page .form-input:focus,
.friends-page input[type="text"]:focus {
	border-color: light-dark(#563acc, #6364ff);
	background: light-dark(#fff, #282c37);
}

.friends-page .btn,
.friends-page button {
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
}

.friends-page .btn {
	border-radius: 100px;
	padding: 7px 18px;
	font-weight: 500;
	border: none;
	transition: background .1s;
	background: light-dark(#eaedf1, #313543);
	color: light-dark(#282c37, #dadada);
}

.friends-page .btn:hover { background: light-dark(#d4dde8, #3d4456); box-shadow: none; }

.friends-page .btn-primary {
	background: light-dark(#563acc, #6364ff);
	color: #fff;
}

.friends-page .btn-primary:hover { background: light-dark(#4926a5, #7475ff); }

.friends-page .btn-link {
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px 10px;
	color: light-dark(#606984, #9baec8);
	border-radius: 100px;
}

.friends-page .btn-link:hover {
	background: light-dark(rgba(86,58,204,.08), rgba(99,100,255,.12));
	color: light-dark(#563acc, #6364ff);
	box-shadow: none;
}

.friends-page .input-group { display: flex; }

.friends-page .input-group .form-input,
.friends-page .input-group input[type="text"] {
	flex: 1;
	border-radius: 100px 0 0 100px;
}

.friends-page .input-group .input-group-btn,
.friends-page .input-group .btn {
	border-radius: 0 100px 100px 0;
}

.friends-page .form-autocomplete { position: relative; }

.friends-page .form-autocomplete .menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: light-dark(#fff, #313543);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	z-index: 100;
	box-shadow: 0 8px 24px rgba(0,0,0,.2);
	overflow: hidden;
	padding: 0;
}

.friends-page .form-autocomplete .menu .menu-item {
	padding: 0;
	margin: 0;
}

.friends-page .form-autocomplete .menu .menu-item + .menu-item {
	margin-top: 0;
}

.friends-page .form-autocomplete .menu .menu-item > a {
	display: block !important;
	white-space: normal;
	margin: 0;
	padding: 8px 12px;
	border-radius: 0;
	color: light-dark(#282c37, #dadada);
	font-size: 14px;
	font-weight: normal;
	line-height: 1.4;
}

.friends-page .form-autocomplete .menu .menu-item > a:hover,
.friends-page .form-autocomplete .menu .menu-item > a:focus,
.friends-page .form-autocomplete .menu .menu-item > a:active {
	background: light-dark(rgba(86,58,204,.06), rgba(99,100,255,.1));
	color: light-dark(#282c37, #dadada);
	outline: none;
}

.friends-page .form-autocomplete .menu .menu-item > a > .ab-icon {
	margin-right: 6px;
	vertical-align: middle;
}

.friends-page .form-autocomplete .menu .menu-item > a small {
	margin-left: .3em;
	color: light-dark(#606984, #9baec8);
}

.friends-page .form-autocomplete .menu .menu-item > a mark {
	background: light-dark(rgba(86,58,204,.15), rgba(99,100,255,.25));
	color: inherit;
	border: none;
	border-radius: 2px;
	padding: 0 1px;
}

/* === Dropdown Menus === */
.friends-page .friends-dropdown {
	position: relative;
	display: inline-block;
}

.friends-page .friends-dropdown .menu {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	left: auto;
	background: light-dark(#fff, #313543);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0,0,0,.2);
	z-index: 100;
	min-width: 200px;
	overflow: hidden;
}

.friends-page .friends-dropdown.active .menu,
.friends-page .friends-dropdown .menu:hover {
	display: block;
}

.friends-page .friends-dropdown .menu .menu-item a {
	padding: 10px 16px;
	font-size: 14px;
}

.friends-page .friends-dropdown-right .menu {
	left: auto;
	right: 0;
}

/* === Author Header (on single-author pages) === */
.friends-page #author-header,
.friends-page .author-header {
	padding: 16px;
}

.friends-page #author-header.has-header-image {
	background-size: cover;
	background-position: center;
	position: relative;
	padding: 40px 16px 16px;
}

.friends-page #author-header.has-header-image::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.6) 100%);
	border-radius: inherit;
}

.friends-page #author-header.has-header-image > * {
	position: relative;
}

.friends-page #author-header.has-header-image h2,
.friends-page #author-header.has-header-image p,
.friends-page #author-header.has-header-image .chip,
.friends-page #author-header.has-header-image a {
	color: #fff;
	text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.friends-page #author-header.has-header-image .chip {
	background: rgba(255,255,255,.2);
}

.friends-page .author-header .avatar img {
	border-radius: 8px;
	vertical-align: middle;
	margin-right: 8px;
	margin-bottom: 10px;
}

/* Add spacing after the description text, before chips */
.friends-page #author-header > p {
	margin-bottom: 12px;
}

/* Folder dropdown: blend into chip style */
.friends-page .friends-folder-selector select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: none;
	color: inherit;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	padding: 0;
	margin: 0;
}

.friends-page .friends-folder-selector select:focus {
	outline: none;
}

/* Message section styling */
.friends-page .card.mt-2.p-2 {
	padding: 16px 16px 16px 78px !important;
	margin: 0 !important;
	border: none;
	border-bottom: 1px solid light-dark(#c8d0db, #393f4f);
	border-radius: 0;
	background: light-dark(#fff, #282c37);
	box-shadow: none;
}

.friends-page #friends-send-new-message {
	padding: 16px !important;
}

/* Mastodon theme: messages */
.friends-page .card.mt-2.p-2:has(.friend-message) {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0 !important;
	margin: 0;
}

.friends-page .card.mt-2.p-2:has(.friend-message) > strong {
	display: block;
	padding: 12px 16px;
	font-size: 15px;
	color: light-dark(#282c37, #dadada);
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
}

.friends-page .friend-message {
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
}

.friends-page a.display-message {
	display: block;
	padding: 12px 16px;
	color: light-dark(#282c37, #dadada);
	font-size: 14px;
	transition: background .15s;
}

.friends-page a.display-message:hover {
	background: light-dark(#f2f5f7, #313543);
	text-decoration: none;
}

.friends-page a.display-message.unread {
	font-weight: 700;
	border-left: 3px solid light-dark(#563acc, #6364ff);
	padding-left: 13px;
}

.friends-page .friend-message .conversation {
	background: light-dark(#f2f5f7, #1e2028);
	border-top: 1px solid light-dark(#d4dde8, #393f4f);
}

.friends-page .friend-message .conversation .messages {
	max-height: 50vh;
	overflow-y: auto;
	padding: 8px 0;
}

.friends-page .friend-message .conversation .message {
	padding: 10px 16px;
	font-size: 14px;
	color: light-dark(#606984, #9baec8);
}

.friends-page .friend-message .conversation .message .author {
	font-weight: 600;
	color: light-dark(#282c37, #dadada);
}

.friends-page .friend-message .conversation .message .time {
	font-size: 12px;
}

.friends-page .friend-message .conversation .message blockquote {
	margin: 6px 0 0;
	padding: 10px 14px;
	background: light-dark(#fff, #282c37);
	border-radius: 8px;
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-left: none;
	color: light-dark(#282c37, #dadada);
	font-size: 15px;
}

.friends-page .friend-message .conversation .message blockquote p:last-child {
	margin-bottom: 0;
}

.friends-page .friend-message .conversation .form-horizontal {
	padding: 12px 16px;
	border-top: 1px solid light-dark(#d4dde8, #393f4f);
}

.friends-page .friend-message .conversation .form-horizontal .form-input {
	background: light-dark(#fff, #282c37);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 14px;
	font-family: inherit;
	color: light-dark(#282c37, #dadada);
	width: 100%;
}

.friends-page .friend-message .conversation .form-horizontal .form-input:focus {
	border-color: light-dark(#563acc, #6364ff);
	outline: none;
}

.friends-page .friend-message .conversation .form-horizontal textarea.form-input {
	min-height: 60px;
	resize: vertical;
}

.friends-page .friend-message .conversation .form-horizontal .btn {
	background: light-dark(#563acc, #6364ff);
	color: #fff;
	border: none;
	border-radius: 100px;
	padding: 6px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}

.friends-page .friend-message .conversation .form-horizontal .btn:hover {
	background: light-dark(#4a30b0, #7475ff);
}

.friends-page .friend-message .conversation .form-horizontal .btn.delete-conversation {
	background: transparent;
	color: light-dark(#df405a, #e87c8e);
	font-size: 12px;
	padding: 4px 8px;
}

.friends-page .friend-message .conversation .form-horizontal .form-group {
	margin-bottom: 8px;
}

.friends-page .friend-message .conversation .form-horizontal .form-label {
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	font-weight: 600;
}

/* Mastodon theme: direct messages */
.friends-page .friends-dm-view {
	background: light-dark(#fff, #282c37);
	border-top: 1px solid light-dark(#d4dde8, #393f4f);
	display: grid;
	grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
	height: calc(100vh - 56px);
	min-height: 32rem;
}

.friends-page .friends-dm-sidebar {
	background: light-dark(#f2f5f7, #1e2028);
	border-right: 1px solid light-dark(#d4dde8, #393f4f);
	overflow: auto;
}

.friends-page .friends-profile-messages {
	background: transparent;
	border: none;
	box-shadow: none;
	overflow: hidden;
	padding: 0 !important;
}

.friends-page .friends-profile-messages-header {
	align-items: center;
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
	display: flex;
	justify-content: space-between;
	padding: 12px 16px;
}

.friends-page .friends-profile-messages-header strong {
	color: light-dark(#282c37, #dadada);
	font-size: 15px;
}

.friends-page .friends-profile-messages .friends-dm-conversation,
.friends-page .friends-profile-messages .friends-dm-conversation:visited {
	grid-template-columns: minmax(0, 1fr) auto;
}

.friends-page .friends-dm-conversation,
.friends-page .friends-dm-conversation:visited {
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
	color: light-dark(#282c37, #dadada);
	display: grid;
	gap: 4px 10px;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	padding: 12px 16px;
	text-decoration: none;
}

.friends-page .friends-dm-conversation:hover,
.friends-page .friends-dm-conversation:focus,
.friends-page .friends-dm-conversation.is-selected {
	background: light-dark(#e6ebf0, #313543);
	text-decoration: none;
}

.friends-page .friends-dm-conversation.is-unread .friends-dm-conversation-name,
.friends-page .friends-dm-conversation.is-unread .friends-dm-conversation-preview {
	font-weight: 700;
}

.friends-page .friends-dm-conversation .avatar,
.friends-page .friends-dm-thread-header .avatar,
.friends-page .friends-dm-message-avatar .avatar {
	border-radius: 8px;
	display: block;
	object-fit: cover;
}

.friends-page .friends-dm-conversation-main {
	display: grid;
	min-width: 0;
}

.friends-page .friends-dm-conversation-name,
.friends-page .friends-dm-conversation-preview {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.friends-page .friends-dm-conversation-preview,
.friends-page .friends-dm-conversation-meta,
.friends-page .friends-dm-message-meta time {
	color: light-dark(#606984, #9baec8);
}

.friends-page .friends-dm-conversation-meta {
	align-items: end;
	display: flex;
	flex-direction: column;
	font-size: 12px;
	gap: 5px;
}

.friends-page .friends-dm-unread-count {
	background: light-dark(#563acc, #6364ff);
	border-radius: 999px;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	min-width: 20px;
	padding: 4px 6px;
	text-align: center;
}

.friends-page .friends-dm-thread {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	min-width: 0;
}

.friends-page .friends-dm-thread-header {
	align-items: center;
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
	display: flex;
	gap: 12px;
	min-height: 64px;
	padding: 10px 16px;
}

.friends-page .friends-dm-thread-header h3 {
	color: light-dark(#282c37, #dadada);
	font-size: 17px;
	line-height: 1.2;
	margin: 0;
}

.friends-page .friends-dm-thread-header a {
	font-size: 13px;
}

.friends-page .friends-dm-messages {
	background: light-dark(#fff, #282c37);
	overflow: auto;
	padding: 16px;
}

.friends-page .friends-dm-message {
	display: grid;
	gap: 10px;
	grid-template-columns: 32px minmax(0, 1fr);
	margin: 0 0 16px;
}

.friends-page .friends-dm-message-meta {
	align-items: baseline;
	display: flex;
	gap: 8px;
	line-height: 1.2;
}

.friends-page .friends-dm-message-meta strong {
	color: light-dark(#282c37, #dadada);
}

.friends-page .friends-dm-message-content {
	background: light-dark(#f2f5f7, #1e2028);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	color: light-dark(#282c37, #dadada);
	margin-top: 4px;
	max-width: 720px;
	padding: 10px 14px;
}

.friends-page .friends-dm-message.is-own-message .friends-dm-message-content {
	background: light-dark(#f4f1ff, #313052);
}

.friends-page .friends-dm-message-content > :first-child { margin-top: 0; }
.friends-page .friends-dm-message-content > :last-child { margin-bottom: 0; }

.friends-page .friends-dm-reply {
	background: light-dark(#f2f5f7, #1e2028);
	border-top: 1px solid light-dark(#d4dde8, #393f4f);
	padding: 12px 16px;
}

.friends-page .friends-dm-reply .form-horizontal .form-group {
	display: flex;
	gap: 10px;
	margin-bottom: 8px;
}

.friends-page .friends-dm-reply .form-horizontal .form-group > div:first-child {
	flex: 0 0 72px;
}

.friends-page .friends-dm-reply .form-horizontal .form-group > div:nth-child(2) {
	flex: 1 1 auto;
	max-width: none;
}

.friends-page .friends-dm-reply .form-horizontal .form-input {
	background: light-dark(#fff, #282c37);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	color: light-dark(#282c37, #dadada);
	padding: 8px 12px;
	width: 100%;
}

.friends-page .friends-dm-reply textarea.friends-message-message {
	min-height: 76px;
	resize: vertical;
}

.friends-page .friends-dm-reply .btn {
	background: light-dark(#563acc, #6364ff);
	border: none;
	border-radius: 999px;
	color: #fff;
	font-weight: 600;
	padding: 7px 18px;
}

.friends-page .friends-dm-empty {
	background: light-dark(#fff, #282c37);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 8px;
	grid-column: 1 / -1;
	margin: 16px;
	padding: 16px;
}

@media (max-width: 840px) {
	.friends-page .friends-dm-view {
		grid-template-columns: 1fr;
		height: auto;
	}

	.friends-page .friends-dm-sidebar {
		border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
		border-right: 0;
		max-height: 16rem;
	}
}

/* Mastodon theme: header image as banner on the title row */
.mastodon-col-title-row.has-header-image {
	position: relative;
	background-size: cover;
	background-position: center;
	min-height: 150px;
	align-items: flex-end;
	padding-bottom: 10px;
}

.mastodon-col-title-row.has-header-image::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 100%);
}

.mastodon-col-title-row.has-header-image > * {
	position: relative;
	z-index: 1;
}

.mastodon-col-title-row.has-header-image h2 a,
.mastodon-col-title-row.has-header-image #page-title a {
	color: #fff;
	text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.mastodon-col-title-row.has-header-image .mastodon-title-avatar {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.mastodon-col-title-row.has-header-image h2,
.mastodon-col-title-row.has-header-image #page-title {
	font-size: 20px;
}

/* === Content Sections === */
.friends-page section.subscriptions,
.friends-page section.followers {
	padding: 16px;
}

.friends-page section.followers ul,
.friends-page section.subscriptions ul {
	list-style: none;
	padding-left: 0;
}

/* --- Subscription items --- */
.friends-page section.subscriptions .subscription-item {
	padding: 12px 0;
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
	display: grid;
	grid-template-columns: 46px 1fr;
	grid-template-rows: auto auto auto;
	column-gap: 12px;
	row-gap: 2px;
	align-items: center;
}

.friends-page section.subscriptions .subscription-item:last-child {
	border-bottom: none;
}

.friends-page section.subscriptions .subscription-link {
	display: contents;
	text-decoration: none;
	color: light-dark(#282c37, #dadada);
}

.friends-page section.subscriptions .subscription-link .avatar {
	border-radius: 8px;
	grid-row: 1 / 3;
	width: 46px;
	height: 46px;
}

.friends-page section.subscriptions .subscription-info {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.friends-page section.subscriptions .subscription-name {
	font-size: 15px;
	font-weight: 700;
	color: light-dark(#282c37, #fff);
}

.friends-page section.subscriptions .starred {
	color: #ca8f04;
}

.friends-page section.subscriptions .subscription-folder {
	font-size: 12px;
	background: light-dark(rgba(86,58,204,.08), rgba(99,100,255,.15));
	padding: 2px 8px;
	border-radius: 100px;
	color: light-dark(#563acc, #c4bbff);
}

.friends-page section.subscriptions .subscription-meta {
	grid-column: 2;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
}

.friends-page section.subscriptions .subscription-description {
	grid-column: 2;
	font-size: 14px;
	color: light-dark(#606984, #9baec8);
	margin: 4px 0 0;
}

.friends-page section.subscriptions .subscription-actions {
	grid-column: 2;
	margin-top: 4px;
}

.friends-page section.subscriptions .subscription-action {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 100px;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	transition: color .1s, background .1s;
	text-decoration: none;
}

.friends-page section.subscriptions .subscription-unfollow:hover {
	color: light-dark(#c0392b, #e74c3c);
	background: light-dark(rgba(192,57,43,.08), rgba(231,76,60,.12));
	text-decoration: none;
}

.friends-page section.subscriptions .subscription-action .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
}

/* --- Follower items --- */
.friends-page section.followers .follower-item {
	padding: 12px 0;
	border-bottom: 1px solid light-dark(#d4dde8, #393f4f);
}

.friends-page section.followers .follower-item:last-child {
	border-bottom: none;
}

.friends-page section.followers .follower-details {
	/* no marker */
}

.friends-page section.followers .follower-details > summary {
	list-style: none;
	display: grid;
	grid-template-columns: 46px 1fr auto;
	column-gap: 12px;
	row-gap: 0;
	align-items: start;
	cursor: pointer;
}

.friends-page section.followers .follower-details > summary::-webkit-details-marker { display: none; }
.friends-page section.followers .follower-details > summary::marker { display: none; content: ''; }

.friends-page section.followers .follower-link {
	display: contents;
	text-decoration: none;
	color: light-dark(#282c37, #dadada);
}

.friends-page section.followers .follower-link .avatar {
	border-radius: 8px;
	grid-row: 1 / -1;
	width: 46px;
	height: 46px;
	max-width: none;
}

.friends-page section.followers .follower-info {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
	min-width: 0;
}

.friends-page section.followers .follower-name {
	font-size: 15px;
	font-weight: 700;
	color: light-dark(#282c37, #fff);
}

.friends-page section.followers .follower-handle {
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
}

.friends-page section.followers .follower-meta {
	grid-column: 2;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	line-height: 1.3;
}

.friends-page section.followers .follower-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	grid-row: 1 / -1;
}

.friends-page section.followers .follower-action,
.friends-page section.followers .follower-status {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 100px;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	transition: color .1s, background .1s;
}

.friends-page section.followers .follower-action:hover {
	color: light-dark(#563acc, #6364ff);
	background: light-dark(rgba(86,58,204,.08), rgba(99,100,255,.12));
	text-decoration: none;
}

.friends-page section.followers .follower-delete:hover {
	color: light-dark(#c0392b, #e74c3c);
	background: light-dark(rgba(192,57,43,.08), rgba(231,76,60,.12));
}

.friends-page section.followers .follower-status {
	color: light-dark(#2ecc71, #27ae60);
}

.friends-page section.followers .follower-actions .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	vertical-align: middle;
}

.friends-page section.followers .follower-description {
	grid-column: 2 / -1;
	font-size: 14px;
	color: light-dark(#606984, #9baec8);
	margin: 2px 0 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.friends-page section.followers .loading-posts {
	grid-column: 2;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	padding: 8px 0;
}

/* --- Filter & sort controls --- */
.friends-page section.followers > p,
.friends-page section.subscriptions > p {
	font-size: 14px;
	color: light-dark(#606984, #9baec8);
	margin-bottom: 8px;
}

/* --- Search form --- */
.friends-page section.followers .friends-search,
.friends-page section.subscriptions .friends-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 14px;
	color: light-dark(#606984, #9baec8);
}

.friends-page section.followers .friends-search-label,
.friends-page section.subscriptions .friends-search-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 1 1 240px;
	min-width: 0;
}

.friends-page section.followers .friends-search-input,
.friends-page section.subscriptions .friends-search-input {
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
	padding: 6px 10px;
	font-size: 14px;
	line-height: 1.3;
	color: light-dark(#282c37, #dadada);
	background: light-dark(#fff, #282c37);
	border: 1px solid light-dark(#d4dde8, #393f4f);
	border-radius: 4px;
}

.friends-page section.followers .friends-search-input:focus,
.friends-page section.subscriptions .friends-search-input:focus {
	outline: none;
	border-color: light-dark(#563acc, #6364ff);
}

.friends-page section.followers .friends-search-submit,
.friends-page section.subscriptions .friends-search-submit {
	padding: 6px 14px;
	font-size: 14px;
	line-height: 1.3;
	background: light-dark(#563acc, #6364ff);
	color: #fff;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.friends-page section.followers .friends-search-clear,
.friends-page section.subscriptions .friends-search-clear {
	color: light-dark(#563acc, #c4bbff);
	font-size: 13px;
}

.friends-page section.followers > p a,
.friends-page section.subscriptions > p a {
	color: light-dark(#563acc, #c4bbff);
}

.friends-page section.followers > p strong,
.friends-page section.subscriptions > p strong {
	color: light-dark(#282c37, #fff);
}

/* --- Add friend review flow --- */
.friends-page section.add-friend-subscriptions {
	display: grid;
	gap: 12px;
	padding: 16px;
}

.friends-page section.add-friend-subscriptions .card {
	background: light-dark(#fff, #282c37);
	border-radius: 12px;
	margin: 0;
}

.friends-page section.add-friend-subscriptions .card-body {
	padding: 16px;
}

.friends-page section.add-friend-subscriptions .hidden {
	display: none;
}

.friends-page section.add-friend-subscriptions .add-subscription-input {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.friends-page section.add-friend-subscriptions textarea.form-input {
	flex: 1 1 auto;
	min-height: 96px;
	resize: vertical;
	width: 100%;
}

.friends-page section.add-friend-subscriptions .form-select {
	background: light-dark(#eaedf1, #313543);
	border: 1px solid transparent;
	border-radius: 100px;
	color: light-dark(#282c37, #dadada);
	font: inherit;
	padding: 8px 16px;
	width: 100%;
}

.friends-page section.add-friend-subscriptions .opml-file-hint,
.friends-page section.add-friend-subscriptions .subscription-preview-description,
.friends-page section.add-friend-subscriptions .subscription-feed-details,
.friends-page section.add-friend-subscriptions .subscription-preview-status,
.friends-page section.add-friend-subscriptions .bulk-feed-status {
	color: light-dark(#606984, #9baec8);
	font-size: 13px;
}

.friends-page section.add-friend-subscriptions #preview-subscription:not(:empty) {
	margin-top: 14px;
}

.friends-page section.add-friend-subscriptions .bulk-controls,
.friends-page section.add-friend-subscriptions .subscription-feed-actions,
.friends-page section.add-friend-subscriptions .subscription-preview-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.friends-page section.add-friend-subscriptions .subscription-preview-results,
.friends-page section.add-friend-subscriptions .bulk-feed-list,
.friends-page section.add-friend-subscriptions .subscription-feed-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
}

.friends-page section.add-friend-subscriptions .subscription-feed-list.hidden {
	display: none;
}

.friends-page section.add-friend-subscriptions .bulk-feed-row,
.friends-page section.add-friend-subscriptions .subscription-feed-option {
	background: light-dark(#f7f9fb, #313543);
	border-radius: 10px;
	padding: 12px;
}

.friends-page section.add-friend-subscriptions .bulk-feed-row > label,
.friends-page section.add-friend-subscriptions .subscription-feed-option > label {
	display: block;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.friends-page section.add-friend-subscriptions .bulk-feed-row > label small,
.friends-page section.add-friend-subscriptions .subscription-feed-option > label small {
	color: light-dark(#606984, #9baec8);
	font-weight: 400;
}

.friends-page section.add-friend-subscriptions .bulk-feed-row.is-reviewing > .label-for-bulkfeed,
.friends-page section.add-friend-subscriptions .bulk-feed-row.is-reviewing > .bulk-feed-status {
	display: none;
}

.friends-page section.add-friend-subscriptions .bulk-feed-review {
	margin-top: 10px;
}

.friends-page section.add-friend-subscriptions .feed-preview {
	background: light-dark(#f7f9fb, #313543);
	border-radius: 12px;
	box-shadow: inset 4px 0 0 light-dark(rgba(86,58,204,.18), rgba(99,100,255,.25));
	margin-top: 12px;
	padding: 14px;
}

.friends-page section.add-friend-subscriptions .bulk-feed-review .feed-preview {
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	margin-top: 0;
	padding: 0;
}

.friends-page section.add-friend-subscriptions .subscription-preview-header,
.friends-page section.add-friend-subscriptions .subscribe-success {
	display: flex;
	align-items: center;
	gap: 10px;
}

.friends-page section.add-friend-subscriptions .subscription-preview-header .avatar,
.friends-page section.add-friend-subscriptions .subscribe-success .avatar {
	border-radius: 8px;
	flex: 0 0 auto;
}

.friends-page section.add-friend-subscriptions .subscription-preview-title,
.friends-page section.add-friend-subscriptions .subscription-feed-preview-title {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.friends-page section.add-friend-subscriptions .subscription-preview-title small,
.friends-page section.add-friend-subscriptions .subscription-feed-preview-title small {
	color: light-dark(#606984, #9baec8);
	overflow-wrap: anywhere;
}

.friends-page section.add-friend-subscriptions .subscription-settings,
.friends-page section.add-friend-subscriptions .subscription-feed-controls {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 12px;
}

.friends-page section.add-friend-subscriptions .subscription-settings label,
.friends-page section.add-friend-subscriptions .subscription-feed-controls label {
	display: grid;
	gap: 4px;
	font-size: 13px;
	font-weight: 700;
}

.friends-page section.add-friend-subscriptions .subscription-feed-url-label {
	grid-column: 1 / -1;
}

.friends-page section.add-friend-subscriptions .subscription-feed-preview {
	background: light-dark(#fff, #282c37);
	border-radius: 8px;
	margin-top: 10px;
	padding: 10px;
}

.friends-page section.add-friend-subscriptions .subscription-feed-preview ul {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.friends-page section.add-friend-subscriptions .subscription-feed-preview p {
	color: light-dark(#606984, #9baec8);
	font-size: 13px;
	margin: 3px 0 0;
}

.friends-page section.add-friend-subscriptions .error,
.friends-page section.add-friend-subscriptions .subscription-preview-status.error,
.friends-page section.add-friend-subscriptions .bulk-feed-status.error {
	color: light-dark(#c0392b, #e74c3c);
}

@media (max-width: 640px) {
	.friends-page section.add-friend-subscriptions .add-subscription-input {
		flex-direction: column;
	}

	.friends-page section.add-friend-subscriptions .add-subscription-input .btn,
	.friends-page section.add-friend-subscriptions .bulk-controls .btn,
	.friends-page section.add-friend-subscriptions .subscription-feed-actions .btn,
	.friends-page section.add-friend-subscriptions .subscription-preview-actions .btn {
		width: 100%;
	}

	.friends-page section.add-friend-subscriptions .subscription-settings,
	.friends-page section.add-friend-subscriptions .subscription-feed-controls {
		grid-template-columns: 1fr;
	}
}

/* === Pagination === */
.friends-page .navigation {
	padding: 16px;
	font-size: 14px;
	border-top: 1px solid light-dark(#d4dde8, #393f4f);
}

.friends-page .navigation a { color: light-dark(#563acc, #c4bbff); }

/* === Loading === */
.friends-page .loading {
	color: transparent !important;
	pointer-events: none;
	position: relative;
	min-height: 20px;
	min-width: 20px;
	animation: none;
	border: 0;
}

.friends-page .loading::after {
	content: "";
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	margin-left: -10px;
	border: 2px solid light-dark(#d4dde8, #393f4f);
	border-top-color: light-dark(#563acc, #6364ff);
	border-radius: 50%;
	animation: mast-spin .7s linear infinite;
}

@keyframes mast-spin {
	to { transform: rotate(360deg); }
}

/* === Utility === */
.friends-page .d-hide { display: none !important; }
.friends-page .mb-2 { margin-bottom: 8px; }
.friends-page .ml-1 { margin-left: 4px; }
.friends-page .mr-2 { margin-right: 8px; }
.friends-page .text { font-size: 13px; }
.friends-page .mention-indicator { color: light-dark(#563acc, #c4bbff); font-weight: 700; }
.friends-page .toggle-compact { cursor: pointer; }
.friends-page .overflow { display: none; }

/* Migration notification */
.friends-page .friends-migration-notification {
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: .5rem 1rem;
	background: light-dark(#fef9e7, #2a2410);
	border-bottom: 1px solid light-dark(#e8c840, #5a4a00);
	font-size: .85rem;
	white-space: nowrap;
	overflow: hidden;
}
.friends-page .friends-migration-notification .friends-migration-notification-meta {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: .5rem;
	white-space: nowrap;
	opacity: .75;
}
.friends-page .friends-migration-notification button {
	background: none;
	border: 1px solid currentColor;
	border-radius: 3px;
	cursor: pointer;
	font-size: .8rem;
	padding: 1px 6px;
}

/* === Compact (all-collapsed) Mode === */

/* Collapsed items: hide body and footer */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .card-body,
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .entry-content,
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) footer.entry-meta {
	display: none;
}

/* Show card-title as a truncated preview line in compact mode */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .card-title {
	margin: 2px 0 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .card-title a {
	font-size: 13px;
	font-weight: 400;
	color: light-dark(#606984, #9baec8);
}

/* Compact card: reduce padding, single-line layout */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) {
	padding: 10px 14px 10px 52px;
	cursor: pointer;
}

/* Smaller avatar in compact mode */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .card-header > div.avatar {
	top: 10px;
	left: 14px;
}

.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .card-header .avatar img {
	width: 28px;
	height: 28px;
}

/* Header inline */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .card-header {
	margin-bottom: 0;
	align-items: center;
}

/* Author and permalink inline */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .post-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: nowrap;
	overflow: hidden;
}

.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .author {
	flex-shrink: 0;
}

.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .author::after {
	content: '\00b7';
	margin-left: 6px;
	color: light-dark(#999, #606984);
}

.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .permalink {
	flex-shrink: 0;
	font-size: 12px;
}

.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .reading-time {
	display: none;
}

/* Show teaser inline after header */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) div.teaser {
	display: block;
	font-size: 13px;
	color: light-dark(#606984, #9baec8);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

.friends-page .posts.all-collapsed article.card:not(.uncollapsed) div.teaser p {
	display: inline;
	margin: 0;
}

/* Hide reblog/boost metadata in collapsed mode */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .reblog-info,
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .reblogged-by {
	display: none;
}

/* Hide overflow menu in collapsed mode */
.friends-page .posts.all-collapsed article.card:not(.uncollapsed) .overflow {
	display: none;
}

/* Expanded item within collapsed list: teaser hidden */
.friends-page .posts.all-collapsed article.card.uncollapsed div.teaser {
	display: none;
}

/* Highlight for currently-selected item */
.friends-page .posts.all-collapsed article.card.mast-current:not(.uncollapsed) {
	background: light-dark(#f0f3f8, #2c3040);
}
