:root {
  --bg: #0f0b17;
  --line: rgba(255, 255, 255, 0.09);
  --fg: #f2eef8;
  --muted: #9d94b3;
  --pi: #8b5cf6;
  --pi-2: #d946ef;
  --radius: 18px;
}

* { box-sizing: border-box; }

/* hidden 属性优先级最高：防止 .dock 等设置了 display 的元素在隐藏时仍然显示 */
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

/* 页面底色：任何滚动/回弹都不露白 */
html { background: #0f0b17; }

/* 禁止移动端字体自动放大（font boosting），否则长文本块会把布局撑出屏幕 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(1100px 620px at 15% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(217, 70, 239, 0.18), transparent 55%),
    var(--bg);
  color: var(--fg);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans Devanagari",
        "Nirmala UI", "Mangal", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 28px 18px 40px;
  display: flex;
  justify-content: center;
}

.shell { width: 100%; max-width: 460px; }

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--pi);
}

/* 品牌 logo + OP + 副标题：仅首页左上角显示，其他页签隐藏并压缩顶部 */
.brand-info { text-align: left; min-width: 0; }
.brand-info h1 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--fg);
  line-height: 1.2;
}
.brand-info .sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
/* 品牌 logo + OP + 副标题：首页和登录页显示，其他页签隐藏并压缩顶部 */
body:not(.on-home):not(.on-login) .brand .mark,
body:not(.on-home):not(.on-login) .brand .brand-info { display: none; }
body:not(.on-home):not(.on-login) .brand { margin-bottom: 2px; min-height: 18px; }

/* 商城分类筛选条 */
.cat-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 10px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(220, 210, 240, 0.85);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.12s ease;
}
.cat-chip:active { transform: scale(0.95); }
.cat-chip.on {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  border-color: transparent;
  color: #fff;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.mark { color: var(--pi); display: grid; place-items: center; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.card.center { text-align: center; }

h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }

.muted { color: var(--muted); margin: 0; }
.small { font-size: 12.5px; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.985); }
.btn[disabled] { opacity: 0.55; cursor: default; }

.btn.primary {
  background: linear-gradient(135deg, var(--pi), var(--pi-2));
  color: #fff;
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.32);
}

.btn.primary:hover { filter: brightness(1.06); }

.pi-dot {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.link {
  background: none;
  border: 0;
  padding: 4px 6px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}

.link:hover { color: var(--fg); }

.row { display: flex; align-items: center; gap: 13px; }
.grow { flex: 1; min-width: 0; }

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--pi), var(--pi-2));
  flex: 0 0 auto;
}

.row h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 商品列表 */
.products { margin-top: 18px; }

.product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.p-info { flex: 1; min-width: 0; }

.p-title { font-size: 14px; font-weight: 600; }

.p-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

.p-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  vertical-align: middle;
  margin-left: 4px;
  font-weight: 500;
}

.p-btn {
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.18);
  color: #e9d5ff;
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s ease;
}

.p-btn:hover { background: rgba(139, 92, 246, 0.32); }
.p-btn[disabled] { opacity: 0.5; cursor: default; }

.hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #fca5a5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  border-radius: 6px;
}

/* 愿景文案（登录页下方） */
.vision {
  margin-top: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
}

/* 圆形团队照片 */
.vision-photo {
  /* 直径随屏幕高度伸缩：小屏不挤压文字，大屏保持醒目 */
  --d: clamp(150px, 25vh, 210px);
  display: block;
  width: var(--d);
  height: var(--d);
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.55),
    0 0 0 6px rgba(139, 92, 246, 0.12),
    0 0 34px rgba(139, 92, 246, 0.28);
}

.vision h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #c4b5fd, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c4b5fd;
}

.vision p { margin: 0; }

.vision p + p { margin-top: 13px; }

