/* 上部トグルと管理リンク、テーブルオーバーレイ（ネットワークの graph.css と衝突しない範囲だけ） */
.viewtoggle {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px; z-index: 60;
  background: rgba(120,120,120,.16); backdrop-filter: blur(4px);
  border-radius: 999px; padding: 2px;
}
.vtab {
  border: none; background: transparent; border-radius: 999px;
  width: 30px; height: 24px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #888; padding: 0;
}
.vtab.active { background: rgba(255,255,255,.9); color: #555; }

.adminlink {
  position: fixed; top: 12px; right: 14px; z-index: 60;
  color: #bbb; font-size: 10px; line-height: 1; text-decoration: none;
}

/* テーブル整列モードでは、SVGテキストのタイトル（省略表示）は隠し、
   下のforeignObject版（.row-title / 省略なし・横スクロール可）に差し替える */
#graph.table-mode .node-title { display: none !important; }

/* テーブル整列モード: タイトル（省略せず表示。foreignObject内でのoverflow-x:autoは
   モバイルSafariでスクロール要素ごと描画が壊れる既知の不具合があったため使わない。
   はみ出す分はクリップせずそのまま表示し、全文はタップでモーダルから読める） */
.row-title {
  font-size: 12px; color: #000; white-space: nowrap;
  overflow: visible;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 18px;
  cursor: pointer;
}

/* テーブル整列モード: タイトル下のショーノート冒頭プレビュー（複数行折り返し・高さで切り詰め） */
.row-summary {
  font-size: 11px; color: #666; line-height: 1.4;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  white-space: normal;
  overflow: hidden;
  cursor: pointer;
}

/* テーブル整列モード: パン/ピンチではなく縦スクロールで見る */
#graph-container.table-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#graph-container.table-scroll #graph { touch-action: pan-y; }

/* テーブル整列モード: タイトル下のタグ（横並び・グレー） */
.row-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  font-size: 9px; color: #999; line-height: 1.3;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
}
.row-tags span { white-space: nowrap; }

/* テーブル整列モード: ネットワーク専用の層を丸ごと非表示にする
   （opacityではなくdisplay:noneで切り離すことで、シミュレーションが
    止まっていても再描画・アニメーションが一切残らないようにする） */
#graph.table-mode .links,
#graph.table-mode .link-handles,
#graph.table-mode .deco-layer,
#graph.table-mode .logo-layer,
#graph.table-mode .node.tag,
#graph.table-mode .text-node.tag,
#graph.table-mode .pulse-ring {
  display: none !important;
}
