/**
 * AffiBlocks フロント表示スタイル（FR-BLOCK / NFR-COMPAT-01）。
 * テーマ側の影響を受けにくいよう affib- プレフィックスで完結させ、
 * 色・角丸はCSS変数（設定画面で上書き）で制御する。
 */

:root {
	--affib-btn-rakuten: #bf0000;
	--affib-btn-amazon: #e68a00;
	--affib-btn-yahoo: #ff0033;
	--affib-btn-moshimo: #2e8b57;
	--affib-btn-rakuten-travel: #0f6bb2;
	--affib-radius: 6px;
	--affib-header-bg: #1c2b4a;
	--affib-header-text: #ffffff;
	--affib-border: #e2e4e9;
	--affib-stripe: #f7f8fa;
	/* 見出しセルの文字色。テーマがthに白文字を当てても読めるよう、ブロック側で必ず指定する。 */
	--affib-th-text: #333333;
}

/* ---- 共通パーツ ---- */

.affib-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 6px 0;
	align-items: flex-end;
}

/* すべてのボタンを等幅にして、「ひとこと」の有無でサイズが変わらないようにする。
   幅が広くなりすぎないよう上限を設ける。 */
.affib-buttons > .affib-btn,
.affib-buttons > .affib-btn-wrap {
	flex: 1 1 110px;
	max-width: 220px;
	min-width: 0;
}

.affib-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 指で押しやすいサイズ（タップ領域44px以上）を確保する。 */
	padding: 14px 12px;
	border-radius: var(--affib-radius);
	color: #fff !important;
	font-weight: 700;
	font-size: 0.95em;
	line-height: 1.3;
	white-space: nowrap;
	text-decoration: none !important;
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
	/* 下に影を落として「押せる立体物」に見せる（押すと沈む＝:active）。 */
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
	/* width:100% で使われる場面（.affib-btn-wrap内など）で
	   paddingぶんはみ出さないようにする（NFR-COMPAT-01） */
	box-sizing: border-box;
	max-width: 100%;
}

/* ボタン末尾の矢印は、強調表示の主ボタンでだけ出す（「この先がある」と分かるように）。 */
.affib-btn-arrow {
	display: none;
}

.affib-btn--primary .affib-btn-arrow {
	display: inline-block;
	margin-left: 6px;
	font-weight: 400;
}

.affib-btn:hover {
	color: #fff;
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2);
}

