/* Posting and reading pages in the copied desktop X5 style. */
body.pg_post #postform #ct > .bm {
	box-sizing: border-box;
	padding: 16px 20px 20px;
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-m, 10px);
	background: var(--dz-bgf);
}
body.pg_post #postform #ct > .bm > .tb {
	margin: 0 0 14px !important;
	padding: 0;
	border-bottom: 1px solid var(--dz-borderb);
}
body.pg_post #postform #ct > .bm > .tb a {
	padding: 0 12px;
	font-size: 14px;
}
body.pg_post #postbox {
	padding-top: 0;
}
body.pg_post #postbox > .pbt {
	margin-bottom: 12px;
}
body.pg_post #postbox > .pbt:has(#subject) {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}
body.pg_post #postbox > .pbt:has(#subject)::after {
	display: none;
}
body.pg_post #postbox > .pbt > .ftid {
	float: none;
	margin: 0;
}
body.pg_post #postbox > .pbt > .z {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	flex: 1;
	float: none;
	min-width: 0;
}
body.pg_post #postbox > .pbt > .z > span:has(> #subject) {
	flex: 1;
	min-width: 220px;
}
body.pg_post #postbox #subject {
	box-sizing: border-box;
	width: 100% !important;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-s, 6px);
	font-size: 15px;
	font-weight: 400;
	line-height: 34px;
}
body.pg_post #postbox #subject:focus {
	border-color: var(--dz-nvbg);
}
body.pg_post #postbox #subjectchk {
	font-size: 12px;
	color: var(--dz-fc);
	white-space: nowrap;
}
body.pg_post #postbox > .pbt .ftid a,
body.pg_post #postbox > .pbt .ftid select {
	box-sizing: border-box;
	height: 36px;
	border-radius: var(--dz-radius-s, 6px);
	font-size: 13px;
	line-height: 34px;
}
/* Clear wrapped tool groups without constraining resize or fullscreen modes. */
body.pg_post #postform #e_body {
	border-color: var(--dz-borderb) !important;
	border-radius: var(--dz-radius-m, 10px);
}
body.pg_post #postform #e_controls {
	box-sizing: content-box;
	height: auto;
	min-height: 56px;
	padding: 8px;
	border-radius: var(--dz-radius-m, 10px) var(--dz-radius-m, 10px) 0 0;
	background: var(--dz-bgc);
}
body.pg_post #postform #e_controls::after {
	content: "";
	display: block;
	clear: both;
}
body.pg_post #postform #e_controls .b1r,
body.pg_post #postform #e_controls .b2r {
	padding-right: 2px;
	padding-left: 2px;
}
body.pg_post #postform #e_body > .area {
	padding: 10px;
}
body.pg_post #postform #e_bbar {
	box-sizing: border-box;
	height: auto;
	min-height: 32px;
	padding: 0 8px;
	border-radius: 0 0 var(--dz-radius-m, 10px) var(--dz-radius-m, 10px);
	font-size: 12px;
	line-height: 32px;
}
body.pg_post #postform #postsubmit {
	height: 36px;
	padding: 0 16px;
	border-radius: var(--dz-radius-s, 6px);
	font-size: 14px;
	line-height: 34px;
}
body.pg_post #postform #post_extra {
	margin-top: 12px;
}
body.pg_post #postform .pnpost {
	padding-top: 10px;
	font-size: 12px;
}

