/**
 * bbPress V2EX Skin v1.3
 * Tabs + topic list; Shoptimizer sidebar layout; hide theme title/breadcrumb.
 * Visual reference: https://www.v2ex.com/
 */

/* -------------------------------------------------------------------------- */
/* Tokens                                                                     */
/* -------------------------------------------------------------------------- */
body.bbp-v2ex-skin {
	--v2ex-bg: #e2e2e2;
	--v2ex-box: #ffffff;
	--v2ex-box-alt: #f9f9f9;
	--v2ex-border: #e2e2e2;
	--v2ex-border-soft: rgba(0, 0, 0, 0.06);
	--v2ex-radius: 3px;
	--v2ex-font: "Helvetica Neue", "Luxi Sans", "Segoe UI", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
	--v2ex-fg: #000;
	--v2ex-link: #778087;
	--v2ex-link-hover: #4d5256;
	--v2ex-title: #778087;
	--v2ex-fade: #999;
	--v2ex-fade-soft: #ccc;
	--v2ex-node-bg: #f5f5f5;
	--v2ex-count: #aab0c6;
	--v2ex-count-hover: #969cb1;
	--v2ex-tab-active: #333344;
	--v2ex-subtab-bg: #f0f0f0;
	--v2ex-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	--v2ex-font-size: 14px;
	--v2ex-title-size: 16px;
	/* Main / sidebar column widths (Shoptimizer-friendly, smaller gutter) */
	--v2ex-main-col: 80%;
	--v2ex-side-col: 18%;
	background-color: var(--v2ex-bg);
}

/* -------------------------------------------------------------------------- */
/* Hide theme title + breadcrumbs (Shoptimizer / Woo breadcrumb / entry title)*/
/* -------------------------------------------------------------------------- */
body.bbp-v2ex-skin .archive-header,
body.bbp-v2ex-skin .woocommerce-breadcrumb,
body.bbp-v2ex-skin nav.woocommerce-breadcrumb,
body.bbp-v2ex-skin .entry-header,
body.bbp-v2ex-skin header.entry-header,
body.bbp-v2ex-skin .entry-title,
body.bbp-v2ex-skin h1.entry-title,
body.bbp-v2ex-skin .page-header,
body.bbp-v2ex-skin .yoast-breadcrumb,
body.bbp-v2ex-skin #breadcrumbs,
body.bbp-v2ex-skin .rank-math-breadcrumb {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
}

/* bbPress built-in breadcrumb / description (skin has its own UI) */
#bbpress-forums .bbp-breadcrumb,
#bbpress-forums .bbp-forum-description,
#bbpress-forums .bbp-topic-description {
	display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Shoptimizer layout: side-by-side + tight gap                                */
/* -------------------------------------------------------------------------- */
@media (min-width: 993px) {
	body.bbp-v2ex-skin.right-sidebar .content-area,
	body.bbp-v2ex-skin.right-post-sidebar .content-area {
		float: left !important;
		width: var(--v2ex-main-col) !important;
		max-width: none !important;
		clear: none !important;
		box-sizing: border-box;
		padding-right: 1.25rem;
	}

	body.bbp-v2ex-skin.right-sidebar #secondary.widget-area,
	body.bbp-v2ex-skin.right-post-sidebar #secondary.widget-area {
		float: right !important;
		width: var(--v2ex-side-col) !important;
		max-width: none !important;
		clear: none !important;
		box-sizing: border-box;
		padding-left: 0;
		margin-left: 0;
	}

	body.bbp-v2ex-skin.left-sidebar .content-area,
	body.bbp-v2ex-skin.left-post-sidebar .content-area {
		float: right !important;
		width: var(--v2ex-main-col) !important;
		padding-left: 1.25rem;
		padding-right: 0;
	}

	body.bbp-v2ex-skin.left-sidebar #secondary.widget-area,
	body.bbp-v2ex-skin.left-post-sidebar #secondary.widget-area {
		float: left !important;
		width: var(--v2ex-side-col) !important;
	}

	/* Clear floats so footer doesn't jump up */
	body.bbp-v2ex-skin .site-content .col-full::after,
	body.bbp-v2ex-skin .shoptimizer-archive .col-full::after {
		content: "";
		display: table;
		clear: both;
	}

	/* Sidebar widgets sit flush with main card top */
	body.bbp-v2ex-skin #secondary.widget-area {
		padding-top: 0;
		margin-top: 0;
	}

	body.bbp-v2ex-skin #secondary .widget:first-child {
		margin-top: 0;
	}
}

