/*
 * /wh/canada/hiyou/（カナダのワーホリの費用）だけの見た目
 * 2026-10-18 追加・マキ → 同日 エンジが「明細書」の見た目に作り直し（Ryoさんが案A を選択。案の一覧＝engineering/lp/canada-hiyou-2026-10-18/案3つ.html）
 * 金額を明細の形（点線の先に金額・合計は二重線）で並べる。色は協会サイトの紺と赤。書体は足さない（表示を重くしないため）
 * 共通の CSS が p・h2 に大きさや飾りを付けているため、ところどころ !important で打ち消している
 */
.ca-hiyou {
  --cah-ink: #1b2333;
  --cah-sub: #5a6476;
  --cah-navy: #0c1f5c;
  --cah-red: #c8202f;
  --cah-paper: #fffdf8;
  --cah-line: #d9dde5;
  --cah-dot: #9aa3b2;
  --cah-tint: #f3f5f9;
  color: var(--cah-ink);
}
.ca-hiyou .cah { max-width: 760px; margin: 0 auto; padding: 8px 4px 24px; font-size: 16px; line-height: 1.9; font-variant-numeric: tabular-nums; }
.ca-hiyou .cah p { margin: 0 0 12px; font-size: 16px !important; line-height: 1.9 !important; }
.ca-hiyou .cah a { color: var(--cah-navy); }
.ca-hiyou .cah a:focus-visible { outline: 3px solid var(--cah-red); outline-offset: 2px; }
.ca-hiyou .cah .cah-source, .ca-hiyou .cah .cah-small { font-size: 12px !important; line-height: 1.7 !important; color: var(--cah-sub); }

/* ===== 最初の画面 ===== */
.ca-hiyou .cah-hero { padding: 18px 0 6px; margin-bottom: 24px; }
.ca-hiyou .cah .cah-kicker { color: var(--cah-red); font-size: 13px !important; font-weight: 700; margin: 0 0 2px; }
.ca-hiyou .cah-title { margin: 0 0 12px !important; padding: 0 !important; border: none !important; background: none !important; color: var(--cah-navy) !important; font-size: 26px !important; line-height: 1.45 !important; font-weight: 700 !important; }

/* 明細：上の辺は切り取り線のぎざぎざ。合計は二重線 */
.ca-hiyou .cah-bill { position: relative; margin: 26px 0 10px; padding: 18px 20px 14px; background: var(--cah-paper); border: 1px solid var(--cah-ink); }
.ca-hiyou .cah-bill::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 8px; background: radial-gradient(circle at 6px -2px, #fff 5px, transparent 5.5px) 0 0 / 12px 8px repeat-x; }
.ca-hiyou .cah .cah-bill-head { display: flex; justify-content: space-between; margin: 0 !important; padding: 0 64px 8px 0; border-bottom: 1px solid var(--cah-ink); font-size: 12px !important; color: var(--cah-sub); }
.ca-hiyou .cah-rows { list-style: none; margin: 0; padding: 4px 0; }
.ca-hiyou .cah-rows li, .ca-hiyou .cah .cah-bill-year { display: flex; align-items: baseline; gap: 8px; margin: 0 !important; padding: 7px 0; font-size: 15px !important; line-height: 1.5 !important; }
.ca-hiyou .cah-rows li i { flex: 1; min-width: 12px; border-bottom: 1.5px dotted var(--cah-dot); transform: translateY(-4px); }
.ca-hiyou .cah-rows li b { white-space: nowrap; }
.ca-hiyou .cah .cah-bill-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 4px 0 0 !important; padding-top: 10px; border-top: 3px double var(--cah-ink); font-size: 14px !important; font-weight: 700; line-height: 1.4 !important; }
.ca-hiyou .cah-bill-sum b { font-size: 32px; color: var(--cah-navy); letter-spacing: .02em; white-space: nowrap; }
.ca-hiyou .cah .cah-bill-year { margin-top: 14px !important; padding-top: 12px; border-top: 1px solid var(--cah-line); justify-content: space-between; font-weight: 700; }
.ca-hiyou .cah-bill-year b { font-size: 24px; color: var(--cah-red); white-space: nowrap; }
.ca-hiyou .cah .cah-bill-note { margin: 2px 0 0 !important; font-size: 13px !important; line-height: 1.6 !important; color: var(--cah-sub); }
.ca-hiyou .cah-stamp { position: absolute; right: -10px; top: -34px; width: 78px; height: 78px; display: grid; place-items: center; text-align: center; border: 2px solid var(--cah-red); border-radius: 50%; background: rgba(255,253,248,.92); color: var(--cah-red); font-size: 11px; font-weight: 700; line-height: 1.3; transform: rotate(-12deg); opacity: .85; }

