:root {
	--bg-primary: #ffffff;
	--bg-secondary: #f5f5f7;
	--bg-tertiary: #e8e8ed;
	--bg-card: #ffffff;
	--border-subtle: rgba(0, 0, 0, 0.04);
	--border-default: rgba(0, 0, 0, 0.08);
	--text-primary: #1d1d1f;
	--text-secondary: #86868b;
	--text-tertiary: #aeaeb2;
	--accent: #0071e3;
	--accent-hover: #0077ed;
	--radius-sm: 10px;
	--radius-md: 14px;
	--radius-lg: 20px;
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
	--shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	--shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
	--transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
	--font-heading: 32px;
	--font-title: 18px;
	--font-body: 15px;
	--font-caption: 13px;
	--font-small: 11px;
}

body {
	font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
	background: var(--bg-secondary);
	color: var(--text-primary);
}

.document_container {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 24px;
}

/* 페이지 헤더 */
.page-header {
	padding: 0 0 10px;
	text-align: left;
}


.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--font-caption);
	color: var(--text-secondary);
	text-decoration: none;
	transition: var(--transition);
	margin-bottom: 24px;
}

.back-link:hover {
	color: var(--text-primary);
}

.back-link i {
	font-size: 12px;
}

/* ========================================
   게시글 상세
   ======================================== */
.post-container {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-subtle);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
}

.post-header {
	padding: 32px;
	border-bottom: 1px solid var(--border-subtle);
}

.post-category {
	display: inline-block;
	padding: 4px 12px;
	background: var(--bg-secondary);
	color: var(--text-secondary);
	font-size: var(--font-small);
	font-weight: 600;
	border-radius: 20px;
	margin-bottom: 16px;
}

.post-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--text-primary);
	line-height: 1.4;
	margin-bottom: 20px;
}

.post-meta {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.post-author {
	display: flex;
	align-items: center;
	gap: 10px;
}

.post-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
	color: white;
	text-transform: uppercase;
	overflow: hidden;
	flex-shrink: 0;
}

.post-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-author-name {
	font-size: var(--font-caption);
	font-weight: 500;
	color: var(--text-primary);
}

.post-info {
	display: flex;
	align-items: center;
	gap: 16px;
}

.post-info-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: var(--font-caption);
	color: var(--text-tertiary);
}

.post-info-item i {
	font-size: 12px;
}

/* 본문 내용 */
.post-content {
	padding: 32px;
	min-height: 300px;
}

.post-content p {
	font-size: var(--font-body);
	line-height: 1.8;
	color: var(--text-primary);
}

.post-content p:last-child {
}

.post-content img {
	max-width: 100%;
	border-radius: var(--radius-sm);
	margin: 20px 0;
}

.post-content code {
	background: var(--bg-secondary);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: var(--font-caption);
	font-family: 'SF Mono', Monaco, monospace;
}

.post-content pre {
	background: #1d1d1f;
	color: #f8f8f2;
	padding: 20px;
	border-radius: var(--radius-sm);
	overflow-x: auto;
	margin: 20px 0;
}

.post-content pre code {
	background: none;
	padding: 0;
	color: inherit;
}

/* 버튼 그룹 */
.post-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	padding: 24px 0;
	margin-bottom: 24px;
	background: transparent;
	border: none;
}

.post-actions .sendi-btn,
.post-actions button,
.post-actions a {
	height: 44px !important;
	box-sizing: border-box;
}

.sendi-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: var(--font-caption);
	font-weight: 600;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
	text-decoration: none;
	border: none;
}

.sendi-btn-primary {
	background: var(--accent);
	color: white;
}

.sendi-btn-primary:hover {
	background: var(--accent-hover);
}

.sendi-btn-secondary {
	background: var(--bg-primary);
	color: var(--text-primary);
	border: 1px solid var(--border-default);
}

.sendi-btn-secondary:hover {
	border-color: var(--text-primary);
}

/* 이전글/다음글 */
.post-navigation {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-subtle);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

.post-nav-item {
	display: flex;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border-subtle);
	text-decoration: none;
	transition: var(--transition);
}

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

.post-nav-item:hover {
	background: var(--bg-secondary);
}

