.posts-shell {
	padding: 24px;
	border-radius: 24px;
	background: linear-gradient(180deg, var(--surface, var(--bg-panel)), var(--surface-strong, var(--bg-panel)));
	border: 1px solid var(--border-soft);
	box-shadow: 0 24px 70px var(--card-shadow-hover);
}

.posts-hero {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	align-items: center;
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--border-soft);
}

.posts-kicker {
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.78rem;
	color: var(--accent);
	font-weight: 700;
}

.posts-description {
	max-width: 760px;
	color: var(--text-soft);
	line-height: 1.6;
}

.posts-hero-user {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border-radius: 18px;
	background: var(--accent-very-soft);
	min-width: min(100%, 260px);
}

.posts-hero-user img {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	object-fit: cover;
	border: 2px solid var(--accent);
	box-shadow: 0 0 18px var(--accent-soft);
}

.posts-hero-user strong,
.posts-hero-user span {
	display: block;
}

.posts-hero-user span {
	color: var(--text-soft);
	font-size: 0.9rem;
}

.posts-composer {
	margin-bottom: 22px;
}

.post-create-form,
.posts-guest-note {
	padding: 18px;
	border-radius: 18px;
	border: 1px solid var(--border-soft);
	background: var(--surface-strong, var(--bg-panel));
}

.post-create-form {
	display: grid;
	gap: 10px;
}

.post-create-form label {
	font-weight: 700;
}

.post-create-form textarea,
.post-reply-form textarea {
	width: 100%;
	resize: vertical;
	min-height: 96px;
	padding: 14px;
	border-radius: 14px;
	border: 1px solid var(--border-strong);
	background: var(--input-surface);
	color: var(--text-main);
	font: inherit;
	line-height: 1.5;
}

.post-create-form textarea:focus,
.post-reply-form textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
}

.post-create-footer,
.post-reply-form-footer {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.post-counter,
.post-composer-note,
.post-replies-status,
.post-time,
.posts-guest-note p {
	color: var(--text-soft);
	font-size: 0.92rem;
}

.post-composer-note {
	margin: 0;
}

.posts-feed {
	display: grid;
	gap: 16px;
}

.post-card {
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr);
	gap: 18px;
	padding: 18px;
	border-radius: 20px;
	border: 1px solid var(--border-soft);
	background: linear-gradient(180deg, var(--surface, var(--bg-panel)), var(--surface-strong, var(--bg-panel)));
	box-shadow: 0 14px 40px var(--card-shadow-hover);
}

.post-card.post-reply-card {
	margin-top: 10px;
	margin-left: 18px;
	grid-template-columns: 118px minmax(0, 1fr);
	padding: 14px;
	box-shadow: none;
	background: var(--surface-soft, rgba(255, 255, 255, 0.03));
}

.post-sidebar {
	display: grid;
	justify-items: center;
	gap: 10px;
	padding: 0 14px;
	border-right: 1px solid var(--border-soft);
    align-content: start;
}

.post-avatar {
	width: 88px;
	height: 88px;
	border-radius: 18px;
	object-fit: cover;
	border: 2px solid var(--accent);
	background: var(--white);
	box-shadow: 0 0 18px var(--accent-soft);
}

.post-identity {
	text-align: center;
	display: grid;
	gap: 4px;
}

.post-username {
	font-size: 1rem;
}

.post-minecraft {
	color: var(--text-soft);
	font-size: 0.9rem;
}

.post-rank {
	font-size: 0.9rem;
}

.post-main {
	display: grid;
	gap: 12px;
	min-width: 0;
}