.vision b { color: #e9d5ff; font-weight: 600; }

.vision .tagline {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(157, 148, 179, 0.75);
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 6px auto;
  border: 2.5px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--pi);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 签到 ---------- */

.mine {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(217, 70, 239, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.03);
}

.mine-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mine-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.mine-bal {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.mine-bal span {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(96deg, #fff 6%, #d8c7ff 55%, #e9a8ff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.mine-bal small { font-size: 12px; color: var(--muted); font-weight: 600; }

.mine-streak {
  text-align: right;
  line-height: 1.25;
  padding-top: 4px;
}

.mine-streak b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.mine-streak span { display: block; font-size: 11px; color: var(--muted); }

.mine-streak em {
  display: inline-block;
  margin-top: 4px;
  font-style: normal;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  color: #d8b4fe;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.energy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 14px;
}

.energy-cells {
  display: flex;
  gap: 5px;
  flex: 1;
}

.energy-cells i {
  flex: 1;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.energy-cells i.on {
  background: linear-gradient(90deg, var(--pi), var(--pi-2));
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.55);
}

.energy-txt {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 62px;
  text-align: right;
}

.btn.block {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

/* 弹窗内左右双按钮 */
.btn-row {
  display: flex;
  gap: 10px;
}
.btn-row .btn {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  letter-spacing: 0.02em;
  margin: 0;
}
.btn-row .btn.ghost { margin-top: 0; }

/* 居中提醒弹窗 */
.alert-sheet {
  min-height: 0;
  width: calc(100% - 48px);
  max-width: 340px;
  border-radius: 20px;
  padding-bottom: 16px;
}
.alert-msg {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(235, 226, 250, 0.9);
  text-align: center;
  word-break: break-word;
}

.mine-sub {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
  font-variant-numeric: tabular-nums;
}

.warn {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.warn b { color: #fca5a5; font-variant-numeric: tabular-nums; }

/* ---------- 底部悬浮导航（毛玻璃） ---------- */

body { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(430px, calc(100% - 28px));
  display: flex;
  gap: 6px;
  padding: 7px;
  border-radius: 24px;
  z-index: 60;

  background: linear-gradient(180deg, rgba(40, 30, 62, 0.58), rgba(20, 14, 33, 0.72));
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    0 22px 48px -18px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 顶边高光，让玻璃有厚度 */
.dock::before {
  content: "";
  position: absolute;
  inset: 0 14% auto 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
}

/* 不支持 backdrop-filter 时退化为实色，避免文字糊在背景上 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock { background: rgba(26, 19, 42, 0.96); }
}

.dock button {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 4px 8px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: rgba(190, 178, 214, 0.72);
  font: inherit;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.22s ease, background 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.dock button svg { transition: transform 0.22s ease, filter 0.22s ease; }

.dock button.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.28), rgba(217, 70, 239, 0.13));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dock button.active svg {
  filter: drop-shadow(0 0 9px rgba(168, 85, 247, 0.85));
  transform: translateY(-1px);
}

.dock button:active { transform: scale(0.97); }

/* ---------- Tab 面板 ---------- */

.tab-panel { animation: panelIn 0.28s ease both; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.hello { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.hello b { color: var(--fg); font-weight: 600; }

/* 顶部小头像 */
.avatar.sm {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.32);
  transition: transform 0.16s ease;
}

.avatar.sm:active { transform: scale(0.94); }

/* 语言切换（显示当前语言，点击展开四语菜单） */
.lang-btn {
  flex: 0 0 auto;
  height: 44px;
  min-width: 60px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, transform 0.15s ease;
}

.lang-btn:hover { background: rgba(255, 255, 255, 0.14); }
.lang-btn:active { transform: scale(0.96); }

/* ---------- 发行池 ---------- */

.pool-card {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.pool-head {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.pool-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 5px 0;
  color: var(--muted);
}

.pool-row b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }

.pool-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  margin: 12px 0 8px;
  overflow: hidden;
}

.pool-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pi), var(--pi-2));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.pool-note { margin: 0; font-size: 11px; color: var(--muted); }
.pool-note b { color: #d8b4fe; }

/* ---------- 区块标题 ---------- */

.sec-title { margin: 2px 0 4px; font-size: 18px; letter-spacing: -0.01em; }

.sec-title.sm {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 20px 0 8px;
}

.sec-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- 我的 ---------- */

.me-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.me-row:first-child { padding-top: 0; }
.me-row:last-child { border-bottom: 0; padding-bottom: 0; }
.me-row span { color: var(--muted); flex: none; }
.me-row b { font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #cbb8ef;
}

.card.list { padding: 6px 18px; }

.hist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
}

.hist-row:last-child { border-bottom: 0; }
.hist-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-pts { font-weight: 600; color: #86efac; font-variant-numeric: tabular-nums; }
.hist-pts.zero { color: var(--muted); }

.empty-txt { margin: 16px 0; text-align: center; font-size: 12.5px; color: var(--muted); }

.btn.ghost {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #e7dcf7;
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- 登录页固定不滚动 ---------- */
/* 登录视图高度锁定为一屏，内容居中；仅主页允许滚动 */
/* ---------- App 模式：整页不滚，仅内容区滚动 ---------- */
body.is-app {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  padding: 0;
  align-items: stretch;
}

body.is-app .shell {
  height: 100%;
  max-width: 460px;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 18px calc(104px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}

body.is-app .shell::-webkit-scrollbar { display: none; }

body.is-locked {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  padding: 22px 18px;
}

body.is-locked .shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

body.is-locked .brand { flex: 0 0 auto; margin-bottom: auto; order: 0; }

/* 按钮跟在文案下方，留一点呼吸感；上下 auto 外边距让整组居中 */
body.is-locked #viewLogin {
  order: 3;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column-reverse; /* 错误提示显示在按钮上方 */
  margin: 24px 0 auto;
  padding: 0 0 calc(4px + env(safe-area-inset-bottom, 0px));
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body.is-locked #viewLogin .hint { margin: 0 0 10px; }

body.is-locked .vision {
  order: 1;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- 游戏入口卡 ---------- */
.game-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 18px 18px 15px;
  margin-bottom: 20px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid rgba(180, 140, 255, 0.32);
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(139, 92, 246, 0.42), transparent 62%),
    radial-gradient(120% 130% at 100% 100%, rgba(217, 70, 239, 0.32), transparent 60%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}
.game-card h2 { margin: 8px 0 4px; font-size: 24px; letter-spacing: -0.3px; }
.game-card p { margin: 0; font-size: 12.5px; color: #c9bfe0; }
.game-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
  color: #1a1026;
  background: linear-gradient(135deg, #ffd76e, #f0a93b);
  font-weight: 700;
}
.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  color: var(--muted);
}
.game-foot b { color: #fff; font-size: 13px; }


/* 钻石图标（卡片角标与其它位置共用） */
.dia-icon {
  position: relative;
  display: grid;
  place-items: center;
}
.dia-icon::before {
  content: '';
  width: 15px;
  height: 15px;
  border-radius: 4px;
  transform: rotate(45deg);
  background: linear-gradient(150deg, #d7fbff, #22d3ee 48%, #6366f1);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55), inset 0 0 6px rgba(255, 255, 255, 0.6);
}

/* 消消乐卡片右上角钻石角标 */
.game-dia {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 7px;
  border-radius: 22px;
  border: 1px solid rgba(120, 220, 255, 0.32);
  background: rgba(34, 211, 238, 0.13);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.game-dia b {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #d7fbff;
}
.game-dia .dia-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.game-dia .dia-icon::before {
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
  box-shadow: 0 0 9px rgba(34, 211, 238, 0.6), inset 0 0 4px rgba(255, 255, 255, 0.6);
}

.game-dia .dia-unit {
  font-size: 10.5px;
  color: #9fe9f7;
  letter-spacing: 0.3px;
}

/* ---------- 签到规则入口 ---------- */
.rules-link {
  display: block;
  margin: 10px auto 0;
  padding: 4px 10px;
  border: 0;
  background: none;
  color: #b9a6e6;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(185, 166, 230, 0.4);
}
.rules-link:active { opacity: 0.7; }

/* ---------- 底部规则面板 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 6, 14, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: maskIn 0.2s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 460px;
  max-height: 86vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #241c38, #171122);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.55);
  animation: sheetUp 0.26s cubic-bezier(0.25, 0.9, 0.35, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* 居中弹窗（确认框 / 举报卡 / 挂售输入）：
   原来 .center-mask 的 align-items:center 写在前面，被后面 .sheet-mask 的 flex-end 覆盖，
   结果所有「居中」弹窗实际都贴底、还占满整宽 —— 这里补回来并收成卡片。 */
.sheet-mask.center-mask { align-items: center; }
.sheet-mask.center-mask .sheet {
  width: calc(100% - 48px);
  max-width: 340px;
  max-height: 84vh;
  border-radius: 22px;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: popIn 0.22s cubic-bezier(0.25, 0.9, 0.35, 1);
}
.sheet-mask.center-mask .btn { margin: 0; }
@keyframes popIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.sheet-bar {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
}
.sheet h3 {
  margin: 0 0 14px;
  font-size: 17px;
  text-align: center;
  letter-spacing: 0.4px;
}
.rules {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.rules li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 16px;
  font-size: 12.8px;
  line-height: 1.7;
  color: #b8aed0;
}
.rules li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pi), var(--pi-2));
}
.rules b {
  display: block;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 1px;
}

/* ---------- 商城：盲盒 ---------- */
.box-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.box-rail::-webkit-scrollbar { display: none; }

.box-card {
  flex: 0 0 auto;
  width: 74px;
  border-radius: 16px;
  scroll-snap-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, outline-color 0.1s ease;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.box-card img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

.box-card.hit {
  transform: translateY(-6px) scale(1.06);
  outline-color: #c9b4ff;
  box-shadow: 0 10px 26px -8px rgba(160, 110, 255, 0.65);
}

.box-mine {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 10px;
}

.box-mine .empty-txt { grid-column: 1 / -1; }

.box-owned img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.box-sheet { text-align: center; }

.box-prize-img {
  width: 148px;
  height: 148px;
  margin: 2px auto 10px;
  display: block;
  border-radius: 20px;
  box-shadow: 0 14px 34px -10px rgba(160, 110, 255, 0.55);
}

/* ---------- 商城：兑换 / 充值 ---------- */
.ex-card { display: flex; flex-direction: column; gap: 4px; }

.ex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ex-row:last-of-type { border-bottom: 0; }

.ex-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ex-info b { font-size: 13.5px; font-weight: 600; }
.ex-info span { font-size: 11px; color: var(--muted); }

.ex-card .p-btn { flex: 0 0 auto; }

.dep-card { display: flex; flex-direction: column; gap: 10px; }

/* 专属地址的链上余额行 */
.dep-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.dep-meta b {
  font-size: 13px;
  color: #e9e3ff;
  font-variant-numeric: tabular-nums;
}

.dep-addr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dep-addr code {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-all;
  color: #d6c9ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* App 内 Pi 支付（需要 API Key，未配置时整块隐藏） */
.dep-pi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

/* 充值卡片里的「其他方式」折叠区 */
.dep-alt {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.dep-alt summary {
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dep-alt summary::-webkit-details-marker { display: none; }
.dep-alt summary::after { content: '▾'; font-size: 10px; }
.dep-alt[open] summary::after { content: '▴'; }
.dep-alt p { margin: 8px 0 0; }

/* 首页链接按钮一行（规则 / 记录） */
.link-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.link-row .rules-link { margin: 6px 0 0; }

/* 记录抽屉里的列表可独立滚动 */
#histMask .sheet { max-height: 82vh; display: flex; flex-direction: column; }
#histMask #historyList { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.dep-rate {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #c9b4ff;
}

.dep-input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  outline: none;
}

.dep-input::placeholder { color: rgba(157, 148, 179, 0.75); font-family: inherit; }
.dep-input:focus { border-color: rgba(167, 139, 250, 0.65); }

/* ---------- 钱包页 ---------- */

.wallet-hero {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 15px 18px;
}

.wh-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wh-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.wh-value {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.15;
  color: #f4efff;
  font-variant-numeric: tabular-nums;
}

.wh-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.09);
}

/* 充值 / 提现 / 兑换 分段切换 */
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 12px 0 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.seg button {
  flex: 1;
  padding: 9px 4px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(190, 178, 214, 0.78);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.seg button.active {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.34), rgba(109, 40, 217, 0.22));
  color: #f2ecff;
  box-shadow:
    0 6px 16px -10px rgba(139, 92, 246, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

/* 五栏导航在窄屏收一点字号，避免挤出换行 */
.dock button span {
  font-size: 10px;
  white-space: nowrap;
}

.dock button {
  padding: 9px 2px 8px;
}


/* ---------- 提现常用地址 ---------- */

.wd-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.wd-field .dep-input {
  flex: 1;
  min-width: 0;
}

.wd-field .p-btn {
  flex: none;
  padding: 0 14px;
  font-size: 12px;
}

.addr-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 0 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.addr-chips::-webkit-scrollbar { display: none; }

.addr-chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 31px;
  padding: 0 1px 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.addr-chip.on {
  border-color: rgba(167, 139, 250, 0.6);
  background: rgba(139, 92, 246, 0.2);
}

.addr-chip-main {
  border: 0;
  background: transparent;
  padding: 0;
  color: #ded6f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.addr-chip-x {
  width: 24px;
  height: 24px;
  margin-left: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(190, 178, 214, 0.55);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.addr-chip-x:hover { color: #ff9a9a; }

/* ---------- 充值 / 提现记录 ---------- */
.rec-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.rec-link-row .rules-link { margin: 4px 0 0; padding: 4px 2px; }

.rec-btn::after { content: " \203a"; }

.rec-sheet {
  max-height: 86vh;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
}

.rec-sheet .rec-list {
  flex: 1 1 auto;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 2px 2px 6px;
}

.rec-list {
  display: flex;
  flex-direction: column;
  max-height: 268px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.rec-item:last-child { border-bottom: 0; }

.rec-l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rec-t {
  font-size: 11px;
  color: rgba(190, 178, 214, 0.62);
  line-height: 1.25;
  white-space: nowrap;
}

/* 仓库条目：名称 + 「合成材料」红标纵向排列 */
.rec-nm {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rec-nm .rec-t {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 红色标识：这件商品是某个在售配方的材料 */
.mat-tag {
  align-self: flex-start;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  color: #ff8fa3;
  background: rgba(255, 82, 110, 0.14);
  border: 1px solid rgba(255, 82, 110, 0.38);
  padding: 0 6px;
  border-radius: 6px;
  white-space: nowrap;
}

/* 仓库里的车辆编号：#0001 · #0002 */
.inv-no {
  font-size: 10.5px;
  line-height: 1.4;
  color: #f5c451;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rec-t.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: rgba(190, 178, 214, 0.42);
}

.rec-r {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.rec-a { font-size: 14px; font-weight: 650; }
.rec-a.in { color: #34d399; }
.rec-a.out { color: #c4b5fd; }

.rec-st { font-size: 10.5px; }
.rec-st.done { color: #34d399; }
.rec-st.pending { color: #fbbf24; }
.rec-st.failed { color: #ff9a9a; }

.rec-empty {
  margin: 0;
  padding: 14px 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(190, 178, 214, 0.5);
}

/* ---------- 商城货架 ---------- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prod-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.prod-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  /* 完整显示不裁剪：四周留边，透明底图也能看全 */
  object-fit: contain;
  padding: 8px;
  background: #17111f;
}

.prod-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 10px 12px 12px;
}

.prod-name {
  font-size: 13.5px;
  font-weight: 650;
  color: #f2eef8;
  line-height: 1.35;
}

.prod-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(208, 196, 232, 0.85);
}

.prod-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.prod-price {
  font-size: 18px;
  font-weight: 800;
  color: #ffd479;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(255, 212, 121, 0.25);
}

.prod-buy {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.prod-buy:active { transform: scale(0.95); }
.prod-buy[disabled] { opacity: 0.5; }

.prod-buy.soldout {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(230, 220, 245, 0.7);
}

.prod-supply {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(200, 185, 230, 0.75);
  letter-spacing: 0.02em;
}

.buy-supply {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(200, 185, 230, 0.75);
  text-align: center;
}

/* 购买确认层 */
.buy-img {
  display: block;
  width: min(240px, 62%);
  margin: 10px auto 6px;
  border-radius: 14px;
  background: #1a1426;
}

.buy-name {
  margin: 0 0 2px;
  text-align: center;
  font-size: 15px;
  font-weight: 650;
}

.buy-price {
  margin: 0 0 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 750;
  color: #ffd479;
}


/* 商城顶部三入口：仓库 / 合成 / 订单（胶囊） */
.rec-link-row.pills {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pill-btn {
  flex: 1;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 999px;
  padding: 9px 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: #dcc9ff;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.08));
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.pill-btn:active { transform: scale(0.96); border-color: #8b5cf6; }


/* 合成配方卡片 */
.craft-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  margin-bottom: 10px;
}

.craft-media {
  height: 150px;
  border-radius: 12px;
  background: #17111f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.craft-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.craft-name {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 15.5px;
  font-weight: 700;
  color: #f2eef8;
  line-height: 1.3;
}

.craft-ings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
}

.craft-ing {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
  min-width: 0;
}

.craft-ing img {
  width: 26px;
  height: 20px;
  object-fit: contain;
  border-radius: 5px;
  background: #17111f;
  flex: none;
}

.craft-ing-ph {
  width: 26px;
  height: 20px;
  border-radius: 5px;
  background: #17111f;
  flex: none;
}

.craft-ing-name {
  flex: 1;
  color: rgba(232, 222, 248, 0.92);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.craft-ing-need { font-weight: 700; color: #c9b8f0; flex: none; }
.craft-ing.have-row .craft-ing-have { color: #34d399; }
.craft-ing.ok .craft-ing-have { color: #34d399; }
.craft-ing.miss .craft-ing-have { color: #ff9a9a; }
.craft-ing.ok { background: rgba(52, 211, 153, 0.10); }
.craft-ing.miss { background: rgba(255, 120, 120, 0.10); }

.craft-pay {
  display: block;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  margin: 2px 0 8px;
}
.craft-pay.ok { color: #f5c664; }
.craft-pay.miss { color: #ff9a9a; }

/* 货架上的合成产物卡片标记 */
.craft-tag { font-size: 12px; font-weight: 700; color: #f5c664; letter-spacing: 0.02em; }

.craft-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(208, 196, 232, 0.85);
}

.craft-crafted {
  display: block;
  text-align: center;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: #f5c664;
}

/* 挂售价格输入框 */
.price-input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  outline: none;
}
.price-input::placeholder { color: rgba(157, 148, 179, 0.6); font-weight: 500; }
.price-input:focus { border-color: rgba(167, 139, 250, 0.7); }

/* 仓库/市场行内小按钮（挂售 / 购买 / 下架） */
.rec-item .btn.sm {
  width: auto;
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: 999px;
  flex: none;
}

/* 独立子页面（交易市场等）：有自己的顶栏，隐藏品牌行 */
body.on-sub .brand { display: none; }

.page-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  flex: none;
}
.back-btn:active { transform: scale(0.94); }

.page-topbar-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-bal {
  margin-left: auto;
  flex: none;
  font-size: 13.5px;
  font-weight: 700;
  color: #f5c664;
}

.mkt-page-list {
  max-height: none;
  min-height: 200px;
}

/* ---------------- 车库 / 排行榜 ---------------- */

.garage-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.garage-tabs::-webkit-scrollbar { display: none; }

.gtab {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(190, 178, 214, 0.85);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s;
}
.gtab.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* 车库收益（矿机）卡 */
.yield-card {
  position: relative;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(245, 196, 81, 0.09));
  border: 1px solid rgba(245, 196, 81, 0.22);
  overflow: hidden;
}
.yield-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -46px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 196, 81, 0.22), transparent 70%);
  pointer-events: none;
}
.yc-top {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.yc-lbl {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(190, 178, 214, 0.7);
}
.yc-big {
  font-size: 27px;
  font-weight: 800;
  line-height: 1.12;
  color: #f5c451;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.yc-big small {
  font-size: 13px;
  font-weight: 600;
  margin-left: 5px;
  opacity: 0.85;
}
.yc-btn {
  flex: none;
  padding: 9px 20px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #2a1c05;
  background: linear-gradient(135deg, #fbd06b, #f0a92c);
  box-shadow: 0 4px 14px rgba(240, 169, 44, 0.28);
  cursor: pointer;
  transition: 0.16s;
}
.yc-btn:active:not(:disabled) { transform: scale(0.96); }
.yc-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(190, 178, 214, 0.45);
  box-shadow: none;
  cursor: default;
}
.yc-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 13px;
  overflow: hidden;
}
.yc-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f5c451, #f59e0b);
  transition: width 0.4s ease;
}
.yc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 10px;
  font-size: 11px;
  color: rgba(190, 178, 214, 0.72);
}
.yc-meta b {
  color: #e7e0fb;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.yc-meta .yc-fund {
  flex-basis: 100%;
  margin-top: 2px;
  color: #6fe0a0;
  opacity: 0.9;
}
.yc-meta .yc-fund b { color: #6fe0a0; }
.yc-hint {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.55;
  color: rgba(190, 178, 214, 0.48);
}
/* 每台车卡片上的产出行 */
.car-yield {
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #6fe0a0;
  font-variant-numeric: tabular-nums;
}
.car-yield.idle {
  color: rgba(190, 178, 214, 0.42);
  font-weight: 400;
}
.car-yield.capped { color: #f5c451; }

.car-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.car-card {
  position: relative;
  background: #17111f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
}
.car-card.is-listed {
  border-color: rgba(245, 196, 81, 0.25);
}
.car-card img {
  width: 100%;
  height: 78px;
  object-fit: contain;
  display: block;
}
.car-no {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #f5c451;
  background: rgba(245, 196, 81, 0.12);
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 6px;
  padding: 1px 5px;
  font-variant-numeric: tabular-nums;
}
.car-nm {
  font-size: 11.5px;
  color: #e7e0fb;
  margin-top: 6px;
  line-height: 1.35;
  word-break: break-word;
}
.car-sub {
  font-size: 10.5px;
  color: rgba(190, 178, 214, 0.55);
  margin-top: 3px;
}
.car-sub.on-sale { color: #f5c451; }

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 6px;
}
.rank-row.me { background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.35); }
.rank-n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(190, 178, 214, 0.8);
}
.rank-row.r1 .rank-n { background: rgba(245, 196, 81, 0.2); color: #f5c451; }
.rank-row.r2 .rank-n { background: rgba(200, 200, 215, 0.18); color: #dcd7ea; }
.rank-row.r3 .rank-n { background: rgba(205, 127, 50, 0.2); color: #cd7f32; }
.rank-nm { flex: 1; font-size: 12.5px; color: #e7e0fb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-v { font-size: 12.5px; color: #a78bfa; font-weight: 600; }

.garage-empty {
  text-align: center;
  color: rgba(190, 178, 214, 0.55);
  font-size: 12.5px;
  padding: 40px 20px;
  line-height: 1.7;
}


/* 市场等子页：沿用 App 外壳滚动容器，但底部不需要给导航栏留空 */
body.is-app.on-sub .shell {
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

/* 居中提醒弹窗永远压在其他弹窗/抽屉之上 */
#alertMask { z-index: 95; }

/* 弹窗里的商品图完整显示不变形 */
.buy-img { object-fit: contain; }

/* 提醒弹窗加大：更高更透气 */
.alert-sheet {
  min-height: 300px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.alert-sheet h3 { font-size: 19px; }
.alert-msg { font-size: 15px; margin-bottom: 20px; }
.alert-sheet .btn { margin: 0 22px; width: auto; }

/* 弹窗宽度放宽：两边不缩窄 */
.alert-sheet {
  width: calc(100% - 24px);
  max-width: 430px;
}
.alert-sheet .btn { margin: 0 20px; }

/* 弹窗几乎全宽，两边仅留 6px */
.alert-sheet {
  width: calc(100% - 12px);
  max-width: 500px;
}
.alert-sheet .btn { margin: 0 14px; }

/* ============ 头像（全站统一） ============
   有图就铺满；没传头像的新用户统一落到 /img/avatar-default.webp，
   全站共用一张静态文件，不给每个新账号复制一份。 */
.av {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  user-select: none;
  -webkit-user-select: none;
  text-transform: uppercase;
}
.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.av-xs { width: 20px; height: 20px; font-size: 10px; }
.av-s  { width: 26px; height: 26px; font-size: 11.5px; }
.av-m  { width: 34px; height: 34px; font-size: 14px; }
.av-xl { width: 84px; height: 84px; border-radius: 26px; font-size: 32px; }

/* 有头像时用背景图铺满，天然被 border-radius 裁成圆/圆角方 */
.av.av-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 榜单里可点的头像（点开对方卡片，可举报违规图） */
.av-hit {
  display: inline-flex;
  line-height: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.14s ease;
}
.av-hit:active { transform: scale(0.92); }

/* 最新出炉里跟在车名后面的小头像（昵称已隐藏，只留头像） */
.car-av { display: inline-flex; vertical-align: -4px; margin-left: 6px; opacity: 0.7; }

/* 他人头像卡 */
.ucard { text-align: center; }
/* 这张卡片比其它居中弹窗窄、且要真正居中（.sheet-mask 默认贴底） */
#uCardMask { align-items: center; }
#uCardMask .sheet {
  width: calc(100% - 48px);
  max-width: 340px;
  border-radius: 22px;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0px));
}
.ucard-av {
  display: flex;
  justify-content: center;
  margin: 2px 0 10px;
}
.ucard-av .av {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.ucard-nm {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  word-break: break-all;
}
.ucard-reasons { margin: 0 14px 12px; }
.ucard-why {
  margin: 0 0 9px;
  font-size: 12.5px;
  color: var(--muted);
}
.ucard-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ucard-chip {
  padding: 11px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.ucard-chip:active { background: rgba(255, 255, 255, 0.13); }
/* 举报是「破坏性」动作，用暖红色和其它按钮区分 */
.ucard .btn.ucard-report { color: #ffb0a3; }

/* 首页问候语：头像 + Hi, @name */
.hello-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.hello-row .hello { margin: 0; }

/* 我的：头像卡片 */
.me-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.me-avatar {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex: none;
  transition: transform 0.16s ease;
}
.me-avatar:active { transform: scale(0.96); }
.me-avatar .av-xl {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.34);
}
.av-cam {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #e7e0fb;
  background: #1b1426;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.me-id {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.me-nick {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-uid { font-size: 11.5px; color: var(--muted); }
.me-tip { font-size: 11px; color: rgba(190, 178, 214, 0.55); }

/* 最新出炉：作者行（小头像 + 昵称） */
.car-owner {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 10.5px;
  opacity: 0.65;
}

/* 头像上传中：压暗 + 转圈，避免用户以为没反应又点一次 */
.me-avatar.busy .av-xl { opacity: 0.45; }
.me-avatar.busy::after {
  content: '';
  position: absolute;
  inset: 0 0 0 0;
  margin: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #a78bfa;
  animation: avspin 0.7s linear infinite;
}
@keyframes avspin { to { transform: rotate(360deg); } }

/* 头像被后台下架：只提示本人，不在公开页面公示 */
.av-banned {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.34);
}
.av-banned-ico {
  flex: none;
  margin-top: 1px;
  color: #f87171;
  display: grid;
  place-items: center;
}
.av-banned-txt { flex: 1; min-width: 0; }
.av-banned-txt b {
  display: block;
  font-size: 12.5px;
  color: #fca5a5;
}
.av-banned-txt p {
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(252, 165, 165, 0.82);
}
.av-banned-btn {
  flex: none;
  align-self: center;
  height: 28px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.av-banned-btn:active { transform: scale(0.96); }

/* ============ 车辆保养：油量条 / 保养面板 ============ */

/* 车库卡片上的两条细油尺：橙=汽油，蓝=机油，比数字更快看懂「还能不能跑」 */
.car-bars { display: flex; gap: 4px; margin-top: 6px; }
.car-bars .cb { flex: 1; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.car-bars .cb i { display: block; height: 100%; border-radius: 3px; transition: width 0.3s; }
.car-bars .cb.fuel i { background: linear-gradient(90deg, #f59e0b, #f97316); }
.car-bars .cb.oil i { background: linear-gradient(90deg, #38bdf8, #3b82f6); }

.car-card .car-sub .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: 1px;
}
.car-card .car-sub .dot.on { background: #34d399; box-shadow: 0 0 6px rgba(52, 211, 153, 0.7); }
.car-card .car-sub .dot.off { background: rgba(190, 178, 214, 0.35); }
.car-card .car-sub .dot.low { background: #f43f5e; }
.car-card { cursor: pointer; }

.car-sheet { max-width: 352px; max-height: 88vh; overflow-y: auto; }
.car-hero { height: 100px; display: flex; align-items: center; justify-content: center; margin: 2px 0 4px; }
.car-hero img { max-height: 100px; max-width: 76%; object-fit: contain; }
.car-sheet h3 { font-size: 15px; text-align: center; margin: 2px 0 4px; }
.car-meta { text-align: center; font-size: 11px; color: rgba(190, 178, 214, 0.6); margin: 0 0 13px; }

.gauges { display: flex; flex-direction: column; gap: 11px; margin-bottom: 14px; }
.gauge-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: rgba(235, 226, 250, 0.8);
  margin-bottom: 5px;
}
.gauge-h b { font-size: 11.5px; color: #e7e0fb; font-variant-numeric: tabular-nums; }
.gbar { height: 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.gbar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  transition: width 0.35s;
}
.gbar.oil i { background: linear-gradient(90deg, #38bdf8, #3b82f6); }
.gbar i.empty { background: rgba(244, 63, 94, 0.75); }

.svc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.svc {
  flex-direction: column;
  gap: 1px;
  padding: 9px 6px;
  font-size: 12.5px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.16);
  color: #e7e0fb;
  border: 1px solid rgba(139, 92, 246, 0.35);
}
.btn.svc em { font-style: normal; font-size: 10px; font-weight: 500; opacity: 0.62; }
.btn.engine { margin-top: 10px; background: linear-gradient(135deg, #22c55e, #16a34a); }
.btn.engine.on { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.btn.engine:disabled { opacity: 0.45; }

/* 钱包页的 π → 钻石兑换卡 */
.dia-card { padding: 12px 13px; margin-bottom: 12px; }
.dia-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.dia-head span { font-size: 12px; color: #cbbdf0; }
.dia-head b { font-size: 11px; color: rgba(190, 178, 214, 0.72); font-weight: 500; font-variant-numeric: tabular-nums; }
.dia-row { display: flex; align-items: center; gap: 8px; }
.dia-row .dep-input { flex: none; width: 104px; }
.dia-get { flex: 1; font-size: 11.5px; color: rgba(190, 178, 214, 0.75); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 移动端不需要上下步进箭头，留着只会挤在小输入框中间 */
.dia-row input::-webkit-outer-spin-button,
.dia-row input::-webkit-inner-spin-button,
.st-in::-webkit-outer-spin-button,
.st-in::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dia-row input,
.st-in { -moz-appearance: textfield; }
.dia-get b { color: #7dd3fc; }
.dia-get em { font-style: normal; }
.dia-row .p-btn { flex: none; }

/* 官方油站：油是平台发行的消耗品，π 买入油仓，加油另收钻石工时费。
   放在同一个弹层里，是因为「加不上油」和「没油可加」必须一眼连起来看。 */
.station {
  margin-top: 10px;
  padding: 9px 10px 7px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.st-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.st-title { font-size: 11.5px; color: #cbbdf0; letter-spacing: 0.3px; }
.st-wallet { font-size: 10.5px; color: rgba(190, 178, 214, 0.72); font-variant-numeric: tabular-nums; }
.st-wallet b { color: #f0c66b; font-weight: 600; }
.st-wallet em { font-style: normal; }
.st-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.st-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-name { font-size: 12px; color: #e7e0fb; }
.st-sub { font-size: 9.5px; color: rgba(190, 178, 214, 0.55); font-variant-numeric: tabular-nums; }
.st-stock {
  flex: none;
  font-size: 11px;
  color: #8ef0b8;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: right;
}
.st-stock.zero { color: rgba(244, 63, 94, 0.85); }
.btn.st-buy {
  flex: none;
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #e7e0fb;
}
.btn.st-buy:disabled { opacity: 0.45; }
.st-ex {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.st-in {
  width: 54px;
  padding: 4px 6px;
  font-size: 11.5px;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.st-ex-txt { flex: 1; font-size: 10.5px; color: rgba(190, 178, 214, 0.7); font-variant-numeric: tabular-nums; }
.st-ex-txt b { color: #7dd3fc; }
.st-ex-txt em { font-style: normal; }
.st-hint { font-size: 9.5px; color: rgba(190, 178, 214, 0.45); margin: 5px 0 0; text-align: center; }
/* 油仓空时闪一下：用户点了「加汽油」却被告知没油，得让他知道该去哪儿买 */
.station.warn {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.28), 0 0 16px rgba(245, 158, 11, 0.16);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.svc-hint {
  font-size: 10.5px;
  line-height: 1.65;
  color: rgba(190, 178, 214, 0.55);
  margin: 10px 0 12px;
  text-align: center;
}
