@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
  日経風：トップ主記事（toplead）
************************************/
.toplead .entry-card,
.toplead .a-wrap{
  display:flex;
  gap:20px;
  padding:24px;
  align-items:flex-start;
}
.toplead .entry-card-thumb{
  flex:0 0 42%;
  max-width:42%;
}
.toplead .entry-card-thumb img{
  width:100%;
  height:auto;
  display:block;
}
.toplead .entry-card-content{ flex:1; }
.toplead .entry-title{
  font-size:2.1em;
  font-weight:800;
  line-height:1.2;
  letter-spacing:-0.03em;
  margin-bottom:12px;
}
.toplead .entry-snippet,
.toplead .entry-card-snippet{
  font-size:1.05em;
  line-height:1.7;
  color:#222;
}
.toplead{
  border-bottom:3px solid #000;
  padding-bottom:28px;
  margin:0 -16px 12px; /* スマホ：端まで広げる（意図維持） */
}
@media (min-width: 752px){
  .toplead{ margin:0 0 36px; } /* PCは通常幅＆元の下余白を維持 */
}

/************************************
  指数バーの下：フル幅の境界線
************************************/
.regnas-marketbar{ position:relative; }
.regnas-marketbar::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  width:100vw;
  height:1px;
  background:rgba(0,0,0,0.08);
}

/************************************
  株価チャート：共通
************************************/
.stock-quote-bar{
  display:flex;
  flex-wrap:wrap;
  gap:12px 18px;
  align-items:baseline;
  margin:10px 0 8px;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;
}
.stock-quote-bar .label{
  color:rgba(0,0,0,0.60);
  font-size:12px;
  letter-spacing:0.02em;
}
.stock-quote-bar .price{
  font-size:18px;
  font-weight:700;
  letter-spacing:0.01em;
}
.stock-quote-bar .diff{
  font-size:14px;
  font-weight:700;
}
.stock-quote-bar .up{ color:#c00000; }
.stock-quote-bar .down{ color:#0b7a3a; }
.stock-quote-bar .flat{ color:rgba(0,0,0,0.55); }

.stock-chart-paper{
  border:1px solid rgba(0,0,0,0.14);
  border-radius:6px;
  padding:12px 12px 10px;
  background:#fff;
  min-width:0;
}
.stock-chart-split{
  height:1px;
  background:rgba(0,0,0,0.08);
  margin:10px 0;
}

/************************************
  株価：レイアウト（PC=2カラム）
************************************/
.stock-chart-layout{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:16px;
  align-items:start;
}
.stock-side-table{
  font-family:"Noto Sans JP","Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;
  font-size:12px;
  border-right:1px solid rgba(0,0,0,0.15);
  padding-right:10px;
}
.stock-side-table dl{ margin:0; }
.stock-side-table dt{
  margin-top:12px;
  color:rgba(0,0,0,0.55);
  letter-spacing:0.02em;
}
.stock-side-table dd{ margin:0; }
.stock-side-table dd.value{
  font-size:15px;
  font-weight:700;
  color:#111;
}
.stock-side-table dd.date{
  font-size:11px;
  color:rgba(0,0,0,0.45);
  margin-bottom:4px;
}

/************************************
  スマホ：左情報は崩さない＆チャートは画面に収める（スクロール無し）
************************************/
@media (max-width: 834px){

  /* 縦積み */
  .stock-chart-layout{ display:block; }

  /* 左情報：カード化 */
  .stock-side-table{
    border-right:none;
    padding-right:0;
    width:100%;
    box-sizing:border-box;
    padding:10px 12px;
    border:1px solid rgba(0,0,0,0.12);
    border-radius:6px;
    background:#fff;
    margin-bottom:10px;
  }
  .stock-side-table dt{ margin-top:0; }

  /* “1行=用語｜金額｜日付” を固定 */
  .stock-side-table dl{
    display:grid;
    grid-template-columns:auto 1fr auto;
    column-gap:10px;
    align-items:baseline;
  }
  .stock-side-table dt,
  .stock-side-table dd{ margin:0; }

  .stock-side-table dt,
  .stock-side-table dd.value,
  .stock-side-table dd.date{
    padding:10px 0;
    border-bottom:1px solid rgba(0,0,0,0.12);
  }

  .stock-side-table dt{
    color:rgba(0,0,0,0.70);
    white-space:nowrap;
  }
  .stock-side-table dd.value{
    text-align:right;
    font-weight:700;
    white-space:nowrap;
  }
  .stock-side-table dd.date{
    text-align:right;
    font-size:11px;
    color:rgba(0,0,0,0.55);
    white-space:nowrap;
  }

  /* 最終行の下線を消す（date基準） */
  .stock-side-table dd.date:last-of-type{
    border-bottom:none;
  }
  .stock-side-table dd.date:last-of-type + dt,
  .stock-side-table dd.date:last-of-type + dd{
    border-bottom:none;
  }

  /* チャート：スクロール無しで画面に収める */
  .stock-chart-paper{
    width:100%;
    box-sizing:border-box;
    overflow-x:hidden;
  }
  .stock-chart-inner{ min-width:0; }

  .stock-chart-paper canvas{
    display:block;
    width:100% !important;
    height:100% !important;
    max-width:100%;
  }
}

/************************************
  データなしオーバーレイ
************************************/
.stock-empty-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  color:#666;
  pointer-events:none;
  background:rgba(255,255,255,0.55);
}

/* 横方向のはみ出し保険（重複削除） */
html, body{ overflow-x:hidden; }

/* アーカイブの先頭タイトル（カテゴリ名など）を消す */
.archive-title{
  display:none !important;
}

/* 画面が縦に余っても、フッターを最下部に押し下げる */
html, body { height: 100%; }

#content { 
  min-height: calc(100vh - 220px);
}

