/*
 * eSIMポータル 診断・比較
 * - クラス名はすべて epf- で始める（サイトの追加CSSと衝突させない）
 * - テーマのCSSに負けないよう、先頭に .epf を重ねて書いている
 * - ブランドカラーはオレンジ（#ff8c00）。選択中と主要ボタンにだけ使う
 */

.epf {
  box-sizing: border-box;
  margin: 24px 0;
  padding: 0;
  color: #1a1a1a;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  letter-spacing: normal;
  -webkit-text-size-adjust: 100%;
}
.epf *, .epf *::before, .epf *::after { box-sizing: border-box; }
.epf.epf a { color: #1a1a1a; text-decoration: underline; }
.epf.epf a:hover { color: #a85400; }
.epf.epf img { max-width: 100%; height: auto; border: 0; box-shadow: none; }
.epf.epf button, .epf.epf select, .epf.epf input { font: inherit; color: inherit; }
.epf.epf strong { color: inherit; background: none; font-weight: 700; }
.epf.epf summary { color: #1a1a1a; font-size: 13px; }
.epf.epf label { color: inherit; font-weight: inherit; }

/* ---------- 見出し・説明 ---------- */
.epf .epf-title { margin: 0 0 6px; padding: 0; border: 0; background: none; font-size: 20px; line-height: 1.4; font-weight: 700; color: #1a1a1a; }
.epf .epf-title--s { margin: 2px 0 4px; font-size: 18px; }
.epf .epf-h { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 700; }
.epf .epf-lead { margin: 0 0 14px; font-size: 13px; color: #555555; }
.epf .epf-fine { margin: 0; font-size: 12px; line-height: 1.6; color: #555555; }
.epf .epf-meta { font-size: 12px; color: #555555; }
.epf .epf-dim { color: #555555; }
.epf .epf-sub { font-weight: 400; color: #555555; }
.epf.epf-empty, .epf .epf-empty, .epf .epf-none { padding: 14px 16px; border: 1px solid #c8c8c8; background: #fafafa; font-size: 13px; }

/* ---------- フォーム ---------- */
.epf .epf-form { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 16px; border: 1px solid #c8c8c8; border-top: 3px solid #ff8c00; background: #fafafa; }
.epf .epf-form__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.epf .epf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.epf .epf-field--inline { flex-direction: row; align-items: baseline; gap: 12px; }
.epf .epf-label { display: block; margin: 0; font-size: 13px; font-weight: 700; line-height: 1.5; color: #1a1a1a; }
.epf .epf-fixed { font-size: 16px; }
/* ラベルの右に置く、計算ツールを開く小さなボタン（文字リンクの見た目。押せる範囲だけ、まわりに広げてある） */
.epf .epf-lrow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.epf.epf .epf-calcbtn {
  position: relative; flex: 0 0 auto; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
  font-size: 12px; font-weight: 400; line-height: 1.5; color: #1a1a1a; text-decoration: underline; white-space: nowrap; cursor: pointer;
}
.epf .epf-calcbtn::before { content: ''; position: absolute; top: -10px; right: -4px; bottom: -8px; left: -10px; }
.epf.epf .epf-calcbtn:hover { background: none; color: #a85400; }
.epf.epf .epf-calcbtn:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.epf .epf-select { position: relative; }
.epf.epf .epf-select select {
  display: block; width: 100%; height: 48px; margin: 0; padding: 0 36px 0 12px;
  border: 1px solid #888888; border-radius: 4px; box-shadow: none;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 18px 18px;
  font-size: 16px; line-height: 1.2; color: #1a1a1a;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.epf .epf-seg { display: grid; gap: 6px; }
.epf .epf-seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.epf .epf-seg--6 { grid-template-columns: repeat(auto-fit, minmax(42px, 1fr)); }
/* 日数は通常6個。選択肢にない日数（4日など）が加わって7個になったときも、1行に収める */
.epf .epf-seg--6:has(> .epf-chip:nth-child(7)) { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.epf .epf-seg--6:has(> .epf-chip:nth-child(7)) .epf-chip span { padding: 0 2px; white-space: nowrap; }
.epf .epf-seg--prio { grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr) minmax(0, 1fr); }
.epf .epf-seg--prio .epf-chip span { padding: 0 4px; font-size: 13px; }
.epf .epf-chip { position: relative; display: block; margin: 0; padding: 0; cursor: pointer; }
.epf.epf .epf-chip input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.epf .epf-chip span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 6px; border: 1px solid #888888; border-radius: 4px; background: #ffffff;
  font-size: 14px; line-height: 1.3; text-align: center; color: #1a1a1a;
}
.epf .epf-chip input:checked + span { border: 2px solid #ff8c00; background: #fff4e3; font-weight: 700; }
.epf .epf-chip input:focus-visible + span { outline: 2px solid #1a1a1a; outline-offset: 2px; }
/* 2つ選ぶと、残りは選べなくなる（もう一度押して外せば選び直せる） */
.epf .epf-chip.is-off { cursor: default; }
.epf .epf-chip.is-off span { border-color: #cfcfcf; background: #f3f3f3; color: #8a8a8a; }
.epf .epf-form__submit { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: center; }

/* ---------- ボタン ---------- */
.epf.epf .epf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; margin: 0; padding: 0 16px; border: 1px solid #888888; border-radius: 4px; box-shadow: none;
  background: #ffffff; color: #1a1a1a; font-size: 13px; font-weight: 400; line-height: 1.3;
  text-align: center; text-decoration: none; cursor: pointer;
}
.epf.epf .epf-btn:hover { background: #f5f5f5; color: #1a1a1a; }
.epf.epf .epf-btn--primary { border-color: #d97700; background: #ff8c00; color: #1a1a1a; font-weight: 700; }
.epf.epf .epf-btn--primary:hover { background: #f08200; color: #1a1a1a; }
.epf.epf .epf-btn--lg { width: 100%; min-height: 52px; font-size: 16px; }
.epf.epf .epf-btn--outline { width: 100%; min-height: 48px; border-color: #1a1a1a; font-size: 14px; font-weight: 700; }
.epf.epf .epf-btn--ghost { font-weight: 700; }
.epf.epf .epf-btn:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }

/* ---------- 結果：条件・並び順 ---------- */
.epf .epf-cond { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 12px; padding: 12px; border: 1px solid #c8c8c8; background: #fafafa; }
.epf .epf-cond__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 13px; }
.epf .epf-cond__list > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
.epf .epf-cond__list span { color: #555555; }
.epf .epf-cond__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.epf .epf-cond__actions > .epf-btn { flex: 1 1 150px; }
.epf .epf-cond__edit { flex: 1 1 150px; }
.epf .epf-cond__edit[open] { flex: 1 1 100%; }
.epf .epf-cond__edit > summary { width: 100%; list-style: none; }
.epf .epf-cond__edit > summary::-webkit-details-marker { display: none; }
.epf .epf-cond__edit .epf-form { margin-top: 10px; border-top-width: 1px; background: #ffffff; }
.epf .epf-note { margin: 0 0 10px; font-size: 12px; line-height: 1.6; color: #555555; }
.epf .epf-sort { display: flex; margin: 0 0 12px; }
.epf.epf .epf-sort a {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px;
  border: 1px solid #888888; background: #ffffff; font-size: 13px; text-decoration: none; color: #1a1a1a;
}
.epf.epf .epf-sort a + a { border-left: 0; }
.epf.epf .epf-sort a.is-on { border: 2px solid #ff8c00; background: #fff4e3; font-weight: 700; }

/* ---------- 結果：一覧 ---------- */
.epf .epf-list { margin: 0; padding: 0; border-bottom: 1px solid #c8c8c8; }
.epf .epf-item { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 14px 0 16px; border-top: 1px solid #c8c8c8; }
.epf .epf-split { margin: 0; padding: 8px 12px; border-top: 1px solid #c8c8c8; background: #f0f0f0; font-size: 12px; line-height: 1.6; color: #333333; }
.epf .epf-item__head { display: flex; align-items: flex-start; gap: 10px; }
.epf .epf-rank { flex: 0 0 22px; height: 22px; border: 1px solid #888888; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; color: #1a1a1a; }
.epf .epf-item__name { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 8px; }
.epf.epf .epf-logo { flex: 0 0 28px; width: 28px; height: 28px; object-fit: contain; }
.epf .epf-item__title { margin: 0; padding: 0; border: 0; background: none; font-size: 16px; font-weight: 700; line-height: 1.35; color: #1a1a1a; }
.epf .epf-tag { display: inline-block; margin-top: 3px; padding: 0 6px; border: 1px solid #888888; font-size: 11.5px; font-weight: 400; line-height: 1.6; color: #333333; }
.epf .epf-item__price { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.epf .epf-price { font-size: 20px; font-weight: 700; }
.epf .epf-plan { font-size: 12px; color: #555555; }

.epf .epf-ev { display: flex; flex-direction: column; border: 1px solid #d6d6d6; font-size: 13px; line-height: 1.5; }
.epf .epf-ev__row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; padding: 7px 8px; border-top: 1px solid #e3e3e3; background: #ffffff; }
.epf .epf-ev__row:first-child { border-top: 0; }
.epf .epf-ev__row.is-prio { background: #fff8ec; }
.epf .epf-ev__label { font-size: 12px; line-height: 1.7; color: #555555; }
.epf .epf-ev__body { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.epf .epf-ev__text { min-width: 0; overflow-wrap: anywhere; }
.epf .epf-nw { display: inline-block; }
.epf .epf-mk { flex: 0 0 auto; font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', Meiryo, 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.4; color: #1a1a1a; }
.epf .epf-mk--a { color: #a85400; }
.epf .epf-mk--c { color: #555555; }
.epf .epf-mk--n { color: #555555; font-size: 12.5px; }
.epf .epf-dash { color: #777777; }
.epf .epf-best { color: #8a4500; font-weight: 700; }

.epf .epf-cau { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.6; color: #333333; }
.epf .epf-lb { flex: 0 0 36px; align-self: flex-start; margin-top: 1px; background: #ebebeb; color: #333333; font-size: 11.5px; font-weight: 700; line-height: 1.6; text-align: center; }
.epf .epf-actions { display: flex; gap: 8px; }
.epf.epf .epf-actions .epf-btn { flex: 1; min-height: 46px; }
.epf.epf .epf-actions .epf-btn--primary { font-size: 14px; }

/* ---------- 結果：詳細比較表 ---------- */
.epf .epf-sec { display: flex; flex-direction: column; gap: 10px; margin: 24px 0 0; padding: 20px 0 0; border-top: 8px solid #f0f0f0; }
.epf .epf-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.epf .epf-sec__hint { font-size: 12px; color: #555555; }
.epf .epf-scroll { overflow-x: auto; border: 1px solid #c8c8c8; -webkit-overflow-scrolling: touch; }
.epf.epf .epf-ct { width: auto; min-width: 100%; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; background: #ffffff; font-size: 12px; line-height: 1.5; }
.epf.epf .epf-ct th, .epf.epf .epf-ct td {
  width: 132px; min-width: 132px; padding: 8px !important; border: 1px solid #d6d6d6 !important;
  background: #ffffff !important; color: #1a1a1a !important;
  font-size: 12px !important; font-weight: 400 !important; line-height: 1.5; text-align: left !important; vertical-align: top !important;
  overflow-wrap: anywhere;
}
.epf.epf .epf-ct thead th { background: #f0f0f0 !important; font-weight: 700 !important; vertical-align: middle !important; }
.epf.epf .epf-ct .epf-ct__h { position: sticky; left: 0; z-index: 1; width: 100px; min-width: 100px; background: #fafafa !important; font-weight: 700 !important; }
.epf.epf .epf-ct thead .epf-ct__h { background: #f0f0f0 !important; }
.epf .epf-ct__price { font-size: 14px; }
.epf .epf-ct .epf-mk { margin-right: 4px; }
.epf .epf-ct .epf-tag { margin-top: 2px; font-size: 11px; }

.epf .epf-dates { display: flex; flex-direction: column; border-top: 1px solid #e3e3e3; font-size: 13px; }
.epf .epf-dates > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); padding: 9px 0; border-bottom: 1px solid #e3e3e3; }
.epf .epf-dates span { color: #555555; }
.epf.epf .epf-dates strong { font-weight: 400; }
.epf .epf-cell-more > summary { display: inline-block; margin-top: 2px; font-size: 12px; text-decoration: underline; cursor: pointer; }
.epf.epf .epf-cell-more > summary { font-size: 12px; color: #555555; }

/* ---------- 記事内コンパクト版 ---------- */
.epf.epf-compact { border: 1px solid #c8c8c8; border-top: 3px solid #ff8c00; background: #ffffff; }
.epf.epf-compact, .epf.epf-results { scroll-margin-top: 72px; } /* 固定ヘッダーに隠れないよう、飛び先の上に余白 */
.epf .epf-compact__head { padding: 14px 16px 12px; border-bottom: 1px solid #e3e3e3; }
.epf .epf-compact__head .epf-lead { margin: 0; }
.epf .epf-brand { font-size: 12px; font-weight: 700; color: #a85400; }
.epf .epf-form--compact { gap: 14px; padding: 14px 16px 16px; border: 0; }
.epf .epf-form--compact .epf-chip span { min-height: 44px; }
.epf .epf-compact__results { transition: opacity .15s; }
.epf .epf-compact__results.is-loading { opacity: .45; }
.epf .epf-chead { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; padding: 10px 16px; border-top: 1px solid #c8c8c8; border-bottom: 1px solid #c8c8c8; background: #f0f0f0; line-height: 1.5; }
.epf .epf-chead__t { font-size: 14px; font-weight: 700; }
.epf .epf-chead__n, .epf .epf-chead__c { font-size: 12px; color: #555555; }
.epf .epf-chead__c { grid-column: 1 / -1; }
.epf .epf-citem { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid #c8c8c8; }
.epf .epf-citem:first-child { border-top: 0; }
.epf .epf-citem .epf-item__title { font-size: 15px; }
.epf .epf-citem .epf-item__name { gap: 6px; }
.epf.epf .epf-citem .epf-logo { flex: 0 0 24px; width: 24px; height: 24px; }
@media (max-width: 379px) { .epf .epf-citem .epf-item__head { gap: 8px; } }
.epf .epf-citem .epf-price { font-size: 18px; }
/* 1社ごとの情報は診断結果ページと同じ（料金・日本語サポート・キャンセル保証の評価と説明、注意点）＋対応回線。
   枠の幅で並べ方を変えるので、画面幅で切り替える結果ページ用の指定をここで上書きしている。 */
.epf .epf-citem .epf-ev { display: flex; flex-direction: column; font-size: 12.5px; }
.epf .epf-citem .epf-ev__row { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 6px; padding: 5px 8px; border-top: 1px solid #e3e3e3; border-left: 0; }
.epf .epf-citem .epf-ev__row:first-child { border-top: 0; }
.epf .epf-citem .epf-ev__label { font-size: 12px; line-height: 1.6; }
.epf .epf-citem .epf-mk { font-size: 14px; }
.epf .epf-citem .epf-cau { font-size: 12px; }
.epf .epf-citem__foot { display: flex; }
/* クーポン（カード内の1行。コードは等幅で、コピーのボタン付き） */
.epf .epf-coupon { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.6; color: #333333; }
.epf .epf-coupon .epf-lb--cp { flex-basis: auto; padding: 0 6px; white-space: nowrap; background: #fff1e0; color: #8a4b00; }
.epf .epf-coupon__b { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.epf .epf-coupon__d { font-weight: 700; color: #1a1a1a; }
.epf.epf .epf-coupon__code { padding: 1px 7px; border: 1px dashed #ff8c00; border-radius: 0; background: #ffffff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .04em; color: #1a1a1a; user-select: all; }
.epf.epf .epf-coupon__copy { margin: 0; padding: 0 8px; border: 1px solid #888888; border-radius: 0; background: #ffffff; font-size: 11.5px; line-height: 1.8; color: #333333; cursor: pointer; }
.epf.epf .epf-coupon__copy:hover { border-color: #1a1a1a; color: #1a1a1a; }
.epf .epf-coupon__how { color: #555555; }
.epf .epf-citem .epf-coupon { font-size: 12px; }

/* 2位・3位：スマホ幅では、評価の記号だけを1行で見せて、説明・対応回線・注意は「詳しく見る」で開く。
   開閉はチェックボックスとCSSだけ（:has）。:has が使えないブラウザでは、たたまずに全部見せる。 */
.epf .epf-sumrow { display: none; }
@supports selector(:has(*)) {
  .epf .epf-citem--fold .epf-sumrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 10px; min-height: 24px; }
  .epf .epf-citem--fold:not(:has(.epf-fold:checked)) > .epf-ev,
  .epf .epf-citem--fold:not(:has(.epf-fold:checked)) > .epf-cau { display: none; }
  .epf .epf-citem--fold:has(.epf-fold:checked) .epf-sum { display: none; }
}
.epf .epf-sum { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; line-height: 1.7; color: #555555; }
.epf .epf-sum__i { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.epf .epf-sum__i.is-prio .epf-sum__l { font-weight: 700; color: #1a1a1a; }
.epf .epf-citem .epf-sum .epf-mk { font-size: 14px; }
.epf .epf-foldt { position: relative; display: inline-flex; align-items: center; gap: 7px; margin: 0 2px 0 auto; padding: 0; font-size: 12px; line-height: 1.5; color: #1a1a1a; text-decoration: underline; white-space: nowrap; cursor: pointer; }
.epf .epf-foldt::before { content: ''; position: absolute; top: -10px; right: -6px; bottom: -10px; left: -10px; }
.epf.epf .epf-foldt input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.epf .epf-foldt::after { content: ''; flex: 0 0 auto; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid #555555; border-bottom: 1.5px solid #555555; transform: rotate(45deg); }
.epf .epf-foldt__c { display: none; }
.epf .epf-foldt:has(:checked) .epf-foldt__o { display: none; }
.epf .epf-foldt:has(:checked) .epf-foldt__c { display: inline; }
.epf .epf-foldt:has(:checked)::after { margin-top: 3px; transform: rotate(-135deg); }
.epf .epf-foldt:has(:focus-visible) { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.epf.epf .epf-citem__foot .epf-btn { flex: 1 1 auto; min-height: 44px; font-size: 14px; }

/* 記事用ウィジェット：枠の幅が640px以上（PC）のとき。
   1行目に 順位｜名前｜金額｜ボタン、2行目に評価3項目と対応回線を横に並べ、3行目に注意点を置く。 */
.epf .epf-clist { container-type: inline-size; container-name: epf-clist; }
@container epf-clist (min-width: 640px) {
  .epf .epf-citem { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; column-gap: 14px; row-gap: 8px; align-items: center; }
  .epf .epf-citem > .epf-item__head, .epf .epf-citem > .epf-citem__foot { display: contents; }
  .epf .epf-citem .epf-rank { grid-column: 1; grid-row: 1; }
  .epf .epf-citem .epf-item__name { grid-column: 2; grid-row: 1; align-items: center; }
  .epf .epf-citem .epf-item__price { grid-column: 3; grid-row: 1; }
  .epf.epf .epf-citem__foot .epf-btn { grid-column: 4; grid-row: 1; flex: 0 0 auto; min-width: 124px; min-height: 40px; font-size: 13px; }
  .epf .epf-citem .epf-ev { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 13px; }
  .epf .epf-citem .epf-ev--4 { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.1fr); }
  .epf .epf-citem .epf-ev__row { display: flex; flex-direction: column; gap: 0; padding: 6px 10px 7px; border-top: 0; border-left: 1px solid #e3e3e3; }
  .epf .epf-citem .epf-ev__row:first-child { border-left: 0; }
  .epf .epf-citem .epf-cau { grid-column: 1 / -1; grid-row: 3; font-size: 12.5px; }
  .epf .epf-citem .epf-coupon { grid-column: 1 / -1; font-size: 12.5px; } /* 行は自動（注意点の行がなければ3行目に入る） */
  /* PC幅ではたたまない（横に並んでいて長くならないため） */
  .epf .epf-citem--fold .epf-sumrow { display: none; }
  .epf .epf-citem--fold:not(:has(.epf-fold:checked)) > .epf-ev { display: grid; }
  .epf .epf-citem--fold:not(:has(.epf-fold:checked)) > .epf-cau { display: flex; }
}
.epf .epf-cfoot { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid #c8c8c8; }

/* ---------- 文章で相談する（AI相談）。条件を選ぶ欄の続きとして、同じ灰色の地の中に置く ---------- */
.epf .epf-ai { margin: 0; padding: 0 16px 16px; background: #fafafa; }
.epf .epf-ai[hidden] { display: none; }
.epf .epf-ai__in { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid #dcdcdc; }
.epf .epf-ai__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin: 0; }
/* 文字は16px（iPhoneで入力時に画面が拡大されないように）。例文だけ小さくして、狭い画面でも切れないようにする */
.epf.epf .epf-ai__q {
  display: block; width: 100%; min-width: 0; height: 44px; margin: 0; padding: 0 10px;
  border: 1px solid #888888; border-radius: 4px; box-shadow: none; background: #ffffff;
  font-size: 16px; line-height: 1.2; color: #1a1a1a; -webkit-appearance: none; appearance: none;
}
.epf.epf .epf-ai__q::placeholder { font-size: 14px; color: #767676; opacity: 1; }
.epf.epf .epf-ai__q:focus { border-color: #1a1a1a; outline: 2px solid #1a1a1a; outline-offset: 1px; }
.epf.epf .epf-ai__q[readonly] { background: #f3f3f3; color: #555555; }
.epf.epf .epf-ai__send { min-height: 44px; padding: 0 14px; border-color: #1a1a1a; font-weight: 700; white-space: nowrap; }
.epf.epf .epf-ai__send[disabled] { border-color: #cfcfcf; background: #f3f3f3; color: #8a8a8a; cursor: default; }
.epf .epf-ai__log:empty { display: none; }
.epf .epf-ai__box { display: flex; flex-direction: column; border: 1px solid #c8c8c8; background: #ffffff; }
.epf .epf-ai__row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 7px 10px; border-top: 1px solid #e3e3e3; }
.epf .epf-ai__row:first-child { border-top: 0; }
.epf .epf-ai__k { font-size: 12px; line-height: 1.7; color: #555555; }
.epf .epf-ai__v { min-width: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.epf .epf-ai__p { margin: 0; padding: 0; }
.epf .epf-ai__p + .epf-ai__p { margin-top: 4px; }
/* 特定のサービスについて聞かれたときに出す比較データ。診断の候補と同じ部品を、同じ切り替え幅で使う */
.epf .epf-ai__card { border-top: 1px solid #e3e3e3; container-type: inline-size; container-name: epf-clist; }
.epf .epf-ai__card .epf-citem { padding: 10px 10px 12px; }
.epf.epf .epf-ai__card .epf-citem__foot .epf-btn { flex: 0 1 320px; }
.epf .epf-ai__disc { margin: 0; padding: 7px 10px; border-top: 1px solid #e3e3e3; background: #fafafa; font-size: 12px; line-height: 1.6; color: #555555; }
.epf .epf-form.is-wait { opacity: .6; pointer-events: none; }
.epf .epf-compact .epf-none, .epf.epf-compact .epf-none { margin: 12px 16px; }

/* ---------- 結果ページの上：この国の記事への案内 ---------- */
.epf .epf-article { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #e3e3e3; border-left: 3px solid #ff8c00; background: #ffffff; font-size: 13.5px; line-height: 1.6; }
.epf .epf-article__l { flex: 1 1 260px; color: #444444; }
.epf.epf .epf-article__a { flex: 0 0 auto; min-height: 40px; }
@media (max-width: 480px) { .epf.epf .epf-article__a { flex: 1 1 100%; } }

/* ---------- 記事内ウィジェットのいちばん下：この条件のまとめと、全社の比較表（たたんである） ---------- */
.epf .epf-csum { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 12px; border-top: 1px solid #c8c8c8; background: #fafafa; }
.epf .epf-csum__t { font-size: 12px; font-weight: 700; line-height: 1.5; color: #1a1a1a; }
.epf.epf p.epf-csum__p { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; font-size: 12.5px !important; font-weight: 400 !important; line-height: 1.65 !important; letter-spacing: 0 !important; color: #333333 !important; text-align: left !important; text-indent: 0 !important; }
.epf .epf-all { margin: 2px 0 0; padding: 0; border: 0; background: none; }
.epf.epf .epf-all > summary { display: inline-block; margin: 0; padding: 6px 0; border: 0; background: none; list-style: none; font-size: 13px; font-weight: 400; line-height: 1.5; color: #1a1a1a; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.epf .epf-all > summary::-webkit-details-marker { display: none; }
.epf .epf-all > summary::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 9px 2px 2px; border-right: 1.5px solid #555555; border-bottom: 1.5px solid #555555; transform: rotate(-45deg); }
.epf .epf-all[open] > summary::before { margin-bottom: 3px; transform: rotate(45deg); }
.epf .epf-all > summary:focus { outline: none; }
.epf .epf-all > summary:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.epf .epf-all__c, .epf .epf-all[open] .epf-all__o { display: none; }
.epf .epf-all[open] .epf-all__c { display: inline; }
.epf .epf-all > .epf-scroll { margin-top: 4px; background: #ffffff; container-type: inline-size; }
.epf .epf-all > .epf-fine { margin-top: 6px; }
/* 1社1行の表。広い画面では横スクロールなしで全部の列が見える。狭い画面では横に動かす（サービス名の列は固定） */
.epf.epf table.epf-ct--rows { width: 100%; min-width: 600px; border-collapse: separate; border-spacing: 0; }
/* 罫線は右と下だけに引く（横に動かしても、固定したサービス名の列の線が消えない・後ろの文字が透けない） */
.epf.epf table.epf-ct--rows th, .epf.epf table.epf-ct--rows td { border-width: 0 1px 1px 0 !important; }
.epf.epf table.epf-ct--rows th:last-child, .epf.epf table.epf-ct--rows td:last-child { border-right-width: 0 !important; }
.epf.epf table.epf-ct--rows tbody tr:last-child th, .epf.epf table.epf-ct--rows tbody tr:last-child td { border-bottom-width: 0 !important; }
.epf.epf table.epf-ct--rows caption { border-bottom: 1px solid #d6d6d6 !important; }
.epf.epf table.epf-ct--rows.epf-ct--nonet { min-width: 500px; }
.epf.epf .epf-ct caption { padding: 8px 10px !important; background: #f0f0f0 !important; color: #1a1a1a !important; font-size: 12.5px !important; font-weight: 700 !important; line-height: 1.5; text-align: left !important; caption-side: top; }
.epf .epf-ct caption > span { display: block; max-width: calc(100cqw - 20px); }
.epf.epf table.epf-ct--rows th, .epf.epf table.epf-ct--rows td { width: 25%; min-width: 0; white-space: normal; }
.epf.epf table.epf-ct--rows th:nth-child(1) { width: 18%; }
.epf.epf table.epf-ct--rows th:nth-child(2), .epf.epf table.epf-ct--rows td:nth-child(2),
.epf.epf table.epf-ct--rows th:nth-child(5), .epf.epf table.epf-ct--rows td:nth-child(5) { width: 16%; }
.epf.epf table.epf-ct--nonet th, .epf.epf table.epf-ct--nonet td { width: 30%; }
.epf.epf table.epf-ct--nonet th:nth-child(1), .epf.epf table.epf-ct--nonet th:nth-child(2), .epf.epf table.epf-ct--nonet td:nth-child(2) { width: 20%; }
.epf .epf-ct--rows .epf-best { font-size: 11px; white-space: nowrap; }
.epf.epf .epf-ct a.epf-ct__buy { display: inline-block; margin-top: 4px; padding: 2px 0; font-size: 11.5px; font-weight: 400; line-height: 1.5; white-space: nowrap; }

/* ---------- 計算ツールのポップアップ ---------- */
.epf dialog.epf-dlg:not([open]) { display: none; }
.epf dialog.epf-dlg {
  width: min(420px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); margin: auto; padding: 0;
  border: 1px solid #888888; border-radius: 4px; box-shadow: none; background: #ffffff; color: #1a1a1a;
  font-size: 14px; line-height: 1.6; text-align: left; overflow: auto;
}
.epf dialog.epf-dlg::backdrop { background: rgba(0, 0, 0, .45); }
/* ポップアップを使えない古いブラウザでは、その場に開く */
.epf dialog.epf-dlg.epf-dlg--inline { position: static; width: auto; margin: 0 16px 16px; }
.epf .epf-dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid #e3e3e3; }
.epf .epf-dlg__t { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; color: #1a1a1a; }
.epf.epf .epf-dlg__x { flex: 0 0 auto; min-height: 36px; margin: 0; padding: 0 12px; border: 1px solid #888888; border-radius: 4px; box-shadow: none; background: #ffffff; font-size: 12px; line-height: 1.3; color: #1a1a1a; cursor: pointer; }
.epf .epf-dlg__body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.epf .epf-dlg__f { display: flex; flex-direction: column; gap: 4px; }
.epf.epf .epf-dlg__in {
  display: block; width: 100%; min-width: 0; height: 44px; margin: 0; padding: 0 10px;
  border: 1px solid #888888; border-radius: 4px; box-shadow: none; background: #ffffff; font-size: 16px; line-height: 1.2; color: #1a1a1a;
}
.epf.epf .epf-dlg__in:focus { border-color: #1a1a1a; outline: 2px solid #1a1a1a; outline-offset: 1px; }
.epf .epf-dlg__res { padding: 10px 12px; border: 1px solid #d6d6d6; background: #fafafa; font-size: 13px; line-height: 1.6; }
.epf .epf-dlg__res:empty { display: none; }
.epf .epf-dlg__big { margin-left: 6px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.epf .epf-dlg__sub { font-size: 12px; color: #555555; }
.epf .epf-dlg__err { font-weight: 700; }
.epf .epf-dlg__foot { padding: 12px 16px 16px; border-top: 1px solid #e3e3e3; }
.epf.epf .epf-dlg__foot .epf-btn { width: 100%; min-height: 46px; font-size: 14px; }
.epf.epf .epf-btn[disabled] { border-color: #cfcfcf; background: #f3f3f3; color: #8a8a8a; font-weight: 400; cursor: default; }
.epf .epf-opts { display: flex; flex-direction: column; gap: 6px; }
.epf .epf-opt { position: relative; display: block; margin: 0; padding: 0; cursor: pointer; }
.epf.epf .epf-opt input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.epf .epf-opt > span { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 8px 12px; border: 1px solid #888888; border-radius: 4px; background: #ffffff; }
.epf .epf-opt input:checked + span { padding: 7px 11px; border: 2px solid #ff8c00; background: #fff4e3; }
.epf .epf-opt input:focus-visible + span { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.epf .epf-opt__n { grid-column: 1; font-size: 14px; font-weight: 700; line-height: 1.5; }
.epf .epf-opt__d { grid-column: 1; font-size: 12px; line-height: 1.5; color: #555555; }
.epf .epf-opt__g { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; color: #555555; white-space: nowrap; }

/* ---------- 画面が広いとき ---------- */
@media (min-width: 720px) {
  .epf .epf-title { font-size: 24px; }
  .epf .epf-title--s { font-size: 20px; }
  .epf .epf-lead { font-size: 14px; }
  .epf .epf-form { padding: 20px; }
  .epf .epf-form__row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 2.2fr); }
  .epf .epf-seg--prio { display: flex; flex-wrap: wrap; gap: 8px; }
  .epf .epf-seg--prio .epf-chip span { padding: 0 18px; min-height: 44px; font-size: 14px; }
  .epf .epf-form__submit { flex-direction: row; align-items: center; gap: 16px; text-align: left; }
  .epf.epf .epf-btn--lg { width: 300px; }
  .epf .epf-form--compact { padding: 16px 20px 18px; }
  .epf .epf-ai { padding: 0 20px 18px; }
  .epf .epf-ai__form { grid-template-columns: minmax(0, 520px) auto; justify-content: start; }
  .epf .epf-form--compact .epf-seg--6 { grid-template-columns: repeat(auto-fit, minmax(64px, 88px)); }
  .epf .epf-form--compact .epf-seg--6:has(> .epf-chip:nth-child(7)) { grid-template-columns: repeat(7, minmax(0, 88px)); gap: 6px; }
  .epf .epf-form--compact .epf-seg--4 { grid-template-columns: repeat(4, minmax(0, 110px)); }
  .epf .epf-cond { flex-direction: row; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
  .epf .epf-cond__list { grid-template-columns: repeat(2, minmax(0, auto)); column-gap: 32px; }
  .epf .epf-cond__actions { flex: 0 1 auto; }
  .epf .epf-cond__actions > .epf-btn, .epf .epf-cond__edit { flex: 0 0 auto; white-space: nowrap; }
  .epf .epf-cond__edit[open] { order: 3; }
  .epf .epf-sort { max-width: 360px; }
  .epf .epf-ev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .epf .epf-ev__row { display: flex; flex-direction: column; gap: 0; padding: 8px 10px; border-top: 0; border-left: 1px solid #e3e3e3; }
  .epf .epf-ev__row:first-child { border-left: 0; }
  .epf .epf-cau { font-size: 13px; }
  .epf .epf-price { font-size: 22px; }
  .epf .epf-actions { justify-content: flex-start; }
  .epf.epf .epf-actions .epf-btn { flex: 0 0 200px; }
  .epf .epf-compact__head, .epf .epf-citem, .epf .epf-cfoot, .epf .epf-chead, .epf .epf-csum { padding-left: 20px; padding-right: 20px; }
  .epf.epf p.epf-csum__p { font-size: 13px !important; }
  .epf.epf .epf-btn--outline { width: 320px; }
  .epf .epf-sec__hint { display: none; }
  .epf.epf .epf-ct th, .epf.epf .epf-ct td { width: 150px; min-width: 150px; }
  .epf.epf .epf-ct .epf-ct__h { width: 130px; min-width: 130px; }
}
