/* ==========================================================
   10-base.css  reset / 容器 / 排版
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  font-family: var(--font);
  font-size: var(--f-bd);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body { overflow: hidden; }

h1,h2,h3,h4,p,ul,ol,figure { margin: 0; padding: 0; }
ul,ol { list-style: none; }
button { font-family: inherit; font-size: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--c-primary); text-decoration: none; }

/* 数字等宽，数据更专业 */
.num, .metric-val, .ring-txt { font-variant-numeric: tabular-nums; }

/* ---------- 手机容器 ---------- */
#phone {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--c-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 桌面预览：收窄居中 + 手机壳 */
@media (min-width: 640px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EDF0F5;
    background-image: radial-gradient(circle at 50% 0%, #F4F6FA 0%, #E4E9F1 100%);
  }
  #phone {
    width: 390px;
    height: 844px;
    max-height: calc(100vh - 40px);
    border-radius: 40px;
    box-shadow: 0 0 0 10px #1B2233, 0 0 0 11px #333B4F,
                0 28px 64px rgba(15,23,42,.22), 0 4px 12px rgba(15,23,42,.10);
  }
  #statusbar { display: flex !important; }
  #home-indicator { display: block !important; }
}

/* ---------- 状态栏（仅桌面预览显示） ---------- */
#statusbar {
  display: none;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 30px;
  font-size: var(--f-sm);
  font-weight: 600;
  color: var(--c-text);
  background: transparent;
  position: relative;
  z-index: 30;
}
#statusbar .sb-icons { display: flex; align-items: center; gap: 5px; }

#home-indicator {
  display: none;
  position: absolute;
  bottom: 7px; left: 50%;
  transform: translateX(-50%);
  width: 134px; height: 5px;
  border-radius: 3px;
  background: rgba(16,24,43,.28);
  z-index: 40;
  pointer-events: none;
}
@media (min-width: 640px) {
  #tabbar { padding-bottom: 18px; height: calc(var(--h-tab) + 18px); }
}

/* ---------- 视图容器 ---------- */
#app {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
}

.view.enter { animation: viewIn .24s var(--ease) both; }
.view.enter-back { animation: viewBack .24s var(--ease) both; }
@keyframes viewIn  { from { opacity:.4; transform: translateX(20px);} to { opacity:1; transform:none;} }
@keyframes viewBack{ from { opacity:.4; transform: translateX(-16px);} to { opacity:1; transform:none;} }

.body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: var(--s4) var(--s4) var(--s8);
}
.body::-webkit-scrollbar { width: 0; height: 0; }
.body.no-pad { padding: 0 0 var(--s8); }

.tab-root .body { padding-bottom: 96px; }

/* 通用文本 */
.t-lg { font-size: var(--f-lg); font-weight: 600; letter-spacing: -.2px; }
.t-md { font-size: var(--f-md); font-weight: 600; }
.t-bd { font-size: var(--f-bd); }
.t-sm { font-size: var(--f-sm); }
.t-xs { font-size: var(--f-xs); }
.muted  { color: var(--c-text-2); }
.muted2 { color: var(--c-text-3); }
.center { text-align: center; }
.bold { font-weight: 600; }
.pre { white-space: pre-wrap; word-break: break-word; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.clamp3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

.row { display: flex; align-items: center; }
.row-b { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap1{gap:4px}.gap2{gap:8px}.gap3{gap:12px}.gap4{gap:16px}
.grow { flex: 1 1 auto; min-width: 0; }
.mt1{margin-top:4px}.mt2{margin-top:8px}.mt3{margin-top:12px}.mt4{margin-top:16px}
.mt5{margin-top:20px}.mt6{margin-top:24px}.mt7{margin-top:32px}
.mb2{margin-bottom:8px}.mb3{margin-bottom:12px}.mb4{margin-bottom:16px}

.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;
}

.divider { height:1px; background: var(--c-line); margin: var(--s4) 0; }
