/* calc2 extras on top of /calc/assets/index-CkwJHup_.css */

.chart-svg-box {
  position: relative;
  width: 100%;
  overflow: visible;
}

.chart-interactive svg {
  touch-action: manipulation;
  cursor: crosshair;
}

.chart-tip {
  z-index: 8;
  min-width: 156px;
  max-width: min(240px, 78vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: #102a2af2;
  color: #fff;
  box-shadow: 0 12px 32px #102a2a40;
  pointer-events: auto;
}

.chart-tip-fixed {
  position: fixed;
}

.chart-tip-center.chart-tip-above {
  transform: translate(-50%, calc(-100% - 12px));
}
.chart-tip-center.chart-tip-below {
  transform: translate(-50%, 12px);
}
.chart-tip-left.chart-tip-above {
  transform: translate(0, calc(-100% - 12px));
}
.chart-tip-left.chart-tip-below {
  transform: translate(0, 12px);
}
.chart-tip-right.chart-tip-above {
  transform: translate(-100%, calc(-100% - 12px));
}
.chart-tip-right.chart-tip-below {
  transform: translate(-100%, 12px);
}

.chart-tip-age {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.chart-tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 11px;
}

.chart-tip-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.chart-tip-row span {
  color: #c9d8d4;
  flex: 1;
  min-width: 0;
}

.chart-tip-row b {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.chart-fs-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* 全屏布局与旧版 /calc 一致：竖屏旋转 90°，横屏铺满 */
.chart-wrap.is-fs {
  position: fixed !important;
  z-index: 9999;
  margin: 0;
  background: #f7f7f1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px;
}

.chart-wrap.is-fs .legend {
  flex: none;
  justify-content: flex-start;
  font-size: 14px;
  margin-bottom: 8px;
}

.chart-wrap.is-fs .chart-svg-box {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: visible;
  position: relative;
}

.chart-wrap.is-fs svg {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.chart-wrap.is-fs .axis-label {
  font-size: 14px;
}

.chart-wrap.is-fs .chart-fs-btn {
  display: block;
  margin-top: 10px;
  flex: none;
}

.chart-wrap.is-fs .chart-tip {
  position: absolute;
  z-index: 20;
}

@media (orientation: portrait) {
  .chart-wrap.is-fs {
    top: 0;
    left: 100%;
    width: 100vh;
    height: 100vw;
    transform: rotate(90deg);
    transform-origin: top left;
  }
}

@media (orientation: landscape) {
  .chart-wrap.is-fs {
    inset: 0;
    width: 100vw;
    height: 100vh;
    transform: none;
  }
}

.chart-dot,
.chart-bar {
  cursor: pointer;
}

.chart-data-label {
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke fill;
  stroke: #f7f7f1;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.chart-data-label-sm {
  font-size: 9px;
  font-weight: 600;
}

.chart-wrap.is-fs .chart-data-label {
  font-size: 12px;
}

.chart-wrap.is-fs .chart-data-label-sm {
  font-size: 11px;
}

.calc2-note {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 13px;
}

.calc2-note a {
  color: var(--green);
  font-weight: 700;
}

.health-frame {
  width: 100%;
  min-height: 1080px;
  border: 0;
  display: block;
  background: #fff;
}

.notes {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.error-box {
  width: min(720px, calc(100% - 32px));
  margin: 48px auto;
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
  color: #b45309;
}