/* ===== 目次 ===== */
.ca-hiyou .cah-toc { margin: 0 0 34px; padding: 14px 18px; border-top: 1px solid var(--cah-ink); border-bottom: 1px solid var(--cah-ink); }
.ca-hiyou .cah .cah-toc-title { margin: 0 0 4px !important; font-size: 12px !important; color: var(--cah-sub); font-weight: 700; letter-spacing: .1em; }
.ca-hiyou .cah-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.ca-hiyou .cah-toc li { counter-increment: toc; display: flex; gap: 10px; margin: 0; padding: 5px 0; font-size: 15px; border-bottom: 1px dotted var(--cah-dot); }
.ca-hiyou .cah-toc li:last-child { border-bottom: 0; }
.ca-hiyou .cah-toc li::before { content: counter(toc); width: 1.2em; color: var(--cah-red); font-weight: 700; }
.ca-hiyou .cah-toc a { text-decoration: none; }
.ca-hiyou .cah-toc a:hover { text-decoration: underline; }

/* ===== 章 ===== */
.ca-hiyou .cah-sec { margin: 0 0 40px; scroll-margin-top: 16px; }
/* 共通の CSS が h2 を回り込み（float）にしているので外す。外さないと次の行が見出しの横に回り込む（よくある質問の1問目の Q が右端に飛んだ） */
.ca-hiyou .cah-sec h2 { float: none !important; clear: both; margin: 0 0 14px !important; padding: 0 0 8px !important; border: none !important; border-bottom: 3px double var(--cah-navy) !important; background: none !important; color: var(--cah-navy) !important; font-size: 21px !important; line-height: 1.5 !important; font-weight: 700 !important; }
.ca-hiyou .cah-sec h3 { margin: 18px 0 4px; font-size: 16px; color: var(--cah-ink); font-weight: 700; }

/* 表：明細と同じ点線の行・合計は二重線 */
.ca-hiyou .cah-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 15px; background: var(--cah-paper); }
.ca-hiyou .cah-table th, .ca-hiyou .cah-table td { padding: 9px 10px; border: 0; border-bottom: 1px dotted var(--cah-dot); text-align: left; }
.ca-hiyou .cah-table thead th { border-bottom: 1px solid var(--cah-ink); background: none; color: var(--cah-sub); font-size: 12px; font-weight: 700; }
.ca-hiyou .cah-table td:not(:first-child), .ca-hiyou .cah-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.ca-hiyou .cah-table .cah-total td { font-weight: 700; border-top: 0; border-bottom: 3px double var(--cah-ink); }
.ca-hiyou .cah-table .cah-total td:last-child { color: var(--cah-navy); font-size: 17px; }
/* 見積もり：収入は引く行（赤）、最後の差し引きは大きく */
.ca-hiyou .cah-table .cah-minus td:last-child { color: var(--cah-red); font-weight: 700; }
.ca-hiyou .cah-table .cah-final td { padding-top: 14px; padding-bottom: 14px; }
.ca-hiyou .cah-table .cah-final td:last-child { color: var(--cah-red); font-size: 22px; }
/* 相談の見出し：句の途中で折れないように（「変わりま／す。」になっていた） */
.ca-hiyou .cah-cta-lead span { display: inline-block; }

/* 出発前に用意するお金：3つを明細の行のように */
.ca-hiyou .cah-list { margin: 4px 0 14px; }
.ca-hiyou .cah-list > div { padding: 10px 0 10px 14px; border-left: 3px solid var(--cah-navy); margin-bottom: 10px; background: linear-gradient(90deg, var(--cah-tint), transparent); }
.ca-hiyou .cah-list dt { font-weight: 700; color: var(--cah-navy); }
.ca-hiyou .cah-list dd { margin: 2px 0 0; font-size: 15px; }

