:root { --fg:#1c1c1e; --muted:#6b7280; --line:#e5e7eb; --accent:#ff9500; --up:#dc2626; --down:#2563eb; --bg:#fff; }
* { box-sizing: border-box; }
body { margin:0; font-family:-apple-system,"Hiragino Sans","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
  color:var(--fg); background:var(--bg); line-height:1.6; }
main { max-width:840px; margin:0 auto; padding:16px; }

.site-header { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px;
  max-width:840px; margin:0 auto; box-sizing:border-box;
  padding:12px 16px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--bg); z-index:10; }
.brand { font-weight:700; color:var(--fg); text-decoration:none; font-size:1.05rem; }
/* スクロール時のページタイトル(#162): position:fixed のオーバーレイ(レイアウトに影響せずジッター回避)。topはJSでヘッダー高に設定 */
.scroll-title { position:fixed; left:0; right:0; z-index:9; display:none;
  max-width:840px; margin:0 auto; box-sizing:border-box;
  padding:6px 16px; background:var(--bg); border-bottom:1px solid var(--line); box-shadow:0 2px 6px rgba(0,0,0,.06);
  font-size:.9rem; font-weight:700; color:var(--fg); cursor:pointer;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.scroll-title.show { display:block; }
/* 幅は両アプリで固定して統一（ランダム切替でレイアウトがずれないように） */
.cta-mini { display:inline-flex; align-items:center; gap:8px; width:252px; max-width:100%; box-sizing:border-box;
  background:#000; color:#fff; text-decoration:none; padding:6px 10px 6px 8px; border-radius:8px; font-weight:600; line-height:1.15; }
.cta-mini.cta-short { background:#1746a0; }   /* 機関空売りView (青) */
.cta-mini.cta-holder { background:#c0392b; }  /* 大量保有View (赤) */
.cta-mini-icon { width:30px; height:30px; border-radius:7px; flex:none; display:block; }
.cta-mini-msg { flex:1; min-width:0; font-size:.8rem; font-weight:600; line-height:1.28;
  white-space:pre-line; overflow:hidden;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.cta-mini-right { display:flex; flex-direction:column; align-items:center; gap:2px; margin-left:2px; flex:none; }
.cta-mini-os { font-size:.58rem; font-weight:600; opacity:.9; letter-spacing:.02em; white-space:nowrap; }
.cta-mini-get { background:#fff; color:#000; font-size:.7rem; font-weight:700;
  padding:2px 12px; border-radius:999px; letter-spacing:.02em; }

.search { position:relative; display:flex; flex:1 1 220px; order:3; }
.search input { flex:1; min-width:0; padding:8px 12px; font-size:1rem; border:1px solid var(--line); border-radius:9px; }
@media (min-width:560px){ .search { order:0; } }
.suggest { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:30; margin:0; padding:4px 0;
  list-style:none; background:var(--bg); border:1px solid var(--line); border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.12);
  max-height:60vh; overflow-y:auto; }
.suggest li { padding:8px 12px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.92rem; }
.suggest li.on, .suggest li:hover { background:#fff7ed; }
.suggest li .c { color:var(--muted); font-variant-numeric:tabular-nums; margin-right:6px; }

.breadcrumb { font-size:.85rem; color:var(--muted); margin:4px 0 8px; }
.breadcrumb a { color:var(--muted); }
h1 { font-size:1.5rem; margin:.2em 0 .5em; }
/* フィード見出し: タイトル(左) + 公表日(右・目立たせる) */
.feed-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:2px 14px; margin:.2em 0 .5em; }
.feed-head h1 { margin:0; }
.feed-date { flex:none; font-weight:700; color:var(--accent); font-size:1.05rem; white-space:nowrap; font-variant-numeric:tabular-nums; }
h2 { font-size:1.1rem; margin:1.4em 0 .5em; border-left:4px solid var(--accent); padding-left:8px; }

/* 見出し + 右のアクション(コピーボタン等) */
.sec-head { display:flex; align-items:center; justify-content:space-between; gap:8px 12px; flex-wrap:wrap; margin:1.4em 0 .5em; }
.sec-head h2 { margin:0; }
.copy-btn { flex:none; background:var(--accent); color:#fff; border:none; border-radius:8px;
  padding:6px 14px; font-size:.82rem; font-weight:600; cursor:pointer; white-space:nowrap; }
.copy-btn:hover { opacity:.92; }
.copy-btn.copied { background:#1a7f37; }
.copy-src { position:absolute; left:-9999px; top:0; width:1px; height:1px; opacity:0; }

/* H1直下のセクション内リンク */
.anchor-nav { display:flex; flex-wrap:wrap; gap:8px; margin:2px 0 4px; }
.anchor-nav a { text-decoration:none; color:var(--accent); font-size:.85rem; font-weight:600;
  padding:4px 12px; border:1px solid var(--line); border-radius:999px; }
.anchor-nav a:hover { background:var(--accent); color:#fff; border-color:var(--accent); }
/* アンカー遷移時に固定ヘッダーで隠れないようオフセット */
#reports, #trend, #large-holdings { scroll-margin-top:68px; }
.summary { background:#f9fafb; border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.summary strong { color:#111; }
/* 決算発表日(過去+未来) */
.earnings { margin:8px 0 10px; font-size:.92rem; line-height:1.8; }
.earn-date { white-space:nowrap; font-variant-numeric:tabular-nums; }
.earn-date.future { font-weight:700; color:#b45309; }
.earn-legend { color:#d97706; }
/* 表の計算日に付ける決算マーク */
.earn-badge { display:inline-block; font-size:.66rem; font-weight:700; color:#b45309;
  background:#fef3c7; border:1px solid #fcd34d; border-radius:4px; padding:0 5px; line-height:1.5; white-space:nowrap; }

.chart .trend { width:100%; height:auto; display:block; background:#0b1020; border-radius:10px; }
.chart .trend rect.hit { cursor:pointer; }
.chart .trend rect.hit:hover { fill:rgba(255,255,255,0.08); }
.chart-tip { position:fixed; z-index:50; transform:translate(-50%,-100%); pointer-events:none;
  background:#111827; color:#fff; font-size:.78rem; padding:7px 10px; border-radius:6px;
  white-space:nowrap; box-shadow:0 2px 8px rgba(0,0,0,.3); max-width:80vw; }
.chart-tip[hidden] { display:none; }
.chart-tip .ct-head { font-weight:700; margin-bottom:4px; }
.chart-tip .ct-earn { color:#fdba74; font-size:.78em; font-weight:700; border:1px solid #f97316; border-radius:3px; padding:0 4px; margin-left:5px; }
.chart-tip .ct-row { display:flex; align-items:center; gap:7px; line-height:1.5; }
.chart-tip .ct-total { font-weight:700; }
.chart-tip .ct-sw { width:9px; height:9px; border-radius:2px; flex:none; }
.chart-tip .ct-name { flex:1; overflow:hidden; text-overflow:ellipsis; max-width:11em; }
.chart-tip .ct-val { font-variant-numeric:tabular-nums; text-align:right; padding-left:12px; min-width:6em; }
.chart-tip .ct-pct { font-variant-numeric:tabular-nums; text-align:right; min-width:3.8em; color:#cbd5e1; }
.chart-tip .ct-total .ct-pct { color:#fff; }
.legend { list-style:none; padding:0; margin:8px 0 0; display:flex; flex-wrap:wrap; gap:6px 14px; font-size:.82rem; }
.legend li { display:flex; align-items:center; gap:5px; }
.legend .sw { width:11px; height:11px; border-radius:2px; display:inline-block; flex:none; }

.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:.92rem; }
th,td { padding:8px 10px; border-bottom:1px solid var(--line); text-align:left; }
/* テキスト列(銘柄/空売り者)は折り返し、数値・日付・見出しは nowrap で詰める */
th, td.num, td.date { white-space:nowrap; }
td.num, td.date { width:1%; }
/* 空売り者/提出者(長い社名)の折り返し。feed(トップ)は銘柄列が幅を吸収するので nowrap 維持。
   報告/大量保有は4列で計算日(西暦)を圧迫するため折り返し可にする(計算日の見切れ防止)。 */
td[data-label="空売り者"] { white-space:nowrap; }
.table-wrap.reports td[data-label="空売り者"],
.table-wrap.lh td[data-label="提出者"] { white-space:normal; word-break:break-word; }
th { color:var(--muted); font-weight:600; font-size:.82rem; }
td.num, th.num { text-align:right; }
td.num { font-variant-numeric:tabular-nums; }
td.date { color:var(--muted); font-variant-numeric:tabular-nums; }
/* 決算×空売り: コード列(デスクトップ)は内容幅・淡色 */
.table-wrap.earn td.code-col, .table-wrap.earn th.code-col { width:1%; white-space:nowrap; color:var(--muted); font-variant-numeric:tabular-nums; }
/* 決算日バーの件数バッジ */
.date-tabs .cnt { font-size:.72em; margin-left:5px; opacity:.7; }
.date-tabs .cur .cnt { opacity:.85; }
/* 決算×空売り: 過去日付のタブはグレー */
.date-tabs a.past { color:var(--muted); border-color:var(--line); }
/* ランキングの順位列(左端): 内容幅・左寄せ・淡色 */
.table-wrap.rank td.rank-no, .table-wrap.rank th.rank-no,
.table-wrap.sellers td.rank-no, .table-wrap.sellers th.rank-no,
.table-wrap.sdetail td.rank-no, .table-wrap.sdetail th.rank-no {
  width:1%; white-space:nowrap; text-align:left; color:var(--muted); font-variant-numeric:tabular-nums; }
.table-wrap td .code { color:var(--muted); font-size:.85em; margin-left:5px; font-variant-numeric:tabular-nums; }
/* 貸借区分バッジ(#154): 角丸矩形の枠付き・色分け。貸借=緑 / 信用(制度)=橙 / 非制度=灰 */
.ctag { display:inline-block; font-size:.76rem; font-weight:600; line-height:1.5;
  padding:0 5px; margin-left:6px; border:1px solid; border-radius:5px; vertical-align:middle; }
.ctag-t { color:#1e7d38; border-color:#7cc298; background:#e9f6ee; }
.ctag-s { color:#a65f00; border-color:#e0ad5c; background:#fdf1df; }
.ctag-o { color:#5a5a5a; border-color:#c4c4c4; background:#f1f1f1; }
.up { color:var(--up); } .down { color:var(--down); }
.table-wrap td.num .diff { font-size:.9em; margin-left:5px; }
.note { color:var(--muted); font-size:.85rem; margin:.2em 0 .6em; }
.count-note { text-align:right; }

/* デスクトップの最新の報告(feed): 銘柄名と空売り者を同じ幅にし、長い名前は折り返す
   (モバイルはグリッドなので min-width で限定)。table-layout:fixed + 見出し基準の列幅で等幅を厳密化。 */
@media (min-width:601px){
  .table-wrap.feed table { table-layout:fixed; }
  /* 6列: 銘柄 | 空売り者 | 計算日 | 残高数量 | 残高割合 | 増減 */
  .table-wrap.feed th:nth-child(1), .table-wrap.feed th:nth-child(2) { width:27%; }
  .table-wrap.feed th:nth-child(3) { width:8%; }
  .table-wrap.feed th:nth-child(4) { width:14%; }
  .table-wrap.feed th:nth-child(5) { width:12%; }
  .table-wrap.feed th:nth-child(6) { width:12%; }
  .table-wrap.feed td.stock, .table-wrap.feed td[data-label="空売り者"] {
    white-space:normal; word-break:break-word; }
}

.more { margin-top:1.2em; color:var(--muted); font-size:.9rem; }

.faq { margin-top:2em; }
.faq dt { font-weight:700; margin-top:14px; }
.faq dd { margin:4px 0 0; color:#374151; }
.faq code { background:#f3f4f6; padding:1px 5px; border-radius:4px; font-size:.9em; }

/* 画面上部のセクションナビ(最新の報告 · 残高ランキング · 全銘柄一覧)。
   ブレッドクラム風に控えめにし、オレンジの主張を減らす。 */
.site-nav { max-width:840px; margin:0 auto; padding:8px 16px 0; font-size:.9rem;
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.site-nav a { color:var(--accent); text-decoration:none; }
.site-nav a:hover { text-decoration:underline; }
.site-nav b { color:var(--fg); font-weight:700; }
.site-nav .sep { color:var(--line); }
/* 下部の共通ナビ(全ページ同一)。本文と区切るため上に線と余白 */
.site-nav-bottom { margin-top:1.8em; padding-top:14px; border-top:1px solid var(--line); }

/* 全ページ上部の「決算×高空売り」導線ストリップ(回遊促進)。控えめな1行。 */
/* 帯は画面全幅・中身(タグ+本文+矢印)は中央寄せ */
.earn-strip { display:flex; align-items:center; justify-content:center; gap:8px; text-decoration:none;
  padding:7px 16px; border-bottom:1px solid var(--line); background:#fff7ed;
  color:var(--fg); font-size:.85rem; }
.earn-strip:hover { background:#ffedd5; }
.earn-strip-tag { flex:none; background:var(--accent); color:#fff; font-weight:700;
  font-size:.72rem; padding:2px 7px; border-radius:999px; white-space:nowrap; }
.earn-strip-body { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.earn-strip-body b { font-weight:700; }
.earn-strip-arrow { flex:none; color:var(--accent); font-weight:700; }

/* タブ行: 左にラベル(増減/公表日)を置いて何の絞り込みか分かるようにする */
.tab-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:9px 0 2px; }
.tab-row .dir-tabs, .tab-row .date-tabs { margin:0; }
/* 公表日ラベル+日付タブのまとまり。PCはdir-tabsの右にインライン、スマホは次行へ折り返す */
.date-row { display:flex; align-items:center; gap:8px; margin-left:6px; }
.tab-label { color:var(--muted); font-size:.78rem; font-weight:700; white-space:nowrap; }
/* 増減トグルはセグメント型(連結)にして日付タブと見た目を変える */
.dir-tabs { display:inline-flex; border:1px solid var(--accent); border-radius:8px; overflow:hidden; }
.dir-tabs a, .dir-tabs .cur { font-size:.85rem; padding:6px 18px; text-decoration:none; font-weight:600; }
.dir-tabs a { color:var(--accent); background:#fff; }
.dir-tabs .cur { background:var(--accent); color:#fff; }
.dir-tabs a + a, .dir-tabs a + .cur, .dir-tabs .cur + a { border-left:1px solid var(--accent); }

/* 全銘柄一覧の五十音ジャンプバー & 行見出し */
.kana-bar { display:flex; flex-wrap:wrap; gap:5px 6px; margin:10px 0; }
.kana-bar a, .kana-bar .off, .kana-bar .cur { font-size:.85rem; padding:4px 10px; border:1px solid var(--line); border-radius:7px; text-decoration:none; font-variant-numeric:tabular-nums; }
.kana-bar a { color:var(--accent); }
.kana-bar a:hover { border-color:var(--accent); }
.kana-bar .off { color:#c7cbd1; }
.kana-bar .cur { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:700; }
.table-wrap tr.grp td { background:#f9fafb; font-weight:700; color:var(--muted); font-size:.85rem; }

.date-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 4px; }
.date-tabs a, .date-tabs .cur { text-decoration:none; font-size:.85rem; padding:5px 11px; border-radius:8px; border:1px solid var(--line); font-variant-numeric:tabular-nums; }
.date-tabs a { color:var(--accent); }
.date-tabs .cur { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:600; }

.stock-list { list-style:none; padding:0; columns:2; column-gap:24px; }
.stock-list li { break-inside:avoid; margin:2px 0; }
.stock-list .code { color:var(--muted); font-variant-numeric:tabular-nums; margin-left:6px; }

.pager { position:relative; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; margin:24px 0; font-variant-numeric:tabular-nums; }
.pager a { text-decoration:none; color:var(--accent); font-weight:600; padding:7px 12px; border:1px solid var(--line); border-radius:8px; }
.pager .disabled { color:#cbd5e1; padding:7px 12px; }
.pager .nums { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.pager .nums .cur { padding:7px 12px; border-radius:8px; background:var(--accent); color:#fff; font-weight:700; }
.pager .nums .gap { color:var(--muted); padding:0 2px; }
.pager .pager-cta { background:#000; color:#fff; border-color:#000; position:absolute; right:0; top:50%; transform:translateY(-50%); }
@media (max-width:600px){ .pager .pager-cta { position:static; transform:none; flex-basis:100%; text-align:center; margin-top:4px; } }

.app-cta { max-width:840px; margin:24px auto; padding:20px; display:flex; gap:20px; align-items:center;
  background:#fff7ed; border:1px solid #fed7aa; border-radius:14px; }
.app-cta-shot { width:120px; height:auto; border-radius:14px; box-shadow:0 6px 18px rgba(0,0,0,.18); flex:0 0 auto; }
.app-cta-body { flex:1; min-width:0; }
.app-cta-name { font-weight:700; font-size:1.05rem; margin:0 0 2px; }
.app-cta-lead { margin:0 0 8px; color:#374151; font-size:.92rem; }
.app-cta-points { list-style:none; margin:0 0 12px; padding:0; }
.app-cta-points li { position:relative; padding-left:20px; font-size:.88rem; color:#374151; margin:3px 0; }
.app-cta-points li::before { content:"✓"; position:absolute; left:0; color:var(--accent); font-weight:700; }
.app-cta-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; }
.cta-text { color:var(--accent); text-decoration:none; font-weight:600; font-size:.9rem; }
@media (max-width:600px){ .app-cta { flex-direction:column; text-align:center; }
  .app-cta-points { display:inline-block; text-align:left; } .app-cta-actions { justify-content:center; } }

/* アプリ紹介LP (/app) */
.app-lp { max-width:980px; margin:0 auto; }
.lp-hero { display:flex; gap:32px; align-items:center; padding:24px 0 8px; }
.lp-hero-text { flex:1; min-width:0; }
.lp-hero h1 { font-size:2rem; line-height:1.2; margin:0 0 8px; }
.lp-hero h1 .nowrap { white-space:nowrap; }
.lp-tagline { font-size:1.15rem; font-weight:700; margin:0 0 10px; }
.lp-sub { color:#374151; margin:0 0 18px; }
/* App Store 公式バッジ */
.lp-cta-badge { display:inline-block; line-height:0; }
.lp-cta-badge img { height:56px; width:auto; }
.lp-note { color:var(--muted); font-size:.82rem; margin:8px 0 0; }
.lp-hero-shot { flex:0 0 auto; }
.lp-hero-shot img { width:240px; height:auto; border-radius:22px; box-shadow:0 12px 36px rgba(0,0,0,.22); }
.lp-shots { display:flex; gap:14px; overflow-x:auto; padding:18px 4px 24px; scroll-snap-type:x mandatory; }
.lp-shots figure { flex:0 0 auto; width:180px; margin:0; scroll-snap-align:center; text-align:center; }
.lp-shots img { width:180px; height:auto; border-radius:16px; border:1px solid var(--line); box-shadow:0 6px 18px rgba(0,0,0,.14); }
.lp-shots figcaption { font-size:.82rem; color:var(--muted); margin-top:6px; }
.lp-features { margin:16px 0 8px; }
.lp-features h2 { font-size:1.4rem; margin:0 0 16px; }
.lp-feature-grid { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px; }
.lp-feature-grid li { background:#f9fafb; border:1px solid var(--line); border-radius:12px; padding:16px; }
.lp-ico { font-size:1.6rem; display:block; margin-bottom:6px; }
.lp-feature-grid h3 { font-size:1.02rem; margin:0 0 6px; }
.lp-feature-grid p { margin:0; color:#374151; font-size:.9rem; }
.lp-final { text-align:center; margin:36px 0 8px; padding:28px 16px; background:#fff7ed; border:1px solid #fed7aa; border-radius:16px; }
.lp-final h2 { font-size:1.3rem; margin:0 0 16px; }
@media (max-width:600px){
  .lp-hero { flex-direction:column-reverse; text-align:center; gap:18px; }
  .lp-hero h1 { font-size:1.7rem; }
  .lp-hero-shot img { width:200px; }
}

.site-footer { max-width:840px; margin:24px auto; padding:16px; border-top:1px solid var(--line);
  color:var(--muted); font-size:.82rem; }
.site-footer a { color:var(--muted); }

@media (max-width:600px){
  .stock-list { columns:1; }
  h1 { font-size:1.3rem; }
  /* 表を狭幅ではカード型に (1カラム積み上げ) */
  .table-wrap { overflow-x:visible; }
  .table-wrap thead { display:none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display:block; }
  .table-wrap td, .table-wrap td.num, .table-wrap td.date { width:auto; }
  .table-wrap tr { position:relative; border:1px solid var(--line); border-radius:10px; padding:8px 12px 9px; margin:8px 0; }
  .table-wrap td { padding:1px 0; border:none; white-space:normal; line-height:1.5;
    display:flex; justify-content:flex-start; align-items:baseline; gap:10px; }
  /* ラベルは固定幅で揃え、値はすぐ右に左寄せ。フォントサイズは値と統一 */
  .table-wrap td { font-size:.9rem; }
  .table-wrap td::before { content:attr(data-label); color:var(--muted); font-size:.9rem; font-weight:600; flex:none; width:5.5em; }
  /* 銘柄詳細の配当・権利確定日: 「権利付最終日」(6字)が折り返さないようラベル幅を拡張 */
  .table-wrap.ex-rights td::before { width:6.5em; white-space:nowrap; }
  /* 銘柄セル(カード見出し兼用): 既定は通常太さ。一覧系の銘柄名は太字にしない。 */
  .table-wrap td.stock { display:block; font-weight:400; padding-right:2.6em; margin-bottom:1px; }
  .table-wrap td.stock::before { content:none; }
  /* stock.html のカード型テーブルは td.stock が各カードの見出し(空売り者/計算日/提出者)なので太字を維持 */
  .table-wrap.reports td.stock, .table-wrap.daily td.stock, .table-wrap.lh td.stock { font-weight:700; }
  /* 空売り者: ラベル無し・名前のみ */
  .table-wrap td[data-label="空売り者"]::before { content:none; }
  /* 機関別/大量保有: 日付を折り返さず上部に小さく1行で表示(ラベル無し) */
  .table-wrap.reports td.date, .table-wrap.lh td.date {
    display:block; width:auto; white-space:nowrap;
    font-size:.8rem; color:var(--muted); margin:0 0 1px; }
  .table-wrap.reports td.date::before, .table-wrap.lh td.date::before { content:none; }
  /* 順位: 右上 (ランキング等) */
  .table-wrap td[data-label="#"] { position:absolute; top:7px; right:12px; display:block; padding:0; color:var(--muted); font-size:.8rem; }
  .table-wrap td[data-label="#"]::before { content:"#"; }
  /* 五十音の行見出しはカード化せず、軽い区切り見出しにする */
  .table-wrap tr.grp { border:none; padding:0; margin:10px 0 2px; }
  .table-wrap tr.grp td { background:none; padding:0; }

  /* 最新の報告(feed): スマホは2段組。1行(tr)を3カラムgridにし、
     1段目 [銘柄名 コード | 残高数量 | 残高割合]
     2段目 [空売り者      | 計算日   | 増減   ]  と配置する。
     残高割合セルは ratio(上) + 増減span(下) を縦積みにして2段にまたがる。 */
  .table-wrap.feed table, .table-wrap.feed tbody { display:block; }
  .table-wrap.feed thead { display:block; }
  /* 見出しと本文で列位置を揃えるため列幅を固定 (1fr | 残高数量 | 残高割合) */
  .table-wrap.feed tr { display:grid; grid-template-columns:1fr 6.4em 5em;
    column-gap:12px; row-gap:2px; align-items:baseline;
    padding:9px 0; margin:0; border:none; border-bottom:1px solid var(--line); border-radius:0; }
  /* 見出しも本文と同じ2段組:
     1段目 [銘柄 | 残高数量 | 残高割合] / 2段目 [空売り者 | 計算日 | 増減] */
  .table-wrap.feed thead tr { padding:0 0 6px; border-bottom:2px solid var(--line); }
  .table-wrap.feed thead th { font-size:.76rem; color:var(--muted); font-weight:600;
    padding:0; min-width:0; border:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .table-wrap.feed thead th:nth-child(1) { grid-row:1; grid-column:1; }              /* 銘柄 */
  .table-wrap.feed thead th:nth-child(2) { grid-row:2; grid-column:1; }              /* 空売り者 */
  .table-wrap.feed thead th:nth-child(4) { grid-row:1; grid-column:2; text-align:right; } /* 残高数量 */
  .table-wrap.feed thead th:nth-child(3) { grid-row:2; grid-column:2; text-align:right; } /* 計算日 */
  .table-wrap.feed thead th:nth-child(5) { grid-row:1; grid-column:3; text-align:right; } /* 残高割合 */
  .table-wrap.feed thead th:nth-child(6) { grid-row:2; grid-column:3; text-align:right; } /* 増減 */
  .table-wrap.feed td { display:block; min-width:0; padding:0; margin:0; border:none;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.9rem; }
  .table-wrap.feed td::before { content:none; }
  /* 1列目: 銘柄名(コード) / 空売り者 */
  .table-wrap.feed td.stock { grid-row:1; grid-column:1; font-weight:400; }
  .table-wrap.feed td.stock .code { color:var(--muted); font-size:.85em; margin-left:.4em; }
  .table-wrap.feed td[data-label="空売り者"] { grid-row:2; grid-column:1; color:var(--muted); }
  /* 2列目: 残高数量 / 計算日 */
  .table-wrap.feed td[data-label="残高数量"] { grid-row:1; grid-column:2; text-align:right;
    font-variant-numeric:tabular-nums; }
  .table-wrap.feed td.date { grid-row:2; grid-column:2; text-align:right; font-size:.8rem; color:var(--muted); }
  /* 3列目: 残高割合(1段目) / 増減(2段目) */
  .table-wrap.feed td[data-label="残高割合"] { grid-row:1; grid-column:3; text-align:right;
    font-variant-numeric:tabular-nums; }
  .table-wrap.feed td[data-label="増減"] { grid-row:2; grid-column:3; text-align:right;
    font-size:.8rem; font-variant-numeric:tabular-nums; }

  /* 公表日ラベル+日付ボタンをまとめた date-row を2行目に落とす(増加/減少は自然幅で1行目)。
     ラベルは date-row の左端に来る。 */
  .tab-row .date-row { flex-basis:100%; }

  /* ランキング: 順位|銘柄|残高数量|残高割合 を1行に整列(見出し付き)。
     table を4カラムgrid化し thead/tbody/tr を display:contents で見出しと列を揃える。 */
  .table-wrap.rank table { display:grid; grid-template-columns:auto 1fr auto auto; column-gap:12px; }
  .table-wrap.rank thead, .table-wrap.rank tbody,
  .table-wrap.rank thead tr, .table-wrap.rank tbody tr { display:contents; }
  .table-wrap.rank th, .table-wrap.rank td { display:block; width:auto; min-width:0;
    padding:8px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.rank th { font-size:.78rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.rank th.num, .table-wrap.rank td.num { text-align:right; }
  .table-wrap.rank td { font-size:.9rem; }
  .table-wrap.rank td.stock { font-weight:400; color:var(--fg); text-overflow:ellipsis; }
  .table-wrap.rank td.rank-no, .table-wrap.rank th.rank-no { width:auto; text-align:left; }
  .table-wrap.rank td.stock::before,
  .table-wrap.rank td[data-label="順位"]::before,
  .table-wrap.rank td[data-label="残高数量"]::before,
  .table-wrap.rank td[data-label="残高割合"]::before { content:none; }
  /* 銘柄別増減(#140): rank グリッドを流用。独自ラベル列の ::before を抑制 */
  .table-wrap.changes td[data-label]::before { content:none; }

  /* 信用倍率ランキング(#154): スマホは4カラム(順位|銘柄|空売り|倍率)。信用買残と銘柄コードは隠して幅節約 */
  .table-wrap.mratio table { grid-template-columns:auto 1fr auto auto; column-gap:8px; }
  .table-wrap.mratio th:nth-child(5), .table-wrap.mratio td:nth-child(5) { display:none; }
  .table-wrap.mratio td[data-label]::before { content:none; }
  /* 銘柄名は1段目(長くても省略)、2段目に コード + 貸借区分バッジ を必ず表示 */
  .table-wrap.mratio td.stock { white-space:normal; }
  .table-wrap.mratio td.stock a { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .table-wrap.mratio td.stock .code { margin:3px 0 0 0; vertical-align:middle; }
  .table-wrap.mratio td.stock .ctag { margin:3px 0 0 6px; vertical-align:middle; }

  /* 信用残(#152): 申込日|信用売残|信用買残|信用倍率 を4カラムgrid化して表形式を維持(カード化しない) */
  .table-wrap.credit table { display:grid; grid-template-columns:auto 1fr 1fr 1fr; column-gap:10px; }
  .table-wrap.credit thead, .table-wrap.credit tbody,
  .table-wrap.credit thead tr, .table-wrap.credit tbody tr { display:contents; }
  .table-wrap.credit th, .table-wrap.credit td { display:block; width:auto; min-width:0;
    padding:7px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.credit th { font-size:.74rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.credit th.num, .table-wrap.credit td.num { text-align:right; }
  .table-wrap.credit td { font-size:.86rem; }
  .table-wrap.credit td.date { color:var(--fg); }
  .table-wrap.credit td[data-label]::before, .table-wrap.credit td.date::before { content:none; }

  /* 投資家別空売り先(一覧): 順位|空売り者|対象銘柄数 を1行に整列 */
  .table-wrap.sellers table { display:grid; grid-template-columns:auto 1fr auto; column-gap:12px; }
  .table-wrap.sellers thead, .table-wrap.sellers tbody,
  .table-wrap.sellers thead tr, .table-wrap.sellers tbody tr { display:contents; }
  .table-wrap.sellers th, .table-wrap.sellers td { display:block; width:auto; min-width:0;
    padding:8px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.sellers th { font-size:.78rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.sellers th.num, .table-wrap.sellers td.num { text-align:right; }
  .table-wrap.sellers td { font-size:.9rem; }
  .table-wrap.sellers td.stock { font-weight:400; color:var(--fg); text-overflow:ellipsis; }
  .table-wrap.sellers td.rank-no { width:auto; text-align:left; }
  .table-wrap.sellers td.stock::before,
  .table-wrap.sellers td[data-label="順位"]::before,
  .table-wrap.sellers td[data-label="対象銘柄数"]::before { content:none; }

  /* 決算×空売り: 銘柄(コードは銘柄内)|残高数量|残高割合 を1行に整列(3列) */
  .table-wrap.earn table { display:grid; grid-template-columns:1fr auto auto; column-gap:10px; }
  .table-wrap.earn thead, .table-wrap.earn tbody,
  .table-wrap.earn thead tr, .table-wrap.earn tbody tr { display:contents; }
  .table-wrap.earn th, .table-wrap.earn td { display:block; width:auto; min-width:0;
    padding:8px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.earn th { font-size:.78rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.earn th.num, .table-wrap.earn td.num { text-align:right; }
  .table-wrap.earn td { font-size:.9rem; }
  .table-wrap.earn td.stock { font-weight:400; text-overflow:ellipsis; }
  .table-wrap.earn td.code-col { color:var(--muted); font-variant-numeric:tabular-nums; }
  .table-wrap.earn td.stock::before, .table-wrap.earn td[data-label]::before { content:none; }

  /* 空売り者の詳細(対象銘柄): スマホも1段。銘柄コードを隠し、最終公表日を列で同じ行に表示 */
  .table-wrap.sdetail table { display:grid; grid-template-columns:auto 1fr auto auto auto; column-gap:9px; }
  .table-wrap.sdetail thead, .table-wrap.sdetail tbody,
  .table-wrap.sdetail thead tr, .table-wrap.sdetail tbody tr { display:contents; }
  .table-wrap.sdetail th, .table-wrap.sdetail td { display:block; width:auto; min-width:0;
    padding:8px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.sdetail th { font-size:.72rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.sdetail th.num, .table-wrap.sdetail td.num { text-align:right; }
  .table-wrap.sdetail td { font-size:.86rem; }
  .table-wrap.sdetail td.stock { text-overflow:ellipsis; }
  .table-wrap.sdetail td.stock .code { display:none; }
  .table-wrap.sdetail td.rank-no, .table-wrap.sdetail th.rank-no { width:auto; text-align:left; }
  .table-wrap.sdetail td.last-date, .table-wrap.sdetail th.last-date-h {
    text-align:right; color:var(--muted); font-size:.72rem; }
  .table-wrap.sdetail td.stock::before,
  .table-wrap.sdetail td[data-label]::before { content:none; }

  /* 銘柄詳細 報告表: 空売り者|計算日|残高数量|残高割合 を1行に整列。
     幅が足りない時は空売り者名を末尾省略(…)して1行を維持する。 */
  /* 計算日は内容幅で左に全表示、空売り者を可変(1fr)、数量・割合は内容幅 */
  .table-wrap.reports table { display:grid; grid-template-columns:auto 1fr auto auto; column-gap:14px; }
  .table-wrap.reports thead, .table-wrap.reports tbody,
  .table-wrap.reports thead tr, .table-wrap.reports tbody tr { display:contents; }
  .table-wrap.reports th, .table-wrap.reports td { display:block; width:auto; min-width:0;
    padding:8px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.reports th { font-size:.78rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.reports th.num, .table-wrap.reports td.num { text-align:right; }
  .table-wrap.reports td { font-size:.9rem; }
  .table-wrap.reports td.stock { font-weight:400; color:var(--fg); text-overflow:ellipsis; }
  .table-wrap.reports td[data-label="計算日"] { color:var(--muted); }
  .table-wrap.reports td[data-label="空売り者"]::before,
  .table-wrap.reports td[data-label="計算日"]::before,
  .table-wrap.reports td[data-label="残高数量"]::before,
  .table-wrap.reports td[data-label="残高割合"]::before { content:none; }
  /* 残高割合は「割合」と「増減」を2段に(右揃えのまま改行) */
  .table-wrap.reports td[data-label="残高割合"] .diff { display:block; margin-left:0; }
  /* 機関別: PCは計算日の右、スマホは幅が狭いので計算日の下に折り返す */
  .table-wrap.reports td[data-label="計算日"] .earn-badge { display:block; margin-top:2px; }

  /* 大量保有表(モバイル): 義務発生日|提出者|保有割合|保有目的 を機関別表と同じ整列テーブルに。
     義務発生日=内容幅で左、提出者=可変(1fr)、保有割合=右2段、保有目的=右で折り返し可 */
  .table-wrap.lh table { display:grid; grid-template-columns:auto 1fr auto auto; column-gap:12px; }
  .table-wrap.lh thead, .table-wrap.lh tbody,
  .table-wrap.lh thead tr, .table-wrap.lh tbody tr { display:contents; }
  .table-wrap.lh th, .table-wrap.lh td { display:block; width:auto; min-width:0;
    padding:8px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.lh th { font-size:.78rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.lh th.num, .table-wrap.lh td.num { text-align:right; }
  .table-wrap.lh td { font-size:.9rem; }
  .table-wrap.lh td.stock { font-weight:400; color:var(--fg); }
  .table-wrap.lh td[data-label="保有目的"] { white-space:normal; word-break:break-word;
    text-align:right; color:var(--muted); font-size:.82rem; }
  .table-wrap.lh td[data-label="提出者"]::before,
  .table-wrap.lh td[data-label="義務発生日"]::before,
  .table-wrap.lh td[data-label="保有割合"]::before,
  .table-wrap.lh td[data-label="保有目的"]::before { content:none; }
  .table-wrap.lh td[data-label="保有割合"] .diff { display:block; margin-left:0; }

  /* 銘柄詳細 合計(推移)表: 見出し付きの整列テーブル。
     table を3カラムgrid化し thead/tbody/tr を display:contents にすることで、
     見出しと各行の数値列を内容にフィットさせて厳密に揃える（列幅固定による切れ・重なりを回避）。 */
  .table-wrap.daily table { display:grid; grid-template-columns:1fr auto auto; column-gap:16px; }
  .table-wrap.daily thead, .table-wrap.daily tbody,
  .table-wrap.daily thead tr, .table-wrap.daily tbody tr { display:contents; }
  .table-wrap.daily th, .table-wrap.daily td { display:block; width:auto; min-width:0;
    padding:7px 0; border:none; border-bottom:1px solid var(--line); overflow:visible; white-space:nowrap; }
  .table-wrap.daily th { font-size:.78rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.daily th .pc-only { display:none; }
  .table-wrap.daily th.num, .table-wrap.daily td.num { text-align:right; }
  .table-wrap.daily td { font-size:.9rem; }
  .table-wrap.daily td.stock { font-weight:400; color:var(--fg); margin:0; padding:7px 0; }
  .table-wrap.daily td[data-label="残高数量"]::before,
  .table-wrap.daily td[data-label="残高割合"]::before { content:none; }
}

/* 大量保有(5%超株主) / ロング×ショート */
.lh-tag { display:inline-block; font-size:.72rem; font-weight:600; padding:1px 6px; border-radius:10px; margin-left:5px; vertical-align:middle; white-space:nowrap; }
.lh-tag.new { background:#e7f5ec; color:#1a7f37; }
.lh-tag.ret { background:#e7effb; color:#1f6feb; }
.lh-tag.lend { background:#f3f0fb; color:#6f42c1; }
.lh-tag.lapse { background:#eeeeee; color:#666; }
.table-wrap tr.lh-lapsed td { color:var(--muted); }
.lh-tag.amend { background:#eeeeee; color:#666; }

/* 配当権利付最終日 (#183): 他ページ(決算/報告等)と同様、モバイルは display:grid で表形式に整列。
   5列: 銘柄(1fr)|権利付最終日|権利落日|基準日|残高割合 */
@media (max-width:600px){
  .table-wrap.exr table { display:grid; grid-template-columns:1fr auto auto auto auto; column-gap:9px; }
  .table-wrap.exr thead, .table-wrap.exr tbody,
  .table-wrap.exr thead tr, .table-wrap.exr tbody tr { display:contents; }
  .table-wrap.exr th, .table-wrap.exr td { display:block; width:auto; min-width:0;
    padding:8px 0; border:none; border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; }
  .table-wrap.exr th { font-size:.72rem; color:var(--muted); font-weight:600; padding:0 0 5px; }
  .table-wrap.exr th.num, .table-wrap.exr td.num { text-align:right; }
  .table-wrap.exr td { font-size:.82rem; }
  .table-wrap.exr td.stock { text-overflow:ellipsis; }
  .table-wrap.exr td.stock .code { color:var(--muted); font-size:.85em; margin-left:.3em; }
  .table-wrap.exr td.stock::before, .table-wrap.exr td[data-label]::before { content:none; }
}