/* 押した瞬間に沈む（クリックできたという手応えを返す）。 */
.affib-btn:active {
	transform: translateY(3px);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* ===== メインのショップだけ強調する表示（設定：クリック率アップの装飾） ===== */

/* 主役のボタンは1行を独占して大きく見せる。 */
.affib-buttons--emphasis > .affib-btn--primary,
.affib-buttons--emphasis > .affib-btn-wrap--primary {
	flex: 1 1 100%;
	max-width: 100%;
}

.affib-btn--primary {
	padding: 17px 16px;
	font-size: 1.05em;
	letter-spacing: 0.02em;
}

/* 脇役のボタンは白地＋ショップ色の枠線。押せることは分かるが主役を邪魔しない。 */
.affib-btn--sub {
	background-color: #fff !important;
	color: var(--affib-btn-c, #444) !important;
	border: 2px solid var(--affib-btn-c, #ccc);
	box-shadow: none;
	padding: 11px 10px;
	font-size: 0.85em;
}

.affib-btn--sub:hover,
.affib-btn--outline:hover {
	color: var(--affib-btn-c, #444) !important;
	filter: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.affib-btn--sub:active,
.affib-btn--outline:active {
	box-shadow: none;
}

/* ===== 画像・商品名も購入先リンクにしたカード ===== */
.affib-card--linked {
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.affib-card--linked:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.affib-card-link {
	color: inherit;
	text-decoration: none;
}

.affib-card-link--image {
	display: inline-block;
	max-width: 100%;
}

.affib-card-link--image .affib-image {
	transition: transform 0.2s ease;
}

.affib-card--linked:hover .affib-card-link--image .affib-image {
	transform: scale(1.03);
}

.affib-card-link--title:hover {
	text-decoration: underline;
}

/* 動きを減らす設定の読者には、拡大・浮き上がりを出さない。 */
@media (prefers-reduced-motion: reduce) {
	.affib-btn,
	.affib-card--linked,
	.affib-card-link--image .affib-image {
		transition: none;
	}

	.affib-btn:hover,
	.affib-btn:active,
	.affib-card--linked:hover,
	.affib-card--linked:hover .affib-card-link--image .affib-image {
		transform: none;
	}
}

.affib-btn--rakuten { --affib-btn-c: var(--affib-btn-rakuten); background-color: var(--affib-btn-c); }
.affib-btn--amazon { --affib-btn-c: var(--affib-btn-amazon); background-color: var(--affib-btn-c); }
.affib-btn--yahoo { --affib-btn-c: var(--affib-btn-yahoo); background-color: var(--affib-btn-c); }
.affib-btn--moshimo { --affib-btn-c: var(--affib-btn-moshimo); background-color: var(--affib-btn-c); }
.affib-btn--rakuten-travel { --affib-btn-c: var(--affib-btn-rakuten-travel); background-color: var(--affib-btn-c); }

.affib-btn--custom { --affib-btn-c: var(--affib-header-bg, #1c2b4a); background-color: var(--affib-btn-c); }
.affib-btn--travel-jalan { --affib-btn-c: #f26a21; background-color: var(--affib-btn-c); }
.affib-btn--travel-ikkyu { --affib-btn-c: #123a5e; background-color: var(--affib-btn-c); }
.affib-btn--travel-agoda { --affib-btn-c: #6d3fc0; background-color: var(--affib-btn-c); }

/* アウトライン（枠線）スタイル */
.affib-btn--outline {
	background: transparent !important;
	color: var(--affib-btn-c) !important;
	border: 2px solid var(--affib-btn-c);
	box-shadow: none;
}

/* 価格非表示設定：ボタン位置がズレないよう高さだけ確保 */
.affib-price--placeholder {
	visibility: hidden;
	display: block;
	min-height: 1.4em;
}

.affib-price {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px;
}

.affib-price-value {
	font-size: 1.25em;
	font-weight: 700;
	color: #c9302c;
}

.affib-price-note,
.affib-review-note,
.affib-review-count {
	font-size: 0.75em;
	color: #6b7280;
}

.affib-review-star {
	color: #f5a623;
}

.affib-review--none {
	color: #9ca3af;
}

/* ★5つの視覚的な星（部分塗り）。全ブロック共通のレビュー表示 */
.affib-review {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px;
}

.affib-stars {
	position: relative;
	display: inline-block;
	line-height: 1;
	font-size: 1.05em;
	letter-spacing: 1px;
}

.affib-stars-base {
	color: #d8dbe0;
}

.affib-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #f5a623;
	pointer-events: none;
}

.affib-review-value {
	font-weight: 700;
}

.affib-review-link {
	font-size: 0.78em;
	color: #2271b1;
	text-decoration: underline;
	white-space: nowrap;
}

.affib-review-link:hover {
	color: #135e96;
}

/* セール文言リボン（ボタン群の上に表示） */
.affib-sale-ribbon {
	text-align: center;
	color: #d81b3f;
	font-weight: 700;
	font-size: 0.88em;
	margin: 6px 0 2px;
}

/* 商品ごとのマイクロコピー（ボタン上のひとこと） */
.affib-microcopy {
	text-align: center;
	color: #e07800;
	font-weight: 700;
	font-size: 0.85em;
	margin: 4px 0 2px;
}

/* ボタン別ひとこと：対象ボタンの真上に固定（ボタン本体の幅・サイズは変えない） */
.affib-btn-wrap {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 3px;
}

.affib-btn-wrap > .affib-btn {
	width: 100%;
}

/* ひとことは吹き出しにして、読んだ視線がそのままボタンに落ちるようにする。 */
.affib-btn-copy {
	position: relative;
	margin-bottom: 4px;
	padding: 4px 8px;
	background: #fff7e6;
	border: 1px solid #ffd28a;
	border-radius: 6px;
	text-align: center;
	color: #c2600a;
	font-weight: 700;
	font-size: 0.75em;
	line-height: 1.35;
	white-space: normal;
}

/* 吹き出しの下向きのしっぽ（四角を45度回して三角に見せる）。 */
.affib-btn-copy::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	background: #fff7e6;
	border-right: 1px solid #ffd28a;
	border-bottom: 1px solid #ffd28a;
	transform: rotate(45deg);
}

/* サイト紹介の単独CTAは等幅にせず中央・内容幅のまま */
.affib-siteintro .affib-buttons > .affib-btn {
	flex: 0 1 auto;
}

/* セール文言マーキー（右から左へ流す） */
.affib-sale-ribbon--marquee {
	overflow: hidden;
	white-space: nowrap;
}

.affib-sale-ribbon--marquee .affib-sale-ribbon-inner {
	display: inline-block;
	padding-left: 100%;
	animation: affib-marquee 10s linear infinite;
}

@keyframes affib-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-100%); }
}

.affib-buttons--center {
	justify-content: center;
}

/* イチオシバッジ（金メダル風・王冠つき） */
.affib-pick-badge {
	display: inline-block;
	position: relative;
	padding: 5px 16px 5px 30px;
	background: linear-gradient(160deg, #ffe9a8 0%, #f5b912 35%, #d99400 75%, #f5c542 100%);
	color: #7a4a00;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
	font-weight: 800;
	font-size: 0.8em;
	letter-spacing: 0.04em;
	line-height: 1.4;
	white-space: nowrap;
	border: 2px solid #fff;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(160, 105, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.affib-pick-badge::before {
	content: '\1F451'; /* 王冠 */
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-52%);
	font-size: 1.05em;
	text-shadow: none;
}

.affib-pick-badge--corner {
	position: absolute;
	top: -14px;
	right: -8px;
	z-index: 2;
	transform: rotate(4deg);
	font-size: 0.85em;
}

.affib-card {
	position: relative;
}

/* 比較テーブル・リストのイチオシ強調 */
.affib-compare tbody tr.affib-row--pick td,
.affib-compare--striped tbody tr.affib-row--pick td {
	background: #fff8e6;
}

.affib-compare tbody tr.affib-row--pick td:first-child {
	border-left: 3px solid #f5a623;
}

.affib-list-item--pick {
	border-color: #f5a623;
	border-width: 2px;
	background: #fffdf5;
}

.affib-hotelcard--pick {
	border-color: #f5a623;
	border-width: 2px;
	background: #fffdf5;
}

/* 口コミ引用（単品カード下） */
.affib-quotes {
	margin-top: 12px;
}

.affib-quotes-title {
	font-size: 0.82em;
	font-weight: 700;
	color: #6b7280;
	margin-bottom: 6px;
}

.affib-quote {
	position: relative;
	margin-bottom: 8px;
	padding: 10px 14px 10px 30px;
	background: var(--affib-stripe);
	border-radius: 10px;
	font-size: 0.88em;
	line-height: 1.6;
}

.affib-quote::before {
	content: '\201C';
	position: absolute;
	left: 10px;
	top: 4px;
	font-size: 1.6em;
	color: #f5a623;
	font-weight: 700;
}

.affib-features {
	margin: 0;
	padding-left: 1.2em;
	list-style: disc;
	font-size: 0.9em;
	text-align: left;
}

.affib-features li {
	margin: 0 0 2px;
}

.affib-credit {
	margin-top: 8px;
	font-size: 0.72em;
	color: #6b7280;
	text-align: right;
}

.affib-credit a {
	color: inherit;
}

.affib-image {
	max-width: 100%;
	height: auto;
	border-radius: calc(var(--affib-radius) / 2);
}

.affib-noimage {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100px;
	height: 100px;
	background: #f0f0f1;
	color: #9ca3af;
	font-size: 0.8em;
	border-radius: calc(var(--affib-radius) / 2);
}

/* ---- 単品カード ---- */

.affib-card {
	max-width: var(--affib-card-max, 640px);
	margin: 1.5em auto;
	padding: 16px;
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	background: #fff;
	box-sizing: border-box;
}

.affib-card-sale-banner {
	margin: -16px -16px 12px;
	padding: 8px 16px;
	background: linear-gradient(90deg, #d81b3f, #f0506e);
	color: #fff;
	font-weight: 700;
	text-align: center;
	border-radius: var(--affib-radius) var(--affib-radius) 0 0;
}

.affib-card--sale {
	border-color: #d81b3f;
	border-width: 2px;
}

.affib-card-image {
	text-align: center;
	margin-bottom: 12px;
}

.affib-card-image .affib-image,
.affib-card-image .affib-noimage {
	width: var(--affib-card-img, 320px);
	height: var(--affib-card-img, 320px);
	max-width: 100%;
}

.affib-card-image .affib-image {
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.affib-card-title {
	font-weight: 700;
	font-size: 1.05em;
	margin-bottom: 12px;
	line-height: 1.5;
}

.affib-card-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92em;
}

.affib-card-table th,
.affib-card-table td {
	padding: 8px 10px;
	border: 1px solid var(--affib-border);
	vertical-align: top;
	text-align: left;
}

.affib-card-table th {
	width: 32%;
	background: var(--affib-stripe);
	font-weight: 600;
	white-space: nowrap;
}

/* ---- 比較テーブル ---- */

.affib-compare-wrap {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	margin: 1.5em 0;
}

.affib-compare {
	display: table;
	width: max-content;
	min-width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

/* 列を潰さず内容ぶんの幅を確保 → はみ出したぶんは横スクロール（スワイプ）で見る */
.affib-compare th,
.affib-compare td {
	white-space: nowrap;
}

.affib-compare thead th {
	background: var(--affib-header-bg);
	color: var(--affib-header-text);
	padding: 10px 12px;
	text-align: center;
	white-space: nowrap;
	border: 1px solid var(--affib-header-bg);
}

.affib-compare tbody td {
	padding: 10px 12px;
	border: 1px solid var(--affib-border);
	text-align: center;
	vertical-align: middle;
	background: #fff;
}

.affib-compare--striped tbody tr:nth-child(even) td {
	background: var(--affib-stripe);
}

/* 商品名は3行までで省略し、行の高さバランスが崩れないようにする */
.affib-compare-title {
	font-weight: 600;
	text-align: left;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.5;
	max-height: 4.5em;
}

/* 商品名・特徴は折り返す（td の nowrap より詳細度を高くして確実に上書き）。
   max-width で横に広がりすぎないようにする。 */
.affib-compare td.affib-compare-cell--features {
	text-align: left;
	white-space: normal;
	min-width: 160px;
	max-width: 280px;
}

.affib-compare td.affib-compare-cell--title {
	white-space: normal;
	min-width: 150px;
	max-width: 260px;
}

/* 価格・レビュー・画像列は内容ぶんに詰めてバランスを取る */
.affib-compare th,
.affib-compare td.affib-compare-cell--price,
.affib-compare td.affib-compare-cell--review,
.affib-compare td.affib-compare-cell--image {
	width: 1%;
}

.affib-compare-cell--price {
	white-space: nowrap;
}

.affib-compare-title {
	word-break: break-word;
}

/* 比較テーブルの画像は見やすいサイズ・自然な比率で表示 */
.affib-compare td.affib-compare-cell--image {
	white-space: normal;
}

.affib-compare-cell--image img.affib-image,
.affib-compare-cell--image .affib-noimage {
	width: var(--affib-compare-img, 110px);
	height: var(--affib-compare-img, 110px);
	max-width: 100%;
}

.affib-compare-cell--image img.affib-image {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	border-radius: 6px;
}

.affib-compare-cell--buttons .affib-btn {
	padding: 8px 12px;
	font-size: 0.85em;
	white-space: nowrap;
}

/* 先頭列スティッキー（FR-BLOCK-02） */
.affib-compare-wrap--sticky .affib-compare th:first-child,
.affib-compare-wrap--sticky .affib-compare td:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
}

.affib-compare-wrap--sticky .affib-compare tbody td:first-child {
	background: #fff;
	box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}

/* ---- リスト ---- */

.affib-list {
	margin: 1.5em 0;
	counter-reset: affib-rank;
}

.affib-list-item {
	position: relative;
	display: flex;
	gap: 16px;
	padding: 16px;
	margin-bottom: 12px;
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	background: #fff;
}

/* ===== 1枚のカードにまとめる表示（リストブロックの既定） =====
   商品ごとに枠を分けず、1つの枠の中に区切り線で並べる。 */
.affib-list--merged {
	max-width: var(--affib-card-max, 640px);
	margin: 1.5em auto;
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	background: #fff;
}

.affib-list--merged .affib-list-item {
	margin-bottom: 0;
	border: 0;
	border-top: 1px solid var(--affib-border);
	border-radius: 0;
}

.affib-list--merged .affib-list-item:first-child {
	border-top: 0;
}

/* イチオシは枠色を変えられないため、左の太線と淡い背景で示す。 */
.affib-list--merged .affib-list-item--pick {
	border-left: 3px solid #f5a623;
	background: #fffdf5;
}

/* 番号は枠の外にはみ出させず、商品の左上に収める。 */
.affib-list--merged .affib-list-rank {
	top: 10px;
	left: 10px;
	width: 26px;
	height: 26px;
	font-size: 0.85em;
	box-shadow: 0 0 0 2px #fff;
}

.affib-list--merged.affib-list--numbered .affib-list-item {
	padding-top: 20px;
}

.affib-list-rank {
	position: absolute;
	top: -10px;
	left: -10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--affib-header-bg);
	color: var(--affib-header-text);
	font-weight: 700;
}

.affib-list-image {
	flex: 0 0 var(--affib-list-img, 140px);
	align-self: flex-start;
}

.affib-list-image .affib-image,
.affib-list-image .affib-noimage {
	width: var(--affib-list-img, 140px);
	height: var(--affib-list-img, 140px);
	max-width: 100%;
}

.affib-list-image .affib-image {
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.affib-list-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.affib-list-title {
	font-weight: 700;
	line-height: 1.5;
}

/* ---- ホテル比較（カード型・レスポンシブ） ---- */

.affib-hotelcards {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 1.5em 0;
}

.affib-hotelcard {
	position: relative;
	flex: 1 1 0;
	min-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	border: 1px solid var(--affib-border);
	border-radius: calc(var(--affib-radius) + 4px);
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

.affib-hotelcard:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* タイトル：見出しタグを使わずテーマ装飾を排除。2行ぶんの高さに固定して
   カード間で画像の開始位置（＝以降の行）を揃える。 */
.affib-hotelcard-title {
	margin: 0;
	min-height: 3em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--affib-header-bg);
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.5;
}

.affib-hotelcard-images {
	display: flex;
	gap: 8px;
}

.affib-hotelcard-images figure {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

.affib-hotelcard-images img {
	width: 100%;
	height: 110px;
	aspect-ratio: auto;
	object-fit: cover;
	border-radius: calc(var(--affib-radius) / 2);
	display: block;
}

.affib-noimage--fill {
	width: 100%;
	height: 110px;
	border-radius: calc(var(--affib-radius) / 2);
}

.affib-hotelcard-imgcap {
	margin-top: 2px;
	font-size: 0.72em;
	color: #6b7280;
	text-align: center;
}

.affib-hotelcard-rating {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 1.05em;
}

.affib-hotelcard-reviewcount {
	font-size: 0.78em;
	color: #6b7280;
}

/* 施設紹介文：高さを揃えつつ、切れずに中でスクロールして全文読める */
.affib-hotelcard-special {
	margin: 0;
	padding: 10px 12px;
	background: var(--affib-stripe);
	border-radius: calc(var(--affib-radius) / 2);
	font-size: 0.85em;
	line-height: 1.6;
	height: 7.6em;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.affib-hotelcard-scores {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 14px;
}

.affib-hotelcard-scores li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 4px 0;
	border-bottom: 1px dashed var(--affib-border);
	font-size: 0.88em;
}

.affib-hotelcard-score-label {
	color: #6b7280;
}

.affib-hotelcard-score-value {
	font-weight: 700;
}

.affib-hotelcard-facts {
	margin: 0;
}

.affib-hotelcard-facts dt {
	margin-top: 6px;
	font-size: 0.76em;
	font-weight: 600;
	color: #6b7280;
}

.affib-hotelcard-facts dd {
	margin: 2px 0 0;
	font-size: 0.9em;
	line-height: 1.5;
}

/* Googleマップ埋め込み（クリックで読み込み） */
.affib-hotelcard-map iframe {
	width: 100%;
	height: 180px;
	border: 0;
	border-radius: calc(var(--affib-radius) / 2);
	display: block;
}

.affib-map-load {
	width: 100%;
	padding: 10px;
	background: var(--affib-stripe);
	border: 1px dashed var(--affib-border);
	border-radius: calc(var(--affib-radius) / 2);
	color: #2271b1;
	font-size: 0.85em;
	font-weight: 600;
	cursor: pointer;
}

.affib-map-load:hover {
	background: #eef2f7;
}

.affib-map-close {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 6px;
	background: #f0f2f5;
	border: 1px solid var(--affib-border);
	border-radius: calc(var(--affib-radius) / 2);
	color: #50575e;
	font-size: 0.8em;
	cursor: pointer;
}

.affib-map-close:hover {
	background: #e5e8ee;
}

/* 地図〜予約ボタンをカード下端にまとめて固定（カード間で位置が揃う） */
.affib-hotelcard .affib-hotelcard-map {
	margin-top: auto;
}

.affib-hotelcard .affib-buttons {
	margin-top: 0;
	padding-top: 4px;
	justify-content: center;
}

/* 地図非表示設定のときはボタンを下端に固定 */
.affib-hotelcard:not(:has(.affib-hotelcard-map)) .affib-buttons {
	margin-top: auto;
}

/* ---- ランキング比較 ---- */

.affib-ranking {
	margin: 1.5em 0;
}

.affib-ranking-item {
	margin-bottom: 20px;
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	background: #fff;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.affib-ranking-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	color: #fff;
	font-weight: 700;
	background: var(--affib-header-bg);
}

.affib-ranking-no {
	flex: 0 0 auto;
	padding: 2px 10px;
	background: rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	font-size: 0.9em;
	white-space: nowrap;
}

.affib-ranking-title {
	line-height: 1.5;
}

.affib-ranking-item--1 .affib-ranking-head {
	background: linear-gradient(135deg, #d99400, #f5b912);
	color: #5b3a00;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.affib-ranking-item--1 .affib-ranking-no::before {
	content: '\1F451 ';
}

.affib-ranking-item--1 {
	border: 2px solid #f5b912;
}

.affib-ranking-item--2 .affib-ranking-head {
	background: linear-gradient(135deg, #8e9aa6, #c0c8d0);
	color: #333;
}

.affib-ranking-item--3 .affib-ranking-head {
	background: linear-gradient(135deg, #a05f2c, #c98a52);
}

.affib-ranking-body {
	display: flex;
	gap: 16px;
	padding: 16px;
}

.affib-ranking-image {
	flex: 0 0 var(--affib-ranking-img, 160px);
	text-align: center;
}

.affib-ranking-image .affib-image,
.affib-ranking-image .affib-noimage {
	width: var(--affib-ranking-img, 160px);
	height: var(--affib-ranking-img, 160px);
	max-width: 100%;
}

.affib-ranking-image .affib-image {
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.affib-ranking-info {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

/* ---- サイト紹介 ---- */

.affib-siteintro {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 680px;
	margin: 1.5em auto;
	padding: 16px;
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 画像を上に大きく表示 */
.affib-siteintro-image {
	display: block;
	width: 100%;
}

.affib-siteintro-image img {
	width: 100%;
	height: auto;
	max-height: 340px;
	object-fit: cover;
	border-radius: calc(var(--affib-radius) / 2);
	display: block;
}

.affib-siteintro-cta {
	margin-bottom: 0;
}

.affib-siteintro-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.affib-siteintro-title {
	font-weight: 700;
	font-size: 1.05em;
	line-height: 1.5;
}

.affib-siteintro-desc {
	margin: 0;
	font-size: 0.9em;
	line-height: 1.7;
	color: #444;
}

.affib-siteintro .affib-buttons {
	margin-top: auto;
}

/* ---- 価格推移 ---- */

.affib-trend-row {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.affib-sparkline {
	color: #2271b1;
	vertical-align: middle;
}

.affib-trend {
	font-weight: 700;
	font-size: 0.82em;
	padding: 2px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

.affib-trend--down {
	color: #00753b;
	background: #eafaf1;
}

.affib-trend--up {
	color: #b32d2e;
	background: #fdeeee;
}

/* ---- インラインボタン ---- */

.affib-minibtn-wrap {
	margin: 0.8em 0;
}

.affib-minibtn {
	padding: 8px 22px;
	border-radius: 999px;
	font-size: 0.88em;
}

/* ---- この記事の商品まとめ ---- */

.affib-postitems {
	margin: 1.5em 0;
	padding: 14px 16px;
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	background: #fff;
}

.affib-postitems-heading {
	font-weight: 700;
	padding-bottom: 8px;
	margin-bottom: 8px;
	border-bottom: 2px solid var(--affib-header-bg);
}

.affib-postitems-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px dashed var(--affib-border);
}

.affib-postitems-row:last-of-type {
	border-bottom: none;
}

.affib-postitems-thumb {
	flex: 0 0 60px;
}

.affib-postitems-thumb .affib-image {
	width: 60px;
	height: 60px;
	object-fit: contain;
}

.affib-postitems-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.affib-postitems-title {
	font-weight: 600;
	font-size: 0.9em;
	line-height: 1.4;
}

.affib-postitems-btn {
	flex: 0 0 auto;
	padding: 7px 14px;
	font-size: 0.82em;
	white-space: nowrap;
}

/* ---- 縦型比較表（SaaS料金表のような、商品・サービスを列に並べる比較表） ---- */
/* 本物の<table>を使い、列（商品）ごとに文章量が違っても行の高さを自動で揃えつつ、
   border-collapse:separate + border-spacing で列と列の間にすき間を作ることで、
   「罫線だらけの表」ではなく「独立した角丸カードが並んでいる」ように見せている。
   各セルは列の中で上下に連続しているため内側に横線は出ず、先頭行・最終行だけを
   角丸にしてカード1枚に見せる（tr:first-child/tr:last-childで判定するので、
   バッジ行の有無・カスタム行の増減があっても常に正しく先頭/最終行になる）。 */

.affib-cv-wrap {
	margin: 2em 0;
	padding: 4px 2px; /* 強調列の浮き上がり・影がスクロール枠で切れないための余白 */
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* テーマ（SWELL等）が .post_content table 等で罫線・背景・余白を強く指定していると
   このデザインが打ち消され、ただの表に戻ってしまう。セレクタを .affib-cv-wrap で
   包んで特異度を上げたうえで、デザインの土台になる指定だけは !important で守る。 */
.affib-cv-wrap .affib-cv2 {
	width: 100%;
	min-width: 560px;
	/* この2つが崩れるとカード状の見た目が成立しないため必ず優先する */
	border-collapse: separate !important;
	border-spacing: 16px 0 !important;
	table-layout: auto;
	margin: 0;
	background: none;
	border: none;
}

/* テーマ由来の th/td 既定スタイル（罫線・背景・中央寄せ等）を打ち消す土台リセット。
   個別の見た目は、この後のクラス指定で改めて当てる。 */
.affib-cv-wrap .affib-cv2 th,
.affib-cv-wrap .affib-cv2 td {
	border: none;
	background: none;
	color: inherit;
	font-weight: inherit;
	text-align: inherit;
	white-space: normal;
	word-break: break-word;
}

.affib-cv-wrap .affib-cv2 caption {
	padding-top: 14px;
	color: #6b7076;
	font-size: 0.84em;
	text-align: center;
	caption-side: bottom;
}

.affib-cv-wrap .affib-cv2-label,
.affib-cv-wrap .affib-cv2-cell,
.affib-cv-wrap .affib-cv2-badge-cell {
	padding: 14px 16px;
	vertical-align: middle;
}

.affib-cv-wrap .affib-cv2-label {
	background: transparent;
	text-align: left;
	font-weight: 700;
	font-size: 0.88em;
	color: #3c434a;
	white-space: nowrap;
	padding-left: 2px;
	padding-right: 10px;
}

.affib-cv-wrap .affib-cv2-cell,
.affib-cv-wrap .affib-cv2-badge-cell {
	position: relative;
	min-width: 190px;
	text-align: center;
	/* 列を1枚のカードに見せる白背景と左右の枠線。テーマのtd背景に負けないよう優先する。 */
	background: #fff !important;
	border-left: 1px solid var(--affib-border);
	border-right: 1px solid var(--affib-border);
}

/* 列の先頭セル（バッジ行があればそれ、なければ画像行）だけ上を丸め、上罫線を引く */
.affib-cv-wrap .affib-cv2 thead tr:first-child .affib-cv2-cell,
.affib-cv-wrap .affib-cv2 thead tr:first-child .affib-cv2-badge-cell {
	padding-top: 18px;
	border-top: 1px solid var(--affib-border);
	border-top-left-radius: var(--affib-radius);
	border-top-right-radius: var(--affib-radius);
}

/* 列の最終セル（購入ボタン行等）だけ下を丸め、下罫線を引く */
.affib-cv-wrap .affib-cv2 tbody tr:last-child .affib-cv2-cell {
	padding-bottom: 20px;
	border-bottom: 1px solid var(--affib-border);
	border-bottom-left-radius: var(--affib-radius);
	border-bottom-right-radius: var(--affib-radius);
}

.affib-cv-wrap .affib-cv2-cell.affib-cv2-pick,
.affib-cv-wrap .affib-cv2-badge-cell.affib-cv2-pick {
	background: color-mix( in srgb, var(--affib-cv-accent, var(--affib-header-bg)) 5%, #fff ) !important;
	border-left: 2px solid var(--affib-cv-accent, var(--affib-header-bg));
	border-right: 2px solid var(--affib-cv-accent, var(--affib-header-bg));
	box-shadow: 0 10px 26px rgba( 0, 0, 0, 0.09 );
}

.affib-cv-wrap .affib-cv2 thead tr:first-child .affib-cv2-cell.affib-cv2-pick,
.affib-cv-wrap .affib-cv2 thead tr:first-child .affib-cv2-badge-cell.affib-cv2-pick {
	border-top: 2px solid var(--affib-cv-accent, var(--affib-header-bg));
}

.affib-cv-wrap .affib-cv2 tbody tr:last-child .affib-cv2-cell.affib-cv2-pick {
	border-bottom: 2px solid var(--affib-cv-accent, var(--affib-header-bg));
}

/* バッジ行：強調していない列は帯なし・高さだけ他列と共有される */
.affib-cv-wrap .affib-cv2-badge-cell {
	padding-top: 12px;
	padding-bottom: 0;
}

.affib-cv-wrap .affib-cv2-pick-badge {
	display: block;
	padding: 6px 0;
	background: var(--affib-cv-accent, var(--affib-header-bg));
	color: #fff;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.04em;
	white-space: nowrap;
	border-radius: 999px;
}

.affib-cv-wrap .affib-cv2-row--image .affib-cv2-cell {
	padding-bottom: 8px;
}

.affib-cv-wrap .affib-cv2-row--image .affib-image,
.affib-cv-wrap .affib-cv2-row--image .affib-noimage {
	display: inline-block;
	width: 100%;
	max-width: 128px;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.affib-cv-wrap .affib-cv2-row--title .affib-cv2-cell {
	padding-top: 4px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--affib-border);
}

.affib-cv-wrap .affib-cv2-title {
	display: block;
	font-weight: 700;
	font-size: 1.05em;
	line-height: 1.5;
}

.affib-cv-wrap .affib-cv2-cell--price {
	font-size: 1.5em;
	font-weight: 800;
	color: var(--affib-cv-accent, var(--affib-header-bg));
}

.affib-cv-wrap .affib-cv2-price-text {
	font-size: 0.7em;
	font-weight: 700;
}

.affib-cv-wrap .affib-cv2-cell--features {
	text-align: left;
}

.affib-cv-wrap .affib-cv2-cell--features .affib-features {
	margin: 0;
	padding-left: 1.1em;
	font-size: 0.87em;
	line-height: 1.9;
}

.affib-cv-wrap .affib-cv2-desc {
	margin: 0;
	font-size: 0.87em;
	line-height: 1.8;
	color: #50575e;
	text-align: left;
}

.affib-cv-wrap .affib-cv2-cell--review {
	font-size: 0.94em;
}

.affib-cv-wrap .affib-cv2-cell--buttons .affib-buttons {
	margin: 0;
}

.affib-cv-wrap .affib-cv2-cell--buttons .affib-btn {
	width: 100%;
	justify-content: center;
	box-sizing: border-box;
}

.affib-cv-wrap .affib-cv2-empty {
	color: #b7bbc0;
}

/* 評価アイコン（○良い/△普通/✕不可）：色文字だけでなく丸いチップにして視認性を上げる */
.affib-cv-wrap .affib-cv2-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-right: 6px;
	color: #fff;
	font-size: 0.78em;
	font-weight: 700;
	border-radius: 50%;
	vertical-align: -3px;
}

.affib-cv-wrap .affib-cv2-icon--good {
	background: #2e8b57;
}

.affib-cv-wrap .affib-cv2-icon--mid {
	background: #d97a00;
}

.affib-cv-wrap .affib-cv2-icon--bad {
	background: #d81b3f;
}

/* ---- 関連記事・おすすめリンク ---- */
/* fieldset + legend のネイティブな挙動を使い、見出し文字が枠線に食い込む「1本線」デザインにする
   （枠線とは別に見出し用の線を重ねると二重線に見えるため、あえてfieldsetで実装している）。
   線・見出し文字の色は --affib-related-accent（未設定ならテーマのヘッダー色／枠線色）で統一する。 */

.affib-related {
	min-width: 0;
	margin: 1.8em 0;
	padding: 6px 22px 22px;
	background: #fff;
	border: 1px solid var(--affib-related-accent, var(--affib-border));
	border-radius: var(--affib-radius);
}

.affib-related-heading {
	float: none;
	width: fit-content;
	max-width: calc( 100% - 40px );
	margin-inline: auto;
	padding: 0 12px;
	color: var(--affib-related-accent, var(--affib-header-bg));
	font-weight: 700;
	font-size: 0.95em;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.affib-related-check {
	font-weight: 700;
	margin-right: 4px;
}

.affib-related-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin-top: 8px;
}

.affib-related-list--cols-2 {
	grid-template-columns: repeat( 2, 1fr );
	gap: 0 24px;
}

.affib-related-list--cols-3 {
	grid-template-columns: repeat( 3, 1fr );
	gap: 0 20px;
}

.affib-related-list--cols-4 {
	grid-template-columns: repeat( 4, 1fr );
	gap: 0 16px;
}

.affib-related-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px dashed var(--affib-border);
	text-decoration: none;
	color: inherit;
	transition: opacity 0.15s ease;
}

.affib-related-list--cols-1 .affib-related-row:last-child,
.affib-related-list--cols-2 .affib-related-row:nth-last-child(-n+2),
.affib-related-list--cols-3 .affib-related-row:nth-last-child(-n+3),
.affib-related-list--cols-4 .affib-related-row:nth-last-child(-n+4) {
	border-bottom: none;
}

.affib-related-row:hover {
	opacity: 0.75;
}

.affib-related-thumb {
	flex: 0 0 120px;
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--affib-stripe);
	border-radius: calc( var(--affib-radius) - 2px );
	overflow: hidden;
}

.affib-related-thumb .affib-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.affib-related-thumb .affib-noimage {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #90959c;
	font-size: 0.78em;
}

.affib-related-body {
	flex: 1 1 auto;
	min-width: 0;
}

.affib-related-title {
	display: block;
	font-weight: 700;
	font-size: 0.98em;
	line-height: 1.5;
	color: #1d2327;
}

.affib-related-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin-top: 4px;
	color: #6b7076;
	font-size: 0.84em;
	line-height: 1.6;
}

/* ---- 追従CTAバー ---- */

.affib-ctabar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	display: flex;
	align-items: center;
	padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
	box-sizing: border-box;
	/* スクロールギミック（下スクロールで隠す・上スクロールで再表示）用のトランジション。 */
	transition: transform 0.3s ease;
}

/* デザイン：バー（白背景の帯・従来の見た目） */
.affib-ctabar--bar {
	background: #fff;
	border-top: 1px solid var(--affib-border);
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* デザイン：オーバーレイ（半透明の黒帯） */
.affib-ctabar--overlay {
	background: rgba(0, 0, 0, 0.75);
}

.affib-ctabar--overlay .affib-ctabar-message,
.affib-ctabar--overlay .affib-ctabar-title {
	color: #fff;
}

/* デザイン：フローティング（背景なし・ピル型ボタンだけが浮く） */
.affib-ctabar--floating {
	background: transparent;
	/* バー自体は透明で操作を邪魔しない。ボタン・閉じるボタンだけクリック可能にする。 */
	pointer-events: none;
}

.affib-ctabar--floating .affib-ctabar-row,
.affib-ctabar--floating .affib-ctabar-close {
	pointer-events: auto;
}

.affib-ctabar--floating .affib-btn,
.affib-ctabar--floating .affib-ctabar-btn {
	padding: 14px 22px;
	font-size: 0.95em;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* ピル型ボタン */
.affib-ctabar--rounded .affib-btn,
.affib-ctabar--rounded .affib-ctabar-btn {
	border-radius: 999px;
}

/* スクロールギミック：下スクロールで下に隠す（front.jsがクラス付与） */
.affib-ctabar--scroll-hidden {
	transform: translateY(130%);
}

/* エディタ内プレビュー（ServerSideRender）では固定表示にしない。スクロールギミックも対象外。 */
.affib-ctabar--preview {
	position: relative;
	box-shadow: none;
	left: auto;
	right: auto;
	bottom: auto;
}

.affib-ctabar--preview.affib-ctabar--scroll-hidden {
	transform: none;
}

.affib-ctabar-inner {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.affib-ctabar-message {
	text-align: center;
	color: #e07800;
	font-weight: 700;
	font-size: 0.78em;
}

.affib-ctabar-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.affib-ctabar-thumb {
	flex: 0 0 40px;
}

.affib-ctabar-thumb .affib-image,
.affib-ctabar-thumb .affib-noimage {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.affib-ctabar-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.82em;
	font-weight: 600;
}

.affib-ctabar-row .affib-buttons {
	flex: 1 1 auto;
	margin: 0;
	gap: 6px;
}

.affib-ctabar-row .affib-buttons > .affib-btn,
.affib-ctabar-row .affib-buttons > .affib-btn-wrap {
	flex: 1 1 90px;
}

.affib-ctabar-row .affib-btn,
.affib-ctabar-btn {
	padding: 7px 14px;
	font-size: 0.82em;
}

.affib-ctabar-close {
	position: absolute;
	top: -10px;
	right: 8px;
	width: 22px;
	height: 22px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--affib-border);
	background: #fff;
	color: #50575e;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.affib-ctabar-close:hover {
	background: #f0f2f5;
}

/* スマホ幅（600px以下）のみ表示 */
@media (min-width: 601px) {
	.affib-ctabar--mobile-only {
		display: none;
	}
}

/* フローティングデザイン：狭い画面ではボタンを折り返して中央寄せにする */
@media (max-width: 600px) {
	.affib-ctabar--floating .affib-ctabar-row {
		flex-wrap: wrap;
		justify-content: center;
	}
}

/* ---- FAQ（よくある質問） ---- */

.affib-faq {
	margin: 1.5em 0;
}

.affib-faq-item {
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	margin-bottom: 10px;
	background: #fff;
	overflow: hidden;
}

.affib-faq-item summary {
	position: relative;
	padding: 12px 40px 12px 16px;
	font-weight: 700;
	line-height: 1.5;
	cursor: pointer;
	list-style: none;
}

.affib-faq-item summary::-webkit-details-marker {
	display: none;
}

.affib-faq-item summary::after {
	content: '▶';
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.8em;
	color: #6b7280;
	transition: transform 0.15s ease;
}

.affib-faq-item[open] summary::after {
	transform: translateY(-50%) rotate(90deg);
}

.affib-faq-item summary:hover {
	background: var(--affib-stripe);
}

.affib-faq-a {
	margin: 0 16px 14px 20px;
	padding-left: 12px;
	border-left: 3px solid var(--affib-header-bg);
	font-size: 0.92em;
	line-height: 1.7;
}

/* ---- メリット・デメリット ---- */

.affib-proscons {
	margin: 1.5em 0;
}

.affib-proscons-title {
	font-weight: 700;
	font-size: 1.05em;
	margin-bottom: 10px;
}

.affib-proscons-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.affib-proscons-col {
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	overflow: hidden;
	background: #fff;
}

.affib-proscons-head {
	padding: 10px 14px;
	font-weight: 700;
	text-align: center;
}

.affib-proscons-col--pros .affib-proscons-head {
	color: var(--affib-pros-c, #2e8b57);
}

.affib-proscons-col--cons .affib-proscons-head {
	color: var(--affib-cons-c, #d81b3f);
}

.affib-proscons-list {
	margin: 0;
	padding: 12px 16px;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 0.92em;
	line-height: 1.6;
}

.affib-proscons-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.affib-proscons-icon {
	flex: 0 0 auto;
	font-weight: 700;
}

.affib-proscons-col--pros .affib-proscons-icon {
	color: var(--affib-pros-c, #2e8b57);
}

.affib-proscons-col--cons .affib-proscons-icon {
	color: var(--affib-cons-c, #d81b3f);
}

/* デザインバリエーション：card＝ヘッダ帯に淡色背景（デフォルト） */
.affib-proscons--card .affib-proscons-col--pros .affib-proscons-head {
	background-color: #e8f7ee; /* color-mix非対応ブラウザ向けフォールバック */
	background-color: color-mix( in srgb, var(--affib-pros-c, #2e8b57) 12%, #fff );
}

.affib-proscons--card .affib-proscons-col--cons .affib-proscons-head {
	background-color: #fdecec;
	background-color: color-mix( in srgb, var(--affib-cons-c, #d81b3f) 12%, #fff );
}

/* デザインバリエーション：fill＝列全体を淡色背景で塗る */
.affib-proscons--fill .affib-proscons-col--pros {
	background-color: #e8f7ee;
	background-color: color-mix( in srgb, var(--affib-pros-c, #2e8b57) 8%, #fff );
}

.affib-proscons--fill .affib-proscons-col--cons {
	background-color: #fdecec;
	background-color: color-mix( in srgb, var(--affib-cons-c, #d81b3f) 8%, #fff );
}

/* デザインバリエーション：simple＝枠なし・アイコンとラベル色のみ */
.affib-proscons--simple .affib-proscons-col {
	border: none;
	background: transparent;
}

.affib-proscons--simple .affib-proscons-head {
	text-align: left;
}

/* ---- レスポンシブ（FR-BLOCK-05） ---- */

/* タブレット幅：比較テーブルは横スクロール前提なのでスワイプしやすくしておく */
@media (max-width: 782px) {
	.affib-compare-wrap {
		-webkit-overflow-scrolling: touch;
	}
}

@media (max-width: 600px) {
	/* ---- 共通：画像は必ずコンテナ内に収める ---- */
	.affib-image,
	.affib-noimage,
	.affib-siteintro-image img,
	.affib-hotelcard-images img {
		max-width: 100%;
		height: auto;
	}

	/* ---- 共通：ボタン群。1列で全幅にし、はみ出し・切れを防ぐ ---- */
	.affib-buttons {
		gap: 6px;
	}

	.affib-buttons > .affib-btn,
	.affib-buttons > .affib-btn-wrap {
		flex-basis: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.affib-btn,
	.affib-btn-wrap {
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	/* ボタン文言が長い場合は折り返して幅からはみ出させない。
	   あわせて、指で押しやすい高さ（48px）を確保する。 */
	.affib-btn {
		white-space: normal;
		word-break: break-word;
		min-height: 48px;
	}

	/* スマホでは全ボタンが1列になるため、主役は高さと文字で差をつける。 */
	.affib-btn--primary {
		min-height: 56px;
		font-size: 1.05em;
	}

	.affib-btn--sub {
		min-height: 44px;
	}

	/* ---- 単品カード ---- */
	.affib-card {
		padding: 12px;
	}

	.affib-card-sale-banner {
		margin: -12px -12px 12px;
	}

	/* auto layoutのままだと購入ボタン列（td）の内容幅に引っ張られ、
	   見出し列（th）が極端に狭くなって1文字ずつ縦書き状態になる。
	   table-layoutをfixedにして見出し列の幅を固定し、それを防ぐ。 */
	.affib-card-table {
		table-layout: fixed;
	}

	.affib-card-table th {
		width: 34%;
		min-width: 5em;
		padding: 8px 6px;
		white-space: normal;
		word-break: break-word;
	}

	.affib-card-table td {
		padding: 8px 6px;
		word-break: break-word;
	}

	/* ---- 比較テーブル ----
	   列数が多いテーブル自体は崩さず横スクロールで見せる方針のまま。
	   購入ボタン列だけは縦積み・全幅にして、スクロール幅を無駄に広げず見やすくする。 */
	.affib-compare-cell--buttons .affib-buttons {
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
	}

	.affib-compare-cell--buttons .affib-btn {
		width: 100%;
		white-space: normal;
	}

	/* ---- 縦型比較表：列間の余白・セルの余白を詰める（横スクロールで比較する想定はそのまま）
	   セレクタは通常時と同じ形（.affib-cv-wrap 付き・border-spacingは!important）に
	   揃える。揃えないと特異度で通常時の指定に負け、モバイル調整が効かなくなる。 ---- */
	.affib-cv-wrap .affib-cv2 {
		border-spacing: 10px 0 !important;
	}

	.affib-cv-wrap .affib-cv2-label,
	.affib-cv-wrap .affib-cv2-cell,
	.affib-cv-wrap .affib-cv2-badge-cell {
		padding: 10px 12px;
	}

	.affib-cv-wrap .affib-cv2-cell,
	.affib-cv-wrap .affib-cv2-badge-cell {
		min-width: 160px;
	}

	/* ---- リスト ---- */
	.affib-list-item {
		flex-direction: column;
	}

	.affib-list-image {
		flex-basis: auto;
		text-align: center;
	}

	/* ---- ホテル比較カードはスマホで縦積み（1列）に ---- */
	.affib-hotelcard {
		flex-basis: 100%;
		padding: 14px;
	}

	.affib-hotelcard-scores {
		grid-template-columns: 1fr;
	}

	/* ---- ランキング ---- */
	.affib-ranking-body,
	.affib-siteintro {
		flex-direction: column;
	}

	.affib-ranking-image,
	.affib-siteintro-image {
		flex-basis: auto;
		text-align: center;
	}

	.affib-ranking-image .affib-image {
		max-width: 100%;
	}

	/* ---- この記事の商品まとめ：狭い幅ではサムネ＋本文＋ボタンを縦積みに ---- */
	.affib-postitems {
		padding: 12px;
	}

	.affib-postitems-row {
		flex-wrap: wrap;
	}

	.affib-postitems-btn {
		flex-basis: 100%;
		text-align: center;
	}

	/* ---- 関連記事・おすすめリンク：狭い幅では列数指定に関わらず1列、サムネも小さく ---- */
	.affib-related {
		padding: 6px 16px 16px;
	}

	.affib-related-list {
		grid-template-columns: 1fr !important;
	}

	.affib-related-row {
		border-bottom: 1px dashed var(--affib-border) !important;
	}

	.affib-related-row:last-child {
		border-bottom: none !important;
	}

	.affib-related-thumb {
		flex-basis: 84px;
	}

	/* ---- インラインボタン ---- */
	.affib-minibtn-wrap {
		max-width: 100%;
	}

	/* ---- 追従CTAバー：サムネ・商品名を切り詰めてボタンを確保 ---- */
	.affib-ctabar-title {
		font-size: 0.78em;
	}

	.affib-ctabar-row .affib-buttons > .affib-btn,
	.affib-ctabar-row .affib-buttons > .affib-btn-wrap {
		flex-basis: 70px;
	}

	/* ---- メリット・デメリット：1列に ---- */
	.affib-proscons-grid {
		grid-template-columns: 1fr;
	}
}

/* ==================================================================
   施設基本情報ブロック（ホテル・旅館）
   ================================================================== */

.affib-hotelinfo {
	max-width: var(--affib-card-max, 640px);
	margin: 1.5em auto;
	padding: 16px;
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	background: #fff;
	box-sizing: border-box;
}

.affib-hotelinfo-heading {
	margin: -16px -16px 12px;
	padding: 10px 16px;
	background: var(--affib-header-bg, #1c2b4a);
	border-radius: var(--affib-radius) var(--affib-radius) 0 0;
	color: var(--affib-header-text, #fff);
	font-weight: 700;
}

.affib-hotelinfo-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92em;
}

.affib-hotelinfo-table th,
.affib-hotelinfo-table td {
	padding: 8px 10px;
	border: 1px solid var(--affib-border);
	vertical-align: top;
	text-align: left;
}

.affib-hotelinfo-table th {
	width: 32%;
	background: var(--affib-stripe);
	font-weight: 600;
	white-space: nowrap;
}

.affib-hotelinfo-map {
	display: inline-block;
	margin-left: 4px;
	white-space: nowrap;
}

.affib-hotelinfo-buttons {
	margin-top: 12px;
}

/* ==================================================================
   予約サイト比較ブロック
   ================================================================== */

.affib-rates {
	max-width: var(--affib-card-max, 640px);
	margin: 1.5em auto;
	box-sizing: border-box;
}

.affib-rates-heading {
	padding: 10px 16px;
	background: var(--affib-header-bg, #1c2b4a);
	border-radius: var(--affib-radius) var(--affib-radius) 0 0;
	color: var(--affib-header-text, #fff);
	font-weight: 700;
}

.affib-rates-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 0.92em;
}

.affib-rates-table th,
.affib-rates-table td {
	padding: 10px;
	border: 1px solid var(--affib-border);
	vertical-align: middle;
	text-align: left;
}

.affib-rates-table thead th {
	background: var(--affib-stripe);
	font-weight: 600;
	white-space: nowrap;
}

.affib-rates-table tbody th {
	width: 30%;
	font-weight: 700;
}

.affib-rates-price {
	white-space: nowrap;
	font-weight: 700;
}

.affib-rates-cta .affib-btn {
	width: 100%;
	padding: 10px;
	font-size: 0.85em;
}

/* 最安の行：淡い黄色で目立たせ、サイト名の横に「最安」バッジを出す。 */
.affib-rates-row--lowest > th,
.affib-rates-row--lowest > td {
	background: #fffaf0;
}

.affib-rates-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #d81b3f;
	color: #fff;
	font-size: 0.72em;
	font-weight: 700;
	vertical-align: middle;
	white-space: nowrap;
}

.affib-rates-note-text {
	margin: 6px 0 0;
	color: #767676;
	font-size: 0.78em;
	line-height: 1.6;
}

@media (max-width: 600px) {
	/* スマホでは「特典・備考」列を落として、料金と予約ボタンに絞る（横スクロールを避ける）。 */
	.affib-rates-table th:nth-child(3),
	.affib-rates-table td:nth-child(3) {
		display: none;
	}

	.affib-rates-table tbody th {
		width: 40%;
	}

	.affib-rates-note::before {
		content: '';
	}

	.affib-hotelinfo {
		padding: 12px;
	}

	.affib-hotelinfo-heading {
		margin: -12px -12px 12px;
	}

	.affib-hotelinfo-table {
		table-layout: fixed;
	}

	.affib-hotelinfo-table th {
		width: 34%;
		min-width: 5em;
		padding: 8px 6px;
		white-space: normal;
		word-break: break-word;
	}
}

/* ==================================================================
   宿泊価格カレンダー（日別の宿泊料金・毎日1回更新）
   ================================================================== */

.affib-rates-cal {
	max-width: var(--affib-card-max, 640px);
	margin: 1.5em auto;
	box-sizing: border-box;
}

.affib-rates-cal-intro {
	position: relative;
	margin: 0 auto 18px;
	padding: 14px 18px;
	max-width: 90%;
	background: #fdf0f0;
	border-radius: var(--affib-radius);
	text-align: center;
	font-size: 0.92em;
	line-height: 1.7;
}

/* 案内文の吹き出しのしっぽ（下向き） */
.affib-rates-cal-intro::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -8px;
	width: 16px;
	height: 16px;
	margin-left: -8px;
	background: #fdf0f0;
	transform: rotate(45deg);
}

.affib-rates-cal-item {
	margin-bottom: 20px;
	border-radius: var(--affib-radius);
	background: #fff;
}

/* 開閉見出し：クリックできることが分かるよう＋／−を右端に出す。 */
.affib-rates-cal-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	background: var(--affib-header-bg, #1c2b4a);
	border-radius: var(--affib-radius);
	color: var(--affib-header-text, #fff);
	font-weight: 700;
	line-height: 1.5;
	cursor: pointer;
	list-style: none;
}

.affib-rates-cal-summary::-webkit-details-marker {
	display: none;
}

.affib-rates-cal-mark {
	flex: 0 0 auto;
	position: relative;
	width: 16px;
	height: 16px;
}

.affib-rates-cal-mark::before,
.affib-rates-cal-mark::after {
	content: '';
	position: absolute;
	left: 0;
	top: 7px;
	width: 16px;
	height: 2px;
	background: currentColor;
}

.affib-rates-cal-mark::after {
	transform: rotate(90deg);
	transition: transform 0.15s ease;
}

.affib-rates-cal-item[open] .affib-rates-cal-summary {
	border-radius: var(--affib-radius) var(--affib-radius) 0 0;
}

/* 開いているときは＋を−にする。 */
.affib-rates-cal-item[open] .affib-rates-cal-mark::after {
	transform: rotate(0deg);
}

.affib-rates-cal-body {
	padding: 16px 20px 20px;
	border: 1px solid var(--affib-border);
	border-top: 0;
	border-radius: 0 0 var(--affib-radius) var(--affib-radius);
}

.affib-rates-cal-note {
	margin: 0 0 16px;
	font-size: 0.82em;
	line-height: 1.7;
	color: #555;
}

/* ---- 人数条件タブ（ラジオボタン＋:checked。JavaScriptなしで切り替える） ---- */

.affib-rates-cal-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.affib-rates-cal-tablist {
	display: flex;
	gap: 4px;
	margin-bottom: 16px;
}

.affib-rates-cal-tab {
	flex: 1 1 0;
	padding: 12px 8px;
	background: #f2f3f5;
	border-radius: 4px 4px 0 0;
	text-align: center;
	font-weight: 700;
	font-size: 0.88em;
	line-height: 1.4;
	color: #555;
	cursor: pointer;
	white-space: pre-line;
}

/* タブの中身は既定で隠し、選ばれたものだけ出す（body直下の1つだけのときは常に表示）。 */
.affib-rates-cal-tabs .affib-rates-cal-pane {
	display: none;
}

.affib-rates-cal-radio:nth-of-type(1):checked ~ .affib-rates-cal-pane--plan1,
.affib-rates-cal-radio:nth-of-type(2):checked ~ .affib-rates-cal-pane--plan2 {
	display: block;
}

.affib-rates-cal-radio:nth-of-type(1):checked ~ .affib-rates-cal-tablist .affib-rates-cal-tab:nth-child(1),
.affib-rates-cal-radio:nth-of-type(2):checked ~ .affib-rates-cal-tablist .affib-rates-cal-tab:nth-child(2) {
	position: relative;
	background: var(--affib-header-bg, #1c2b4a);
	color: var(--affib-header-text, #fff);
}

/* 選択中のタブの下に、表を指す小さな三角を出す。 */
.affib-rates-cal-radio:nth-of-type(1):checked ~ .affib-rates-cal-tablist .affib-rates-cal-tab:nth-child(1)::after,
.affib-rates-cal-radio:nth-of-type(2):checked ~ .affib-rates-cal-tablist .affib-rates-cal-tab:nth-child(2)::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	background: var(--affib-header-bg, #1c2b4a);
	transform: rotate(45deg);
}

/* キーボード操作でタブを選べるようにフォーカスを見せる。 */
.affib-rates-cal-radio:focus-visible ~ .affib-rates-cal-tablist .affib-rates-cal-tab {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* ---- 日付×料金の表 ---- */

.affib-rates-cal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.affib-rates-cal-table th,
.affib-rates-cal-table td {
	padding: 9px 10px;
	border-bottom: 1px solid var(--affib-border);
	text-align: right;
}

.affib-rates-cal-table thead th {
	border-bottom: 2px solid var(--affib-border);
	font-weight: 700;
	white-space: nowrap;
}

.affib-rates-cal-table thead th:first-child,
.affib-rates-cal-table tbody th {
	text-align: left;
	font-weight: 400;
	white-space: nowrap;
}

.affib-rates-cal-plan {
	font-size: 0.82em;
	font-weight: 400;
	color: #666;
}

.affib-rates-cal-table td a {
	color: #2271b1;
	text-decoration: underline;
}

.affib-rates-cal-empty {
	color: #9ca3af;
}

/* 土日は日付を色分けして、週末の相場が一目で分かるようにする。 */
.affib-rates-cal-row--sat > th {
	color: #1d6fa5;
}

.affib-rates-cal-row--sun > th {
	color: #c9302c;
}

.affib-rates-cal-updated {
	margin: 12px 0 0;
	color: #767676;
	font-size: 0.78em;
}

@media (max-width: 600px) {
	.affib-rates-cal-summary {
		padding: 14px;
		font-size: 0.92em;
	}

	.affib-rates-cal-body {
		padding: 12px 12px 16px;
	}

	.affib-rates-cal-table th,
	.affib-rates-cal-table td {
		padding: 8px 6px;
	}

	.affib-rates-cal-intro {
		max-width: 100%;
		padding: 12px;
		font-size: 0.85em;
	}
}

/* 編集中だけ見える案内（なぜ表示されないかを書き手に伝える。記事本文には出ない） */
.affib-rates-cal-guide {
	margin: 12px 0;
	padding: 12px 14px;
	background: #fff8e5;
	border: 1px dashed #e0b040;
	border-radius: var(--affib-radius);
	color: #6a4a00;
	font-size: 0.85em;
	line-height: 1.7;
}

/* ==================================================================
   宿泊料金の比較（取得済みの日別料金から自動集計）
   ================================================================== */

.affib-rates-sum {
	max-width: var(--affib-card-max, 640px);
	margin: 1.5em auto;
	box-sizing: border-box;
}

.affib-rates-sum-heading {
	padding: 10px 16px;
	background: var(--affib-header-bg, #1c2b4a);
	border-radius: var(--affib-radius) var(--affib-radius) 0 0;
	color: var(--affib-header-text, #fff);
	font-weight: 700;
}

.affib-rates-sum-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 0.9em;
}

.affib-rates-sum-table th,
.affib-rates-sum-table td {
	padding: 10px;
	border: 1px solid var(--affib-border);
	vertical-align: middle;
	text-align: right;
}

.affib-rates-sum-table thead th {
	background: var(--affib-stripe);
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
}

.affib-rates-sum-table tbody th {
	width: 32%;
	text-align: left;
	font-weight: 700;
	line-height: 1.5;
}

/* 最安値の列：金額を大きく、日付をその下に小さく。 */
.affib-rates-sum-price {
	display: block;
	color: #c9302c;
	font-weight: 700;
	font-size: 1.1em;
	white-space: nowrap;
}

.affib-rates-sum-date {
	display: block;
	color: #6b7280;
	font-size: 0.78em;
}

.affib-rates-sum-row--best > th,
.affib-rates-sum-row--best > td {
	background: #fffaf0;
}

.affib-rates-sum-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #d81b3f;
	color: #fff;
	font-size: 0.72em;
	font-weight: 700;
	white-space: nowrap;
}

.affib-rates-sum-cta .affib-btn {
	width: 100%;
	padding: 10px;
	font-size: 0.82em;
}

.affib-rates-sum-note {
	margin: 6px 0 0;
	color: #767676;
	font-size: 0.78em;
	line-height: 1.6;
}

@media (max-width: 600px) {
	/* スマホでは「平日の目安」を隠し、最安値と週末料金に絞る。 */
	.affib-rates-sum-table th:nth-child(3),
	.affib-rates-sum-table td:nth-child(3) {
		display: none;
	}

	.affib-rates-sum-table th,
	.affib-rates-sum-table td {
		padding: 8px 6px;
	}

	.affib-rates-sum-table tbody th {
		width: 38%;
		font-size: 0.95em;
	}
}

/* ==================================================================
   共通：見出しセルの文字色とレスポンシブ
   テーマ側が th に白文字などを当てていると、薄い背景の見出しが読めなくなる。
   ブロック内の表は必ず自前の文字色を指定して、どのテーマでも読めるようにする。
   ================================================================== */

.affib-card-table th,
.affib-compare th,
.affib-cv2 th,
.affib-hotelinfo-table th,
.affib-rates-table th,
.affib-rates-sum-table th,
.affib-rates-cal-table th,
.affib-rates-cal-table thead th {
	color: var(--affib-th-text, #333);
}

/* 見出し行（背景色付き）は特に読みづらくなりやすいので、背景と文字色をセットで固定する。 */
.affib-compare thead th,
.affib-hotelinfo-table th,
.affib-rates-table thead th,
.affib-rates-sum-table thead th,
.affib-card-table th {
	background: var(--affib-stripe);
	color: var(--affib-th-text, #333);
}

/* 濃い背景の見出し（紺色のバー）は白文字のまま。上の指定に負けないよう個別に戻す。 */
.affib-hotelinfo-heading,
.affib-rates-heading,
.affib-rates-sum-heading,
.affib-rates-cal-summary,
.affib-rates-cal-summary .affib-rates-cal-title {
	color: var(--affib-header-text, #fff);
}

/* 表がはみ出すときは、その表だけ横スクロールさせる（ページ全体を横に揺らさない）。 */
.affib-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* 画像・埋め込みが親からはみ出さないようにする（全ブロック共通の保険）。 */
.affib-card,
.affib-list,
.affib-rates-cal,
.affib-rates-sum,
.affib-hotelinfo,
.affib-hotelcards,
.affib-ranking,
.affib-siteintro {
	max-width: 100%;
}

.affib-card img,
.affib-list img,
.affib-hotelinfo img,
.affib-hotelcards img,
.affib-ranking img {
	max-width: 100%;
	height: auto;
}

@media (max-width: 600px) {
	/* ---- 宿泊料金の比較：狭い画面では表を1件ずつのカードに組み替える ----
	   横スクロールさせるより、項目名を各行の左に出すほうが読みやすいため。 */
	.affib-rates-sum-table,
	.affib-rates-sum-table tbody,
	.affib-rates-sum-table tr,
	.affib-rates-sum-table th,
	.affib-rates-sum-table td {
		display: block;
		width: auto;
	}

	.affib-rates-sum-table thead {
		display: none;
	}

	.affib-rates-sum-table tr {
		margin-bottom: 12px;
		border: 1px solid var(--affib-border);
		border-radius: var(--affib-radius);
		overflow: hidden;
	}

	.affib-rates-sum-table tbody th {
		width: auto;
		background: var(--affib-stripe);
		border: 0;
		text-align: left;
	}

	.affib-rates-sum-table td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		border: 0;
		border-top: 1px solid var(--affib-border);
		text-align: right;
	}

	/* 項目名（data-label）を各行の左に出す。 */
	.affib-rates-sum-table td::before {
		content: attr(data-label);
		flex: 0 0 auto;
		color: #666;
		font-size: 0.88em;
		font-weight: 600;
	}

	/* スマホでは列を隠さず、すべての項目をカード内に表示する。 */
	.affib-rates-sum-table th:nth-child(3),
	.affib-rates-sum-table td:nth-child(3) {
		display: flex;
	}

	.affib-rates-sum-price {
		display: inline;
		font-size: 1.15em;
	}

	.affib-rates-sum-date {
		display: inline;
		margin-left: 6px;
	}

	.affib-rates-sum-cta {
		display: block;
	}

	.affib-rates-sum-cta::before {
		content: none;
	}

	.affib-rates-sum-cta .affib-btn {
		font-size: 0.9em;
	}
}

/* ==================================================================
   宿泊価格カレンダー：月のマス目表示（カレンダーそのままの見た目）
   ================================================================== */

.affib-cal {
	margin-bottom: 18px;
}

.affib-cal-month {
	margin-bottom: 6px;
	font-weight: 700;
	font-size: 1.02em;
}

/* 日〜土の7列。マス目の高さは中身に合わせつつ、最低限そろえる。 */
.affib-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1px;
	background: var(--affib-border);
	border: 1px solid var(--affib-border);
	border-radius: var(--affib-radius);
	overflow: hidden;
}

.affib-cal-head {
	padding: 6px 2px;
	background: var(--affib-stripe);
	color: var(--affib-th-text, #333);
	text-align: center;
	font-size: 0.78em;
	font-weight: 700;
}

.affib-cal-head--sun {
	color: #c9302c;
}

.affib-cal-head--sat {
	color: #1d6fa5;
}

.affib-cal-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 2px;
	min-height: 56px;
	padding: 4px 2px;
	background: #fff;
}

/* 取得対象の期間から外れた日（先月ぶん・期間の後ろ）は薄く。 */
.affib-cal-cell--blank,
.affib-cal-cell--out {
	background: #fafbfc;
}

.affib-cal-day {
	font-size: 0.78em;
	color: #555;
	line-height: 1.2;
}

.affib-cal-cell--sun .affib-cal-day {
	color: #c9302c;
}

.affib-cal-cell--sat .affib-cal-day {
	color: #1d6fa5;
}

/* 今日のマスは丸で囲む（カレンダーらしい目印）。 */
.affib-cal-cell--today .affib-cal-day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1a73e8;
	color: #fff;
	font-weight: 700;
}

.affib-cal-price {
	font-size: 0.74em;
	font-weight: 700;
	line-height: 1.2;
	color: #1a4f8a;
	text-decoration: none;
	word-break: keep-all;
}

a.affib-cal-price:hover {
	text-decoration: underline;
}

.affib-cal-none {
	font-size: 0.72em;
	color: #b8bec7;
}

/* 価格の安さで背景を4段階に塗り分ける（その施設・その期間の中での相対評価）。 */
.affib-cal-cell--lv1 { background: #e3f4e6; }
.affib-cal-cell--lv2 { background: #f2faf1; }
.affib-cal-cell--lv3 { background: #fff8ec; }
.affib-cal-cell--lv4 { background: #fdeceb; }

.affib-cal-cell--lv1 .affib-cal-price { color: #1c6b32; }
.affib-cal-cell--lv4 .affib-cal-price { color: #a5322c; }

.affib-cal-legend {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 4px;
	font-size: 0.72em;
	color: #666;
}

.affib-cal-legend-item {
	display: inline-block;
	min-width: 44px;
	padding: 3px 6px;
	border: 1px solid var(--affib-border);
	border-radius: 3px;
	text-align: center;
}

.affib-cal-legend-note {
	margin-left: 4px;
}

@media (max-width: 600px) {
	/* スマホでも7列は保つ（カレンダーとして読めることを優先）。文字だけ小さくする。 */
	.affib-cal-cell {
		min-height: 48px;
		padding: 3px 1px;
	}

	.affib-cal-price {
		font-size: 0.62em;
		letter-spacing: -0.02em;
	}

	.affib-cal-day {
		font-size: 0.7em;
	}

	.affib-cal-head {
		font-size: 0.7em;
		padding: 4px 1px;
	}

	.affib-cal-legend-note {
		flex: 1 1 100%;
		margin-left: 0;
	}
}