@media (max-width: 992px) {
	body.bbp-v2ex-skin .content-area,
	body.bbp-v2ex-skin #secondary.widget-area {
		float: none !important;
		width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* Main forum chrome fills the content column (no 920px centered dead space) */
body.bbp-v2ex-skin #bbpress-forums,
body.bbp-v2ex-skin .bbpress-wrapper {
	font-family: var(--v2ex-font);
	font-size: var(--v2ex-font-size);
	line-height: 1.5;
	color: var(--v2ex-fg);
	max-width: none;
	width: 100%;
	margin: 0;
	/* vertical + slight horizontal safety gutters */
	padding: 16px 12px 48px;
	background: transparent;
	overflow: visible;
	float: none;
	box-sizing: border-box;
}

@media (min-width: 993px) {
	body.bbp-v2ex-skin #bbpress-forums,
	body.bbp-v2ex-skin .bbpress-wrapper {
		padding: 20px 8px 56px;
	}
}

/*
 * Top spacing: Shoptimizer sets padding-top:0 when .woocommerce-breadcrumb exists
 * in the DOM. We hide that breadcrumb visually, so force spacing back.
 */
body.bbp-v2ex-skin.bbpress .site-content,
body.bbp-v2ex-skin.single-topic .site-content,
body.bbp-v2ex-skin.bbpress:has(.woocommerce-breadcrumb) .site-content,
body.bbp-v2ex-skin .site-content {
	padding-top: 1.75rem !important;
}

/* Keep archive/entry headers collapsed, but don't steal top gap from the content col */
body.bbp-v2ex-skin .shoptimizer-archive > .archive-header {
	display: none !important;
}

body.bbp-v2ex-skin #content.site-content > .col-full,
body.bbp-v2ex-skin .shoptimizer-archive > .col-full {
	padding-top: 0;
}

/* Keep Shoptimizer horizontal page gutters (don't flush to viewport edge) */
@media (min-width: 993px) {
	body.bbp-v2ex-skin .site-content .col-full,
	body.bbp-v2ex-skin .shoptimizer-archive .col-full {
		padding-left: 2.5rem !important;
		padding-right: 2.5rem !important;
		box-sizing: border-box !important;
	}
}

@media (max-width: 992px) {
	body.bbp-v2ex-skin .site-content .col-full,
	body.bbp-v2ex-skin .shoptimizer-archive .col-full {
		padding-left: 1.15rem !important;
		padding-right: 1.15rem !important;
		box-sizing: border-box !important;
	}
}

body.bbp-v2ex-skin #bbpress-forums a {
	color: var(--v2ex-link);
	text-decoration: none;
}
body.bbp-v2ex-skin #bbpress-forums a:hover {
	color: var(--v2ex-link-hover);
}

/* Sidebar polish on forum pages */
body.bbp-v2ex-skin #secondary .widget {
	background: #fff;
	border: 1px solid var(--v2ex-border-soft);
	border-radius: var(--v2ex-radius);
	box-shadow: var(--v2ex-shadow);
	padding: 12px;
	margin-bottom: 14px;
	border-bottom: none;
}

body.bbp-v2ex-skin #secondary .widget .widget-title,
body.bbp-v2ex-skin #secondary .widget .gamma.widget-title {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 10px;
	padding: 0 0 8px;
	border-bottom: 1px solid var(--v2ex-border);
	color: #333;
}

/* -------------------------------------------------------------------------- */
/* White card                                                                 */
/* -------------------------------------------------------------------------- */
.v2ex-box {
	background: var(--v2ex-box);
	border-radius: 6px;
	box-shadow: var(--v2ex-shadow);
	border: 1px solid var(--v2ex-border-soft);
	overflow: hidden;
	margin: 0 0 18px;
}

/* Theme .entry-content wrappers on single topic/forum — keep flush with card */
body.bbp-v2ex-skin.bbpress .entry-content,
body.bbp-v2ex-skin.single-topic .entry-content,
body.bbp-v2ex-skin.single-forum .entry-content {
	margin: 0 !important;
	padding: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

body.bbp-v2ex-skin.bbpress .site-main,
body.bbp-v2ex-skin.single-topic .site-main {
	margin: 0 !important;
	padding: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* Full-width search bar (all forum pages)                                    */
/* -------------------------------------------------------------------------- */
.v2ex-search-bar {
	margin: 0 0 14px;
}

.v2ex-search-form {
	position: relative;
	display: block;
	width: 100%;
}

.v2ex-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
	pointer-events: none;
}

.v2ex-search-input,
#bbpress-forums .v2ex-search-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	height: 40px;
	padding: 8px 16px 8px 40px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	font-size: 14px;
	font-family: var(--v2ex-font);
	color: #333;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.v2ex-search-input::placeholder {
	color: #bbb;
}

.v2ex-search-input:focus {
	border-color: #c0c0c8;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

/* Live search dropdown */
.v2ex-search-form {
	position: relative;
}

.v2ex-search-results {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	z-index: 100;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	max-height: min(420px, 70vh);
	overflow-y: auto;
}

.v2ex-search-status {
	padding: 14px 16px;
	font-size: 13px;
	color: #999;
	text-align: center;
}

.v2ex-search-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.v2ex-search-item {
	margin: 0 !important;
	border-bottom: 1px solid #f0f0f0;
}

.v2ex-search-item:last-child {
	border-bottom: none;
}

.v2ex-search-link {
	display: block;
	padding: 10px 14px;
	text-decoration: none !important;
	color: inherit !important;
}

.v2ex-search-item:hover .v2ex-search-link,
.v2ex-search-item.is-active .v2ex-search-link {
	background: #f7f8fa;
}

.v2ex-search-type {
	display: inline-block;
	font-size: 11px;
	line-height: 1.3;
	color: #999;
	background: #f5f5f5;
	border-radius: 2px;
	padding: 1px 6px;
	margin-right: 6px;
	vertical-align: middle;
}

.v2ex-search-title {
	display: inline;
	font-size: 14px;
	color: #333 !important;
	font-weight: 500;
	line-height: 1.4;
	word-break: break-word;
}

.v2ex-search-meta {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	color: #999;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.v2ex-search-more {
	display: block;
	padding: 10px 14px;
	text-align: center;
	font-size: 13px;
	color: #778087 !important;
	background: #fafafa;
	border-top: 1px solid #f0f0f0;
	text-decoration: none !important;
}

.v2ex-search-more:hover {
	background: #f0f0f0;
	color: #333 !important;
}

/* -------------------------------------------------------------------------- */
/* Inline breadcrumb (inside topic header)                                    */
/* -------------------------------------------------------------------------- */
.v2ex-inline-bc {
	font-size: 13px;
	line-height: 1.4;
	color: #999;
	margin: 0 0 8px;
}

.v2ex-inline-bc a {
	color: #999 !important;
	text-decoration: none !important;
}

.v2ex-inline-bc a:hover {
	color: #666 !important;
}

.v2ex-bc-sep {
	color: #ccc;
	margin: 0 2px;
}

/* -------------------------------------------------------------------------- */
/* Tab bar (row 1) — like V2EX 技术 / 创意 / …                               */
/* -------------------------------------------------------------------------- */
.v2ex-tabs-wrap {
	border-bottom: 1px solid var(--v2ex-border);
	background: #fff;
}

.v2ex-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 2px;
	padding: 10px 12px 8px;
}