/* 最低時給：数字を大きく */
.ca-hiyou .cah .cah-wage { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 4px 0 14px !important; padding: 14px 18px; background: var(--cah-paper); border: 1px solid var(--cah-ink); font-size: 13px !important; line-height: 1.4 !important; color: var(--cah-sub); }
.ca-hiyou .cah-wage span:first-child { flex-basis: 100%; font-weight: 700; color: var(--cah-ink); }
.ca-hiyou .cah-wage b { font-size: 36px; color: var(--cah-navy); line-height: 1.1; }
.ca-hiyou .cah-wage b small { font-size: 14px; margin-left: 4px; }

.ca-hiyou .cah-points { margin: 0; padding: 0; list-style: none; }
.ca-hiyou .cah-points li { position: relative; margin: 0; padding: 8px 0 8px 28px; border-bottom: 1px dotted var(--cah-dot); }
.ca-hiyou .cah-points li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px; border-left: 2.5px solid var(--cah-red); border-bottom: 2.5px solid var(--cah-red); transform: rotate(-45deg); }

/* よくある質問 */
.ca-hiyou .cah-faq h3 { margin: 20px 0 6px; padding-left: 28px; text-indent: -28px; color: var(--cah-navy); }
.ca-hiyou .cah-faq h3::before { content: "Q"; display: inline-block; width: 28px; text-indent: 0; color: var(--cah-red); font-size: 18px; }
.ca-hiyou .cah-faq p { padding-left: 28px; }

