/* ============================================================
   base.css — reset / 排版 / 移动端布局栅格 / 字体字重
   ============================================================ */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 300; /* 全局纤细 */
  color: var(--text-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.3s ease;
}

/* 应用容器：移动端单列，桌面端居中限宽模拟手机画布 */
#app {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: transparent;
  padding-bottom: 84px; /* 给底部 Tab 留位 */
}

/* 顶部标题区 */
.app-header {
  padding: 26px 20px 8px;
}
.app-header h1 {
  font-size: 22px;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.5px;
}
.app-header .sub {
  font-size: 12.5px;
  color: var(--text-sub);
  font-weight: 300;
  margin-top: 2px;
}

/* 页面 section：默认隐藏，激活显示 */
.page {
  display: none;
  padding: 0 16px 24px;
  animation: fadeIn 0.3s ease;
}
.page.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 区块间细浅分割线留白 */
.divider {
  height: 1px;
  background: var(--divider);
  margin: 22px 4px;
  border: none;
}

/* 通用区块标题 */
.section-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
  letter-spacing: 1px;
  margin: 0 0 10px 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-sub);
}

/* 底部 Tab 导航 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  box-shadow: 0 -4px 18px rgba(120, 150, 140, 0.08);
  z-index: 50;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--tab-inactive);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 14px;
  font-family: inherit;
  transition: color 0.2s;
}
.tab-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}
.tab-item.active {
  color: var(--tab-active);
}

/* 隐藏 html2canvas 用的离屏卡片容器 */
#card-stage {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 360px;
  pointer-events: none;
}
