/* ==========================================================================
   Karadakara Training Legacy CSS (PC Reproduce + Responsive Mobile)
   ========================================================================== */

/* 全体ラッパー */
#training-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  font-family: "MS PGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 14px;
  color: #333333;
  line-height: 1.5;
}

/* コピータイトル */
h1.copy, .copy {
  font-size: 11px;
  color: #666666;
  margin: 0 0 5px 0;
  font-weight: normal;
}

/* 2カラムレイアウトテーブル */
.training-main-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.training-main-table td {
  vertical-align: top;
}

#tre-l {
  vertical-align: top;
  padding-right: 15px;
}

#tre-r {
  width: 220px;
  min-width: 220px;
  vertical-align: top;
}

/* メインコピー枠 */
.top-copy {
  background-image: url(/training/img/top/main.jpg);
  background-repeat: no-repeat;
  background-position: top left;
  background-color: #f7fbf2;
  font-size: 14px;
  line-height: 1.8;
  padding: 125px 25px 15px 125px;
  border: 1px solid #CCCCCC;
  margin-bottom: 15px;
  color: #333333;
}

/* 見出し：脳力トレーニング */
h3.ti-tre {
  clear: both;
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0px 3px 0px;
  border-bottom: 1px solid #000000;
  margin-bottom: 0;
  margin-top: 20px;
  display: flex;
  align-items: center;
}

h3.ti-tre img {
  vertical-align: middle;
  margin-right: 7px;
}

div.ti-tre-bar {
  border-top: 3px solid #EFEFEF;
  margin-bottom: 12px;
}

/* 会員登録のご案内メッセージ */
div.tr-toroku {
  color: #cc0033;
  font-size: 14px;
  margin: 12px 0 15px 0;
  font-weight: bold;
}

div.tr-toroku a {
  color: #0033cc;
  text-decoration: underline;
}

/* お試し脳トレエリア (tr-s0) */
table.tr-s0 {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 15px;
  background-color: #eeeeee;
  border: 1px solid #cccccc;
  border-radius: 4px;
}

table.tr-s0 td.tr-s1 {
  padding: 12px 15px;
  vertical-align: top;
}

h3.tr-h3 {
  font-size: 16px;
  color: #222222;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  font-weight: bold;
}

h3.tr-h3 img {
  vertical-align: middle;
  margin-right: 8px;
}

div.tr-det {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: #333333;
}

/* お試しゲームグリッド */
table.tr-cols-tbl {
  width: 100%;
  border-collapse: collapse;
}

table.tr-cols-tbl td {
  padding: 6px 8px;
  text-align: center;
  vertical-align: top;
  font-size: 14px;
}

table.tr-cols-tbl td a {
  color: #0033cc;
  text-decoration: underline;
  display: inline-block;
  font-weight: bold;
  font-size: 14px;
  line-height: 1.4;
}

table.tr-cols-tbl td img {
  border: 1px solid #cccccc;
  display: block;
  margin: 6px auto 0 auto;
  width: 130px;
  height: 75px;
  object-fit: cover;
  transition: transform 0.15s ease;
}

table.tr-cols-tbl td img:hover {
  transform: scale(1.03);
}

/* ログイン時：新着・人気トレーニング枠 */
table.tr-login-top {
  width: 100%;
  border-collapse: separate;
  border-spacing: 10px;
  margin-bottom: 15px;
}

table.tr-login-top td.tr-s1 {
  background-color: #eeeeee;
  border: 1px solid #cccccc;
  padding: 12px 15px;
  vertical-align: top;
  width: 50%;
  border-radius: 4px;
}

div.tr-s3 {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 6px;
}

div.tr-s3 a {
  color: #0033cc;
}

div.tr-s3 img {
  vertical-align: middle;
  margin-left: 5px;
}

table.tr-login-top p {
  font-size: 13px;
  line-height: 1.6;
  color: #444444;
  margin: 5px 0 10px 0;
}

div.tr-s4 {
  font-size: 13px;
  text-align: right;
  font-weight: bold;
}

div.tr-s4 a {
  color: #e65100;
  text-decoration: underline;
}

ol.tr-olr {
  line-height: 28px;
  list-style: none;
  margin: 0;
  padding-left: 10px;
  font-size: 14px;
}

ol.tr-olr li a {
  color: #0033cc;
  text-decoration: underline;
}

/* ゲーム一覧テーブル (top-menu) */
table.top-menu {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
}

table.top-menu th {
  font-size: 14px;
  text-align: left;
  padding: 10px 8px 4px 8px;
  vertical-align: middle;
  font-weight: bold;
  width: 33.333%;
}

table.top-menu th img {
  vertical-align: middle;
  margin-right: 6px;
}

table.top-menu th a {
  color: #0033cc;
  text-decoration: underline;
  font-size: 14px;
}

table.top-menu td {
  padding: 0 8px 20px 8px;
  vertical-align: top;
  width: 33.333%;
}

table.top-menu td img.game-thumb {
  border: 1px solid #cccccc;
  display: block;
  margin-bottom: 6px;
  width: 211px;
  height: 121px;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.game-btn-row {
  margin-top: 4px;
  display: flex;
  gap: 4px;
}

.game-btn-row img {
  vertical-align: middle;
}

/* 右サイドバー */
table.tr-menu {
  width: 220px;
  border-collapse: collapse;
  margin-bottom: 15px;
  border: 1px solid #cccccc;
  background-color: #ffffff;
}

table.tr-menu th {
  background-color: #d2e1f0;
  font-size: 14px;
  font-weight: bold;
  padding: 6px 10px;
  text-align: left;
  color: #003366;
  border-bottom: 1px solid #b8cce4;
}

table.tr-menu td {
  padding: 10px;
  font-size: 13px;
  line-height: 1.6;
}

/* レーダーチャート */
div.radar {
  margin: 5px auto;
  width: 180px;
  text-align: center;
}

#radar {
  height: 180px;
  width: 180px;
}

