/* Comment Boost — 画面側の見た目。どのテーマにもなじむよう控えめに。影は付けない */
:root {
	--cboost-accent: #e8553d;
	--cboost-border: rgba(128, 128, 128, .35);
	--cboost-soft: rgba(128, 128, 128, .08);
	--cboost-muted: rgba(128, 128, 128, .95);
}

/* ---------- ワンタップ反応 ---------- */
.cboost-reactions {
	margin: 2em 0;
	padding: 1em;
	border: 1px solid var(--cboost-border);
	border-radius: 12px;
	text-align: center;
}
.cboost-reactions-heading {
	margin: 0 0 .75em;
	font-weight: 700;
}
.cboost-reactions-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5em;
}
.cboost-reaction {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	margin: 0;
	padding: .45em .9em;
	border: 1px solid var(--cboost-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .95em;
	line-height: 1.3;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
	-webkit-tap-highlight-color: transparent;
}
.cboost-reaction:hover { border-color: var(--cboost-accent); }
.cboost-reaction:focus-visible { outline: 2px solid var(--cboost-accent); outline-offset: 2px; }
.cboost-reaction.is-mine {
	border-color: var(--cboost-accent);
	background: color-mix(in srgb, var(--cboost-accent) 14%, transparent);
}
.cboost-reaction-emoji { font-size: 1.2em; line-height: 1; }
.cboost-reaction-count { font-variant-numeric: tabular-nums; opacity: .75; font-size: .9em; }
.cboost-reaction.is-mine .cboost-reaction-count { opacity: 1; color: var(--cboost-accent); font-weight: 700; }
.cboost-reactions.is-busy .cboost-reaction { cursor: progress; }
.cboost-reaction.is-pop .cboost-reaction-emoji { animation: cboost-pop .45s ease; }
@keyframes cboost-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.5); }
	100% { transform: scale(1); }
}
.cboost-reactions-note {
	min-height: 1.4em;
	margin: .6em 0 0;
	font-size: .85em;
	opacity: .8;
}

/* 大きめのアイコン */
.cboost-style-icon .cboost-reactions-list { gap: .4em; }
.cboost-style-icon .cboost-reaction {
	flex-direction: column;
	min-width: 5.2em;
	padding: .6em .5em;
	border-radius: 12px;
	gap: .2em;
}
.cboost-style-icon .cboost-reaction-emoji { font-size: 2em; }
.cboost-style-icon .cboost-reaction-label { font-size: .85em; }

/* 割合バー */
.cboost-style-bar .cboost-reactions-list {
	flex-direction: column;
	align-items: stretch;
	max-width: 32em;
	margin: 0 auto;
	gap: .4em;
}
.cboost-style-bar .cboost-reaction {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	padding: .55em .9em;
	justify-content: flex-start;
	text-align: left;
}
.cboost-style-bar .cboost-reaction::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--cboost-pct, 0%);
	background: color-mix(in srgb, var(--cboost-accent) 16%, transparent);
	transition: width .4s ease;
	z-index: 0;
}
.cboost-style-bar .cboost-reaction > * { position: relative; z-index: 1; }
.cboost-style-bar .cboost-reaction-label { flex: 1; }
.cboost-style-bar .cboost-reaction-pct { font-size: .85em; opacity: .75; min-width: 3em; text-align: right; }
.cboost-style-bar .cboost-reaction.is-mine { background: transparent; }

/* ---------- スタンプ ---------- */
.cboost-stamp-picker { margin: .5em 0 1em; }
.cboost-stamp-toggle {
	display: inline-flex;
	align-items: center;
	gap: .3em;
	padding: .4em .9em;
	border: 1px solid var(--cboost-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .9em;
	cursor: pointer;
}
.cboost-stamp-toggle:hover,
.cboost-stamp-toggle[aria-expanded="true"] { border-color: var(--cboost-accent); }
.cboost-stamp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: .4em;
	max-height: 260px;
	overflow-y: auto;
	margin-top: .5em;
	padding: .5em;
	border: 1px solid var(--cboost-border);
	border-radius: 10px;
}
.cboost-stamp-grid[hidden],
.cboost-stamp-selected[hidden] { display: none; }
.cboost-stamp-item {
	aspect-ratio: 1;
	padding: 4px;
	border: 2px solid transparent;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
}
.cboost-stamp-item:hover { background: var(--cboost-soft); }
.cboost-stamp-item.is-selected { border-color: var(--cboost-accent); }
.cboost-stamp-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cboost-stamp-selected {
	position: relative;
	display: inline-block;
	margin: .5em 0 0 .5em;
	vertical-align: middle;
}
.cboost-stamp-selected img { width: 72px; height: 72px; object-fit: contain; display: block; }
.cboost-stamp-clear {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #555;
	color: #fff;
	font-size: 14px;
	line-height: 22px;
	cursor: pointer;
}
.cboost-hint { margin: .4em 0 0; font-size: .82em; opacity: .75; }
.cboost-hint[hidden] { display: none; }
.cboost-hint code { padding: 0 .3em; border-radius: 4px; background: var(--cboost-soft); }