.v2ex-tab {
	display: inline-block;
	padding: 4px 12px;
	font-size: 14px;
	line-height: 1.4;
	color: #555 !important;
	border-radius: 16px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background 0.12s ease, color 0.12s ease;
}

.v2ex-tab:hover {
	color: #000 !important;
	background: #f5f5f5;
}

.v2ex-tab.is-active {
	background: var(--v2ex-tab-active) !important;
	color: #fff !important;
	font-weight: 500;
}

.v2ex-tab.is-active:hover {
	color: #fff !important;
	opacity: 0.95;
}

/* -------------------------------------------------------------------------- */
/* Sub tabs (row 2) — like 程序员 / Python / …                               */
/* -------------------------------------------------------------------------- */
.v2ex-subtabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 4px;
	padding: 8px 12px 10px;
	background: #fafafa;
	border-top: 1px solid #f0f0f0;
}

.v2ex-subtab {
	display: inline-block;
	padding: 3px 10px;
	font-size: 13px;
	line-height: 1.4;
	color: #666 !important;
	border-radius: 3px;
	text-decoration: none !important;
	white-space: nowrap;
}

.v2ex-subtab:hover {
	color: #000 !important;
	background: #eee;
}

.v2ex-subtab.is-active {
	color: #000 !important;
	font-weight: 600;
	background: #e8e8e8;
}

/* -------------------------------------------------------------------------- */
/* Topic list                                                                 */
/* -------------------------------------------------------------------------- */
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results,
.v2ex-topics-list,
.v2ex-forums-list,
.v2ex-replies-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	overflow: visible;
}

#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
	display: none !important;
}

#bbpress-forums li.bbp-body {
	display: block;
	background: transparent;
	border: none;
	padding: 0;
}

/* Single topic row */
.v2ex-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--v2ex-border);
	background: #fff;
	box-sizing: border-box;
}

.v2ex-item:last-child {
	border-bottom: none;
}

.v2ex-item:hover {
	background: #fafafa;
}

.v2ex-item-avatar {
	flex: 0 0 48px;
	width: 48px;
	padding-top: 2px;
}

.v2ex-item-avatar img,
.v2ex-item-avatar .avatar {
	display: block;
	width: 48px !important;
	height: 48px !important;
	border-radius: 4px;
}

.v2ex-item-main {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 8px;
}

.v2ex-item-title {
	display: block;
	font-size: var(--v2ex-title-size);
	line-height: 1.4;
	font-weight: 400;
	margin: 0 0 5px;
	word-break: break-word;
}

.v2ex-item-title a,
.v2ex-item-title a.bbp-topic-permalink {
	color: var(--v2ex-title) !important;
	text-decoration: none !important;
}

.v2ex-item-title a:hover {
	color: var(--v2ex-link-hover) !important;
	text-decoration: underline !important;
}

.v2ex-item-meta {
	font-size: 12px;
	color: var(--v2ex-fade);
	line-height: 1.5;
}

.v2ex-item-meta a {
	color: var(--v2ex-link) !important;
}

.v2ex-item-meta a:hover {
	color: var(--v2ex-link-hover) !important;
}

.v2ex-item-meta .v2ex-node {
	display: inline-block;
	background: var(--v2ex-node-bg);
	color: #999 !important;
	padding: 1px 5px;
	border-radius: 2px;
	font-size: 12px;
	margin-right: 4px;
	text-decoration: none !important;
	vertical-align: baseline;
}

.v2ex-item-meta .v2ex-node:hover {
	background: #e7e7e7;
	color: #666 !important;
}

.v2ex-item-meta .v2ex-author {
	font-weight: 600;
	color: #778087 !important;
}

.v2ex-item-meta .v2ex-sep {
	margin: 0 3px;
	color: #ccc;
}

.v2ex-item-meta .v2ex-last-reply {
	color: #999;
}

.v2ex-item-meta .v2ex-last-reply a {
	font-weight: 600;
	color: #778087 !important;
}

/* Reply count badge */
.v2ex-item-count {
	flex: 0 0 auto;
	align-self: center;
	min-width: 24px;
	text-align: right;
	padding-left: 4px;
}

.v2ex-count {
	display: inline-block;
	min-width: 10px;
	padding: 2px 10px;
	border-radius: 12px;
	background: var(--v2ex-count);
	color: #fff !important;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
	text-decoration: none !important;
	font-weight: 500;
}

.v2ex-count:hover {
	background: var(--v2ex-count-hover);
	color: #fff !important;
}

.v2ex-count.is-zero {
	visibility: hidden; /* V2EX hides empty counts visually */
}

/* Sticky */
.v2ex-item.sticky .v2ex-item-title a::before,
.v2ex-item.super-sticky .v2ex-item-title a::before {
	content: "📌 ";
	font-size: 12px;
}

.v2ex-tag {
	display: inline-block;
	font-size: 11px;
	padding: 0 5px;
	border-radius: 2px;
	margin-left: 6px;
	background: #f0f0f0;
	color: #999;
	vertical-align: middle;
}

.v2ex-tag-closed {
	background: #f5e6e6;
	color: #a66;
}

/* Hide leftover table columns / meta */
#bbpress-forums .bbp-topic-voice-count,
#bbpress-forums .bbp-topic-reply-count,
#bbpress-forums .bbp-topic-freshness,
#bbpress-forums p.bbp-topic-meta {
	display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Pagination                                                                 */
