/* 全体を極限までコンパクトに */
.table-card {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;   /* ← ここで全体縮小 */
  table-layout: fixed;
  
}

.table-card th,
.table-card td {
  border: 1px solid #ccc;
   padding: 0 2px;   /* 上下0, 左右2 */
  text-align: center;
  vertical-align: middle;
  word-break: break-word; /*  折り返して収める */
}

.table-card th {
  background: #f0f8ff;
  font-weight: 600;
  color: #0653a6;
}

/* サービス欄の縦レイアウト（画像→文字） */
.cell-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

/* 他CSSの img {max-width:100%} などを無効化してサイズを“絶対化” */
.table-card .cell-flex > img {
  max-width: none;
  width: 45px;        /* PC 絶対 */
  height: 45px;       /* 縦も固定で比率崩れ/CLS防止 */
  object-fit: contain;
  border-radius: 3px;
}

/* 画像列のパディングだけ最適化（他列はそのまま） */
.table-card th:first-child,
.table-card td:first-child {
  padding-top: 2px;   /* 画像の高さがあるので上は詰める */
  padding-bottom: 2px;
  padding-left: 6px;
  padding-right: 6px;
}

/* 他列（2列目以降）は少し余白を残して読みやすく */
.table-card th:not(:first-child),
.table-card td:not(:first-child) {
  padding: 4px 6px;
}


.cell-flex .info span {
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 1.2;
}
.cell-flex .info small {
  font-size: 0.65rem;
  color: #666;
  line-height: 1.1;
}

/* リンク */
.table-card td a {
  color: #067aff;
  font-weight: 600;
  font-size: 0.7rem;
}
.table-card td a:hover {
  text-decoration: underline;
}

/* スマホでも「横表」のまま維持する */
@media (max-width: 640px) {
  .table-card {
    font-size: 0.6rem;
    
  }
  .table-card th, .table-card td {
    padding: 2px 3px; /* さらに狭め */
  }
  .cell-flex img {
    width: 40px;
  }
}

@media (max-width: 640px) {
  .table-card .cell-flex > img {
    width: 40px;      /* スマホ 絶対 */
    height: 40px;
  }
  .table-card th:first-child,
  .table-card td:first-child {
    padding-top: 1px;
    padding-bottom: 1px;
  }
  .table-card th:not(:first-child),
  .table-card td:not(:first-child) {
    padding: 3px 4px;
  }
}

/* PCフィット：デスクトップだけ縮小。vwに応じて自動で少しだけ縮む */
@media (min-width: 1024px) {

  .table-card {
    max-width: 800px; /* ← お好みで 860〜980px くらいで目視調整 */
    margin: 0 auto;   /* 中央寄せ */
  }
  /* 列幅の固定（必要ならそのまま維持） */
.table-card.pc-fit colgroup col:nth-child(1) { width: 20%; } /* サービス */
.table-card.pc-fit colgroup col:nth-child(2) { width: 20%; } /* 通貨ペア数 */
.table-card.pc-fit colgroup col:nth-child(3) { width: 30%; } /* 注文/自動化 */
.table-card.pc-fit colgroup col:nth-child(4) { width: 30%; } /* 取引ツール */


  .table-card.pc-fit {
    /* 0.70rem〜0.80remの範囲で自動調整（画面が狭いほど小さく） */
    font-size: clamp(0.70rem, 0.75vw, 0.80rem);
  }
  .table-card.pc-fit th,
  .table-card.pc-fit td {
    /* 余白はemで指定＝フォント縮小に連動してさらに詰まる */
    padding: 0.28em 0.45em;
    line-height: 1.15;
  }

  /* 画像は“絶対”サイズ維持（PC=45px） */
  .table-card.pc-fit .cell-flex > img {
    width: 45px;
    height: 45px;
  }

  /* テキストも少し小さめに寄せる */
  .table-card.pc-fit .info span { font-size: 0.72rem; }
  .table-card.pc-fit .info small { font-size: 0.60rem; }

  /* 見出しセルも気持ち小さくして高さを抑える */
  .table-card.pc-fit th {
    font-weight: 600;
  }

  
}

