/**
 * 2ch風コメントデザイン
 */

.comment-list,
.commets-list,
.twch-comment,
.twch-comment .children {
	list-style: none;
}

.twch-comment {
	margin: 0 0 14px;
	padding: 0;
}

.twch-comment-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 0;
	padding: 14px 16px;
	line-height: 1.8;
}

.twch-comment-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 8px;
	font-size: 13px;
	color: #666;
}

.twch-comment-no {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: #333;
}

.twch-comment-author {
	font-weight: 700;
	color: #333;
}

.twch-comment-author a {
	color: inherit;
	text-decoration: none;
}

.twch-comment-date {
	color: #777;
	text-decoration: none;
}

.twch-comment-date:hover {
	text-decoration: underline;
}

.twch-parent-ref {
	margin: 0 0 8px;
	font-size: 14px;
	color: #777;
}

.twch-comment-body {
	font-size: 15px;
	color: #222;
	word-break: break-word;
}

.twch-comment-body p {
	margin: 0 0 0.8em;
}

.twch-comment-body p:last-child {
	margin-bottom: 0;
}

.twch-comment-actions {
	margin-top: 10px;
	font-size: 13px;
}

.twch-comment-actions a {
	color: #666;
	text-decoration: none;
}

.twch-comment-actions a:hover {
	text-decoration: underline;
}

.twch-comment-awaiting {
	margin: 8px 0;
	padding: 8px 10px;
	background: #fff8e5;
	border-radius: 6px;
	font-size: 13px;
	color: #8a6500;
}

.twch-ref {
	display: inline-block;
	color: #0066cc;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.twch-ref:hover {
	text-decoration: underline;
}

.twch-ref-missing {
	color: #999;
	cursor: default;
}

/* ネスト表示を完全に無効化 */
.twch-comment .children {
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

/* ポップアップ */
.twch-popup {
	position: absolute;
	z-index: 99999;
	width: min(420px, calc(100vw - 24px));
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 0;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.7;
	color: #222;
}

.twch-popup[hidden] {
	display: none;
}

.twch-popup-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
	font-size: 13px;
	color: #666;
}

.twch-popup-no {
	font-weight: 700;
	color: #333;
}

.twch-popup-author {
	font-weight: 700;
	color: #333;
}

.twch-popup-body {
	max-height: 220px;
	overflow: auto;
	word-break: break-word;
}

.twch-popup-body p {
	margin: 0 0 0.8em;
}

.twch-popup-body p:last-child {
	margin-bottom: 0;
}

.twch-popup-foot {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #eee;
	font-size: 13px;
}

.twch-popup-link {
	color: #0066cc;
	text-decoration: none;
}

.twch-popup-link:hover {
	text-decoration: underline;
}

@media screen and (max-width: 600px) {
	.twch-comment-card {
		padding: 12px;
	}

	.twch-comment .children {
		margin-left: 10px;
		padding-left: 10px;
	}

	.twch-popup {
		position: fixed;
		left: 12px !important;
		right: 12px;
		top: auto !important;
		bottom: 12px;
		width: auto;
		max-height: 55vh;
		overflow: auto;
	}
}