/* Readable post cards with the original X5 author profile proportions. */
body.pg_viewthread #postlist {
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-m, 10px);
	background: var(--dz-bgf);
}
body.pg_viewthread #postlist .posthead,
body.pg_viewthread #postlist table.plhin {
	width: 100%;
	table-layout: fixed;
}
body.pg_viewthread #postlist .posthead .plc {
	padding: 14px 20px;
	padding-right: 20px !important;
	border-radius: 0 var(--dz-radius-m, 10px) 0 0;
}
body.pg_viewthread #postlist .posthead .pls {
	vertical-align: top;
	padding: 14px 0;
}
body.pg_viewthread #postlist .posthead .pls > .hm {
	padding-top: 0 !important;
	line-height: 28px;
}
/* Give long titles their own line and keep utility links secondary. */
body.pg_viewthread #postlist .posthead .ts {
	display: block;
	margin: 0 100px 0 0;
	overflow-wrap: anywhere;
}
body.pg_viewthread #postlist .posthead .plc > .y {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
}
body.pg_viewthread #postlist .posthead .plc > .y > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	line-height: 28px;
}
body.pg_viewthread #postlist .posthead .plc > .y > a > i::before {
	margin: 0;
}
body.pg_viewthread #postlist .posthead .plc > .xg1:not(.side_btn) {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	line-height: 20px;
}
body.pg_viewthread #postlist .ts {
	font-size: 18px;
	font-weight: 500;
	line-height: 28px;
}
/* Keep statistics on one line without changing the original author layout. */
body.pg_viewthread #postlist .pls .tns th,
body.pg_viewthread #postlist .pls .tns td,
body.pg_viewthread #postlist .pls .tns th p,
body.pg_viewthread #postlist .pls .tns td p {
	white-space: nowrap;
	word-break: normal;
	font-variant-numeric: tabular-nums;
}
body.pg_viewthread #postlist .pls .tns th p,
body.pg_viewthread #postlist .pls .tns td p {
	margin: 0;
}

body.pg_viewthread #postlist .plc {
	padding-right: 20px;
	padding-left: 20px;
}
body.pg_viewthread #postlist .plc .pi {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	height: auto;
	min-height: 24px;
	margin-bottom: 12px;
	padding: 10px 0;
	font-size: 12px;
	line-height: 24px;
}
/* Keep the floor link and elevator level with the publishing details. */
body.pg_viewthread #postlist .plc .pi > .pti {
	order: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	flex: 1 1 300px;
	gap: 6px 12px;
	min-width: 0;
}
body.pg_viewthread #postlist .plc .pti > .pdbt {
	order: 1;
	float: none;
	margin: 0;
}
body.pg_viewthread #postlist .plc .pti > .pdbt:not(:has(*)) {
	display: none;
}
body.pg_viewthread #postlist .plc .pi > strong {
	order: 1;
	flex: 0 0 auto;
}
body.pg_viewthread #postlist .plc .pi > strong > a {
	display: inline-flex;
	align-items: center;
	float: none;
	box-sizing: border-box;
	min-height: 24px;
	margin: 0;
	padding: 0 6px;
	white-space: nowrap;
}
body.pg_viewthread #postlist .plc .pi > .y {
	order: 2;
	float: none !important;
	margin: 0;
}
body.pg_viewthread #postlist .plc .authi {
	order: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	flex: 1 1 auto;
	min-width: 0;
	line-height: 24px;
}
body.pg_viewthread #postlist .plc .authi .authicn {
	float: none;
	margin: 0 4px 0 0;
}
body.pg_viewthread #postlist #fj {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}
body.pg_viewthread #postlist #fj > label,
body.pg_viewthread #postlist #fj > input,
body.pg_viewthread #postlist #fj_btn {
	float: none !important;
	box-sizing: border-box;
	height: 24px;
	margin: 0;
	line-height: 24px;
}
body.pg_viewthread #postlist #fj > input {
	width: 40px;
	padding: 0 4px;
	border-radius: 4px;
	font-size: 12px;
	text-align: center;
}
body.pg_viewthread #postlist #fj_btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
}
body.pg_viewthread #postlist #fj_btn::before {
	margin: 0;
	line-height: 1;
}
body.pg_viewthread #postlist .t_f {
	font-size: 15px;
	line-height: 1.8;
	overflow-wrap: break-word;
}
body.pg_viewthread #postlist .t_f img {
	max-width: 100%;
}
body.pg_viewthread #postlist .pob,
body.pg_viewthread #postlist .po {
	font-size: 12px;
	line-height: 28px;
}
/* Native moderator controls are siblings of .pob, so align both containers. */
body.pg_viewthread #postlist .po {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding: 8px 0;
}
body.pg_viewthread #postlist .po > .pob {
	order: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	flex: 1 1 360px;
	gap: 6px 12px;
	min-width: 0;
}
body.pg_viewthread #postlist .pob::after {
	display: none;
}
body.pg_viewthread #postlist .pob > em,
body.pg_viewthread #postlist .pob > p,
body.pg_viewthread #postlist .po > .y {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	float: none !important;
	margin: 0;
}
body.pg_viewthread #postlist .pob > p {
	margin-left: auto;
}
body.pg_viewthread #postlist .pob > em > a,
body.pg_viewthread #postlist .pob > p > a {
	display: inline-flex;
	align-items: center;
	float: none;
	min-height: 28px;
	height: auto;
	margin: 0;
	line-height: 28px;
	white-space: nowrap;
}
body.pg_viewthread #postlist .pob > em > a::before {
	flex: 0 0 16px;
	height: auto;
	margin: 0 4px 0 0;
	font-size: 14px;
	line-height: 1;
	transform: none;
}
body.pg_viewthread #postlist .pob > em > a > span {
	margin-left: 4px;
}
body.pg_viewthread #postlist .po > .y {
	order: 1;
	margin-left: auto;
}
body.pg_viewthread #postlist .po > .y > label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	margin: 0;
	line-height: 28px;
	white-space: nowrap;
	cursor: pointer;
}
body.pg_viewthread #postlist .po > .y .pc {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	margin: 0;
}
body.pg_viewthread #postlist .po:focus-within {
	opacity: 1;
}
body.pg_viewthread #modmenu {
	margin-bottom: 10px;
	padding-bottom: 8px;
	font-size: 12px;
	line-height: 24px;
}
body.pg_viewthread #modmenu .pipe {
	margin: 0 6px;
	color: var(--dz-borderb);
}
body.pg_viewthread #f_pst {
	border-radius: var(--dz-radius-m, 10px);
}