/* さらに詰めたい“XSモード”（任意） */
@media (min-width: 1024px) {
  .table-card.pc-fit.xs {
    font-size: clamp(0.64rem, 0.6vw, 0.72rem);
  }
  .table-card.pc-fit.xs th,
  .table-card.pc-fit.xs td {
    padding: 0.22em 0.4em;
    line-height: 1.1;
  }

  .table-card.pc-fit th:first-child,
  .table-card.pc-fit td:first-child {
    padding-top: 0.15em;  /* ← 上下は詰めすぎない */
    padding-bottom: 0.15em;
    padding-left: 0.45em;
    padding-right: 0.45em;
}
  .table-card colgroup col:nth-child(1) { width: 31%; } /* サービス */
  .table-card colgroup col:nth-child(2) { width: 23%; } /* 通貨ペア数 */
  .table-card colgroup col:nth-child(3) { width: 23%; } /* 注文/自動化 */
  .table-card colgroup col:nth-child(4) { width: 23%; } /* 取引ツール */

}

/* 最後の列 左寄せを無効化 */
.table-card td:last-of-type { text-align: center !important; }

/* ストライプ無効化 */
.table-card tbody > tr:nth-of-type(even) { background: transparent !important; }

/* 余計な外枠を削除 */
.table-card { border:0 !important; }


/* ===== レスポンシブ表（改訂版） ===== */