/* -------------------------------------------------------------------------- */
#bbpress-forums .bbp-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	float: none;
	width: auto;
	margin: 0;
	padding: 8px 12px;
	background: var(--v2ex-box-alt);
	border-bottom: 1px solid var(--v2ex-border);
	font-size: 12px;
	color: var(--v2ex-fade);
}

#bbpress-forums .bbp-pagination-count,
#bbpress-forums .bbp-pagination-links {
	float: none;
	margin: 0;
}

#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span {
	display: inline-block;
	min-width: 24px;
	padding: 2px 8px;
	margin: 0 2px;
	border: 1px solid var(--v2ex-border);
	border-radius: 3px;
	background: #fff;
	text-align: center;
	line-height: 1.5;
	color: var(--v2ex-link);
}

#bbpress-forums .bbp-pagination-links span.current {
	background: var(--v2ex-tab-active);
	border-color: var(--v2ex-tab-active);
	color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Single topic page                                                          */
/* -------------------------------------------------------------------------- */
#bbpress-forums .v2ex-topic-card .v2ex-topic-header,
.v2ex-topic-card .v2ex-topic-header {
	/* top | right | bottom | left — left unchanged, right = 200px */
	padding: 24px 200px 16px 28px !important;
	border-bottom: 1px solid var(--v2ex-border);
}

.v2ex-topic-header-top {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.v2ex-topic-header-text {
	flex: 1 1 auto;
	min-width: 0;
}

.v2ex-topic-header-avatar {
	flex: 0 0 72px;
	width: 72px;
}

.v2ex-topic-header-avatar img,
.v2ex-topic-header-avatar .avatar {
	display: block;
	width: 72px !important;
	height: 72px !important;
	border-radius: 6px;
}

.v2ex-topic-title,
.v2ex-topic-header h1.v2ex-topic-title {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.4;
	color: #000;
	word-break: break-word;
}

.v2ex-topic-header-meta {
	font-size: 13px;
	color: var(--v2ex-fade);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
}

.v2ex-topic-header-meta .v2ex-author {
	font-weight: 600;
	color: #778087 !important;
}

.v2ex-topic-header-meta .v2ex-sep {
	margin: 0 6px;
	color: #ccc;
}

.v2ex-topic-actions {
	margin-left: 10px;
	display: inline-flex;
	gap: 8px;
	font-size: 12px;
}

/* Lead post body under header (no second avatar) */
#bbpress-forums .v2ex-post-lead,
.v2ex-post-lead {
	padding: 24px 200px 28px 28px;
	border-bottom: none;
}

.v2ex-post-body-full {
	width: 100%;
}

#bbpress-forums .v2ex-post,
.v2ex-post {
	display: flex;
	gap: 14px;
	padding: 18px 200px 18px 28px;
	border-bottom: 1px solid var(--v2ex-border);
	background: #fff;
	box-sizing: border-box;
}

.v2ex-post:last-child {
	border-bottom: none;
}

.v2ex-post-avatar {
	flex: 0 0 48px;
}

.v2ex-post-avatar img,
.v2ex-post-avatar .avatar {
	display: block;
	width: 48px !important;
	height: 48px !important;
	border-radius: 4px;
}

.v2ex-post-body {
	flex: 1;
	min-width: 0;
}

.v2ex-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 12px;
	color: var(--v2ex-fade);
}

.v2ex-post-author {
	font-weight: 600;
	color: #778087 !important;
	font-size: 13px;
}

.v2ex-post-floor {
	margin-left: auto;
	color: var(--v2ex-fade-soft);
}

.v2ex-post-floor a {
	color: var(--v2ex-fade-soft) !important;
}

