@font-face {
  font-family: 'MiSans';
  src: url('../fonts/MiSans-subset.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: #f7f7f8; overflow-x: hidden; }
.stage {
  position: absolute; top: 0; left: 0; /* 脱离文档流:scale 不缩布局,否则未缩放高度撑出长滚动条 */
  width: 1080px;
  transform-origin: top left;
  font-family: MiSans, 'HarmonyOS Sans SC', -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
  padding-bottom: 80px;
}

/* 顶栏 */
.top { text-align: center; padding-top: 56px; }
.top h1 { font-size: 44px; font-weight: 600; }
.top-sub { font-size: 30px; color: #8a8a8e; margin-top: 10px; }

/* tabs */
.tabs {
  display: flex; margin: 40px 56px 0; background: #ededef;
  border-radius: 44px; padding: 8px; height: 88px;
}
.tab {
  flex: 1; border: 0; background: transparent; border-radius: 36px;
  font-size: 32px; font-family: inherit; color: #1a1a1a; cursor: pointer;
}
.tab.is-active { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); font-weight: 500; }

/* 滑动容器:strip 宽 3×1080,居中显示当前面板 */
.swipe { overflow: hidden; touch-action: pan-y; }
.strip { display: flex; width: 3240px; transform: translateX(-1080px); }
.strip > .panel { width: 1080px; flex-shrink: 0; }
.strip.static { width: 1080px; transform: none; } /* 单面板静态态(初次渲染) */

/* 大数字 */
.bignum-wrap { padding: 48px 72px 0; min-height: 150px; }
.bignum { font-size: 88px; font-weight: 700; line-height: 1.1; }
.bignum-unit { font-size: 34px; font-weight: 400; margin-left: 12px; }
.panel-sub { font-size: 30px; color: #8a8a8e; margin-top: 8px; }
.panel.has-sel .bignum-wrap > .bignum, .panel.has-sel .bignum-wrap > .panel-sub { visibility: hidden; }

/* 图表 */
.chart { position: relative; margin: 40px 24px 0 72px; height: 640px; }
.plot { position: absolute; inset: 0 110px 70px 0; }
.gridline { position: absolute; left: 0; right: 0; height: 2px; background: #efefef; }
.ylabels { position: absolute; inset: 0 0 70px auto; width: 100px; }
.ylabel {
  position: absolute; left: 24px;
  transform: translateY(50%); font-size: 26px; color: #9e9e9e;
}
.bar {
  position: absolute; bottom: 0;
  background: linear-gradient(180deg, #f8c64a 0%, #f5b71f 100%);
}
.xlabels { position: absolute; left: 0; right: 110px; bottom: 0; height: 50px; }
.xlabels span {
  position: absolute; transform: translateX(-50%); white-space: nowrap;
  font-size: 26px; color: #9e9e9e;
}
/* tooltip */
.tip {
  position: absolute; top: -170px; display: inline-block; text-align: center;
  background: #f0f0f2; border-radius: 24px; padding: 20px 36px; z-index: 2;
}
.tip-title { font-size: 44px; font-weight: 700; }
.tip-title::after { content: ' 步'; font-size: 28px; font-weight: 400; }
.tip-sub { font-size: 28px; color: #8a8a8e; margin-top: 4px; }
.tip-line { position: absolute; top: -20px; width: 2px; background: #d9d9db; z-index: 1; }

/* 卡片 */
.card {
  background: #fff; margin: 56px 40px 0; border-radius: 28px;
  padding: 40px 48px 56px; box-shadow: 0 2px 12px rgba(0,0,0,.03);
}
.card-head { display: flex; align-items: center; gap: 20px; padding-bottom: 32px; border-bottom: 2px solid #f0f0f0; }
.card-icon {
  width: 64px; height: 64px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="32" fill="%23f8bd20"/><path d="M10 32q22-19 44 0q-22 19-44 0z" fill="%23fff"/><circle cx="32" cy="32" r="9.5" fill="%23f8bd20"/><circle cx="32" cy="32" r="3.5" fill="%23fff"/></svg>') no-repeat center / contain;
}
.card-title { font-size: 36px; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; row-gap: 48px; padding-top: 40px; }
.cell:nth-child(even) { border-left: 2px solid #f0f0f0; padding-left: 48px; }
.cell-v { font-size: 56px; font-weight: 700; }
.cell-u { font-size: 26px; font-weight: 400; margin-left: 8px; }
.cell-l { font-size: 28px; color: #8a8a8e; margin-top: 8px; }

/* 调参面板(?ui=1,不参与缩放与截图) */
.uipanel { position: fixed; right: 16px; bottom: 16px; z-index: 9; font-size: 14px; font-family: system-ui, sans-serif; }
.uipanel-toggle { float: right; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #333; color: #fff; cursor: pointer; font-size: 20px; }
.uipanel-body { display: none; clear: both; margin-bottom: 8px; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 12px; width: 280px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.uipanel.open .uipanel-body { display: grid; gap: 8px; }
.uipanel-body label { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.uipanel-body input, .uipanel-body select { width: 150px; }
.uipanel-seed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.uipanel-seed code { font-size: 11px; word-break: break-all; width: 100%; color: #888; }