div.h0 {
  font-weight: bold;
  font-size: 13px;
  margin: 10px 0 5px 0;
  color: #333333;
}

table.tr-mdp {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

table.tr-mdp th {
  background: none;
  border: none;
  border-top: 1px dotted #cccccc;
  padding: 4px 0;
  width: 55px;
  text-align: left;
}

table.tr-mdp th img {
  vertical-align: middle;
}

table.tr-mdp td {
  border-top: 1px dotted #cccccc;
  font-size: 12px;
  padding: 4px 2px;
  vertical-align: middle;
}

table.tr-mdp td span.dx {
  color: navy;
  font-weight: bold;
  margin-right: 4px;
}

div.h1 {
  font-weight: bold;
  font-size: 13px;
  text-align: left;
  color: #333333;
}

div.r1 {
  border-bottom: 1px dotted #cccccc;
  margin: 5px 0 10px 0;
  text-align: center;
  font-size: 14px;
}

div.r1 span.r2 {
  color: #cc0000;
  font-size: 26px;
  font-weight: bold;
}

p.det {
  color: #888888;
  font-size: 11px;
  margin: 5px 0 0 0;
  line-height: 1.4;
}

/* 未ログイン時サイドバー (top-l-waku) */
table.top-l-waku {
  width: 220px;
  border-collapse: collapse;
  border: 1px solid #cccccc;
  margin-bottom: 15px;
  background-color: #ffffff;
}

table.top-l-waku th.no-login {
  background-color: #f0f0f0;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: bold;
  text-align: left;
  color: #555555;
  border-bottom: 1px solid #e0e0e0;
}

table.top-l-waku th.no-login-link {
  background-color: #f0f0f0;
  padding: 8px 10px;
  font-size: 13px;
  text-align: right;
  border-bottom: 1px solid #e0e0e0;
}

table.top-l-waku th.no-login-link a {
  color: #0033cc;
  text-decoration: underline;
}

div.no-prof {
  background-color: #e2ecf9;
  border: 1px solid #c2d8f2;
  padding: 10px;
  text-align: center;
  margin: 10px;
  border-radius: 4px;
}

div.no-prof a {
  color: #003399;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  display: block;
}

div.no-prof a:hover {
  text-decoration: underline;
}

td.cont {
  padding: 10px;
  font-size: 13px;
}

td.cont img.icon-first {
  vertical-align: middle;
  margin-right: 5px;
}

td.cont a {
  color: #0033cc;
  text-decoration: underline;
}

/* カラダカラGUIDE テーブル */
table.tr-guide {
  width: 220px;
  border-collapse: collapse;
  border: 1px solid #cccccc;
  margin-bottom: 15px;
  background-color: #ffffff;
}

table.tr-guide th {
  background-color: #e6f0fa;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #d0e0f0;
}

table.tr-guide th a {
  color: #003366;
  text-decoration: none;
}

table.tr-guide td {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.9;
  vertical-align: top;
  width: 50%;
}

table.tr-guide td a {
  color: #0033cc;
  text-decoration: underline;
}

table.tr-guide td img {
  vertical-align: middle;
  margin-right: 4px;
}

/* Google AdSense ラッパー */
.tr-adsense-wrap {
  text-align: center;
  margin: 15px auto;
  max-width: 100%;
  overflow: hidden;
}

/* ==========================================================================
   Responsive Mobile Optimization (max-width: 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
  #training-container {
    padding: 0 8px;
    font-size: 13px;
  }

  .training-main-table,
  .training-main-table tbody,
  .training-main-table tr,
  .training-main-table td {
    display: block;
    width: 100% !important;
  }

  #tre-l {
    padding-right: 0;
  }

  #tre-r {
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 25px;
  }

  /* メインコピー枠 */
  .top-copy {
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    padding: 70px 10px 12px 10px;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    border-radius: 4px;
  }

  /* お試し脳トレエリア */
  .trial-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
  }

  .trial-mobile-card {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    padding: 6px;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .trial-mobile-card a.trial-title-link {
    font-size: 12px;
    line-height: 1.3;
    display: block;
    color: #0033cc;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 4px;
  }

  .trial-mobile-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #eee;
    display: block;
  }

  /* ログイン時新着・人気 */
  table.tr-login-top,
  table.tr-login-top tbody,
  table.tr-login-top tr {
    display: block;
  }

  table.tr-login-top td.tr-s1 {
    display: block;
    width: 100% !important;
    margin-bottom: 12px;
    box-sizing: border-box;
  }

  /* ゲーム一覧をスマホで2列カードグリッドに変換 */
  .mobile-game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
  }

  .mobile-game-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .mobile-game-card .card-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
  }

  .mobile-game-card .card-head img {
    height: 16px;
    width: auto;
    flex-shrink: 0;
  }

  .mobile-game-card .card-head .game-title {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    color: #0033cc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-game-card img.game-thumb {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #eee;
  }

  .mobile-game-card .game-btn-row {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  /* サイドバーテーブルの幅を100%に */
  table.tr-menu,
  table.top-l-waku,
  table.tr-guide {
    width: 100% !important;
  }
}