.post-top-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.post-badges {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.post-badge {
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.post-badge.is-pending {
	color: var(--posts-pending-badge-text, var(--warning));
	background: var(--posts-pending-badge-bg, rgba(255, 183, 77, 0.14));
}

.post-content-wrap {
	display: grid;
	gap: 8px;
}

.post-content {
	white-space: pre-wrap;
	line-height: 1.65;
	color: var(--text-main);
}

.post-content.clamped {
	display: -webkit-box;
	line-clamp: 3;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-content.expanded {
	display: block;
	line-clamp: none;
	-webkit-line-clamp: none;
	overflow: visible;
}

.post-content-toggle,
.post-action-btn,
.post-more-replies-btn {
	width: fit-content;
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid var(--border-soft);
	background: var(--accent-very-soft);
	color: var(--text-main);
	cursor: pointer;
	transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.post-content-toggle:hover,
.post-action-btn:hover,
.post-more-replies-btn:hover {
	transform: translateY(-1px);
	background: var(--accent-soft);
}

.post-action-danger {
	background: var(--danger-soft);
	color: var(--danger);
}

.post-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.post-replies-area {
	display: grid;
	gap: 12px;
}

.post-replies-summary {
	margin-top: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--border-soft);
	display: grid;
	gap: 10px;
}

.post-replies-label {
	margin: 0;
	color: var(--text-soft);
	font-size: 0.9rem;
	font-weight: 700;
}

.post-replies-list {
	display: grid;
	gap: 10px;
}

.post-replies-list .post-card.post-reply-card {
	border-radius: 16px;
}

.post-replies-list .post-card.post-reply-card .post-sidebar {
	width: auto;
	min-width: 0;
	padding: 0 12px 0 0;
}

.post-replies-list .post-card.post-reply-card .post-avatar {
	width: 62px;
	height: 62px;
	border-radius: 14px;
}

.post-replies-list .post-card.post-reply-card .post-content {
	font-size: 0.94rem;
}

.post-replies-list .post-card.post-reply-card .post-actions,
.post-replies-list .post-card.post-reply-card .post-badges {
	gap: 6px;
}

.post-replies-list .post-card.post-reply-card .post-content-toggle,
.post-replies-list .post-card.post-reply-card .post-action-btn,
.post-replies-list .post-card.post-reply-card .post-more-replies-btn {
	padding: 6px 10px;
	font-size: 0.85rem;
}

.post-replies-list .post-card.post-reply-card .post-rank,
.post-replies-list .post-card.post-reply-card .post-minecraft,
.post-replies-list .post-card.post-reply-card .post-time {
	font-size: 0.84rem;
}

.post-replies-list .post-card.post-reply-card .post-content.clamped {
	line-clamp: 2;
	-webkit-line-clamp: 2;
}

.post-replies-list .post-card.post-reply-card .post-sidebar {
	gap: 8px;
}

.post-replies-list .post-card.post-reply-card .post-identity {
	gap: 2px;
}

.post-replies-list .post-card.post-reply-card .post-top-row {
	align-items: flex-start;
}

.post-replies-list .post-card.post-reply-card .post-main {
	gap: 10px;
}

.post-replies-list .post-card.post-reply-card .post-content-wrap {
	gap: 6px;
}

.post-reply-form {
	display: grid;
	gap: 10px;
	padding: 14px;
	border-radius: 16px;
	background: var(--surface-soft, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--border-soft);
}

.post-reply-form-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.post-inline-notice {
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--accent-very-soft);
	border: 1px solid var(--accent-soft);
	color: var(--text-main);
}

.post-inline-notice.is-error {
	background: var(--danger-soft);
	border-color: var(--danger-soft);
	color: var(--danger);
}

.post-modal {
	position: fixed;
	inset: 0;
	z-index: 5000;
	display: grid;
	place-items: center;
}

.post-modal.hidden {
	display: none;
}

body.posts-modal-open {
	overflow: hidden;
}

.post-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(10, 12, 20, 0.62);
	z-index: 0;
}

.post-modal-panel {
	position: relative;
	z-index: 1;
	width: min(720px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 20px;
	border-radius: 24px;
	background: linear-gradient(180deg, var(--surface, var(--bg-panel)), var(--surface-strong, var(--bg-panel)));
	border: 1px solid var(--border-soft);
	box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.post-modal-header {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: flex-start;
	margin-bottom: 16px;
}

.post-modal-header h3 {
	margin-top: 4px;
}

.post-modal-close {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--border-soft);
	background: var(--accent-very-soft);
	color: var(--text-main);
	cursor: pointer;
	font-size: 1.3rem;
	line-height: 1;
}

.post-modal-close:hover {
	background: var(--accent-soft);
}

.post-open-modal {
	margin-bottom: 14px;
}

.post-create-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.posts-loading,
.posts-empty {
	padding: 16px 0 0;
	text-align: center;
	color: var(--text-soft);
}

.posts-sentinel {
	height: 1px;
}

@media (max-width: 700px) {
	.posts-shell {
		padding: 16px;
		border-radius: 20px;
	}

	.posts-feed {
		gap: 12px;
	}

	.post-card,
	.post-card.post-reply-card,
	.post-replies-list .post-card.post-reply-card {
		grid-template-columns: 48px minmax(0, 1fr);
		gap: 10px;
		padding: 12px;
		margin-left: 0;
		border-radius: 16px;
	}

	.post-sidebar,
	.post-card.post-reply-card .post-sidebar,
	.post-replies-list .post-card.post-reply-card .post-sidebar {
		justify-items: start;
		align-content: start;
		width: auto;
		gap: 6px;
		padding: 0;
		border: none;
	}

	.post-avatar,
	.post-card.post-reply-card .post-avatar,
	.post-replies-list .post-card.post-reply-card .post-avatar {
		width: 48px;
		height: 48px;
		border-radius: 12px;
	}

	.post-identity,
	.post-card.post-reply-card .post-identity,
	.post-replies-list .post-card.post-reply-card .post-identity {
		text-align: left;
		gap: 1px;
	}

	.post-username,
	.post-card.post-reply-card .post-username {
		font-size: 0.92rem;
		line-height: 1.2;
	}

	.post-minecraft,
	.post-rank,
	.post-time,
	.post-card.post-reply-card .post-minecraft,
	.post-card.post-reply-card .post-rank,
	.post-card.post-reply-card .post-time {
		font-size: 0.78rem;
		line-height: 1.2;
	}

	.post-main,
	.post-card.post-reply-card .post-main {
		gap: 8px;
	}

	.post-card:not(.post-reply-card) .post-sidebar {
		display: contents;
	}

	.post-card:not(.post-reply-card) .post-avatar {
		grid-column: 1;
		grid-row: 1 / span 2;
		align-self: start;
	}

	.post-card:not(.post-reply-card) .post-identity {
		grid-column: 2;
		grid-row: 1;
		align-self: end;
	}

	.post-card:not(.post-reply-card) .post-main {
		grid-column: 2;
		grid-row: 2;
	}

	.post-top-row,
	.post-card.post-reply-card .post-top-row {
		align-items: flex-start;
		gap: 6px;
	}

	.post-content,
	.post-card.post-reply-card .post-content {
		font-size: 0.9rem;
		line-height: 1.45;
	}

	.post-actions,
	.post-card.post-reply-card .post-actions {
		gap: 8px;
	}

	.post-action-btn,
	.post-content-toggle,
	.post-more-replies-btn,
	.post-card.post-reply-card .post-action-btn,
	.post-card.post-reply-card .post-content-toggle,
	.post-card.post-reply-card .post-more-replies-btn {
		padding: 6px 10px;
		font-size: 0.82rem;
	}

	.post-replies-summary {
		gap: 8px;
	}

	.post-replies-list {
		gap: 8px;
		padding-left: 10px;
		border-left: 2px solid var(--border-soft);
	}

	.post-reply-form {
		padding: 10px;
		gap: 8px;
	}

	.post-reply-form textarea {
		min-height: 76px;
		padding: 10px 12px;
	}
}