/* 1年の出費の内訳の帯 */
.ca-hiyou .cah-bar { margin: 16px 0 12px; }
.ca-hiyou .cah-bar figcaption { font-weight: 700; font-size: 14px; color: var(--cah-navy); margin-bottom: 6px; }
.ca-hiyou .cah-bar-track { display: flex; height: 40px; overflow: hidden; border: 1px solid var(--cah-ink); transform-origin: left center; }
.ca-hiyou .cah-seg { display: flex; align-items: center; justify-content: center; gap: 4px; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; }
.ca-hiyou .cah-seg b { font-weight: 700; }
.ca-hiyou .cah-seg-life { background: var(--cah-navy); }
.ca-hiyou .cah-seg-school { background: #3d5a9e; }
.ca-hiyou .cah-seg-ins { background: #8ea0cb; }
.ca-hiyou .cah-seg-air { background: #c3cde4; color: var(--cah-ink); }
.ca-hiyou .cah-seg-visa { background: var(--cah-red); }
.ca-hiyou .cah .cah-bar-legend { font-size: 12px !important; color: var(--cah-sub); margin: 6px 0 0 !important; }
.ca-hiyou .cah-bar-legend .k { display: inline-block; width: 10px; height: 10px; margin-right: 3px; vertical-align: -1px; }
.ca-hiyou .k-ins { background: #8ea0cb; } .ca-hiyou .k-air { background: #c3cde4; } .ca-hiyou .k-visa { background: var(--cah-red); }

/* 相談 */
.ca-hiyou .cah-cta { margin: 12px 0 8px; padding: 26px 22px; background: var(--cah-navy); color: #fff; text-align: center; }
.ca-hiyou .cah .cah-cta p { color: #fff; }
.ca-hiyou .cah .cah-cta-lead { font-weight: 700; font-size: 17px !important; }
.ca-hiyou .cah-btn { display: inline-block; margin: 8px 0 12px; padding: 15px 28px; background: var(--cah-red); color: #fff !important; font-weight: 700; text-decoration: none; transition: transform .2s; }
.ca-hiyou .cah-btn:hover { transform: translateY(-2px); background: #a91a27; }
.ca-hiyou .cah .cah-cta-sub { font-size: 14px !important; margin: 0 !important; }
.ca-hiyou .cah .cah-cta-sub a { color: #fff; }

/* ===== 動き（JS が html に cah-motion を付けたときだけ。JS が無くても全部見える） ===== */
.cah-motion .ca-hiyou .cah-rows li,
.cah-motion .ca-hiyou .cah-bill-sum,
.cah-motion .ca-hiyou .cah-bill-year,
.cah-motion .ca-hiyou .cah-bill-note,
.cah-motion .ca-hiyou .cah-list > div,
.cah-motion .ca-hiyou .cah-table tbody tr { opacity: 0; transform: translateY(10px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.cah-motion .ca-hiyou .is-in .cah-rows li,
.cah-motion .ca-hiyou .is-in .cah-bill-sum,
.cah-motion .ca-hiyou .is-in .cah-bill-year,
.cah-motion .ca-hiyou .is-in .cah-bill-note,
.cah-motion .ca-hiyou .is-in > div,
.cah-motion .ca-hiyou .cah-table.is-in tbody tr { opacity: 1; transform: none; }
.cah-motion .ca-hiyou .cah-rows li:nth-child(2), .cah-motion .ca-hiyou .cah-list > div:nth-child(2), .cah-motion .ca-hiyou .cah-table tbody tr:nth-child(2) { transition-delay: .1s; }
.cah-motion .ca-hiyou .cah-rows li:nth-child(3), .cah-motion .ca-hiyou .cah-list > div:nth-child(3), .cah-motion .ca-hiyou .cah-table tbody tr:nth-child(3) { transition-delay: .2s; }
.cah-motion .ca-hiyou .cah-rows li:nth-child(4), .cah-motion .ca-hiyou .cah-table tbody tr:nth-child(4) { transition-delay: .3s; }
.cah-motion .ca-hiyou .cah-table tbody tr:nth-child(5) { transition-delay: .4s; }
.cah-motion .ca-hiyou .cah-table tbody tr:nth-child(6) { transition-delay: .5s; }
.cah-motion .ca-hiyou .cah-table tbody tr:nth-child(7) { transition-delay: .6s; }
.cah-motion .ca-hiyou .cah-table tbody tr:nth-child(8) { transition-delay: .7s; }
.cah-motion .ca-hiyou .cah-bill-sum { transition-delay: .45s; }
.cah-motion .ca-hiyou .cah-bill-year { transition-delay: .6s; }
.cah-motion .ca-hiyou .cah-bill-note { transition-delay: .7s; }
/* 印は最後に、少し大きいところから押される */
.cah-motion .ca-hiyou .cah-stamp { opacity: 0; transform: rotate(-12deg) scale(1.7); transition: transform .45s cubic-bezier(.3,1.6,.5,1) 1s, opacity .25s 1s; }
.cah-motion .ca-hiyou .is-in .cah-stamp { opacity: .85; transform: rotate(-12deg); }
/* 帯は左から伸びる。最低時給は数字がふわっと */
.cah-motion .ca-hiyou .cah-bar-track { transform: scaleX(0); transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.cah-motion .ca-hiyou .cah-bar.is-in .cah-bar-track { transform: none; }
.cah-motion .ca-hiyou .cah-wage b { display: inline-block; opacity: 0; transform: translateY(12px); transition: opacity .8s cubic-bezier(.16,1,.3,1) .1s, transform .8s cubic-bezier(.16,1,.3,1) .1s; }
.cah-motion .ca-hiyou .cah-wage.is-in b { opacity: 1; transform: none; }

/* ===== スマホ ===== */
@media (max-width: 767px) {
  .ca-hiyou .cah { font-size: 15px; padding: 4px 2px 20px; }
  .ca-hiyou .cah p { font-size: 15px !important; }
  .ca-hiyou .cah-title { font-size: 22px !important; }
  .ca-hiyou .cah-bill { padding: 16px 14px 12px; margin-top: 30px; }
  .ca-hiyou .cah-rows li, .ca-hiyou .cah .cah-bill-year { font-size: 14px !important; }
  .ca-hiyou .cah-bill-sum b { font-size: 28px; }
  .ca-hiyou .cah-bill-year b { font-size: 21px; }
  .ca-hiyou .cah-stamp { width: 66px; height: 66px; font-size: 10px; right: -4px; top: -30px; }
  .ca-hiyou .cah-sec h2 { font-size: 19px !important; }
  .ca-hiyou .cah-table { font-size: 14px; }
  .ca-hiyou .cah-table th, .ca-hiyou .cah-table td { padding: 8px 6px; }
  .ca-hiyou .cah-wage b { font-size: 30px; }
  .ca-hiyou .cah-seg { font-size: 11px; }
  .ca-hiyou .cah-seg-ins b, .ca-hiyou .cah-seg-air b { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ca-hiyou * { transition: none !important; }
}