.post-nav-label {
	width: 80px;
	font-size: var(--font-caption);
	font-weight: 600;
	color: var(--text-tertiary);
	flex-shrink: 0;
}

.post-nav-title {
	flex: 1;
	font-size: var(--font-body);
	color: var(--text-primary);
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-nav-item:hover .post-nav-title {
	color: var(--accent);
}

.post-nav-arrow {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-tertiary);
	flex-shrink: 0;
}

/* ========================================
   댓글 섹션
   ======================================== */
.comments-section {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-subtle);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
}

.comments-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border-subtle);
}

.comments-title {
	font-size: var(--font-body);
	font-weight: 600;
	color: var(--text-primary);
}

.comments-count {
	font-size: var(--font-caption);
	color: var(--accent);
	font-weight: 600;
}

/* 댓글 입력 - 독립 섹션 */
.comment-form {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-subtle);
	padding: 24px;
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
}

.comment-input-wrap {
	display: flex;
	gap: 12px;
}

.comment-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--bg-tertiary);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-tertiary);
	flex-shrink: 0;
}

.comment-input-box {
	flex: 1;
}

.comment-textarea {
	width: 100%;
	min-height: 80px;
	padding: 12px 16px;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-sm);
	font-size: var(--font-caption);
	font-family: inherit;
	resize: vertical;
	transition: var(--transition);
}

.comment-textarea:focus {
	outline: none;
	border-color: var(--accent);
}

.comment-textarea::placeholder {
	color: var(--text-tertiary);
}

.comment-submit {
	display: flex;
	justify-content: flex-end;
	margin-top: 12px;
}

/* 댓글 목록 */
.comment-list {
	padding: 0;
}

.comment-item {
	padding: 24px;
	border-bottom: 1px solid var(--border-subtle);
}

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

.comment-item-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.comment-item-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	color: white;
	flex-shrink: 0;
}

.comment-item-info {
	flex: 1;
}

.comment-item-author {
	font-size: var(--font-caption);
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 2px;
}

.comment-item-date {
	font-size: var(--font-small);
	color: var(--text-tertiary);
}

.comment-item-content {
	font-size: var(--font-caption);
	line-height: 1.7;
	color: var(--text-primary);
	margin-left: 48px;
}

.comment-item-actions {
	display: flex;
	gap: 12px;
	margin-left: 48px;
	margin-top: 12px;
}

.comment-action-btn {
	font-size: var(--font-small);
	color: var(--text-tertiary);
	background: none;
	border: none;
	cursor: pointer;
	transition: var(--transition);
}

.comment-action-btn:hover {
	color: var(--text-primary);
}

/* 대댓글 */
.comment-reply {
	margin-left: 48px;
	margin-top: 16px;
	padding: 16px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
}

.comment-reply .comment-item-header {
	margin-bottom: 8px;
}

.comment-reply .comment-item-avatar {
	width: 28px;
	height: 28px;
	font-size: 10px;
}

.comment-reply .comment-item-content {
	margin-left: 40px;
}

.comment-reply .comment-item-actions {
	margin-left: 40px;
}

/* 댓글 프로필 이미지 */
.comment-item-avatar-img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.comment-reply .comment-item-avatar-img {
	width: 28px;
	height: 28px;
}

/* 댓글 작성자 링크 */
.comment-item-author a {
	color: var(--text-primary);
	text-decoration: none;
}

.comment-item-author a:hover {
	color: var(--accent);
}

/* 비로그인 사용자 입력 */
.comment-guest-info {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.comment-input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-sm);
	font-size: var(--font-caption);
	font-family: inherit;
	transition: var(--transition);
}

.comment-input:focus {
	outline: none;
	border-color: var(--accent);
}

.comment-input::placeholder {
	color: var(--text-tertiary);
}

/* 댓글 옵션 */
.comment-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 12px;
}

.comment-options-left {
	display: flex;
	gap: 16px;
}

.comment-option {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: var(--font-small);
	color: var(--text-secondary);
	cursor: pointer;
}

.comment-option input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--accent);
}

/* 캡차 */
.comment-captcha {
	margin-top: 12px;
	padding: 12px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
}

/* 삭제된 댓글 */
.comment-item-content.deleted {
	color: var(--text-tertiary);
	font-style: italic;
}

