html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#tv_chart_container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 首屏主题底色：与 Widget 构造前恢复的 data-theme 同步，避免刷新白闪。 */
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #131722;
  color-scheme: dark;
}

html[data-theme="light"],
html[data-theme="light"] body {
  background: #ffffff;
  color-scheme: light;
}

/* 非阻塞的目录指标错误反馈；使用 textContent，不暴露服务器绝对路径。 */
.tv-js-indicator-errors {
  position: fixed;
  inset-inline-start: 12px;
  bottom: 48px;
  z-index: 11000;
  box-sizing: border-box;
  max-width: min(520px, calc(100vw - 24px));
  max-height: 40vh;
  overflow: auto;
  padding: 10px 14px;
  border: 1px solid #b2b5be;
  border-radius: 6px;
  background: #fff;
  color: #131722;
  box-shadow: 0 2px 10px #0002;
  font: 13px/1.5 sans-serif;
  overflow-wrap: anywhere;
}
.tv-js-indicator-errors summary { cursor: pointer; }
.tv-js-indicator-errors ul { padding-inline-start: 20px; }
.tv-js-indicator-errors button { cursor: pointer; font: inherit; }
html[data-theme="dark"] .tv-js-indicator-errors {
  background: #1f1f1f;
  color: #dbdbdb;
  border-color: #434651;
}
