/* ==========================================================
   TIMELESS 予約ボタン枠（8p 確定）
   トマレバ：.cstmreba > .cstmreba_ttl01（ホテル名）＋ .tomarebalink-box
   ベージュ背景・枠なし・写真は角丸・ティールの丸ボタン（中央揃え）
   PC/タブレット：3列　スマホ：2列
   ※色は style.css 冒頭の --hotel-btn-bg（自作プラグイン .hab-btn と共通）
========================================================== */
.post_content .cstmreba {
	--tl-cta-bg: #f7f4ef; --tl-cta-gold: #8c7633; --tl-cta-text: #26211d; --tl-cta-sub: #8a8178;
	display: grid !important; grid-template-columns: 128px minmax(0,1fr); gap: 14px 18px; align-items: center;
	width: 100%; margin: 2.4em 0 !important; padding: 20px 22px !important; box-sizing: border-box;
	background: var(--tl-cta-bg) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
.post_content .cstmreba:not(:has(.tomarebalink-image img)) { grid-template-columns: minmax(0,1fr); }
.post_content .cstmreba .tomarebalink-box,
.post_content .cstmreba .tomarebalink-info { display: contents !important; }
.post_content .cstmreba .booklink-footer,
.post_content .cstmreba .tomarebalink-name,
.post_content .cstmreba .tomarebalink-powered-date,
.post_content .cstmreba .tomarebalink-address { display: none !important; }

/* 写真（トマレバの施設画像） */
.post_content .cstmreba .tomarebalink-image {
	display: block !important; grid-column: 1; grid-row: 1; float: none !important; width: auto !important; margin: 0 !important;
	aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #efebe5;
}
.post_content .cstmreba .tomarebalink-image a,
.post_content .cstmreba .tomarebalink-image img { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; object-fit: cover; }

/* ホテル名＋BEST RATE */
.post_content .cstmreba .cstmreba_ttl01 {
	grid-column: -2; grid-row: 1; display: flex; flex-direction: column; gap: 3px;
	width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
	font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--tl-cta-text); text-align: left;
}
.post_content .cstmreba .cstmreba_ttl01::before {
	content: 'BEST RATE'; display: block; padding-left: 28px;
	font-family: 'Josefin Sans', sans-serif; font-size: 10px; font-weight: 400; letter-spacing: 3px; line-height: 1.6; color: var(--tl-cta-gold);
	background: linear-gradient(var(--tl-cta-gold), var(--tl-cta-gold)) no-repeat left center / 20px 1px;
}
.post_content .cstmreba .cstmreba_ttl01 a { color: inherit !important; text-decoration: none !important; }

