@charset "UTF-8";
/*
 * スコア表（2026-11-25）
 * 対象：
 *   1. 表ブロックのスタイル「スコア表」（.is-style-score）
 *   2. 既存の表ブロックで、2行目の先頭が見出しセル（th）のもの（＝1列目が「パー」「まっちゃん」などの見出しの表）
 * どちらも「1行目」と「1列目」を見出しの見た目にする。
 * 表ブロックで行を追加すると新しい行のセルは td になるが、1列目の td も見出しの見た目になる。
 * フロント（.single）とブロックエディターで同じファイルを読み込む。
 * セレクタに table を入れているのは、.single.cat_21 table th { border: unset } より強くするため。
 */

.wp-block-table.is-style-score,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) {
	overflow-x: auto;
	margin: 1.5rem 0;
}

.wp-block-table.is-style-score table,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) table {
	width: 100%;
	min-width: 560px;
	margin: 0;
	border-collapse: collapse;
	table-layout: auto;
}

.wp-block-table.is-style-score table th,
.wp-block-table.is-style-score table td,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) th,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) td {
	border: 1px solid #ccc;
	padding: 1rem 0.5rem;
	background: #fff;
	font-weight: 400;
	text-align: center;
	vertical-align: middle;
	line-height: 1.4;
}

/* 1行目（アウト・ホール番号・合計）と1列目（パー・名前・フェアウェー…）は見出しの見た目 */
.wp-block-table.is-style-score table tr:first-child > th,
.wp-block-table.is-style-score table tr:first-child > td,
.wp-block-table.is-style-score table tr > th:first-child,
.wp-block-table.is-style-score table tr > td:first-child,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr:first-child > th,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr:first-child > td,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr > th:first-child,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr > td:first-child {
	background: #dff1ff;
	font-weight: 500;
}

/* 1列目は名前が折り返さない幅にする */
.wp-block-table.is-style-score table tr > th:first-child,
.wp-block-table.is-style-score table tr > td:first-child,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr > th:first-child,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr > td:first-child {
	width: 7.5em;
	white-space: nowrap;
	font-size: 0.9em;
}

/* 最終列（合計） */
.wp-block-table.is-style-score table tr > th:last-child,
.wp-block-table.is-style-score table tr > td:last-child,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr > th:last-child,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) tr > td:last-child {
	width: 4.5em;
}

/* 既存の表はホール番号に太字（strong）が混じっているので、見出しの太さにそろえる */
.wp-block-table.is-style-score table th strong,
.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) th strong {
	font-weight: inherit;
}

@media (max-width: 768px) {
	.wp-block-table.is-style-score table th,
	.wp-block-table.is-style-score table td,
	.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) th,
	.wp-block-table:has(> table > tbody > tr:nth-child(2) > th:first-child) td {
		padding: 0.6rem 0.3rem;
	}
}

/* ブロックエディター：見出しセルの選択枠などはエディターの既定のまま */
.editor-styles-wrapper .wp-block-table.is-style-score table td,
.editor-styles-wrapper .wp-block-table.is-style-score table th {
	min-width: 2em;
}
