/* 2026-11-01 マキ：/ryugaku/ryugaku_hiyou（語学留学の費用）だけの見た目。土台は協会の費用ページの ca-hiyou.css。ここでは横棒グラフと2つの表だけ足す */

/* 国別の総額の横棒グラフ。数字は文字のまま（検索・AI にも読まれる）。棒は色の帯だけ */
.ca-hiyou .rh-hbar { margin: 18px 0 22px; padding: 16px 18px 12px; background: var(--cah-paper); border: 1px solid var(--cah-line); }
.ca-hiyou .rh-hbar figcaption { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--cah-sub); }
.ca-hiyou .rh-hbar ol { list-style: none; margin: 0 !important; padding: 0 !important; }
.ca-hiyou .rh-hbar li { display: grid; grid-template-columns: 8.5em 1fr 7.5em; align-items: center; gap: 10px; margin: 0 0 8px !important; padding: 0 !important; background: none !important; font-size: 14px; line-height: 1.4; }
.ca-hiyou .rh-hbar-name { font-weight: 700; color: var(--cah-ink); }
.ca-hiyou .rh-hbar-track { position: relative; height: 14px; background: var(--cah-tint); border-radius: 2px; overflow: hidden; }
.ca-hiyou .rh-hbar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #6d7a96; border-radius: 2px; transition: transform .9s cubic-bezier(.2, .7, .2, 1); transform-origin: left center; }
.ca-hiyou .rh-hbar-fill.rh-low { background: var(--cah-navy); }
.ca-hiyou .rh-hbar-fill.rh-high { background: var(--cah-red); }
.ca-hiyou .rh-hbar b { text-align: right; font-variant-numeric: tabular-nums; color: var(--cah-ink); white-space: nowrap; }
.ca-hiyou .rh-hbar b small { margin-left: 2px; font-size: 11px; font-weight: 400; color: var(--cah-sub); }
.cah-motion .ca-hiyou .rh-hbar:not(.is-in) .rh-hbar-fill { transform: scaleX(0); }

/* 早見表：数字を折らない */
.ca-hiyou .rh-quick td { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.ca-hiyou .rh-quick td small, .ca-hiyou .rh-quick th small { display: inline-block; font-size: 11px; font-weight: 400; color: var(--cah-sub); white-space: normal; }
.ca-hiyou .rh-quick thead th { text-align: center; }
.ca-hiyou .rh-quick tbody th { text-align: left; font-weight: 700; }
.ca-hiyou .rh-country small { font-size: 11.5px; color: var(--cah-sub); }
/* 国別の表（PC）：費用ページの表は「2列目以降は折り返さず右寄せ」なので、文の入るこの表だけ折り返して左寄せにする */
.ca-hiyou .cah-table.rh-country td, .ca-hiyou .cah-table.rh-country td:not(:first-child), .ca-hiyou .cah-table.rh-country th:not(:first-child) { white-space: normal; text-align: left; vertical-align: top; }
.ca-hiyou .rh-country tbody th { white-space: nowrap; font-weight: 700; vertical-align: top; }
.ca-hiyou .rh-country thead th:nth-child(2), .ca-hiyou .rh-country thead th:nth-child(3) { width: 7.5em; }

@media (max-width: 640px) {
	.ca-hiyou .rh-hbar { padding: 12px 12px 8px; }
	.ca-hiyou .rh-hbar li { grid-template-columns: 1fr 6.8em; grid-template-areas: "name num" "bar bar"; gap: 2px 8px; font-size: 13.5px; }
	.ca-hiyou .rh-hbar-name { grid-area: name; }
	.ca-hiyou .rh-hbar b { grid-area: num; }
	.ca-hiyou .rh-hbar-track { grid-area: bar; height: 10px; }
	.ca-hiyou .rh-quick td, .ca-hiyou .rh-quick th { padding: 8px 5px !important; font-size: 13px !important; }

	/* 国別の表：国ごとのカード */
	.ca-hiyou .rh-country thead { display: none; }
	.ca-hiyou .rh-country, .ca-hiyou .rh-country tbody, .ca-hiyou .rh-country tr { display: block; width: 100%; }
	.ca-hiyou .rh-country tr { margin: 0 0 14px; border: 1px solid var(--cah-line); }
	.ca-hiyou .rh-country th[scope="row"] { display: block; background: var(--cah-navy); color: #fff; border: none; padding: 8px 12px; }
	.ca-hiyou .rh-country td { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; border: none; border-top: 1px solid var(--cah-line); padding: 8px 12px; text-align: left; }
	.ca-hiyou .rh-country td::before { content: attr(data-label); font-weight: 700; color: var(--cah-navy); }
}

/* 題名が2行になると、サイト共通の見出しの高さの指定で次の文と重なる（11/1 Ryoさん「デザインが壊れている」）→ 高さを外す */
.ca-hiyou .cah-title { height: auto !important; }

/* 冒頭の国比べ（/hiyou.html の hy-compare）：国が7つ・名前が長い（ニュージーランド）ので名前の列を広げ、金額を少し小さくする */
.ca-hiyou .hy .hy-crow { grid-template-columns: 9.5em 1fr auto; }
.ca-hiyou .hy .hy-cname { font-size: 16px; white-space: nowrap; }
.ca-hiyou .hy .hy-camt { font-size: 22px; }
@media (max-width: 640px) { .ca-hiyou .hy .hy-crow { grid-template-columns: 1fr auto; } }

/* 費用を抑える5つの方法（11/1 Ryoさん「みんな気になるところだからもっと目立つ感じで」）：必要な費用のすぐ後ろに置き、色のついた枠で囲む */
.ca-hiyou .cah-sec.rh-save { margin: 34px 0; padding: 22px 24px 10px; background: #fff8e8; border: 2px solid #e0a100; border-radius: 12px; }
.ca-hiyou .cah-sec.rh-save h2 { margin-top: 0 !important; border-bottom-color: #e0a100 !important; }
.ca-hiyou .cah .rh-save-lead { margin: 0 0 14px !important; font-size: 16px !important; font-weight: 700; color: var(--cah-ink); }
.ca-hiyou .rh-save .hy-tips li { background: #fff; border-radius: 8px; padding-top: 12px !important; padding-bottom: 12px !important; margin-bottom: 10px !important; }
.ca-hiyou .cah a.rh-save-jump { display: block; margin: 14px 0 6px; padding: 12px 16px; background: #fff8e8; border: 2px solid #e0a100; border-radius: 10px; color: var(--cah-ink) !important; font-weight: 700; text-decoration: none !important; text-align: center; }
.ca-hiyou .cah a.rh-save-jump::after { content: " ↓"; color: #b97f00; }
.ca-hiyou .cah a.rh-save-jump:hover { background: #ffefcc; }
@media (max-width: 640px) { .ca-hiyou .cah-sec.rh-save { padding: 16px 14px 6px; } }
.ca-hiyou .rh-save .hy-tips li { padding-left: 56px !important; padding-right: 14px !important; border-bottom: none; }
.ca-hiyou .rh-save .hy-tips li::before { left: 12px; top: 14px; background: #e0a100; border-radius: 50%; }