/* ボタン */
.post_content .cstmreba .tomarebalink-link1 {
	grid-column: 1 / -1; grid-row: 2; display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px;
	width: 100%; margin: 0 !important;
}
.post_content .cstmreba .tomarebalink-link1 > * { display: block !important; width: auto !important; margin: 0 !important; float: none !important; }
.post_content .cstmreba .tomarebalink-link1 a {
	position: relative; display: flex !important; align-items: center; justify-content: center;
	width: 100% !important; height: 36px; padding: 0 28px !important; margin: 0 !important; box-sizing: border-box;
	background: var(--hotel-btn-bg, #4ea9a9) !important; border: 0 !important; border-radius: 999px !important; box-shadow: none !important;
	color: #fff !important; font-size: 13px; font-weight: 700; line-height: 1 !important; white-space: nowrap; text-align: center; text-decoration: none !important;
	transition: filter .2s, transform .2s;
}
.post_content .cstmreba .tomarebalink-link1 a::before { content: none !important; display: none !important; }
.post_content .cstmreba .tomarebalink-link1 a::after {
	content: '' !important; position: absolute !important; right: 15px !important; left: auto !important; top: 50% !important; bottom: auto !important;
	display: block !important; width: 5px !important; height: 5px !important; margin: -3px 0 0 !important; padding: 0 !important;
	background: none !important; border: 0 !important; border-top: 1.5px solid #fff !important; border-right: 1.5px solid #fff !important;
	transform: rotate(45deg) !important; font-size: 0 !important; line-height: 0 !important;
}
.post_content .cstmreba .tomarebalink-link1 a:hover { filter: brightness(.92); transform: translateY(-1px); text-decoration: none !important; }

@media (max-width: 959px) {
	.post_content .cstmreba .tomarebalink-link1 a { height: 40px; }
}
@media (max-width: 599px) {
	.post_content .cstmreba { grid-template-columns: 96px minmax(0,1fr); gap: 12px; padding: 16px !important; }
	.post_content .cstmreba .cstmreba_ttl01 { font-size: 14px; }
	.post_content .cstmreba .cstmreba_ttl01::before { font-size: 9px; }
	.post_content .cstmreba .tomarebalink-link1 { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.post_content .cstmreba .tomarebalink-link1 a { font-size: 12px; padding: 0 24px !important; }
}

/* 枠内のその他の要素（記事側で書いた補足文など）は全幅で、ボタンの下に */
.post_content .cstmreba > *:not(.tomarebalink-box):not(.cstmreba_ttl01),
.post_content .cstmreba .tomarebalink-info > *:not(.tomarebalink-link1):not(.tomarebalink-name):not(.tomarebalink-powered-date):not(.tomarebalink-address):not(.cstmreba_ttl01),
.post_content .cstmreba .tomarebalink-box > *:not(.tomarebalink-image):not(.tomarebalink-info):not(.cstmreba_ttl01) {
	grid-column: 1 / -1 !important; grid-row: auto !important; width: auto !important; max-width: none !important; float: none !important;
	margin: 0 !important; padding: 0 !important; font-size: 13px; line-height: 1.8; color: var(--tl-cta-sub); text-align: left;
}
.post_content .cstmreba > p:empty, .post_content .cstmreba > br { display: none !important; }

/* ホテル名はどの階層にあっても写真の右・1行目に */
.post_content .cstmreba .cstmreba_ttl01 { grid-column: -2 !important; grid-row: 1 !important; font-size: 16px !important; color: var(--tl-cta-text) !important; }
.post_content .cstmreba:not(:has(.tomarebalink-image img)) .cstmreba_ttl01 { grid-column: 1 / -1 !important; }
@media (max-width: 599px) { .post_content .cstmreba .cstmreba_ttl01 { font-size: 14px !important; } }

/* ホテル名（.cstmreba_ttl01）がない枠：トマレバのホテル名を写真の右に表示 */
.post_content .cstmreba:not(:has(.cstmreba_ttl01)) .tomarebalink-name {
	display: flex !important; flex-direction: column; gap: 3px; grid-column: -2; grid-row: 1;
	margin: 0 !important; padding: 0 !important; font-size: 16px !important; font-weight: 700; line-height: 1.5; text-align: left; color: var(--tl-cta-text);
}
.post_content .cstmreba:not(:has(.cstmreba_ttl01)) .tomarebalink-name::before {
	content: 'BEST RATE'; display: block; padding-left: 28px;
	font-family: 'Josefin Sans', sans-serif; font-size: 10px; font-weight: 400; letter-spacing: 3px; line-height: 1.6; color: var(--tl-cta-gold);
	background: linear-gradient(var(--tl-cta-gold), var(--tl-cta-gold)) no-repeat left center / 20px 1px;
}
.post_content .cstmreba:not(:has(.cstmreba_ttl01)) .tomarebalink-name a { color: inherit !important; text-decoration: none !important; }
.post_content .cstmreba:not(:has(.cstmreba_ttl01)) .tomarebalink-name .tomarebalink-powered-date { display: none !important; }
.post_content .cstmreba:not(:has(.cstmreba_ttl01)):not(:has(.tomarebalink-image img)) .tomarebalink-name { grid-column: 1 / -1; }
@media (max-width: 599px) { .post_content .cstmreba:not(:has(.cstmreba_ttl01)) .tomarebalink-name { font-size: 14px !important; } }

/* 文字サイズの底上げ */
@media (max-width: 599px) {
	.post_content .cstmreba .cstmreba_ttl01::before,
	.post_content .cstmreba:not(:has(.cstmreba_ttl01)) .tomarebalink-name::before { font-size: 10px !important; }
	.post_content .cstmreba .tomarebalink-link1 a { font-size: 13px !important; }
}