/*
 * Topic / reply body
 * Fill the white card evenly (NO narrow max-width reading column — that caused
 * a huge empty right gutter). Beat theme resets for spacing.
 */
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content,
#bbpress-forums .v2ex-post-content {
	font-family: var(--v2ex-font);
	font-size: 15px;
	line-height: 1.75;
	color: #222;
	word-break: break-word;
	letter-spacing: 0.01em;
	max-width: none !important;
	width: 100%;
	box-sizing: border-box;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content > *:first-child {
	margin-top: 0 !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content > *:last-child {
	margin-bottom: 0 !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content p,
#bbpress-forums .v2ex-post-content p {
	margin: 0 0 1.05em !important;
	padding: 0 !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content p:last-child,
#bbpress-forums .v2ex-post-content p:last-child {
	margin-bottom: 0 !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content h1,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content h2,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content h3,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content h4,
#bbpress-forums .v2ex-post-content h1,
#bbpress-forums .v2ex-post-content h2,
#bbpress-forums .v2ex-post-content h3,
#bbpress-forums .v2ex-post-content h4 {
	margin: 1.35em 0 0.55em !important;
	padding: 0 !important;
	font-weight: 650;
	line-height: 1.35;
	color: #111;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content h2 { font-size: 1.25em; }
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content h3 { font-size: 1.12em; }
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content h4 { font-size: 1.05em; }

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content ul,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content ol,
#bbpress-forums .v2ex-post-content ul,
#bbpress-forums .v2ex-post-content ol {
	margin: 0 0 1.1em !important;
	padding: 0 0 0 1.45em !important;
	list-style-position: outside;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content ul {
	list-style-type: disc !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content ol {
	list-style-type: decimal !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content li,
#bbpress-forums .v2ex-post-content li {
	margin: 0 0 0.45em !important;
	padding: 0 !important;
	line-height: 1.7;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content li > ul,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content li > ol {
	margin-top: 0.4em !important;
	margin-bottom: 0.2em !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content blockquote,
#bbpress-forums .v2ex-post-content blockquote {
	margin: 0 0 1.1em !important;
	padding: 10px 14px !important;
	border-left: 3px solid #d0d0d0;
	background: #f7f7f7;
	color: #444;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content a {
	color: #2266bb;
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content strong,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content b {
	font-weight: 650;
	color: #111;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content img,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content img.v2ex-content-img,
#bbpress-forums .v2ex-post-content img {
	display: block !important;
	max-width: 100% !important;
	width: auto !important;
	height: auto !important;
	margin: 1.15em 0 !important;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content p > img:only-child,
#bbpress-forums .v2ex-post-content p > img:only-child {
	margin: 0.2em 0 !important;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content pre,
body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.92em;
}

body.bbp-v2ex-skin #bbpress-forums .v2ex-post-content pre {
	margin: 0 0 1.1em !important;
	padding: 12px 14px !important;
	overflow: auto;
	background: #f5f5f5;
	border-radius: 6px;
}

.v2ex-post-admin {
	margin-top: 16px;
	font-size: 12px;
	color: var(--v2ex-fade);
}

.v2ex-post-admin a {
	margin-right: 8px;
}

/* Tablet/mobile: drop the 200px right pad so content isn't crushed */
@media (max-width: 992px) {
	#bbpress-forums .v2ex-topic-card .v2ex-topic-header,
	.v2ex-topic-card .v2ex-topic-header {
		padding: 18px 20px 14px 20px !important;
	}
	#bbpress-forums .v2ex-post.v2ex-post-lead.bbp-lead-topic,
	#bbpress-forums .v2ex-post-lead,
	.v2ex-post-lead {
		padding: 18px 20px 22px 20px !important;
	}
	#bbpress-forums .v2ex-post,
	.v2ex-post {
		padding: 16px 20px !important;
	}
}

@media (max-width: 600px) {
	#bbpress-forums .v2ex-topic-card .v2ex-topic-header,
	.v2ex-topic-card .v2ex-topic-header {
		padding: 16px 16px 12px !important;
	}
	#bbpress-forums .v2ex-post.v2ex-post-lead.bbp-lead-topic,
	#bbpress-forums .v2ex-post-lead,
	.v2ex-post-lead {
		padding: 16px 16px 20px !important;
	}
	#bbpress-forums .v2ex-post,
	.v2ex-post {
		padding: 14px 16px !important;
	}
}

#bbpress-forums .bbp-reply-header,
#bbpress-forums .bbp-lead-topic .bbp-header,
#bbpress-forums .bbp-lead-topic .bbp-footer {
	display: none !important;
}

/* Do NOT zero padding here — .v2ex-post-lead owns card body spacing.
   (#bbpress-forums .bbp-lead-topic used to set padding:0 and wiped all gutters.) */
#bbpress-forums .bbp-lead-topic {
	border: none;
	margin: 0;
	background: transparent;
}

#bbpress-forums .v2ex-post.v2ex-post-lead.bbp-lead-topic {
	padding: 24px 200px 28px 28px !important;
	padding-right: 200px !important;
}

/* -------------------------------------------------------------------------- */
/* Auth CTA (guest login) + user card — black / minimal                       */
/* -------------------------------------------------------------------------- */

/* Hide third-party login button rows that send users to wp-login.php */
body.bbp-v2ex-skin .bbwptw-login-register-links,
body.bbp-v2ex-skin .bbp-login-links {
	display: none !important;
}

/* Soften yellow notice above login */
body.bbp-v2ex-skin .bbp-no-topic .bbp-template-notice,
body.bbp-v2ex-skin .bbp-no-reply .bbp-template-notice {
	background: #f5f5f5;
	border: 1px solid #e5e5e5;
	color: #555;
	border-radius: 6px;
	margin: 0 0 12px;
}

body.bbp-v2ex-skin .bbp-no-topic,
body.bbp-v2ex-skin .bbp-no-reply {
	margin-top: 12px;
}

.v2ex-auth-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	padding: 20px 18px;
	text-align: left;
}

.v2ex-auth-card--inline {
	margin: 0;
}

.v2ex-auth-card--widget {
	padding: 4px 0 0;
	border: none;
	box-shadow: none;
	background: transparent;
}

.v2ex-auth-title {
	font-size: 16px;
	font-weight: 700;
	color: #111;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
	text-align: left;
}

.v2ex-auth-desc {
	font-size: 13px;
	line-height: 1.5;
	color: #777;
	margin: 0 0 14px;
}

.v2ex-login-form {
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
}

.v2ex-field {
	margin: 0 0 12px;
}

.v2ex-field label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #555;
	margin: 0 0 5px;
}

.v2ex-input,
.v2ex-login-form input.v2ex-input,
body.bbp-v2ex-skin .v2ex-login-form input[type="text"],
body.bbp-v2ex-skin .v2ex-login-form input[type="password"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	height: 40px;
	padding: 0 12px;
	margin: 0;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	color: #111;
	background: #fff;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.v2ex-input:focus,
body.bbp-v2ex-skin .v2ex-login-form input[type="text"]:focus,
body.bbp-v2ex-skin .v2ex-login-form input[type="password"]:focus {
	border-color: #111;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.v2ex-field-row {
	margin-bottom: 14px;
}

.v2ex-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 500;
	color: #666;
	cursor: pointer;
	margin: 0;
}

.v2ex-check input {
	margin: 0;
	width: auto;
	height: auto;
}

.v2ex-auth-error {
	display: none;
	margin: 0 0 12px;
	padding: 8px 12px;
	font-size: 12px;
	line-height: 1.4;
	color: #8a1f1f;
	background: #fdecec;
	border: 1px solid #f5c2c2;
	border-radius: 6px;
}

.v2ex-auth-error.is-visible {
	display: block;
}

.v2ex-auth-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.v2ex-auth-actions-form {
	margin-top: 4px;
}

.v2ex-auth-card--widget .v2ex-auth-actions-form {
	flex-direction: column;
	align-items: stretch;
}

.v2ex-auth-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 120px;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 6px;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	box-sizing: border-box;
	font-family: inherit;
}