/* 비밀 댓글 폼 */
.comment-secret-form {
	margin-left: 48px;
	padding: 16px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.comment-secret-form p {
	font-size: var(--font-caption);
	color: var(--text-secondary);
	margin: 0;
}

.comment-secret-form .comment-input {
	flex: 0 1 200px;
}

/* 댓글 첨부파일 */
.comment-files {
	margin-left: 48px;
	margin-top: 12px;
}

.comment-files-toggle {
	font-size: var(--font-small);
	color: var(--text-secondary);
	background: var(--bg-secondary);
	border: none;
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
}

.comment-files-toggle:hover {
	background: var(--bg-tertiary);
}

.comment-files-list {
	display: none;
	list-style: none;
	margin-top: 8px;
	padding: 0;
}

.comment-files-list li {
	padding: 4px 0;
}

.comment-files-list a {
	font-size: var(--font-small);
	color: var(--accent);
	text-decoration: none;
}

.comment-files-list a:hover {
	text-decoration: underline;
}

/* 댓글 액션 활성화 상태 */
.comment-action-btn.active {
	color: var(--accent);
}

.comment-action-btn.active i {
	color: var(--accent);
}

/* 댓글 페이지네이션 */
.comment-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	padding: 20px 24px;
	border-top: 1px solid var(--border-subtle);
}

.comment-page-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	font-size: var(--font-caption);
	color: var(--text-secondary);
	text-decoration: none;
	border-radius: var(--radius-sm);
	transition: var(--transition);
}

.comment-page-btn:hover {
	background: var(--bg-secondary);
	color: var(--text-primary);
}

.comment-page-current {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	font-size: var(--font-caption);
	font-weight: 600;
	color: white;
	background: var(--accent);
	border-radius: var(--radius-sm);
}

/* 대댓글 스타일 조정 */
.comment-item.comment-reply {
	margin-left: 48px;
	padding: 16px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
	border-bottom: none;
	margin-bottom: 0;
	margin-top: 0;
}

.comment-item.comment-reply + .comment-item:not(.comment-reply) {
	margin-top: 16px;
}

.comment-item.comment-reply .comment-item-content,
.comment-item.comment-reply .comment-item-actions,
.comment-item.comment-reply .comment-files,
.comment-item.comment-reply .comment-secret-form {
	margin-left: 40px;
}

.comment-item.comment-reply .comment-item-avatar,
.comment-item.comment-reply .comment-item-avatar-img {
	width: 28px;
	height: 28px;
	font-size: 10px;
}

/* 반응형 */
@media (max-width: 768px) {
	.document_container {
		padding: 0;
	}

	.post-header {
		padding: 24px;
	}

	.post-title {
		font-size: 20px;
	}

	.post-meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.post-content {
		padding: 24px;
	}

	.post-actions {
		justify-content: flex-end;
	}

	.comment-item-content,
	.comment-item-actions,
	.comment-files,
	.comment-secret-form {
		margin-left: 0;
		margin-top: 12px;
	}

	.comment-guest-info {
		flex-direction: column;
	}

	.comment-options {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.comment-submit {
		width: 100%;
	}

	.comment-submit .sendi-btn {
		width: 100%;
		justify-content: center;
	}

	.comment-item.comment-reply {
		margin-left: 24px;
	}

	.comment-item.comment-reply .comment-item-content,
	.comment-item.comment-reply .comment-item-actions,
	.comment-item.comment-reply .comment-files {
		margin-left: 0;
	}

	.comment-secret-form {
		flex-direction: column;
		align-items: flex-start;
	}

	.comment-secret-form .comment-input {
		width: 100%;
	}
}

/* 비밀글 차단 화면 */
.post-secret-blocked {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-subtle);
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
	padding: 80px 32px;
	text-align: center;
}

.post-secret-blocked-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.post-secret-blocked-inner > i {
	font-size: 36px;
	color: var(--text-tertiary);
}

.post-secret-blocked-ticker {
	display: inline-block;
	padding: 6px 20px;
	background: #1d1d1f;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 24px;
}

.post-secret-blocked p {
	font-size: var(--font-caption);
	color: var(--text-secondary);
	margin: 0;
}
