/*
 * レビュー記事の見た目。
 *
 * 以前はインラインの style で書いていたが、保存時の wp_kses_post() が
 * display / border / background を削るため、
 * 星の幅指定が効かずに並びがずれ、枠や背景も消えていた。
 * 属性は残らないがクラスは残るので、こちらへ移した。
 *
 * 記事の中身は生成しなおさなくても、この1枚を直せば全記事に効く。
 *
 * 親テーマ（AFFINGER）は表やボタンの見た目を !important で押してくるので、
 * 譲れないところは同じ強さで返している。
 */

.tab-review {
	--c: #a26a1e;
	--c-soft: rgba(162, 106, 30, .08);
	--c-line: rgba(162, 106, 30, .28);
	--ink: #1f2933;
	--ink-2: #5b6673;
	--ink-3: #98a1ac;
	--line: #e4e8ed;
	--ground: #f6f7f9;
	--star-on: #e0a33a;
	--star-off: #dfe3e8;
}

/* ── 作品の情報表 ────────────────── */

.entry-content table.tab-info {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.6em;
	font-size: .88em;
}

.entry-content table.tab-info th,
.entry-content table.tab-info td {
	padding: .55em .8em !important;
	border: 0 !important;
	border-bottom: 1px solid var(--line) !important;
	background: none !important;
	text-align: left;
	vertical-align: top;
}

.entry-content table.tab-info th {
	width: 7.5em;
	color: var(--ink-3) !important;
	font-weight: 600;
	white-space: nowrap;
}

.entry-content table.tab-info tr:first-child th,
.entry-content table.tab-info tr:first-child td {
	border-top: 1px solid var(--line) !important;
}

/* ── 筆者の採点 ──────────────────── */

.tab-score {
	margin: 0 0 1.8em;
	border: 1px solid var(--c-line);
	border-radius: 10px;
	overflow: hidden;
}

.tab-score__head {
	display: flex;
	align-items: center;
	padding: 12px 18px;
	background: var(--c-soft);
	border-bottom: 1px solid var(--c-line);
}

.tab-score__label {
	font-size: .8em;
	font-weight: 700;
	color: var(--c);
	letter-spacing: .04em;
}

/* 札を右へ寄せ、点数はそのすぐ隣に置く */
.tab-score__head .tab-tier {
	margin-left: auto;
}

.tab-score__total {
	margin-left: .8em;
	color: var(--c);
	font-variant-numeric: tabular-nums;
}

.tab-score__total b {
	font-size: 1.9em;
	font-weight: 800;
	line-height: 1;
}

.tab-score__total span {
	font-size: .75em;
}

/*
 * 星がずれないようにする要。
 * 項目名・星・数値の3列を固定し、星は1つずつ同じ幅の枠に入れる。
 * 枠の幅は display:inline-block が無いと効かないので、
 * ここがインラインの style だと（kses に削られて）また崩れる。
 */
.entry-content table.tab-score__table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.entry-content table.tab-score__table th,
.entry-content table.tab-score__table td {
	padding: 7px 0 !important;
	border: 0 !important;
	background: none !important;
	vertical-align: middle;
}

.entry-content table.tab-score__table th {
	width: 8em;
	padding-left: 18px !important;
	text-align: left;
	font-size: .84em;
	font-weight: 500;
	color: var(--ink-2) !important;
	white-space: nowrap;
}

.entry-content table.tab-score__table td.tab-score__n {
	width: 3.2em;
	padding-right: 18px !important;
	text-align: right;
	font-size: .78em;
	color: var(--ink-3) !important;
	font-variant-numeric: tabular-nums;
}

.tab-star {
	display: inline-block;
	width: 1.2em;
	text-align: center;
	font-size: 1.05em;
	line-height: 1;
	color: var(--star-off);
}

.tab-star.is-on {
	color: var(--star-on);
}

.tab-score__comment {
	padding: 2px 18px 14px;
	font-size: .88em;
	line-height: 1.75;
	color: var(--ink-2);
}

/* ── 筆者の自由記述 ──────────────── */

.tab-memo {
	margin: 0 0 1.8em;
	padding: 16px 20px;
	border: 1px dashed var(--c-line);
	border-radius: 10px;
	background: var(--c-soft);
}

.tab-memo__label,
.tab-voices__label,
.tab-forwho__label {
	display: block;
	margin-bottom: 6px;
	font-size: .75em;
	font-weight: 700;
	letter-spacing: .04em;
}

.tab-memo__label { color: var(--c); }
.tab-voices__label,
.tab-forwho__label { color: var(--ink-3); }

.tab-memo p:last-child,
.tab-forwho p:last-child {
	margin-bottom: 0;
}

/* ── プレイヤーの声 ──────────────── */

.tab-voices {
	margin: 0 0 1.8em;
}

/* 吹き出し。左の丸が話し手の代わり */
.tab-voice {
	position: relative;
	margin: 0 0 10px 44px;
	padding: 12px 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--ground);
	font-size: .9em;
	line-height: 1.75;
}

.tab-voice::before {
	content: "";
	position: absolute;
	left: -44px;
	top: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--c-soft);
	border: 1px solid var(--line);
}