button.v2ex-auth-btn {
	appearance: none;
	-webkit-appearance: none;
}

.v2ex-auth-btn-primary {
	background: #111 !important;
	border: 1px solid #111 !important;
	color: #fff !important;
}

.v2ex-auth-btn-primary:hover {
	background: #000 !important;
	border-color: #000 !important;
	color: #fff !important;
}

.v2ex-auth-btn-ghost {
	background: #fff !important;
	border: 1px solid #ccc !important;
	color: #111 !important;
}

.v2ex-auth-btn-ghost:hover {
	border-color: #111 !important;
	color: #000 !important;
	background: #fafafa !important;
}

.v2ex-auth-btn-block {
	width: 100%;
	min-width: 0;
}

.v2ex-auth-card--widget .v2ex-auth-btn {
	width: 100%;
	min-width: 0;
}

/* Logged-in user card (sidebar) */
.v2ex-user-card {
	padding: 4px 0 0;
}

.v2ex-user-card-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.v2ex-user-avatar img,
.v2ex-user-avatar .avatar {
	display: block;
	width: 48px !important;
	height: 48px !important;
	border-radius: 6px;
}

.v2ex-user-name {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #111 !important;
	text-decoration: none !important;
	line-height: 1.3;
}

.v2ex-user-name:hover {
	color: #000 !important;
}

.v2ex-user-links {
	margin-top: 4px;
	font-size: 12px;
	color: #999;
}

.v2ex-user-links a {
	color: #666 !important;
	text-decoration: none !important;
}

.v2ex-user-links a:hover {
	color: #111 !important;
}

.v2ex-user-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Legacy bbPress login form (if any plugin still outputs it) */
body.bbp-v2ex-skin .bbp-login-form fieldset.bbp-form {
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	background: #fff;
	padding: 16px;
	margin: 0;
}

body.bbp-v2ex-skin .bbp-login-form legend {
	font-size: 15px;
	font-weight: 700;
	color: #111;
	padding: 0 0 10px;
	background: transparent;
	border: none;
	width: auto;
}

body.bbp-v2ex-skin .bbp-login-form label {
	font-size: 12px;
	color: #666;
	font-weight: 600;
}

body.bbp-v2ex-skin .bbp-login-form input[type="text"],
body.bbp-v2ex-skin .bbp-login-form input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	height: 40px;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 0 12px;
	margin: 4px 0 12px;
	font-size: 14px;
}

body.bbp-v2ex-skin .bbp-login-form button.user-submit,
body.bbp-v2ex-skin .bbp-login-form .button.submit {
	background: #111 !important;
	border-color: #111 !important;
	color: #fff !important;
	border-radius: 6px;
	padding: 8px 16px;
	font-weight: 600;
}

body.bbp-v2ex-skin .bbp-logged-in {
	text-align: left;
}

body.bbp-v2ex-skin .bbp-logged-in h4 {
	margin: 8px 0;
	font-size: 14px;
}

body.bbp-v2ex-skin .bbp-logged-in .logout-link,
body.bbp-v2ex-skin .bbp-logged-in a.button {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 14px;
	background: #111 !important;
	color: #fff !important;
	border-radius: 6px;
	font-size: 13px;
	text-decoration: none !important;
}

/* -------------------------------------------------------------------------- */
/* Forms                                                                      */
/* -------------------------------------------------------------------------- */
#bbpress-forums fieldset.bbp-form {
	border: none;
	padding: 0;
	margin: 0;
}

#bbpress-forums fieldset.bbp-form legend {
	display: block;
	width: 100%;
	padding: 8px 12px;
	margin: 0;
	background: var(--v2ex-box-alt);
	border-bottom: 1px solid var(--v2ex-border);
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

#bbpress-forums .bbp-topic-form,
#bbpress-forums .bbp-reply-form {
	background: #fff;
	border: 1px solid var(--v2ex-border-soft);
	border-radius: var(--v2ex-radius);
	box-shadow: var(--v2ex-shadow);
	margin: 16px 0 0;
	overflow: hidden;
}

#bbpress-forums .bbp-topic-form fieldset.bbp-form > div,
#bbpress-forums .bbp-reply-form fieldset.bbp-form > div {
	padding: 12px;
}

#bbpress-forums .bbp-topic-form input[type="text"],
#bbpress-forums .bbp-reply-form input[type="text"],
#bbpress-forums .bbp-topic-form select,
#bbpress-forums .bbp-reply-form select,
#bbpress-forums #bbp_topic_title {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 14px;
	font-family: var(--v2ex-font);
}

/* -------------------------------------------------------------------------- */
/* Classic editor (TinyMCE + Add Media)                                       */
/* -------------------------------------------------------------------------- */
#bbpress-forums .bbp-the-content-wrapper {
	margin: 8px 0 14px;
	clear: both;
}

#bbpress-forums .bbp-the-content-wrapper .wp-editor-wrap,
#bbpress-forums .wp-editor-wrap {
	width: 100%;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #ddd;
	background: #fff;
}

#bbpress-forums .wp-editor-tools {
	padding: 6px 8px 0;
	background: #f6f7f7;
	border-bottom: 1px solid #ddd;
}

#bbpress-forums .wp-media-buttons {
	float: left;
	margin: 0 0 6px;
}

/* Prefer Visual toolbar visible by default */
#bbpress-forums .wp-editor-wrap.tmce-active .mce-tinymce,
#bbpress-forums .wp-editor-wrap.tmce-active .mce-toolbar-grp {
	display: block !important;
	visibility: visible !important;
}

#bbpress-forums .wp-editor-tabs {
	float: right;
}

#bbpress-forums .wp-switch-editor {
	background: transparent;
	border-color: #ddd;
	color: #555;
	font-size: 12px;
}

