/* ============================ 分割ファイルヘッダー ============================
   責務: 分析ダッシュボード(カード・表・今後の方針ノート・自動更新表示)
   見る場面: ダッシュボードの見た目を変えるとき(描画ロジックは web/dashboard.js)
   ============================================================================ */
/* ================= 分析ダッシュボード ================= */
#dashPane {
  display: none; flex: 1.7; min-width: 0; flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--chat-tint); backdrop-filter: blur(6px);
}
body.view-dash #dashPane { display: flex; }
body.view-dash #chatPane { display: none !important; }
@media (max-width: 939px) {
  #dashPane { position: fixed; inset: 0; border-left: 0; background: var(--bg0); z-index: 6; }
}
#dashBody { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px 30px; -webkit-overflow-scrolling: touch; }
.dash-loading, .dash-empty { color: var(--dim); text-align: center; padding: 60px 20px; }
.dash-empty h2 { font-family: var(--serif); color: var(--text); margin: 18px 0 10px; letter-spacing: 0.06em; }
.dash-empty p { font-size: 13.5px; line-height: 1.9; }
.dash-empty .dim { color: var(--dim2); font-size: 12px; margin-top: 8px; }
.dash-sun {
  width: 84px; height: 84px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 36% 36%, var(--sun2), var(--sun) 62%, #b81f0e 100%);
  box-shadow: 0 14px 44px rgba(255, 77, 54, 0.35);
}
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile {
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 16px; backdrop-filter: blur(14px);
}
.tile-label { color: var(--dim); font-size: 11.5px; letter-spacing: 0.08em; }
.tile-value { font-family: var(--serif); font-size: 30px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile-delta { color: var(--dim2); font-size: 11.5px; }
.tile-delta.up { color: var(--ok); }
.dash-sec { margin: 22px 0; }
.dash-h {
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.1em; margin-bottom: 10px;
  display: flex; align-items: baseline; gap: 10px;
}
.dash-h::before { content: "●"; color: var(--sun); font-size: 7px; }
.chart-wrap { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 12px 6px 6px; }
.chart-tip {
  position: absolute; background: var(--panel); border: 1px solid var(--line2);
  border-radius: 10px; padding: 8px 11px; font-size: 12px; line-height: 1.7; pointer-events: none; z-index: 3;
  white-space: nowrap;
}
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 200px) 1fr; gap: 10px; align-items: center; }
.bar-label { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { position: relative; height: 22px; background: var(--glass); border-radius: 6px; }
.bar-fill {
  height: 100%; border-radius: 4px 4px 4px 4px; min-width: 4px;
  background: linear-gradient(90deg, #2a78d6, #3987e5);
  border-right: 2px solid var(--bg0);
}
.bar-val { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--text); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dash-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 12px; }
.dash-table th { color: var(--dim2); font-weight: 600; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
.dash-table td { color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.dash-table td:first-child { color: var(--text); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 自動更新の表示・アカウント切替 */
.dash-meta { color: var(--dim2); font-size: 11.5px; letter-spacing: 0.04em; margin-bottom: 12px; }
.dash-live { color: var(--ok); font-weight: 600; }
.dash-acc-name { font-family: var(--serif); font-size: 13px; color: var(--dim); letter-spacing: 0.08em; margin-bottom: 12px; }
.dash-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.dash-tab {
  background: var(--glass); border: 1px solid var(--line); color: var(--dim);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; transition: all 0.15s;
}
.dash-tab:hover { color: var(--text); border-color: var(--line2); }
.dash-tab.on { background: rgba(57, 135, 229, 0.18); border-color: #3987e5; color: #fff; }

/* 「今後の方針」= 読みやすく整形したノート(数字→意味→次の一手) */
.dash-note {
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 18px; font-size: 14px; line-height: 1.85; color: var(--text);
}
.dash-note .md-h { font-family: var(--serif); font-size: 15px; letter-spacing: 0.04em; color: var(--text); margin: 14px 0 6px; }
.dash-note .md-h:first-child { margin-top: 0; }
.dash-note h4.md-h { font-size: 13px; color: var(--dim); }
.dash-note .md-p { margin: 6px 0; }
.dash-note .md-ul { margin: 6px 0 6px 2px; padding-left: 18px; }
.dash-note .md-ul li { margin: 4px 0; }
.dash-note strong { color: var(--text); }
.dash-md { margin-top: 10px; }
.dash-md summary { color: var(--dim); font-size: 12.5px; cursor: pointer; }
.dash-report {
  color: var(--dim); font-size: 13px; line-height: 1.8; margin-top: 8px;
  padding: 12px 14px; background: rgba(255,255,255,0.02); border-radius: 12px;
}
.dash-report .md-h { font-family: var(--serif); font-size: 13.5px; color: var(--text); margin: 10px 0 5px; }
.dash-report .md-ul { margin: 5px 0 5px 2px; padding-left: 18px; }
.dash-report strong { color: var(--text); }