.tab-voice::after {
	content: "";
	position: absolute;
	left: -7px;
	top: 13px;
	width: 12px;
	height: 12px;
	background: var(--ground);
	border-left: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	transform: rotate(45deg);
}

/* ── こんな方に ──────────────────── */

.tab-forwho {
	margin: 0 0 1.8em;
	padding: 16px 20px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--ground);
}

/* ── 買う導線 ────────────────────── */

.tab-buy {
	margin: 2.2em 0 1.8em;
	padding: 22px;
	border-radius: 10px;
	text-align: center;
	background: linear-gradient(105deg, #8a5a19, #a26a1e);
	color: #fff;
}

.tab-buy__t {
	display: block;
	margin-bottom: 2px;
	font-size: .95em;
	font-weight: 700;
}

.tab-buy__s {
	display: block;
	margin-bottom: 14px;
	font-size: .78em;
	opacity: .85;
}

.entry-content a.tab-buy__b {
	display: inline-block;
	padding: 11px 36px;
	border-radius: 999px;
	background: #fff !important;
	color: #8a5a19 !important;
	font-size: .95em;
	font-weight: 800;
	text-decoration: none !important;
}

/* ── 見どころ・その他 ────────────── */

.tab-point__h {
	margin: 1.4em 0 .4em;
	font-size: 1em;
	font-weight: 700;
	color: var(--ink);
}

.tab-lead {
	font-size: 1.03em;
	line-height: 1.9;
	margin: 0 0 1.2em;
}

.tab-r18 {
	margin: 1.6em 0 0;
	padding: 10px 14px;
	border: 1px solid rgba(200, 60, 60, .4);
	border-radius: 6px;
	color: #c0392b;
	font-size: .82em;
}

.tab-note {
	margin: 1.4em 0 0;
	font-size: .85em;
	color: #888;
}

/* ── 狭い画面 ────────────────────── */

@media only screen and (max-width: 599px) {
	.entry-content table.tab-score__table th { width: 6.5em; padding-left: 14px !important; }
	.entry-content table.tab-score__table td.tab-score__n { padding-right: 14px !important; }
	.tab-voice { margin-left: 38px; }
	.tab-voice::before { left: -38px; width: 28px; height: 28px; }
	.tab-buy { padding: 18px 14px; }
}

/* ── サンプル画像 ────────────────── */

.entry-content figure.tab-shot {
	margin: 1.2em 0;
	text-align: center;
}

.entry-content figure.tab-shot img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

/* 本文で使わなかったぶんをまとめて並べる */
.tab-shots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 12px;
	margin: 1em 0;
}

.entry-content .tab-shots a {
	display: block;
	overflow: hidden;
	border-radius: 6px;
	box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
}

.tab-shots img {
	width: 100%;
	height: auto;
	display: block;
}

.tab-shots__note {
	text-align: center;
	font-size: .88em;
	color: #888;
}

/* ── 漫画・CG集：サンプルは縦長で並べる ────── */

/*
 * 漫画は縦長なので、ゲームと同じ横長の枠だと切れる。
 * 3列に落として1枚を大きく見せる。
 */
.tab-shots--pages {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media only screen and (max-width: 599px) {
	.tab-shots--pages {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ── ボイス：収録トラック ──────────────── */

/*
 * ボイスは見るものが表紙しかないので、ここが記事の主役になる。
 * 番号を右揃えの等幅にして、曲名の頭を縦に揃える。
 */
.entry-content table.tab-tracks {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.6em;
	font-size: .88em;
}

.entry-content table.tab-tracks td {
	padding: .5em .8em !important;
	border: 0 !important;
	border-bottom: 1px solid var(--line) !important;
	background: none !important;
	vertical-align: top;
}

.entry-content table.tab-tracks tr:first-child td {
	border-top: 1px solid var(--line) !important;
}

.entry-content table.tab-tracks td.tab-tracks__n {
	width: 3em;
	text-align: right;
	color: var(--ink-3) !important;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ── シリーズ：各巻の塊 ──────────────── */

.tab-vol {
	display: grid;
	grid-template-columns: 5rem 1fr auto;
	gap: .9em;
	align-items: center;
	padding: .7em .8em;
	margin: 0 0 .6em;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.entry-content a.tab-vol__cover {
	display: block;
	aspect-ratio: 3 / 4;
	border-radius: 4px;
	overflow: hidden;
	background: rgba(0, 0, 0, .05);
}

.tab-vol__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tab-vol__body { display: block; min-width: 0; }

.tab-vol__n {
	display: block;
	font-size: .7em;
	font-weight: 700;
	color: var(--c);
}

.tab-vol__t {
	display: block;
	font-size: .9em;
	font-weight: 700;
	line-height: 1.45;
	color: var(--ink);
}

.tab-vol__d {
	display: block;
	margin-top: .1em;
	font-size: .76em;
	color: var(--ink-3);
}

.tab-vol__s {
	min-width: 2.8em;
	text-align: center;
}

.tab-vol__s b {
	display: block;
	font-size: 1.2em;
	line-height: 1;
	color: var(--c);
	font-variant-numeric: tabular-nums;
}

.tab-vol__s small { font-size: .6em; color: var(--ink-3); }

@media only screen and (max-width: 599px) {
	.tab-vol { grid-template-columns: 3.6rem 1fr auto; gap: .6em; }
}