#bbpress-forums .tmce-active .switch-tmce,
#bbpress-forums .html-active .switch-html {
	background: #fff;
	border-bottom-color: #fff;
	color: #111;
	font-weight: 600;
}

#bbpress-forums .mce-toolbar .mce-btn button,
#bbpress-forums .quicktags-toolbar input {
	/* keep core look; ensure visible */
}

#bbpress-forums .mce-tinymce,
#bbpress-forums .mce-container,
#bbpress-forums .mce-panel {
	border-radius: 0 !important;
}

#bbpress-forums .mce-edit-area iframe,
#bbpress-forums .wp-editor-area {
	min-height: 220px !important;
}

/* Don't style TinyMCE chrome as plain text inputs */
#bbpress-forums .bbp-the-content-wrapper textarea.bbp-the-content,
#bbpress-forums .bbp-the-content-wrapper .wp-editor-area {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: none;
	border-radius: 0;
	padding: 10px 12px;
	font-size: 14px;
	min-height: 220px;
	font-family: var(--v2ex-font);
}

#bbpress-forums .quicktags-toolbar {
	background: #f6f7f7;
	border-bottom: 1px solid #ddd;
	padding: 4px 6px;
}

/* Form labels under editor */
#bbpress-forums .bbp-topic-form label,
#bbpress-forums .bbp-reply-form label {
	font-size: 12px;
	font-weight: 600;
	color: #555;
}

/* Soften admin-only unfiltered HTML notice */
#bbpress-forums .bbp-template-notice:has(li:only-child) {
	/* keep visible for admins; slightly cleaner */
}

#bbpress-forums .bbp-submit-wrapper {
	float: none;
	text-align: right;
	padding: 0 12px 12px;
}

#bbpress-forums button.submit,
#bbpress-forums .button.submit {
	display: inline-block;
	padding: 6px 18px;
	font-size: 13px;
	border-radius: 3px;
	border: 1px solid #333;
	background: #333;
	color: #fff !important;
	cursor: pointer;
}

#bbpress-forums button.submit:hover {
	background: #555;
	border-color: #555;
}

#bbpress-forums div.bbp-template-notice {
	border: 1px solid #f0e0a0;
	background: #fffbe6;
	color: #665;
	padding: 8px 12px;
	border-radius: 3px;
	margin: 10px 12px;
	font-size: 13px;
}

#bbpress-forums .bbp-topic-tags {
	font-size: 12px;
	margin: 8px 0 0;
	color: var(--v2ex-fade);
}

#bbpress-forums .bbp-topic-tags a {
	display: inline-block;
	background: var(--v2ex-node-bg);
	padding: 1px 6px;
	border-radius: 2px;
	margin-right: 4px;
}

#bbpress-forums .subscription-toggle,
#bbpress-forums .favorite-toggle {
	float: none;
	font-size: 12px;
}

/* Empty state */
.v2ex-empty {
	padding: 32px 16px;
	text-align: center;
	color: #999;
	font-size: 14px;
}

/* Forum create topic area sits under the card */
.v2ex-new-topic {
	margin-top: 0;
}

/* -------------------------------------------------------------------------- */
/* Mobile                                                                     */
/* -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	body.bbp-v2ex-skin #bbpress-forums {
		padding: 12px 8px 32px;
	}

	.v2ex-tabs {
		padding: 8px 8px 6px;
		gap: 2px;
	}

	.v2ex-tab {
		padding: 3px 10px;
		font-size: 13px;
	}

	.v2ex-item-avatar,
	.v2ex-post-avatar {
		flex-basis: 36px;
		width: 36px;
	}

	.v2ex-item-avatar img,
	.v2ex-item-avatar .avatar,
	.v2ex-post-avatar img,
	.v2ex-post-avatar .avatar {
		width: 36px !important;
		height: 36px !important;
	}

	.v2ex-item-title {
		font-size: 15px;
	}

	.v2ex-topic-title,
	.v2ex-topic-header h1.v2ex-topic-title {
		font-size: 18px;
	}

	.v2ex-topic-header-avatar {
		flex-basis: 48px;
		width: 48px;
	}

	.v2ex-topic-header-avatar img,
	.v2ex-topic-header-avatar .avatar {
		width: 48px !important;
		height: 48px !important;
	}

	.v2ex-search-input {
		height: 38px;
	}
}

/* -------------------------------------------------------------------------- */
/* User profile (/forums/users/...)                                           */
/* -------------------------------------------------------------------------- */
body.bbp-user-page.bbp-v2ex-skin .entry-header,
body.bbp-user-page.bbp-v2ex-skin h1.entry-title {
	display: none !important;
}

#bbpress-forums.bbp-v2ex-user {
	padding-top: 8px;
}

.v2ex-user-layout {
	display: block;
	max-width: 100%;
}

.v2ex-user-header {
	margin-bottom: 16px !important;
	overflow: hidden;
}

.v2ex-user-header-main {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 20px 18px 16px;
}

.v2ex-user-header-avatar .avatar,
.v2ex-user-header-avatar img {
	display: block;
	width: 96px !important;
	height: 96px !important;
	border-radius: 12px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.v2ex-user-display-name {
	margin: 0 0 4px !important;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: #111;
	letter-spacing: -0.02em;
}

.v2ex-user-handle {
	font-size: 14px;
	color: #999;
	margin-bottom: 10px;
}

.v2ex-user-header-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-size: 13px;
	color: #777;
}

.v2ex-user-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: #111;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.v2ex-user-joined {
	color: #999;
}

.v2ex-user-nav {
	border-top: 1px solid #eee;
	background: #fafafa;
	padding: 0 8px;
}

.v2ex-user-nav ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.v2ex-user-nav li {
	margin: 0 !important;
}

