/* #region zone:desk.style.chart.expand — ปุ่มขยายกราฟเต็มจอและโหมดกราฟใหญ่ */
/* Loaded after the Board layout so the enlarged chart wins over every per-layout chart height.
   The button is always in the toolbar row (never inside the ⋯ sheet). It right-aligns on its own when the view
   tools have moved out of the toolbar (Board ≥900px puts them in the range bar); otherwise it follows them. */
.chart-expand-btn {
  order: 11;
  margin-left: auto;
  border: 1px solid var(--line);
  color: var(--text);
}
.chart-toolbar:has(.tb-tools) .chart-expand-btn {
  margin-left: 0;
}
.chart-expand-icon {
  display: inline-flex;
}
.chart-expand-btn[aria-pressed='true'] {
  border-color: transparent;
  background: var(--acc-soft);
  color: var(--accent-text);
}
@container (max-width: 799px) {
  .chart-expand-label {
    display: none;
  }
}
@media (max-width: 899px) {
  .chart-expand-btn {
    order: 6;
  }
}
/* Phones: the timeframe row keeps one slot at its end for the button, so the tools row below never overflows
   and the button never wraps alone onto a row of its own (desk-touch.css phone toolbar rule). */
@media (max-width: 599px) {
  :root .chart-toolbar .tf-seg,
  :root[data-board] .chart-toolbar .tf-seg {
    flex: 1 1 calc(100% - var(--tb-h) - 2px - var(--sp-2));
    min-width: 0;
  }
  .chart-expand-btn {
    order: 1;
  }
}
/* Enlarged: the chart card covers the viewport (one gutter of breathing room); the stats strip and trend box
   step aside so the plot gets the height. The chart re-fits through its own ResizeObserver. */
:root[data-chart-expanded] body {
  overflow: hidden;
}
:root[data-chart-expanded] #app-shell .chart-card {
  position: fixed;
  inset: var(--sp-2);
  z-index: 48;
  display: flex;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
}
:root[data-chart-expanded] #app-shell .chart-card .chart-host {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
:root[data-chart-expanded] #app-shell .chart-card :is(.symbol-stats, .board-trend, .index-notice) {
  display: none;
}
@media (max-width: 600px) {
  :root[data-chart-expanded] #app-shell .chart-card {
    inset: 0;
    border-radius: 0;
  }
}
/* #endregion */