/* コメントに付いたスタンプ */
.cboost-stamp { display: block; margin: .3em 0 .5em; }
.cboost-stamp img {
	display: block;
	width: auto;
	height: auto;
	max-width: var(--cboost-stamp-size, 120px);
	max-height: var(--cboost-stamp-size, 120px);
}

/* ---------- 画像の番号と引用 ---------- */
.cboost-imgwrap { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.cboost-imgwrap.is-block { display: block; }
.cboost-imgwrap > img,
.cboost-imgwrap > a > img { display: block; }
.cboost-imgwrap > a { display: block; }
.cboost-imgno {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 2;
	margin: 0;
	padding: .15em .55em;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, .62);
	color: #fff;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	cursor: pointer;
}
span.cboost-imgno { cursor: default; }
.cboost-imgno.is-popular { background: var(--cboost-accent); }
.cboost-imgno:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.cboost-imgwrap.is-flash { animation: cboost-flash 1.2s ease; }
@keyframes cboost-flash {
	0%, 100% { outline: 3px solid transparent; }
	20%, 60% { outline: 3px solid var(--cboost-accent); }
}

.cboost-quotes { display: flex; flex-wrap: wrap; gap: .4em; margin: .5em 0 .2em; }
.cboost-quote {
	position: relative;
	display: block;
	width: 96px;
	height: 72px;
	overflow: hidden;
	border-radius: 6px;
	border: 1px solid var(--cboost-border);
}
.cboost-quote img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.cboost-quote-no {
	position: absolute;
	left: 3px;
	bottom: 3px;
	padding: 0 .4em;
	border-radius: 999px;
	background: rgba(0, 0, 0, .62);
	color: #fff;
	font-size: 11px;
	line-height: 1.6;
}
.cboost-ref { color: var(--cboost-accent); font-weight: 700; text-decoration: none; }

/* ---------- 通報 ---------- */
.cboost-report-wrap { display: block; text-align: right; }
.cboost-report {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: .75em;
	opacity: .5;
	cursor: pointer;
}
.cboost-report:hover { opacity: .9; text-decoration: underline; }
.cboost-report:disabled { cursor: default; text-decoration: none; }