/* ===== 比較テーブル（PC基準） ===== */
.table-responsive{
  width:100%;
  border:0;               /* 全体 table の太枠を打消し:contentReference[oaicite:3]{index=3} */
  border-collapse:collapse;
  table-layout:fixed;     /* 列幅固定化（colgroup が効く） */
  font-size:clamp(.78rem, .72rem + .2vw, .95rem);
  letter-spacing:.01em;
}
.table-responsive th,
.table-responsive td{
  border:1px solid #ccc;
  padding:8px 10px;
  text-align:center;
  vertical-align:top;
  word-break:break-word;
  line-height:1.3;
}
.table-responsive thead{ background:#005BAC; }  /* 明示上書き:contentReference[oaicite:4]{index=4} */
.table-responsive thead th{ color:#fff; white-space:normal; }

/* 列配分（合計100%） */
.table-responsive col.col-cat    { width:22%; }
.table-responsive col.col-reco   { width:29%; }
.table-responsive col.col-reason { width:31%; }
.table-responsive col.col-target { width:18%; }

/* === 早見表：総合列ハイライト === */
.table-card .highlight{ background:#fff6e6; font-weight:700; }

/* ===== スマホ：0.6rem 固定 ===== */
@media (max-width:600px){
  .table-responsive{
    font-size:0.6rem;     /* ご指定どおり */
  }
  .table-responsive th,
  .table-responsive td{
    padding:4px 6px;      /* さらに圧縮 */
    line-height:1.25;     /* 行間も僅かに詰める */
  }
  .table-responsive td br{ display:inline; }  /* <br> を残す */
}

/* 超狭小端末の保険（任意） */
@media (max-width:360px){
  .table-responsive th,
  .table-responsive td{ padding:3px 5px; }
}

.table-card.xs th, .table-card.xs td { padding: .4em .6em; }

/* 早見表専用クラス */

/* ===== 早見表（4カラム）専用 ===== */

.table-hayami{
  width:100%;
  border-collapse:collapse;
  font-size:.85rem;          /* 全体を少し圧縮 */
  table-layout:fixed;        /* 列幅を安定 */
}
.table-hayami th,
.table-hayami td{
  border:1px solid #ccc;
  padding:0 2px;             /* 上下0 / 左右2 */
  text-align:center;
  vertical-align:middle;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.table-hayami th{
  background:#f0f8ff;
  font-weight:600;
  color:#0653a6;
}

/* サービスセルの中身を横並びに */
.table-hayami .cell-flex{
  display:flex;
  align-items:center;
  gap:8px;
}
.table-hayami .cell-flex > img{
  max-width:none;            /* 他のimgルールを無効化 */
  width:45px; height:45px;   /* CLS防止 */
  object-fit:contain;
  border-radius:3px;
}
/* 1列目だけ余白を少し広めに */
.table-hayami th:first-child,
.table-hayami td:first-child{
  padding:2px 6px;
}
/* 2列目以降は標準余白 */
.table-hayami th:not(:first-child),
.table-hayami td:not(:first-child){
  padding:4px 6px;
}

/* サービス名の折返し最適化 */
.table-hayami .cell-flex .info span{
  font-weight:600;
  font-size:.75rem;
  line-height:1.2;
}
.table-hayami .cell-flex .info small{
  font-size:.65rem;
  color:#666;
  line-height:1.1;
}

/* テーブル内リンクの見た目 */
.table-hayami td a{
  color:#067aff;
  font-weight:600;
  font-size:.7rem;
}
.table-hayami td a:hover{ text-decoration:underline; }

/* PC時の4カラム幅＆揃え（1列目は左寄せ） */
@media (min-width:1024px){
  .table-hayami colgroup col:nth-child(1){ width:36%; } /* サービス */
  .table-hayami colgroup col:nth-child(2){ width:25%; } /* 手数料 */
  .table-hayami colgroup col:nth-child(3){ width:15%; } /* 銘柄数 */
  .table-hayami colgroup col:nth-child(4){ width:24%; } /* スマホアプリ */

  .table-hayami th:nth-child(1),
  .table-hayami td:nth-child(1){ text-align:left; }
  .table-hayami th:nth-child(2),
  .table-hayami td:nth-child(2),
  .table-hayami th:nth-child(3),
  .table-hayami td:nth-child(3),
  .table-hayami th:nth-child(4),
  .table-hayami td:nth-child(4){ text-align:center; }
}

/* スマホ微調整：文字＆ロゴを少し縮小 */
@media (max-width:420px){
  .table-hayami{ font-size:.8rem; }
  .table-hayami .cell-flex > img{ width:40px; height:40px; }
}

/* スマホアプリ用バッジ */
.app-badge{
  display:inline-block;
  padding:.2em .6em;
  border-radius:999px;
  font-size:.9em;
  border:1px solid #d0d7de;
}
.app-badge.ok{ background:#eef6ff; border-color:#9ec5fe; }
.app-badge.na{ background:#f6f8fa; }


/* ランキングコンテンツ */
/* ========== ランキング：共通ベース ========== */
.table-ranking{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:.85rem;
  line-height:1.25;
}
.table-ranking th,
.table-ranking td{
  border:1px solid #ccc;
  padding: 0.5px 1px; 
  text-align:center;
  vertical-align:middle;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.table-ranking thead th{
  background:#f0f8ff;
  font-weight:700;
  color:#0653a6;
}
.table-ranking th[scope="row"]{
  font-weight:700;
  color:#333;
}

/* リンク＆中身（ロゴ→名称） */
.ranking-jump {
  display:block;
  text-decoration:none;
  color:inherit;               /* 全体の文字色は親から継承 */
  transition: all .2s ease;    /* ホバーアニメ */
}

.ranking-flex {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:4px 0;
  color:#0653a6;               /* テキスト色（青みの信頼色） */
  text-decoration:none;
  border-radius:6px;
  background:transparent;      /* 通常は透明 */
  transition: background .2s, transform .2s;
}

/* --- ホバーでふわっと浮かせる --- */
.ranking-jump:hover .ranking-flex {
  background:#f0f8ff;          /* 淡い水色の反応 */
  transform:translateY(-1px);
  box-shadow:0 1px 3px rgba(0,0,0,0.08);
}

/* --- クリック時（押下時） --- */
.ranking-jump:active .ranking-flex {
  transform:translateY(0);
  box-shadow:none;
}




/* 画像（共通） */
.table-ranking .ranking-flex img{
  display:block;
  max-width:none !important;          /* 既存の max-width:100% を無効化 */
  object-fit:contain;
  border-radius:3px;
}

/* 超小型：is-ultra 用の確定サイズ（上書きはこれだけに統一） */
.table-ranking.is-ultra .ranking-flex img{
  width:60px !important;   /* テーマ側の width:100% を確実に潰す */
  height:60px !important;
}

/* 360px以下の最終微調整（任意） */
@media (max-width:360px){
  .table-ranking.is-ultra .ranking-flex img{
    width:40px !important;
    height:40px !important;
  }
}

.table-ranking.is-ultra .ranking-info span {
  display: block;
  font-size: .7rem;         /* ← .76 → .7 に圧縮 */
  font-weight: 600;
  text-align: center;
  letter-spacing: 0;        /* 詰めると省スペース */
  line-height: 1.05;        /* 文字高さを詰める */
  margin-top: 0;            /* 余白を完全カット */
}



/* 備考の最小スタイル（任意） */
.note.small{ font-size:.8rem; color:#555; margin:.5em 0 0; }

/* ========== 極小レイアウト（スマホ一瞥用） ========== */
.table-ranking.is-ultra{
  font-size:.72rem;       /* さらに圧縮 */
  line-height:1.12;
}
.table-ranking.is-ultra th,
.table-ranking.is-ultra td{
  padding:2px 2px;        /* 余白を極小に */
}

/* 列幅：合計100%（順/会社/料金/使やすさ/特徴） */
.table-ranking.is-ultra col:nth-child(1){ width:10%; }  /* 順 */
.table-ranking.is-ultra col:nth-child(2){ width:36%; }  /* 会社（ロゴ+名） */
.table-ranking.is-ultra col:nth-child(3){ width:18%; }  /* 料金 */
.table-ranking.is-ultra col:nth-child(4){ width:18%; }  /* 使やすさ */
.table-ranking.is-ultra col:nth-child(5){ width:18%; }  /* 特徴 */

/* ロゴも極小化 */
.table-ranking.is-ultra .ranking-jump > img{
  width:28px; height:28px;
  border-radius:3px;
}

/* 1位をほんのり強調（好みで） */
.table-ranking.is-ultra tbody tr:first-child{ background:#fffdf2; }

/* 360px以下の端末での最終微調整 */
@media (max-width:360px){
  .table-ranking.is-ultra{ font-size:.7rem; }
  .table-ranking.is-ultra .ranking-jump > img{
    width:26px; height:26px;
  }
}


/* PCのみで中央寄せ＋高さ調整 */
@media (min-width:768px){
  .table-ranking {
    max-width:700px;          /* テーブル幅の上限 */
    margin: 1.2em auto;       /* 上下余白を少し広めに */
  }
  .table-ranking.is-ultra th,
  .table-ranking.is-ultra td {
    padding:4px 6px;          /* PCでは少しゆとりを戻す */
  }

}

/* テーブル内ロゴの強制ミニサイズ（はみ出し防止） */
.table-ranking .ranking-flex img{
  display:block;
  max-width:none !important;
  width:26px !important;
  height:26px !important;
  object-fit:contain;
  border-radius:3px;
}
@media (max-width:360px){
  .table-ranking .ranking-flex img{ width:24px !important; height:24px !important; }
}

.ranking-jump{ display:block; color:inherit; text-decoration:none; }
.ranking-flex{
  transition: background .2s, transform .2s, box-shadow .2s;
  border-radius:6px;
}
.ranking-jump:hover .ranking-flex{
  background:#f0f8ff;
  transform:translateY(-1px);
  box-shadow:0 1px 3px rgba(0,0,0,.08);
}
.ranking-jump:active .ranking-flex{
  transform:translateY(0); box-shadow:none;
}
