/**
 * mobile.css — 移动端基线样式（改写自参考 mobile.css）
 */
:root {
  --mob-nav-h: 0px;
}

@media (max-width: 768px) {
  html {
    overflow-x: clip;
    max-width: 100vw;
  }
  body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overflow-x: clip;
    max-width: 100vw;
    font-size: 14px;
  }

  body.has-mob-nav {
    --mob-nav-h: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  body.has-mob-nav .main {
    padding-bottom: var(--mob-nav-h) !important;
  }

  /* ── 共用底部导航 ── */
  .mob-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    background: var(--bg, #0a0a0a);
    border-top: 1px solid var(--border, #1e2228);
    padding: 4px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  }
  .mob-nav::-webkit-scrollbar { display: none; }

  .mob-nav button,
  .mob-nav a {
    flex: 0 0 auto;
    min-width: 56px;
    min-height: 40px;
    border: none;
    background: transparent;
    color: var(--text2, #777);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 8px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-nav button.on,
  .mob-nav a.on {
    color: var(--mint, #7eeee6);
    background: var(--mint-dim, rgba(126, 238, 230, 0.08));
  }

  .mob-nav .mn-ico {
    font-size: 17px;
    line-height: 1;
  }

  .mob-nav .mn-lbl {
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 顶部栏在移动端简化 */
  body.has-mob-nav .top {
    min-height: 44px;
    padding: 6px 10px;
  }
  body.has-mob-nav .top h1 {
    font-size: 13px;
  }
  body.has-mob-nav .top .tabs {
    display: none; /* 移动端用底部导航代替顶部 tabs */
  }

  /* 表格移动端优化 */
  .tbl-wrap {
    -webkit-overflow-scrolling: touch;
  }
  td, th {
    padding: 5px 8px;
    font-size: 11px;
  }

  /* tc-grid 移动端 2 列 */
  .tc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 代币卡片收紧 */
  .tc {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .mob-nav .mn-lbl { font-size: 9px; }
  .tc-grid { grid-template-columns: 1fr 1fr; }
  .macro-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 更新时间戳 */
.upd-ts {
  margin-left: auto;
  font-size: 9px;
  font-weight: 500;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.upd-ts.stale { color: var(--yellow); }