/* ---------- bot よけの欄（人には見えない） ---------- */
.cboost-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- お知らせ ---------- */
.cboost-toast {
	position: fixed;
	left: 50%;
	bottom: 20px;
	z-index: 99999;
	max-width: calc(100% - 32px);
	padding: .7em 1.1em;
	border-radius: 10px;
	background: rgba(30, 30, 30, .94);
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	transform: translate(-50%, 20px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}
.cboost-toast.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cboost-toast a { color: #fff; text-decoration: underline; margin-left: .3em; }

@media (prefers-reduced-motion: reduce) {
	.cboost-reaction.is-pop .cboost-reaction-emoji,
	.cboost-imgwrap.is-flash { animation: none; }
	.cboost-toast, .cboost-style-bar .cboost-reaction::before { transition: none; }
}

/* ---------- Comment Boost のコメント欄 ---------- */
.cboost-thread { margin: 2.5em 0; }
.cboost-thread-title { display: flex; align-items: baseline; gap: .4em; margin: 0 0 .8em; font-size: 1.25em; }
.cboost-thread-count { font-size: .8em; font-weight: 400; opacity: .6; }

.cboost-form {
	margin: 0 0 1.5em;
	padding: .9em;
	border: 1px solid var(--cboost-border);
	border-radius: 12px;
}
.cboost-form textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 5.5em;
	padding: .6em .75em;
	border: 1px solid var(--cboost-border);
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1.6;
	resize: vertical;
}
.cboost-form textarea:focus,
.cboost-form input[type="text"]:focus,
.cboost-form input[type="email"]:focus { outline: 2px solid var(--cboost-accent); outline-offset: 0; border-color: transparent; }
.cboost-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin-top: .6em; }
.cboost-form .cboost-name,
.cboost-form .cboost-email {
	flex: 1 1 10em;
	min-width: 0;
	box-sizing: border-box;
	padding: .5em .7em;
	border: 1px solid var(--cboost-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .9em;
}
.cboost-as { flex: 1; font-size: .85em; opacity: .7; }
.cboost-submit {
	margin-left: auto;
	padding: .55em 1.6em;
	border: 0;
	border-radius: 999px;
	background: var(--cboost-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.cboost-submit:disabled { opacity: .6; cursor: progress; }
.cboost-submit:focus-visible { outline: 2px solid var(--cboost-accent); outline-offset: 2px; }
.cboost-form-note { min-height: 1.2em; margin: .4em 0 0; font-size: .85em; color: var(--cboost-accent); }
.cboost-form-note:empty { min-height: 0; margin: 0; }
.cboost-replying { display: flex; align-items: center; gap: .6em; margin: 0 0 .5em; font-size: .85em; }
.cboost-replying[hidden] { display: none; }
.cboost-replying-to { font-weight: 700; color: var(--cboost-accent); }
.cboost-reply-cancel,
.cboost-reply,
.cboost-more {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.cboost-reply-cancel { font-size: .95em; opacity: .7; text-decoration: underline; }

.cboost-list,
.cboost-replies { list-style: none; margin: 0; padding: 0; }
.cboost-comment { margin: 0; padding: .9em 0; border-top: 1px solid var(--cboost-border); }
.cboost-list > .cboost-comment:first-child { border-top: 0; }
.cboost-replies { margin: .6em 0 0 1.2em; padding-left: .9em; border-left: 2px solid var(--cboost-border); }
.cboost-replies .cboost-comment { padding: .6em 0; border-top: 0; }
.cboost-comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: .45em; margin-bottom: .35em; font-size: .9em; }
.cboost-comment-head .cboost-avatar { width: 36px; height: 36px; border-radius: 50%; margin: 0; object-fit: cover; }
.cboost-comment-author { font-weight: 700; }
.cboost-badge { padding: 0 .5em; border-radius: 999px; background: var(--cboost-accent); color: #fff; font-size: .75em; line-height: 1.7; }
.cboost-comment-time { font-size: .85em; opacity: .55; }
.cboost-comment-body { overflow-wrap: anywhere; }
.cboost-comment-body > p { margin: 0 0 .4em; }
.cboost-comment-body > p:last-of-type { margin-bottom: 0; }
.cboost-comment.is-pending > .cboost-comment-body { opacity: .6; }
.cboost-pending-note { margin: .3em 0 0; font-size: .8em; opacity: .7; }
.cboost-reply { margin-top: .3em; font-size: .8em; opacity: .65; }
.cboost-reply:hover { opacity: 1; color: var(--cboost-accent); }
.cboost-comment.is-new { animation: cboost-new 1.6s ease; }
@keyframes cboost-new {
	0% { background: color-mix(in srgb, var(--cboost-accent) 18%, transparent); }
	100% { background: transparent; }
}
.cboost-empty, .cboost-closed, .cboost-login { margin: 1em 0; font-size: .9em; opacity: .75; }
.cboost-more-wrap { margin: 1em 0 0; text-align: center; }
.cboost-more {
	padding: .5em 1.6em;
	border: 1px solid var(--cboost-border);
	border-radius: 999px;
	font-size: .9em;
}
.cboost-more:hover { border-color: var(--cboost-accent); }
.cboost-thread .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
	.cboost-comment.is-new { animation: none; }
}
.cboost-comment-foot { display: flex; align-items: center; gap: 1em; margin-top: .3em; }
.cboost-comment-foot .cboost-reply { margin: 0; }
.cboost-comment-foot .cboost-report { margin-left: auto; font-size: .75em; }

/* ---------- アバター（表情） ---------- */
.cboost-avatar-picker { position: relative; flex: 0 0 auto; }
.cboost-avatar-toggle {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--cboost-border);
	border-radius: 50%;
	background: var(--cboost-soft);
	color: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.cboost-avatar-toggle:hover,
.cboost-avatar-toggle[aria-expanded="true"] { border-color: var(--cboost-accent); }
.cboost-avatar-toggle:focus-visible { outline: 2px solid var(--cboost-accent); outline-offset: 2px; }
.cboost-avatar-toggle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cboost-avatar-toggle img[hidden],
.cboost-avatar-empty[hidden],
.cboost-avatar-grid[hidden] { display: none; }
.cboost-avatar-grid {
	position: absolute;
	left: 0;
	bottom: calc(100% + 8px);
	z-index: 20;
	width: min(300px, calc(100vw - 48px));
	padding: .6em;
	border: 1px solid var(--cboost-border);
	border-radius: 12px;
	background: var(--cboost-panel, #fff);
	color: #222;
}
.cboost-avatar-grid-title { margin: 0 0 .4em; font-size: .8em; opacity: .7; }
.cboost-avatar-items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
	gap: 6px;
	max-height: 220px;
	overflow-y: auto;
}
.cboost-avatar-item {
	aspect-ratio: 1;
	margin: 0;
	padding: 2px;
	border: 2px solid transparent;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}
.cboost-avatar-item:hover { background: var(--cboost-soft); }
.cboost-avatar-item.is-selected { border-color: var(--cboost-accent); }
.cboost-avatar-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.cboost-avatar-any { display: flex; flex-wrap: wrap; gap: .4em; margin: 0; }
.cboost-avatar-items + .cboost-avatar-any { margin-top: .5em; padding-top: .5em; border-top: 1px solid var(--cboost-border); }
.cboost-avatar-media,
.cboost-avatar-reset {
	margin: 0;
	padding: .3em .8em;
	border: 1px solid var(--cboost-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .8em;
	cursor: pointer;
}
.cboost-avatar-media:hover,
.cboost-avatar-reset:hover { border-color: var(--cboost-accent); }
.cboost-avatar-media[hidden] { display: none; }
/* テーマのコメント欄に足したとき */
.comment-form .cboost-avatar-picker { margin: .5em 0; }
.comment-form .cboost-avatar-grid { bottom: auto; top: calc(100% + 8px); }

/* コメントに出るアバター（表情） */
img.cboost-face { object-fit: cover; }
@media (prefers-color-scheme: dark) {
	.cboost-avatar-grid { --cboost-panel: #1f2328; color: #eee; }
}
