#updateBtn {
  position: absolute;
}

.panel_left_bottom.layout_2 .kpi_card {
  display: block;
  height: 50px;
  border-radius: 1rem;
}

.panel_left_bottom.layout_2 .kpi_title {
  display: none;
}

.panel_left_bottom.layout_2 .kpi_front {
  width: 100%;
}

.kpi_title {
  font-size: 14px;
  color: #3c5f7f;
  font-weight: 600;
  margin-left: 8px;
  margin-bottom: 4px;
  opacity: 0.8;
}

.kpi_card {
  display: flex;
  align-items: flex-start;
  color: #2f5f88;
  min-height: 0;
  font-family: Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  perspective: 800px;
  flex-direction: column;
}

.kpi_card:hover .kpi_inner {
  transform: rotateY(180deg);
}

.kpi_inner {
  position: relative;
  white-space: pre;
  width: 100%;
  height: 50px;
  font-size: 32px;
  font-weight: 700;
  transform-style: preserve-3d;
}

.kpi_front,
.kpi_back {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.18);
}

.kpi_front {
  width: 11ch;
  /* margin-left: calc(50% - (10.5ch + 1.5rem) / 2); */
}

.kpi_front * {
  pointer-events: none;
}

.kpi_back {
  width: 100%;
  transform: rotateY(180deg);
  font-size: 24px;
  color: #4c4c4c;
  /* margin-right: 1.5rem; */
}

.kpi_static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.55em;
  height: 1.2em;
  line-height: 1.2em;
}

.kpi_number {
  display: flex;
}

.kpi_digit {
  position: relative;
  width: 0.72em;
  height: 1.2em;
  overflow: hidden;
  display: inline-block;
}

/* .kpi_card,
.kpi_card * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none;
} */

.kpi_title,
.kpi_inner,
.kpi_number,
.kpi_digit,
.kpi_track,
.kpi_track span,
.kpi_static,
.kpi_unit,
.kpi_currency {
  user-select: none;
  pointer-events: none;
}

.kpi_track {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.kpi_track span {
  height: 1.2em;
  line-height: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.kpi_unit {
  /* min-width: 1.2em;  */
  text-align: left;
  justify-content: flex-start;
}

.drag-ghost {
  --ghost-x: 0px;
  --ghost-y: 0px;
  --ghost-scale: 1.02;
  --ghost-rot-x: 0deg;
  --ghost-rot-y: 0deg;
  --ghost-opacity: 1;

  --shadow-x: 50px;
  --shadow-y: 100px;
  --shadow-blur: 10px;
  --shadow-alpha: 0.3;

  --highlight-alpha: 0.7;
  --inner-alpha: 0.2;

  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  pointer-events: none;
  z-index: 999;
  border-radius: 1rem;
  overflow: hidden;
  will-change: transform, opacity, box-shadow;

  transform: translate3d(var(--ghost-x), var(--ghost-y), 0)
    scale(var(--ghost-scale)) rotateX(var(--ghost-rot-x))
    rotateY(var(--ghost-rot-y));

  opacity: var(--ghost-opacity);

  box-shadow:
    var(--shadow-x) var(--shadow-y) var(--shadow-blur)
      rgba(40, 70, 100, var(--shadow-alpha)),
    inset 1px 1px 1px rgba(255, 255, 255, var(--highlight-alpha)),
    inset -2px -2px 2px rgba(85, 91, 100, var(--inner-alpha));
}

.drag-ghost.is-dragging {
  cursor: grabbing;
}

.drag-ghost.is-dropping {
  /* 这里只作为状态标记，真正下落由 JS 更新 CSS 变量 */
}

.fake-lift-source {
  filter: brightness(0.98);
}

.panel_left_bottom.layout_2 > .chart_box {
  height: 50px;
}

.chart_box {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  padding: 0.5rem;
  box-sizing: border-box;
}

.chart_box canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== 缩略图模式 ===== */
.thumb-mode .panel_right_top {
  flex-wrap: wrap; /* 允许换行 */
  gap: 0.6rem;
}

/* 每个 chart 变成小卡片 */
.thumb-mode .chart_box {
  flex: 0 0 auto; /* 不再平分 */
  width: 160px; /* ⭐ 控制缩略图大小 */
  aspect-ratio: 16 / 9;

  padding: 0.4rem;
  border-radius: 0.8rem;

  background: rgba(255, 255, 255, 0.12);
}

/* canvas 填满 */
.thumb-mode .chart_box canvas {
  width: 100% !important;
  height: 100% !important;
}