/* ナビバー直下〜本文先頭の余白を全体的に詰める */
#content-in{
  padding-top: 0 !important;
}

#main{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/*ついか、かぶかいちらん*/
.seito-stock-table-wrap{ width:100%; }
.seito-stock-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border:1px solid rgba(0,0,0,0.12);
  font-size:14px;
}

.seito-stock-table th,
.seito-stock-table td{
  padding:10px 8px;
  border-bottom:1px solid rgba(0,0,0,0.10);
  vertical-align:middle;
}

.seito-stock-table thead th{
  font-weight:700;
  background:rgba(0,0,0,0.04);
  text-align:center;
}

.seito-stock-table .c-rank{ width:64px; text-align:center; }
.seito-stock-table .c-price{ width:120px; text-align:right; white-space:nowrap; }
.seito-stock-table .c-diff{ width:140px; text-align:right; white-space:nowrap; }
.seito-stock-table .c-vol{ width:120px; text-align:right; white-space:nowrap; }
.seito-stock-table .c-time{ width:80px; text-align:center; white-space:nowrap; }

.seito-stock-table .c-name a{ font-weight:700; }
.seito-stock-table .c-name .c-sub{ font-size:12px; opacity:0.65; margin-top:2px; }

.seito-stock-table .muted{ opacity:0.55; }
.seito-stock-table .is-up{ color:#c00000; }
.seito-stock-table .is-down{ color:#0b7a3a; }
.seito-stock-table .is-flat{ opacity:0.75; }

/* スマホ：横スクロールさせない → 列を減らす & 銘柄名は2行まで */
@media (max-width: 834px){
  .seito-stock-table{ font-size:13px; }
  .seito-stock-table .c-vol{ display:none; }
  .seito-stock-table .c-time{ display:none; }

  .seito-stock-table .c-name a{
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
}

/* =========================
  株式一覧テーブル（stock_table）専用
  ※他のテーブルに影響しないよう .seito-stock-table-wrap で限定
========================= */

/* ヘッダー：全部中央 */
.seito-stock-table-wrap .seito-stock-table thead th{
  text-align:center !important;
  white-space:nowrap;
}

/* 本文：数字は右寄せ（楽天っぽく） */
.seito-stock-table-wrap .seito-stock-table td.c-price,
.seito-stock-table-wrap .seito-stock-table td.c-diff,
.seito-stock-table-wrap .seito-stock-table td.c-vol,
.seito-stock-table-wrap .seito-stock-table td.c-turn{
  text-align:right !important;
  white-space:nowrap; /* 数字は折り返さない */
}

/* Noだけ中央 */
.seito-stock-table-wrap .seito-stock-table td.c-rank{
  text-align:center !important;
  white-space:nowrap;
}

/* フォント（テーブル内だけ） */
.seito-stock-table-wrap .seito-stock-table{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Noto Sans JP", "Meiryo", "Yu Gothic", "YuGothic",
               sans-serif;
  font-size:14px;
  line-height:1.25;
}

/* 銘柄セルの“変な余白”対策（a と sub を詰める） */
.seito-stock-table-wrap .seito-stock-table td.c-name a{
  display:inline;          /* inline-blockにすると高さが出るテーマがある */
  margin:0 !important;
  padding:0 !important;
  line-height:1.2 !important;
}
.seito-stock-table-wrap .seito-stock-table td.c-name .c-sub{
  display:block;
  margin:2px 0 0 0 !important; /* ここで2行目との距離を制御 */
  padding:0 !important;
  line-height:1.1 !important;
  font-size:12px;
}

/* market 表示切替：テーブル内だけに限定 */
.seito-stock-table-wrap .seito-stock-table .market-sp{ display:none; }
.seito-stock-table-wrap .seito-stock-table .market-pc{ display:inline; }

@media (max-width: 834px){
  /* スマホ：PC/SP切替 */
  .seito-stock-table-wrap .seito-stock-table .market-pc{ display:none; }
  .seito-stock-table-wrap .seito-stock-table .market-sp{ display:inline; }

  /* スマホ：詰める（行数削減の本丸） */
  .seito-stock-table-wrap .seito-stock-table td,
  .seito-stock-table-wrap .seito-stock-table th{
    padding:6px 6px !important; /* Cocoon側のpaddingに勝つ */
  }

  /* 数字列は最小幅に寄せる（銘柄列に幅を譲る） */
  .seito-stock-table-wrap .seito-stock-table td.c-price,
  .seito-stock-table-wrap .seito-stock-table td.c-diff,
  .seito-stock-table-wrap .seito-stock-table td.c-vol,
  .seito-stock-table-wrap .seito-stock-table td.c-turn,
  .seito-stock-table-wrap .seito-stock-table th.c-price,
  .seito-stock-table-wrap .seito-stock-table th.c-diff,
  .seito-stock-table-wrap .seito-stock-table th.c-vol,
  .seito-stock-table-wrap .seito-stock-table th.c-turn{
    width:1%;
  }

  /* 銘柄は残り全部使う */
  .seito-stock-table-wrap .seito-stock-table td.c-name,
  .seito-stock-table-wrap .seito-stock-table th.c-name{
    width:auto;
  }

  /* 会社名とコードの間の改行が“空行”に見える場合の最終手当 */
  .seito-stock-table-wrap .seito-stock-table td.c-name br{
    line-height:0;
  }
}
/* No列を詰める（PC/スマホ共通） */
.seito-stock-table-wrap .seito-stock-table th.c-rank,
.seito-stock-table-wrap .seito-stock-table td.c-rank{
  width: 2.2em;          /* 1〜99想定ならこれで十分 */
  padding-left: 4px !important;
  padding-right: 4px !important;
}

/* スマホはさらに詰める */
@media (max-width: 834px){
  .seito-stock-table-wrap .seito-stock-table th.c-rank,
  .seito-stock-table-wrap .seito-stock-table td.c-rank{
    width: 1.8em;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
}

/* =========================
   全ページ共通：指数バー直下の余白をゼロ
   （指数バー(#content-top) → コンテンツ(#content/#main) の間）
========================= */

/* 指数バー側の下余白を消す */
#content-top,
#content-top-in,
.widget-content-top{
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* コンテンツ側の上余白を消す */
#content,
#content-in,
#main,
#main-in,
.content,
.content-in,
.main{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 記事・固定ページで「最初のブロックのmargin-top」が隙間を作るのを防ぐ */
.entry-content > :first-child{
  margin-top: 0 !important;
}

.seito-top-gainers table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.seito-top-gainers th{
  text-align:left;
  padding:6px 4px;
  border-bottom:1px solid #ccc;
}

.seito-top-gainers td{
  padding:6px 4px;
}

.seito-top-gainers td:last-child{
  text-align:right;
  font-weight:600;
}

.seito-top-gainers .up{ color:#c00000; }
.seito-top-gainers .down{ color:#0b7a3a; }

.seito-top-gainers .stg-title{
  font-weight: 700;
  font-size: 13px;
  padding: 6px 0 8px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 6px;
}

.seito-top-gainers table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.seito-top-gainers th{
  text-align:left;
  padding:6px 4px;
  border-bottom:1px solid #e5e5e5;
  white-space:nowrap;
}

.seito-top-gainers td{
  padding:6px 4px;
  border-bottom:1px solid #f0f0f0;
}

.seito-top-gainers .stg-rank{
  width: 2.6em;      /* ←順位列を詰める */
  text-align: right;
  white-space: nowrap;
}

.seito-top-gainers .stg-rate{
  text-align:right;
  font-weight:600;
  white-space: nowrap;
}

.seito-top-gainers .up{ color:#c00000; }
.seito-top-gainers .down{ color:#0b7a3a; }


.seito-top-gainers{
  margin-top: 14px;              /* 広告との距離 */
  padding-top: 10px;             /* 線と文字の間 */
  border-top: 1px solid #e5e5e5; /* ← 区切り線 */
}

.seito-top-gainers{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid #222;
}
/* ランキングタイトルの下線を消す */
.seito-top-gainers .stg-title{
  border-bottom: none !important;
  padding-bottom: 0 !important;
}
/* ===== サイドバー：値上がり率トップ10の文字をスマホで縮めない ===== */
@media (max-width: 834px){

  #sidebar .seito-top-gainers,
  #sidebar .seito-top-gainers table,
  #sidebar .seito-top-gainers th,
  #sidebar .seito-top-gainers td{
    font-size: 13px !important;   /* 強制固定 */
  }

}

@media (max-width: 834px){

  /* 記事・固定ページのH1タイトルの「内側左余白」を強制で消す */
  body.single .article-header.entry-header .entry-title,
  body.page   .article-header.entry-header .entry-title{
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-indent: 0 !important;
  }

  /* もし ::before で飾りが入ってて押してる場合も潰す */
  body.single .article-header.entry-header .entry-title::before,
  body.page   .article-header.entry-header .entry-title::before{
    content: none !important;
    display: none !important;
  }
}
