/* ==========================================================================
   Reset + 基础版式
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #E8EAEE;
  font-family: var(--font-cn);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 细滚动条 ----------
   Windows 默认滚动条又宽又灰，很破坏界面气质。
   统一成 10px 圆角细条，悬停加深；不影响滚动行为。 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #CFD4DC;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #B4BCC8;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---------- 画布等比缩放容器 ----------
   设计稿固定 1440×900，窗口变化时整体缩放，保证像素级还原 */
.canvas-viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-stage {
  position: relative;
  width: var(--w-canvas);
  height: var(--h-canvas);
  transform-origin: center center;
  flex: none;
}

/* ---------- 屏幕 ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.screen.is-active {
  display: flex;
}

/* ---------- 通用 ---------- */
.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 屏幕切换导航（多屏预览用，正式部署可删） ---------- */
.screen-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  gap: var(--s-2);
  padding: var(--s-4);
  background: rgba(15, 20, 25, 0.86);
  border-radius: var(--r-btn);
  backdrop-filter: blur(12px);
  box-shadow: var(--sh-modal);
}

.screen-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--font-cn);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--r-chip);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.screen-nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.screen-nav button.is-active {
  background: var(--primary);
  color: #fff;
}