.v2ex-user-nav a {
	display: block;
	padding: 12px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #666 !important;
	text-decoration: none !important;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.v2ex-user-nav a:hover {
	color: #111 !important;
}

.v2ex-user-nav li.current a {
	color: #111 !important;
	border-bottom-color: #111;
}

.v2ex-user-body {
	padding: 0 !important;
	overflow: hidden;
}

.v2ex-user-body .entry-title,
.v2ex-user-body h2.entry-title,
.v2ex-user-body h3 {
	display: none;
}

.v2ex-user-section-title {
	padding: 14px 16px 10px;
	font-size: 13px;
	font-weight: 700;
	color: #333;
	border-bottom: 1px solid #f0f0f0;
	background: #fafafa;
}

.v2ex-user-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border-bottom: 1px solid #f0f0f0;
}

.v2ex-user-stat {
	padding: 18px 12px;
	text-align: center;
	border-right: 1px solid #f0f0f0;
}

.v2ex-user-stat:last-child {
	border-right: none;
}

.v2ex-user-stat-num {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: #111;
	line-height: 1.2;
	margin-bottom: 4px;
	word-break: break-word;
}

.v2ex-user-stat-num.v2ex-user-stat-text {
	font-size: 14px;
	font-weight: 600;
	padding-top: 4px;
}

.v2ex-user-stat-label {
	display: block;
	font-size: 12px;
	color: #999;
}

.v2ex-user-about {
	padding: 16px;
	font-size: 14px;
	line-height: 1.65;
	color: #333;
}

.v2ex-user-description {
	margin-bottom: 12px;
}

.v2ex-user-website {
	margin: 0;
	font-size: 13px;
}

.v2ex-user-website .v2ex-fade {
	margin-right: 8px;
}

.v2ex-user-empty {
	padding: 28px 16px;
	text-align: center;
	font-size: 13px;
}

.v2ex-user-panel .bbp-user-section {
	padding: 0;
}

#bbp-single-user-details,
#bbp-user-avatar,
#bbp-user-navigation,
#bbp-user-body {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

#bbp-user-navigation ul {
	list-style: none;
}

.v2ex-user-body .bbp-form {
	padding: 16px;
}

.v2ex-user-body fieldset.bbp-form legend {
	background: transparent;
	border: none;
	padding: 0 0 12px;
	font-size: 15px;
}

@media (max-width: 700px) {
	.v2ex-user-header-main {
		flex-direction: column;
		align-items: flex-start;
	}

	.v2ex-user-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.v2ex-user-stat:nth-child(2n) {
		border-right: none;
	}

	.v2ex-user-stat:nth-child(-n + 2) {
		border-bottom: 1px solid #f0f0f0;
	}

	.v2ex-user-nav a {
		padding: 10px 12px;
		font-size: 12px;
	}

	.v2ex-user-header-avatar .avatar,
	.v2ex-user-header-avatar img {
		width: 72px !important;
		height: 72px !important;
	}
}

/* Profile breadcrumb + back */
.v2ex-user-bc {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0 0 12px;
	padding: 0 2px;
	font-size: 13px;
	color: #999;
}

.v2ex-user-bc a {
	color: #778087 !important;
	text-decoration: none !important;
}

.v2ex-user-bc a:hover {
	color: #333 !important;
}

.v2ex-bc-current {
	color: #666;
	font-weight: 500;
}

.v2ex-bc-back {
	margin-left: auto;
	font-size: 12px;
	font-weight: 600;
	color: #111 !important;
	padding: 4px 10px;
	border: 1px solid #ddd;
	border-radius: 999px;
	background: #fff;
}

.v2ex-bc-back:hover {
	border-color: #111;
	background: #fafafa;
}

/* Avatar edit hover */
.v2ex-user-header-avatar.is-editable {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.v2ex-avatar-wrap {
	position: relative;
	display: inline-block;
}

.v2ex-avatar-trigger {
	position: relative;
	display: block;
	padding: 0;
	margin: 0;
	border: none;
	background: none;
	cursor: pointer;
	border-radius: 12px;
	overflow: hidden;
	line-height: 0;
}

.v2ex-avatar-trigger .avatar,
.v2ex-avatar-trigger img {
	display: block;
	width: 96px !important;
	height: 96px !important;
	border-radius: 12px;
}

.v2ex-avatar-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	opacity: 0;
	transition: opacity 0.15s ease;
	border-radius: 12px;
}

.v2ex-avatar-trigger:hover .v2ex-avatar-overlay,
.v2ex-avatar-trigger:focus .v2ex-avatar-overlay {
	opacity: 1;
}

.v2ex-avatar-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 6px;
	border: 1px solid #ccc;
	background: #fff;
	color: #111;
	cursor: pointer;
	font-family: inherit;
}

.v2ex-avatar-btn:hover {
	border-color: #111;
	background: #fafafa;
}

.v2ex-avatar-status {
	margin: 0;
	font-size: 12px;
	color: #666;
}

.v2ex-avatar-status.is-error {
	color: #a33;
}

.v2ex-avatar-status.is-ok {
	color: #2f6b3a;
}

@media (max-width: 700px) {
	.v2ex-bc-back {
		width: 100%;
		margin-left: 0;
		margin-top: 6px;
		text-align: center;
	}

	.v2ex-avatar-trigger .avatar,
	.v2ex-avatar-trigger img {
		width: 72px !important;
		height: 72px !important;
	}
}

/* Responsive video embeds */
.v2ex-video-wrap {
	position: relative;
	width: 100%;
	max-width: 720px;
	margin: 12px 0;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 6px;
	overflow: hidden;
}

.v2ex-video-wrap iframe,
.v2ex-video-wrap .v2ex-embed {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}

.v2ex-post-content .v2ex-video-wrap,
.bbp-topic-content .v2ex-video-wrap,
.bbp-reply-content .v2ex-video-wrap {
	margin: 14px 0;
}

/* Editor canvas preview for inserted images */
.mce-content-body img.v2ex-content-img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}