/* Use the same action and paging dimensions as the board page. */
body.pg_viewthread #ct > .pgs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 !important;
	padding: 0;
	border: 0;
}
body.pg_viewthread #ct > .pgs::after {
	display: none;
}
body.pg_viewthread #ct > .pgs .pgsbtn {
	order: 0;
	float: none;
	box-sizing: border-box;
	height: 36px;
	margin: 0;
	padding: 0 18px;
	font-size: 14px;
	line-height: 36px;
	letter-spacing: 0;
}
body.pg_viewthread #ct > .pgs > .pgb {
	order: 1;
	float: none;
	margin: 0 0 0 auto !important;
}
body.pg_viewthread #ct > .pgs > .pgt,
body.pg_viewthread #ct > .pgs > .pg {
	order: 2;
	float: none;
	margin: 0 !important;
}
body.pg_viewthread .pgs .pg {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	float: none;
	margin: 0 !important;
}
body.pg_viewthread .pgs .pg a,
body.pg_viewthread .pgs .pg strong,
body.pg_viewthread .pgs .pgb a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	float: none;
	box-sizing: border-box;
	min-width: 30px;
	height: 30px;
	margin: 0;
	padding: 0 8px;
	font-size: 12px;
	line-height: 28px;
}
body.pg_viewthread .pgs .pg a.nxt {
	padding-right: 22px;
}
body.pg_viewthread .pgs .pgb a {
	padding: 0 10px;
}
@media (max-width: 1000px) {
	body.pg_viewthread #postlist .plc {
		padding-right: 16px;
		padding-left: 16px;
	}
	body.pg_viewthread #postlist .posthead .plc {
		padding-right: 16px !important;
		padding-left: 16px;
	}
}
@media (max-width: 760px) {
	body.pg_post #postform #ct > .bm {
		padding: 12px;
	}
	body.pg_viewthread #ct > .pgs > .pgt,
	body.pg_viewthread #ct > .pgs > .pg {
		flex-basis: 100%;
		justify-content: flex-end;
	}
}
