:root {
  --bg1: #ffffff;
  --bg2: #f6f2ea;
  --text: #1d1830;
  --muted: #6f6884;
  --line: rgba(29, 24, 48, 0.1);
  --pi: #7c3aed;
  --gold: #d99a1d;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
/* 背景图固定铺满视口（不用 background-attachment: fixed，避免移动端白边） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.24)),
    url('bg.jpg') center center / cover no-repeat;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Noto Sans SC', sans-serif;
  color: var(--text);
  background: #eaf6f8;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 26px 20px calc(170px + env(safe-area-inset-bottom));
}
.wrap { width: 100%; max-width: 400px; text-align: center; }

/* 顶部一行说明，避开画面主体 */
.brand { margin: 0; }
.logo { display: none; }
.support {
  margin: 0; display: inline-block;
  font-size: 12px; letter-spacing: 0.03em; color: #1f2b40;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.9);
}
.support .sep { color: #b07809; font-weight: 800; margin-right: 5px; }

/* 无边框、无底色：只留内容 */
.card { background: none; border: 0; padding: 0; }

/* ---------- 圆形金色登录按钮：固定在页面最底部 ---------- */
.btn-pi {
  position: fixed;
  left: 50%;
  bottom: calc(38px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 98px; height: 98px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; border-radius: 50%;
  padding: 0; cursor: pointer;
  font: inherit;
  color: #5b3a00;
  background:
    radial-gradient(circle at 34% 26%, #fff8d6 0%, #ffe49a 26%, #f7c44b 58%, #d99a1d 82%, #b97708 100%);
  box-shadow:
    0 2px 1px rgba(255, 255, 255, 0.75) inset,
    0 -5px 10px rgba(150, 95, 8, 0.55) inset,
    0 6px 0 #a86c07,
    0 18px 28px -8px rgba(110, 72, 4, 0.5),
    0 30px 46px -20px rgba(110, 72, 4, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s ease;
}
.btn-pi:active {
  transform: translateX(-50%) translateY(4px) scale(0.98);
  box-shadow:
    0 2px 1px rgba(255, 255, 255, 0.6) inset,
    0 -3px 8px rgba(150, 95, 8, 0.5) inset,
    0 2px 0 #a86c07,
    0 8px 16px -8px rgba(110, 72, 4, 0.45);
}
.btn-pi:disabled { filter: saturate(0.7) brightness(0.96); cursor: wait; }
.btn-pi svg { display: none; }
#btnPiText {
  font-size: 17px; font-weight: 800; letter-spacing: 0.12em;
  line-height: 1.15; max-width: 76px; text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
/* 长文案语种：缩小字号、去掉字距，避免溢出圆形 */
html:lang(ar) #btnPiText,
html:lang(hi) #btnPiText,
html:lang(ru) #btnPiText { font-size: 12.5px; letter-spacing: 0; font-weight: 800; }
html:lang(ja) #btnPiText { font-size: 12.5px; letter-spacing: 0; }
html:lang(th) #btnPiText { font-size: 12px; letter-spacing: 0; line-height: 1.25; }
html:lang(vi) #btnPiText { font-size: 12.5px; letter-spacing: 0; }
html:lang(id) #btnPiText { font-size: 15px; letter-spacing: 0; }
html:lang(ko) #btnPiText { font-size: 14px; letter-spacing: 0; }
html:lang(en) #btnPiText,
html:lang(es) #btnPiText,
html:lang(pt) #btnPiText,
html:lang(fr) #btnPiText { font-size: 14px; letter-spacing: 0.01em; }

/* 绿色呼吸灯 */
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 0 10px 2px rgba(22, 163, 74, 0.7);
  animation: liveBlink 1.2s ease-in-out infinite;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* 提示语放在按钮上方 */
.hint {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(158px + env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 40px));
  margin: 0; font-size: 12.5px; line-height: 1.5;
  min-height: 0;
}
.hint.err, .hint.warn, .hint.ok {
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 16px -8px rgba(20, 30, 50, 0.45);
}
.hint.err { color: #b52f1c; }
.hint.warn { color: #a06a00; }
.hint.ok { color: #15803d; }

/* ---------- 登录成功 ---------- */
#userView {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(340px, calc(100% - 40px));
  padding: 24px 20px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 50px -22px rgba(20, 30, 50, 0.45);
}
#userView[hidden] { display: none; }
.avatar {
  width: 72px; height: 72px; margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%; font-size: 26px; font-weight: 800;
  color: #5b3a00;
  background: radial-gradient(circle at 34% 26%, #fff8d6 0%, #ffe49a 30%, #f7c44b 70%, #d99a1d 100%);
  box-shadow: 0 10px 20px -10px rgba(150, 95, 8, 0.6);
}
#userView h2 { margin: 0; font-size: 22px; letter-spacing: 0.01em; }
.uid { margin: 7px 0 18px; font-size: 11.5px; color: var(--muted); word-break: break-all; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 16px; }
.meta > div { background: rgba(29, 24, 48, 0.04); border: 1px solid var(--line); border-radius: 13px; padding: 11px 0; }
.meta b { display: block; font-size: 16px; }
.meta span { font-size: 10.5px; color: var(--muted); }
.ok { margin: 0 0 16px; font-size: 12.5px; color: #15803d; min-height: 16px; }
.btn-out {
  width: 100%; border: 1px solid var(--line); border-radius: 13px;
  padding: 12px; font: inherit; font-size: 13.5px; cursor: pointer;
  color: var(--muted); background: rgba(29, 24, 48, 0.03);
}
.btn-out:hover { color: var(--text); }

/* 用户名 / UID 始终按 LTR 显示，避免 RTL 语言下把 @ 翻到末尾 */
#hName, #mUid, .uid { direction: ltr; unicode-bidi: isolate; }

/* ---------- 语言切换 ---------- */
.lang {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 30;
}
html[dir='rtl'] .lang { right: auto; left: 14px; }

.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.76);
  color: #26314a;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px -12px rgba(20, 30, 50, 0.55);
  backdrop-filter: blur(6px);
}
.lang-btn:active { transform: scale(0.97); }
.lang-btn .chev { opacity: 0.55; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 196px;
  max-height: 324px;
  overflow: auto;
  margin: 0; padding: 6px;
  list-style: none;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(29, 24, 48, 0.08);
  box-shadow: 0 22px 44px -18px rgba(20, 30, 50, 0.45);
}
.lang-menu[hidden] { display: none; }
html[dir='rtl'] .lang-menu { right: auto; left: 0; }

.lang-item {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px;
  border: 0; border-radius: 10px;
  background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: #26314a;
  text-align: start;
}
.lang-item:hover { background: #f5f2fc; }
.lang-item.on { background: #efe7ff; font-weight: 700; }
.li-code { font-size: 10.5px; color: #8a83a0; flex: none; }

/* ================= 登录后：应用界面 ================= */
[hidden] { display: none !important; }

body.in-app {
  display: block;
  padding: 0;
  background: #f6f4ef;
  overflow-y: auto;
}
body.in-app::before { opacity: 0.14; }

.app {
  min-height: 100dvh;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

.appbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 9px;
  min-height: calc(54px + env(safe-area-inset-top));
  padding: calc(12px + env(safe-area-inset-top)) 104px 12px 18px;
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(29, 24, 48, 0.06);
}
html[dir='rtl'] .appbar { padding: calc(12px + env(safe-area-inset-top)) 18px 12px 104px; }
.appbar-logo {
  width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex: none;
  box-shadow: 0 4px 10px -4px rgba(217, 154, 29, 0.7);
}
.appbar-name { font-size: 15px; font-weight: 800; letter-spacing: 0.08em; }
.appbar-title {
  margin: 0;
  font-size: 16px; font-weight: 800; letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar .icon-back {
  width: 30px; height: 30px; border-radius: 10px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.9);
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 8px;
  animation: pageIn 0.18s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.page-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 4px 2px 12px; min-width: 0;
}
.page-title { margin: 0; font-size: 20px; letter-spacing: 0.01em; white-space: nowrap; }
.page-user {
  font-size: 13px; font-weight: 700; color: #b07809;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}



/* 首页欢迎卡 */
.hero {
  background: #fff;
  border-radius: 22px;
  padding: 26px 22px 22px;
  text-align: center;
  box-shadow: 0 16px 36px -22px rgba(20, 30, 50, 0.35);
}
.hero .avatar { width: 74px; height: 74px; margin-bottom: 12px; font-size: 27px; }
.hello { margin: 0; font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }
.hero h2 { margin: 4px 0 8px; font-size: 21px; letter-spacing: 0.01em; }
.verified {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0; padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  color: #15803d; background: rgba(34, 197, 94, 0.1);
}

/* 首页统计 */
.stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 12px;
}
.stats > div {
  background: #fff; border-radius: 16px; padding: 15px 10px;
  text-align: center;
  box-shadow: 0 12px 28px -22px rgba(20, 30, 50, 0.4);
}
.stats b { display: block; font-size: 17px; }
.stats span { font-size: 11px; color: var(--muted); }

/* 我的：三格信息卡（UID / 上次登录 / 注册于） */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.cell {
  background: #fff;
  border-radius: 15px;
  padding: 14px 7px 13px;
  text-align: center;
  min-width: 0;
  box-shadow: 0 12px 26px -24px rgba(20, 30, 50, 0.45);
}
.cell span {
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell b {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  word-break: break-all;
}

/* 我的：信息列表 */
.rows {
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 16px 36px -26px rgba(20, 30, 50, 0.4);
}
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 16px;
  font-size: 13.5px;
}
.row + .row { border-top: 1px solid rgba(29, 24, 48, 0.06); }
.row span { color: var(--muted); }
.row b { font-weight: 700; font-size: 13px; word-break: break-all; text-align: end; }


/* 我的：操作按钮（两两一排，整排与上方三格等宽齐平） */
.acts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.acts .act { width: 100%; }
.act {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  padding: 13px 6px;
  border: 0; cursor: pointer;
  font: inherit;
  color: #6b6478;
  background: #fff;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.act b { font-size: 11.5px; font-weight: 800; letter-spacing: 0.01em; }
.act.gold { color: #a9710a; }
.act:active { transform: translateY(1px); box-shadow: 0 6px 16px -18px rgba(20, 30, 50, 0.5); }

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%; bottom: calc(132px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  z-index: 95;
  max-width: min(320px, calc(100vw - 56px));
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(28, 24, 42, 0.9);
  color: #fff;
  font-size: 12.5px; font-weight: 600; line-height: 1.4;
  text-align: center;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* 底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(29, 24, 48, 0.07);
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 4px;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 10.5px; font-weight: 600;
  color: #8f88a3;
  transition: color 0.15s ease;
}
.tab svg { width: 22px; height: 22px; }
.tab.on { color: #b07809; }
.tab:active { opacity: 0.7; }

/* ================= 钱包 ================= */
.icon-back {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 11px;
  background: #fff; color: #3d3654;
  box-shadow: 0 8px 18px -14px rgba(20, 30, 50, 0.55);
  cursor: pointer;
}
.icon-back:active { transform: translateY(1px); }
html[dir='rtl'] .icon-back svg { transform: scaleX(-1); }

/* 总资产卡 */
.asset-card {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, #26203a, #3b2f57 55%, #4b3a6b);
  box-shadow: 0 22px 44px -26px rgba(30, 22, 54, 0.85);
}
.asset-card::after {
  content: '';
  position: absolute;
  right: -50px; top: -64px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 185, 66, 0.32), transparent 68%);
  pointer-events: none;
}
.asset-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.asset-label {
  margin: 0;
  font-size: 12px; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
}
.asset-hint {
  font-size: 10.5px; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.4);
}
.asset-split {
  display: grid; grid-template-columns: 1fr 1px 1fr;
  align-items: stretch; gap: 8px;
}
.asset-sep { width: 1px; height: 62px; align-self: center; background: rgba(255, 255, 255, 0.14); }
/* 币种切换：点哪一边，下面的明细就只显示那个币 */
.asset-col {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  min-width: 0;
  padding: 6px 6px 18px;
  border: 0; border-radius: 16px;
  background: transparent;
  font: inherit; color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, transform 0.12s ease;
}
/* 选中态只靠明暗 + 底部一根短金条，不加方框 */
.asset-col:not(.on) { opacity: 0.45; }
.asset-col:not(.on) .asset-amt { color: #ded7ef; }
.asset-col:active { transform: scale(0.97); }
.asset-col::after {
  content: '';
  position: absolute; left: 50%; bottom: 6px;
  width: 20px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #ffe6a6, #f7c44b);
  transform: translateX(-50%) scaleX(0);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0.3, 1), opacity 0.18s ease;
}
.asset-col.on::after { transform: translateX(-50%) scaleX(1); opacity: 1; }
.asset-col.on .asset-ico { filter: drop-shadow(0 0 7px rgba(245, 185, 66, 0.5)); }
.asset-ico {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
  overflow: hidden;
  transition: filter 0.2s ease;
}
.asset-ico.pi {
  background: #3b2a63;
  box-shadow: inset 0 0 0 1px rgba(245, 185, 66, 0.35);
}

.asset-ico.pi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-ico.lc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-name {
  font-size: 11.5px; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.66);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.asset-amt {
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
  color: #ffd978;
  font-variant-numeric: tabular-nums;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* 我的：按钮文字按词换行，避免英文单词被拆开 */
.acts .act b { word-break: normal; }

/* 服务条款 / 隐私政策 */
.doc {
  background: #fff;
  border-radius: 20px;
  padding: 20px 18px 24px;
  box-shadow: 0 18px 40px -32px rgba(20, 30, 50, 0.5);
}
.doc-title { margin: 0 0 5px; font-size: 18px; font-weight: 800; letter-spacing: 0.01em; color: #2f2745; }
.doc-date { margin: 0 0 4px; font-size: 11.5px; color: var(--muted); }
.doc-note {
  margin: 10px 0 0; padding: 9px 11px;
  border-radius: 10px;
  background: #fdf6e5;
  font-size: 11.5px; line-height: 1.5;
  color: #8a6a1f;
}
.doc h2 {
  margin: 19px 0 7px;
  font-size: 13.5px; font-weight: 800;
  letter-spacing: 0.01em; color: #2f2745;
}
.doc h2:first-of-type { margin-top: 16px; }
.doc p, .doc li {
  margin: 0 0 9px;
  font-size: 12.8px; line-height: 1.8;
  color: #4b4462;
}
.doc p:last-child { margin-bottom: 0; }
.doc b { font-weight: 800; color: #2f2745; }
.doc ul { margin: 0 0 9px; padding-inline-start: 18px; }

/* ---------- 我的：白皮书入口 ---------- */
.wp-entry {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin-top: 8px;
  padding: 13px 15px;
  border: 0; cursor: pointer; text-align: start;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #16233d 0%, #1f3556 52%, #2a4a6f 100%);
  box-shadow: 0 16px 30px -22px rgba(16, 28, 48, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.12s ease;
}
.wp-entry:active { transform: translateY(1px); }
.wp-entry-ico {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  color: #ffd978;
  background: rgba(255, 217, 120, 0.13);
  border: 1px solid rgba(255, 217, 120, 0.22);
}
.wp-entry-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wp-entry-txt b { font-size: 13.5px; font-weight: 800; color: #ffe6a6; letter-spacing: 0.01em; }
.wp-entry-txt em {
  font-style: normal; font-size: 10.5px; line-height: 1.4;
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wp-entry-arrow { flex: none; color: rgba(255, 255, 255, 0.45); }

/* ---------- 白皮书正文 ---------- */
.doc h3 {
  margin: 13px 0 6px;
  font-size: 12.3px; font-weight: 800;
  letter-spacing: 0.01em; color: #3a3352;
}
.doc h2 { scroll-margin-top: 74px; }
.wp-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 2px 0 10px;
}
.wp-meta span {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  color: #8a6a1f; background: #fdf6e5;
}
.wp-lead {
  margin: 0 0 14px;
  padding: 2px 0 2px 11px;
  border-inline-start: 3px solid #f2c65a;
  font-size: 12.6px !important;
  line-height: 1.85 !important;
  color: #453d5c !important;
}
.wp-toc {
  display: grid; gap: 1px;
  margin: 0 0 6px;
  padding: 12px 13px;
  border-radius: 13px;
  background: #faf8f3;
  border: 1px solid rgba(29, 24, 48, 0.06);
}
.wp-toc b { display: block; margin-bottom: 5px; font-size: 11px; color: #6b6478; letter-spacing: 0.04em; }
.wp-toc a {
  display: block; padding: 3px 0;
  font-size: 12px; line-height: 1.5;
  color: #3f5d85; text-decoration: none;
}
.wp-toc a:active { color: #2b4a72; }
.doc .wp-formula {
  margin: 2px 0 11px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f2f6fc;
  border: 1px solid rgba(43, 74, 114, 0.1);
  font-size: 11.8px; font-weight: 700; line-height: 1.75;
  color: #2b4a72;
  word-break: break-word;
}
.wp-flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  margin: 0 0 10px;
}
.wp-flow span {
  padding: 4px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 700;
  color: #4b4462; background: #f6f3ec;
}
.wp-flow i { font-style: normal; font-size: 11px; color: #b3aabf; }
.doc table.wp-t {
  width: 100%; table-layout: fixed;
  border-collapse: collapse;
  margin: 3px 0 12px;
  font-variant-numeric: tabular-nums;
}
.doc table.wp-t th,
.doc table.wp-t td {
  padding: 7px 5px;
  font-size: 10.8px; line-height: 1.55;
  text-align: start; vertical-align: top;
  border-bottom: 1px solid rgba(29, 24, 48, 0.07);
  word-break: break-word;
}
.doc table.wp-t th {
  font-weight: 700; color: #6b6478;
  background: #faf8f3;
  border-bottom-color: rgba(29, 24, 48, 0.1);
}
.doc table.wp-t td:first-child { color: #2f2745; font-weight: 700; }
.doc table.wp-t tr:last-child td { border-bottom: 0; }
.doc .wp-foot {
  margin: 16px 0 0; padding-top: 12px;
  border-top: 1px dashed rgba(29, 24, 48, 0.12);
  font-size: 11px; color: var(--muted);
}

/* 钱包：充值 / 提现 */
.wallet-acts {
  display: flex; gap: 8px;
  margin-top: 10px;
}
.w-act {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px;
  border: 0; border-radius: 14px;
  font: inherit; font-size: 13.5px; font-weight: 800; letter-spacing: 0.02em;
  color: #5b3a00;
  background: #fff;
  box-shadow: 0 12px 26px -22px rgba(20, 30, 50, 0.5), inset 0 0 0 1px rgba(217, 154, 29, 0.22);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.w-act.main {
  background: linear-gradient(135deg, #fff3cf, #ffe08f 60%, #f7c44b);
  box-shadow: 0 14px 28px -20px rgba(217, 154, 29, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.w-act:active { transform: translateY(1px); }
/* 龙虾币暂不支持充提：按钮保留但置灰 */
.w-act.off {
  background: rgba(255, 255, 255, 0.6);
  color: #9d96ad;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.07);
  opacity: 0.9;
}

/* 明细区 */
.sub-title {
  margin: 22px 2px 10px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
  color: #4b4462;
}
.empty-box {
  padding: 30px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* ================= 充值弹层 ================= */
.sheet {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet[hidden] { display: none !important; }
.sheet-mask {
  position: absolute; inset: 0;
  background: rgba(16, 12, 26, 0.5);
  animation: maskIn 0.18s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.sheet-panel {
  position: relative;
  width: 100%; max-width: 460px;
  min-height: 82dvh;
  max-height: 92dvh;
  display: flex; flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(20px + env(safe-area-inset-top)) 18px calc(26px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: radial-gradient(140% 72% at 50% 108%, #fff6e0 0%, #fffcf5 46%, #ffffff 78%);
  box-shadow: 0 -18px 48px -20px rgba(20, 14, 40, 0.5);
  animation: sheetUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.sheet-head h2 { margin: 0; font-size: 17px; letter-spacing: 0.01em; }
.sheet-x {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  color: #7a4c00;
  background: linear-gradient(180deg, #fff0bb 0%, #ffd978 42%, #f3bb35 78%, #dfa019 100%);
  box-shadow:
    0 3px 0 #b9810f,
    0 7px 14px -4px rgba(180, 130, 20, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(160, 110, 0, 0.35);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.sheet-x svg { stroke-width: 2.8; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6)); }
.sheet-x:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #b9810f,
    0 3px 8px -3px rgba(180, 130, 20, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.sheet-tip { margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); }

.dep-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dep-chips button {
  height: 46px;
  border: 1px solid rgba(29, 24, 48, 0.1);
  border-radius: 13px;
  background: #fff;
  font: inherit; font-size: 15px; font-weight: 800; color: #4b4462;
  cursor: pointer;
}
.dep-chips button.on {
  border-color: transparent;
  color: #5b3a00;
  background: linear-gradient(135deg, #fff3cf, #ffe08f 60%, #f7c44b);
  box-shadow: 0 10px 22px -16px rgba(217, 154, 29, 0.9);
}
.dep-go {
  width: 100%; height: 48px; margin-top: 16px;
  border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #fff3cf, #ffe08f 55%, #f5bd3f);
  color: #5b3a00;
  font: inherit; font-size: 15px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px -20px rgba(217, 154, 29, 0.95);
}
.dep-go:active { transform: translateY(1px); }

.dep-label { margin: 0 0 6px; font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }
.dep-amt {
  margin: 0 0 4px;
  font-size: 40px; font-weight: 800; letter-spacing: -0.02em;
  color: #2f2745; font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.dep-amt em { font-size: 18px; font-style: normal; color: #b07809; margin-left: 4px; }
.dep-note { margin: 0 0 16px; font-size: 11.5px; color: #8b83a3; }

.dep-addr {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 10px 12px;
  border-radius: 13px;
  background: #f6f4fb;
  border: 1px solid rgba(29, 24, 48, 0.06);
}
.dep-addr code {
  flex: 1; min-width: 0;
  font-size: 12px; line-height: 1.35;
  word-break: break-all;
  color: #35304a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.dep-addr button {
  flex: none;
  height: 32px; padding: 0 12px;
  border: 0; border-radius: 9px;
  background: #2f2745; color: #fff;
  font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.dep-addr button:active { opacity: 0.85; }

.dep-steps {
  margin: 16px 0 0; padding-left: 18px;
  font-size: 12px; line-height: 1.65; color: #6b6478;
}
.dep-steps li + li { margin-top: 3px; }

.dep-state {
  display: flex; align-items: center; gap: 7px;
  margin: 16px 0 0; padding: 10px 12px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  font-size: 12.5px; font-weight: 700; color: #15803d;
}
.dep-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  animation: depPulse 1.3s ease-in-out infinite;
}
@keyframes depPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}
.dep-state.done { background: rgba(34, 197, 94, 0.14); }
.dep-state.err { background: rgba(239, 68, 68, 0.09); color: #b42318; }
.dep-state.err .dep-dot { background: #ef4444; animation: none; }

/* 资产明细列表 */
.his-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px -24px rgba(20, 30, 50, 0.45);
}
.his-item + .his-item { margin-top: 8px; }
.his-ico {
  width: 32px; height: 32px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(245, 185, 66, 0.16);
  color: #a9710a; font-size: 15px; font-weight: 800;
}
.his-main { flex: 1; min-width: 0; }
.his-main b { display: block; font-size: 14px; font-weight: 800; color: #2f2745; }
.his-unit {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 5px;
  margin-inline-start: 4px;
  vertical-align: -2px;
  background: url('logo.jpg') center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.his-main span { font-size: 11px; color: var(--muted); }
.his-tag {
  flex: none; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.his-tag.paid { color: #15803d; background: rgba(34, 197, 94, 0.12); }
.his-tag.pending { color: #a9710a; background: rgba(245, 185, 66, 0.18); }
.his-tag.expired { color: #8b83a3; background: rgba(139, 131, 163, 0.14); }

/* 提现弹层 */
.wd-gap { margin-top: 16px; }
.wd-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 13px; border-radius: 13px;
  border: 1px solid rgba(120, 110, 150, 0.22);
  background: rgba(255, 255, 255, 0.9);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: #2f2745; letter-spacing: 0.01em;
  outline: none;
}
.wd-input:focus { border-color: rgba(212, 160, 23, 0.6); box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.16); }
.wd-avail {
  display: flex; align-items: center; justify-content: space-between;
  margin: 12px 0 14px; font-size: 12px; color: var(--muted);
}
.wd-avail b { font-size: 13px; color: #2f2745; font-weight: 800; }

/* 明细：支出项 */
.his-ico.out { background: rgba(120, 110, 150, 0.12); color: #6b6478; }
.his-main b.minus { color: #b42318; }
.his-tag.sent { color: #15803d; background: rgba(34, 197, 94, 0.12); }
.his-tag.processing { color: #a9710a; background: rgba(245, 185, 66, 0.18); }
.his-tag.failed { color: #b42318; background: rgba(239, 68, 68, 0.1); }

/* 专属地址充值 */
.dep-custom { margin-top: 10px; }
.dep-want { margin: 12px 0 0; text-align: center; font-size: 13px; font-weight: 800; color: #a9710a; }
#depAddr { font-size: 11px; line-height: 1.45; }

/* 明细图标：按币种显示 logo */
.his-ico {
  padding: 0; overflow: hidden;
  background: #33245a;
  box-shadow: inset 0 0 0 1px rgba(245, 185, 66, 0.28);
}
.his-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.his-ico.lc { background: #fff7e8; box-shadow: inset 0 0 0 1px rgba(180, 150, 90, 0.22); }
.wd-input[type='number']::-webkit-outer-spin-button,
.wd-input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wd-input[type='number'] { -moz-appearance: textfield; appearance: textfield; }

/* 弹层内容拉伸：信息条/提交按钮贴底，避免高弹层底部大片留白 */
#depState { margin-top: 0; }
.dep-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed rgba(29, 24, 48, 0.12);
  display: grid; gap: 12px;
}
#wdForm { display: flex; flex-direction: column; flex: 1; }
#wdPay { display: flex; flex-direction: column; flex: 1; }
#wdState { margin-top: auto; }

.dep-info {
  margin-top: 0;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(245, 185, 66, 0.12);
  border: 1px solid rgba(212, 160, 23, 0.18);
  font-size: 12px; line-height: 1.55; color: #7a6a45;
}
.wd-sum {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(29, 24, 48, 0.04);
  display: grid; gap: 7px;
  font-size: 12px;
}
.wd-sum > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wd-sum span { color: var(--muted); }
.wd-sum b { font-size: 13px; font-weight: 800; color: #2f2745; font-variant-numeric: tabular-nums; }

.wd-rules {
  margin: 16px 0 12px;
  padding: 14px 0 0; list-style: none;
  border-top: 1px dashed rgba(29, 24, 48, 0.12);
  display: grid; gap: 6px;
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
}
.wd-rules li { display: flex; gap: 7px; }
.wd-rules li::before {
  content: ''; flex: none;
  width: 5px; height: 5px; margin-top: 6px;
  border-radius: 50%; background: rgba(212, 160, 23, 0.55);
}
#wdForm[hidden], #wdPay[hidden] { display: none !important; }



/* ================= 首页 · 龙虾养成 ================= */
/* 首页整屏固定：不滚动，水缸吃掉剩余高度 */
body.home-lock { height: 100dvh; overflow: hidden; }
body.home-lock .app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
  padding-bottom: 0;
}
body.home-lock .appbar { flex: 0 0 auto; }
body.home-lock #pageHome {
  flex: 1 1 auto; min-height: 0;
  width: 100%; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 14px calc(76px + env(safe-area-inset-bottom));
  overflow: hidden;
  animation: none;
}
body.home-lock #pageHome .tank {
  flex: 1 1 auto; min-height: 150px;
  display: flex; flex-direction: column;
  padding: 12px 13px 13px;
}
body.home-lock .tank-stage { flex: 1 1 auto; min-height: 66px; height: auto; margin: 2px 0 6px; }
/* 一屏模式下水缸更矮：多只时的队列做紧凑一点 */
body.home-lock .tank-stage.multi .lob { top: calc(50% - 21px); height: calc(100% - 54px); }
body.home-lock .tank-pets { padding: 2px 12px 2px; bottom: 0; gap: 6px; }
body.home-lock .tank-pets .tp { width: 44px; height: 44px; border-radius: 12px; }
body.home-lock .tank-pets .tp svg { width: 30px; height: 30px; }
body.home-lock .tank-pets .tp b { font-size: 8px; bottom: 1px; }
body.home-lock #pageHome > .s4,
body.home-lock #pageHome > .yield,
body.home-lock #pageHome > .g3acts,
body.home-lock #pageHome > .goal { flex: 0 0 auto; margin-top: 0; }

/* 矮屏（iPhone SE 等）压缩，保证水缸仍有空间 */
@media (max-height: 750px) {
  body.home-lock #pageHome { gap: 6px; padding: 6px 12px calc(70px + env(safe-area-inset-bottom)); }
  body.home-lock .s4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  body.home-lock .lob { height: calc(100% - 12px); }
  body.home-lock .s4-item { gap: 3px 4px; padding: 6px 8px 7px; }
  body.home-lock .s4-item > span { font-size: 9.5px; }
  body.home-lock .s4-item em { font-size: 9.5px; }
  body.home-lock .s4-bar { height: 4px; }
  body.home-lock #pageHome .tank { padding: 10px 12px 11px; }
  body.home-lock .tank-stage { margin: 0 0 6px; min-height: 66px; }
  body.home-lock .tank-stage.multi .lob { top: calc(50% - 17px); height: calc(100% - 44px); }
  body.home-lock .tank-pets .tp { width: 40px; height: 40px; }
  body.home-lock .tank-pets .tp svg { width: 27px; height: 27px; }
  body.home-lock .tank-pets .tp b { font-size: 7.5px; }
  body.home-lock .yield { padding: 10px 12px 11px; }
  body.home-lock .y-num { display: inline-flex; align-items: baseline; white-space: nowrap; }
.y-num b { font-size: 22px; }
  body.home-lock .y-tip { display: none; }
  /* 矮屏也保留「每小时多少」这一行，这是用户最需要看懂的一句 */
  body.home-lock .yield .y-tip#yTip { display: block; }
  body.home-lock .y-btn { height: 36px; }
  body.home-lock .y-head { font-size: 10px; }
  body.home-lock .y-nums { margin: 3px 0 0; }
  body.home-lock .y-tip { margin: 2px 0 8px; }
  body.home-lock .g-act { padding: 8px 6px 7px; }
  body.home-lock .goal { padding: 9px 12px 10px; }
  body.home-lock .goal-items { margin-top: 6px; }
}
.tank {
  position: relative;
  overflow: hidden;
  padding: 14px 14px 15px;
  border-radius: 26px;
  color: #fff;
  background: radial-gradient(125% 95% at 50% 0%, #2f6f95, #1b3f66 58%, #122b49);
  box-shadow: 0 26px 52px -34px rgba(12, 42, 70, 0.95);
}
.tank::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 42% at 50% 6%, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.tank-hd {
  position: relative; z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.tank-id { display: grid; gap: 1px; min-width: 0; overflow: hidden; }
.tank-nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tank-gene {
  flex: none;
  padding: 1px 6px 2px;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 800; font-style: normal;
  letter-spacing: 0.02em;
  color: #ffe9a8;
  background: rgba(255, 214, 106, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 106, 0.35);
}
.tank-gene.shiny { color: #2b1a02; background: linear-gradient(180deg, #ffe9a8, #f3bb35); box-shadow: 0 2px 8px -2px rgba(243, 187, 53, 0.8); }
.tank-sub { font-size: 10.5px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.6); }
.tank-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; letter-spacing: 0.01em; }
.tank-log {
  flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff; font: inherit; font-size: 10.5px; font-weight: 700;
  cursor: pointer;
}
.tank-log:active { background: rgba(255, 255, 255, 0.22); }

.tank-stage {
  position: relative;
  height: 188px;
  margin: 4px 0 10px;
  display: grid; place-items: center;
}
.bub {
  position: absolute; bottom: 14%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  animation: bubRise 7s linear infinite;
  pointer-events: none;
}
.b1 { width: 7px; height: 7px; left: 16%; animation-delay: 0s; }
.b2 { width: 5px; height: 5px; left: 34%; animation-delay: 2.2s; }
.b3 { width: 9px; height: 9px; right: 22%; animation-delay: 1.1s; }
.b4 { width: 4px; height: 4px; right: 38%; animation-delay: 3.6s; }
.bub.b-pop { width: 6px; height: 6px; bottom: 40%; animation-duration: 3s; animation-delay: 0s; opacity: 0; }
@keyframes bubRise {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  18% { opacity: 0.85; }
  100% { transform: translateY(-130px) scale(1.15); opacity: 0; }
}
/* 龙虾本体：手绘 SVG + 持续呼吸/摆尾/挥螯/钳指开合/眨眼 */
.lob {
  position: absolute; z-index: 2;
  left: 50%; top: 50%;
  translate: -50% -50%;
  height: calc(100% - 8px); max-height: 240px;
  aspect-ratio: 240 / 250;
  transform: scale(var(--s, 1));
  transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.3, 1), filter 0.5s ease;
  will-change: transform;
}
.lob svg { width: 100%; height: 100%; display: block; overflow: visible; }
.lob.king svg { filter: drop-shadow(0 0 13px rgba(255, 205, 95, 0.55)); }
.crown { opacity: 0; transform: translateY(9px); transition: opacity 0.4s ease, transform 0.4s ease; }
.lob.king .crown { opacity: 1; transform: translateY(0); }

.lb-float { animation: lbFloat 5.6s ease-in-out infinite; transform-box: view-box; transform-origin: 120px 200px; }
@keyframes lbFloat {
  0%, 100% { transform: translateY(0) rotate(-0.7deg); }
  50% { transform: translateY(-9px) rotate(1.1deg); }
}
.lb-ant { transform-box: view-box; }
.lb-ant.l { transform-origin: 106px 72px; animation: lbAntL 3.6s ease-in-out infinite alternate; }
.lb-ant.r { transform-origin: 134px 72px; animation: lbAntR 4.1s ease-in-out infinite alternate; }
@keyframes lbAntL { from { transform: rotate(-4deg); } to { transform: rotate(7deg); } }
@keyframes lbAntR { from { transform: rotate(4deg); } to { transform: rotate(-7deg); } }

.lb-body { transform-box: view-box; transform-origin: 120px 164px; animation: lbBreath 3.8s ease-in-out infinite; }
@keyframes lbBreath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.018, 0.982); } }

.lb-tail { transform-box: view-box; transform-origin: 120px 158px; animation: lbTail 4.8s ease-in-out infinite; }
@keyframes lbTail { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

.lb-claw { transform-box: view-box; }
.lb-claw.l { transform-origin: 90px 104px; animation: lbClawL 4.2s ease-in-out infinite alternate; }
.lb-claw.r { transform-origin: 150px 104px; animation: lbClawR 4.8s ease-in-out infinite alternate; }
@keyframes lbClawL { from { transform: rotate(-2deg); } to { transform: rotate(4deg); } }
@keyframes lbClawR { from { transform: rotate(2deg); } to { transform: rotate(-4deg); } }

.lb-finger { transform-box: view-box; }
.lb-finger.top { transform-origin: 42px 128px; animation: lbTop 4.4s ease-in-out infinite; }
.lb-finger.bot { transform-origin: 42px 152px; animation: lbBot 4.4s ease-in-out infinite; }
@keyframes lbTop { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-12deg); } }
@keyframes lbBot { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(10deg); } }

.lb-leg { transform-box: view-box; }
.lb-leg path { animation: lbLeg 2.9s ease-in-out infinite alternate; }
.lb-leg.a path { transform-origin: 90px 124px; }
.lb-leg.b path { transform-origin: 92px 137px; animation-delay: -0.6s; }
.lb-leg.c path { transform-origin: 94px 151px; animation-delay: -1.1s; }
@keyframes lbLeg { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }

.lb-eye { transform-box: fill-box; transform-origin: center; animation: lbBlink 6.5s infinite; }
@keyframes lbBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.12); } }

.lob.pop { animation: lobPop 0.6s ease; }
@keyframes lobPop {
  0% { transform: scale(var(--s, 1)) translateY(0); }
  35% { transform: scale(calc(var(--s, 1) * 1.1)) translateY(-14px); }
  68% { transform: scale(calc(var(--s, 1) * 0.97)) translateY(2px); }
  100% { transform: scale(var(--s, 1)) translateY(0); }
}
.tank-floor {
  position: absolute; left: -8%; right: -8%; bottom: -18px; height: 58px;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(70% 100% at 50% 0%, rgba(255, 214, 150, 0.22), transparent 72%),
    linear-gradient(#1c4067, #15304c);
  z-index: 1;
}
.tank-score {
  position: absolute; right: 4px; bottom: 2px; z-index: 3;
  font-size: 9.5px; color: rgba(255, 255, 255, 0.5);
}

/* 多只龙虾：水缸底部一排横向滑动，点哪只就切成哪只 */
.tank-pets {
  position: absolute; left: 0; right: 0; bottom: -2px; z-index: 4;
  display: none;
  gap: 7px;
  padding: 3px 14px 4px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tank-pets::-webkit-scrollbar { display: none; }
.tank-pets.show { display: flex; }
/* 放不下时左右淡出，暗示可以滑 */
.tank-pets.scroll {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.tank-pets .tp {
  flex: none;
  position: relative;
  width: 52px; height: 56px;
  padding: 2px 0 0;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background: rgba(8, 34, 56, 0.34);
  color: #fff;
  cursor: pointer;
  scroll-snap-align: center;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.tank-pets .tp svg { width: 40px; height: 40px; overflow: visible; display: block; }
.tank-pets .tp b {
  position: absolute; left: 0; right: 0; bottom: 2px;
  font-size: 8.5px; font-weight: 700; line-height: 1;
  text-align: center; color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}
.tank-pets .tp.on {
  border-color: #ffd76a;
  background: rgba(255, 214, 130, 0.20);
  box-shadow: 0 0 0 2px rgba(255, 215, 106, 0.28), 0 8px 18px -12px rgba(0, 0, 0, 0.8);
}
.tank-pets .tp.on b { color: #ffe6a8; }
.tank-pets .tp:active { transform: scale(0.94); }
/* 队列占位：主虾上移并让出底部空间 */
.tank-stage.multi .lob { top: calc(50% - 27px); height: calc(100% - 64px); }
.tank-stage.multi .tank-score { display: none; }

.lv-row { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; }
.lv-badge {
  flex: none;
  font-size: 11.5px; font-weight: 800; color: #ffe6a8;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-variant-numeric: tabular-nums;
}
.exp { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.exp i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe6a6, #f7c44b);
  transition: width 0.45s ease;
}
.exp-txt { font-size: 10px; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }

/* 四维状态 */
.s4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.s4-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'lab val' 'bar bar';
  align-items: center; gap: 5px 8px;
  padding: 9px 11px 10px;
  border-radius: 13px; background: #fff;
  box-shadow: 0 12px 24px -24px rgba(20, 30, 50, 0.55);
}
.s4-item > span { grid-area: lab; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.s4-item .s4-bar { grid-area: bar; }
.s4-bar { height: 5px; border-radius: 999px; background: rgba(29, 24, 48, 0.09); overflow: hidden; }
.s4-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 0.4s ease; }
#barHunger { background: linear-gradient(90deg, #ffc46b, #f59e0b); }
#barMood { background: linear-gradient(90deg, #f9a8d4, #ec4899); }
#barClean { background: linear-gradient(90deg, #7dd3fc, #0ea5e9); }
#barBond { background: linear-gradient(90deg, #fca5a5, #ef4444); }
.s4-item em {
  grid-area: val;
  font-style: normal; font-size: 10.5px; font-weight: 800; color: #4b4462;
  font-variant-numeric: tabular-nums;
}

/* 待领取 */
.yield {
  margin-top: 10px; padding: 14px 15px 15px;
  border-radius: 20px; background: #fff;
  box-shadow: 0 16px 32px -28px rgba(20, 30, 50, 0.55);
}
.y-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 11px; color: var(--muted); }
.y-head em { font-style: normal; font-weight: 700; color: #a9710a; font-variant-numeric: tabular-nums; }
.y-head .y-got { font-size: 10.5px; letter-spacing: 0.01em; }
.y-nums { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 5px 0 1px; }
.y-num { display: inline-flex; align-items: baseline; white-space: nowrap; }
.y-num b {
  font-size: 26px; font-weight: 800; letter-spacing: -0.01em; color: #2f2745;
  font-variant-numeric: tabular-nums;
}
.y-num em { display: inline-block; white-space: nowrap; font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--muted); margin-inline-start: 4px; }
.y-num.pi b { color: #a9710a; }
.y-tip { margin: 2px 0 10px; font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.y-btn {
  width: 100%; height: 42px;
  border: 0; border-radius: 13px;
  font: inherit; font-size: 13.5px; font-weight: 800; color: #5b3a00;
  background: linear-gradient(135deg, #fff3cf, #ffe08f 60%, #f7c44b);
  box-shadow: 0 10px 20px -14px rgba(217, 154, 29, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
}
.y-btn:active { transform: translateY(1px); }
.y-btn:disabled { background: #f1ece2; color: #a9a2b5; box-shadow: none; cursor: default; }

/* 待领取卡片：两行大白话说明 + 单个领取按钮 */
.y-cap {
  margin-inline-start: auto; font-size: 10.5px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.yield .y-tip { margin: 3px 0 0; font-size: 11px; line-height: 1.55; }
.yield .y-btn { margin-top: 11px; }

/* 三个动作 */
.g3acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.g-act {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px 11px;
  border: 0; border-radius: 15px;
  background: #fff; color: #6b6478;
  font: inherit; cursor: pointer;
  box-shadow: 0 12px 26px -24px rgba(20, 30, 50, 0.45);
}
.g-act b { font-size: 12px; font-weight: 800; color: #2f2745; }
.g-act em { font-style: normal; font-size: 10px; font-weight: 700; color: #a9710a; }
.g-act:active { transform: translateY(1px); }
.g-act:disabled { opacity: 0.5; }

/* 今日目标 */
.goal {
  margin-top: 10px; padding: 12px 14px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.05);
}
.goal-hd { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 800; color: #4b4462; }
.goal-btn {
  height: 26px; padding: 0 11px;
  border: 0; border-radius: 999px;
  font: inherit; font-size: 10.5px; font-weight: 800; color: #5b3a00;
  background: linear-gradient(135deg, #ffe9a8, #f7c44b);
  cursor: pointer;
}
.goal-btn:disabled { background: #ece6d9; color: #a9a2b5; cursor: default; }
.goal-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.goal-items span {
  padding: 4px 8px; border-radius: 8px;
  background: #fff; color: var(--muted);
  font-size: 10px; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.06);
}
.goal-items span.done { color: #15803d; background: rgba(34, 197, 94, 0.1); box-shadow: none; }

/* 食物列表 */
.foods { display: grid; gap: 8px; margin-top: 10px; }
.food {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px;
  border: 0; border-radius: 14px;
  background: #fbf8f1; color: inherit;
  font: inherit; text-align: start;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.06);
}
.food:disabled { opacity: 0.45; cursor: default; }
.food-ico {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px; background: #fff; color: #a9710a;
}
.food-main { flex: 1; min-width: 0; }
.food-main b { display: block; font-size: 13px; color: #2f2745; }
.food-main span { font-size: 10.5px; color: var(--muted); }
.food-cost { flex: none; font-size: 11.5px; font-weight: 800; color: #a9710a; white-space: nowrap; }

/* 日报 */
.log-list { display: grid; gap: 7px; margin-top: 8px; max-height: 54dvh; overflow: auto; }
.log-item { display: flex; gap: 8px; font-size: 12px; line-height: 1.55; color: #4b4462; }
.log-item time { flex: none; padding-top: 2px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 喂食 / 日报弹层：按内容自适应高度，不撑满整屏 */
#feedSheet .sheet-panel,
#logSheet .sheet-panel {
  min-height: auto;
  max-height: 86dvh;
  overflow: auto;
}

/* ================= 二期：皮肤 / 水缸主题 / 摆件 / 商店 ================= */
/* 龙虾配色（SVG 渐变与描边走变量，换皮肤即时生效） */
.lob { --sk1: #ff9a6b; --sk2: #f0592f; --sk3: #b22a16; --skb1: #ffb894; --skb2: #e9663f; --skl: #8e1d0f; }
.lob[data-skin='cobalt'] { --sk1: #b3ddff; --sk2: #3f8ff0; --sk3: #1c3fa8; --skb1: #dcefff; --skb2: #6aa9ef; --skl: #16306f; }
.lob[data-skin='ghost'] { --sk1: #ffffff; --sk2: #dfe7f5; --sk3: #a6b2c9; --skb1: #ffffff; --skb2: #d3dcec; --skl: #8d99b3; }
.lob[data-skin='ember'] { --sk1: #ffd27a; --sk2: #f2731f; --sk3: #9d1c0c; --skb1: #ffe0a8; --skb2: #f09040; --skl: #7d1707; }
.lob[data-skin='gold'] { --sk1: #fff2b8; --sk2: #f2c14a; --sk3: #a8791a; --skb1: #fff7d6; --skb2: #e3b04a; --skl: #8a6212; }

/* 水缸背景主题 */
.tank[data-bg='reef'] { background: radial-gradient(120% 92% at 50% 0%, #2f97a6, #17657f 55%, #0c3a52); }
.tank[data-bg='moon'] { background: radial-gradient(120% 100% at 72% 0%, #5b6a99, #2c3757 55%, #141b2f); }
.tank[data-bg='lava'] { background: radial-gradient(120% 95% at 50% 8%, #8a3423, #4a1719 55%, #1d0a10); }
.tank[data-bg='aurora'] { background: radial-gradient(120% 92% at 30% 0%, #1f7a75, #163f5e 52%, #101a38); }
.tank::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.tank[data-bg='reef']::before {
  opacity: 1;
  background:
    radial-gradient(38% 30% at 16% 82%, rgba(255, 176, 120, 0.22), transparent 70%),
    radial-gradient(36% 26% at 86% 78%, rgba(120, 255, 220, 0.16), transparent 70%);
}
.tank[data-bg='moon']::before {
  opacity: 1;
  background:
    radial-gradient(22% 18% at 76% 14%, rgba(220, 232, 255, 0.45), transparent 70%),
    radial-gradient(60% 40% at 50% 100%, rgba(120, 150, 220, 0.18), transparent 72%);
}
.tank[data-bg='lava']::before {
  opacity: 1;
  background:
    radial-gradient(50% 26% at 50% 100%, rgba(255, 120, 40, 0.4), transparent 72%),
    radial-gradient(24% 18% at 22% 22%, rgba(255, 90, 40, 0.16), transparent 70%);
}
.tank[data-bg='aurora']::before {
  opacity: 1;
  background:
    linear-gradient(112deg, transparent 18%, rgba(120, 255, 200, 0.22) 34%, rgba(140, 180, 255, 0.18) 46%, transparent 62%),
    radial-gradient(60% 40% at 50% 100%, rgba(80, 220, 200, 0.16), transparent 72%);
  background-size: 100% 100%, 100% 100%;
  animation: auroraShift 9s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  from { background-position: 0 0, 50% 100%; }
  to { background-position: 40px 0, 50% 100%; }
}

/* 摆件层 */
.deco-layer { position: absolute; left: 0; right: 0; bottom: 0; height: 104px; z-index: 1; pointer-events: none; }
.deco { position: absolute; bottom: 6px; opacity: 0; animation: decoIn 0.45s ease forwards; }
.deco svg { width: 100%; height: 100%; display: block; }
@keyframes decoIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.d-weed { left: 3%; width: 52px; height: 84px; }
.d-rock { left: 24%; width: 66px; height: 38px; bottom: 2px; }
.d-coral { right: 4%; width: 54px; height: 66px; }
.d-star { right: 23%; width: 34px; height: 34px; bottom: 4px; }
.d-bubbler { left: 45%; width: 44px; height: 48px; }
.d-chest { right: 30%; width: 58px; height: 44px; bottom: 2px; }
.tank-floor { z-index: 0; }

/* 五个动作按钮：第一行三个，第二行两个居中 */
.g3acts { grid-template-columns: repeat(6, 1fr); }
.g3acts .g-act { grid-column: span 2; padding: 9px 3px 8px; }
.g3acts .g-act:nth-child(4) { grid-column: 2 / span 2; }
.g3acts .g-act:nth-child(5) { grid-column: 4 / span 2; }
.g3acts .g-act b { font-size: 11.5px; }
.g3acts .g-act em { font-size: 9.5px; }

/* 商店弹层 */
.shop-panel { height: auto; min-height: 46dvh; max-height: 86dvh; overflow: hidden; display: flex; flex-direction: column; }
.shop-bal { margin: 1px 0 9px; font-size: 11.5px; color: var(--muted); }
.shop-bal b { font-size: 17px; font-weight: 800; color: #a9710a; font-variant-numeric: tabular-nums; margin-inline-start: 2px; }
.shop-tabs { display: flex; gap: 5px; padding: 3px; border-radius: 12px; background: rgba(29, 24, 48, 0.06); flex: none; }
.shop-tabs button {
  flex: 1; height: 31px; border: 0; border-radius: 9px; background: none;
  font: inherit; font-size: 11.5px; font-weight: 700; color: #6f6884; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.shop-tabs button.on { background: #fff; color: #2f2745; box-shadow: 0 6px 14px -10px rgba(20, 30, 50, 0.5); }
.shop-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: 11px; padding-bottom: 2px; }
.shop-sec { margin: 0 2px 7px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; color: #9a92aa; }
.shop-sec:not(:first-child) { margin-top: 14px; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shop-item {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px; border: 0; border-radius: 14px; background: #fff;
  font: inherit; text-align: start; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.06);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.shop-item:active { transform: scale(0.985); }
.shop-item.on { box-shadow: inset 0 0 0 2px #f0b432; }
.shop-item.pending { background: #fffdf4; box-shadow: inset 0 0 0 2px #f0b432; }
.shop-item.pending em { color: #b45309; }
.shop-item b { font-size: 11.5px; font-weight: 800; color: #2f2745; }
.shop-item em { font-style: normal; font-size: 10px; font-weight: 800; color: #a9710a; }
.shop-item em.own { color: #15803d; }
.shop-item em.eq { color: #8d86a0; }
.shop-item em.pending { color: #b45309; }
/* 价格/状态与「+X% 产出」并排，窄屏也不会换行挤爆 */
.shop-item .si-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.shop-item .si-perk {
  flex: none; padding: 2px 5px; border-radius: 6px; line-height: 1.4;
  background: #e8f7ee; color: #157f3c;
  font-size: 9px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.si-prev { display: block; height: 62px; border-radius: 10px; overflow: hidden; position: relative; }
.si-prev svg { width: 100%; height: 100%; display: block; }
.prev-bg { background: radial-gradient(120% 100% at 50% 0%, #2f6f95, #1b3f66 58%, #122b49); }
.prev-bg::before { content: ''; position: absolute; inset: 0; background: radial-gradient(62% 42% at 50% 0%, rgba(255,255,255,.2), transparent 72%); }
.prev-bg::after { content: ''; position: absolute; left: -12%; right: -12%; bottom: -16px; height: 34px; border-radius: 50% 50% 0 0; background: rgba(8, 28, 46, 0.5); }
.prev-bg.p-reef { background: radial-gradient(120% 100% at 50% 0%, #2f97a6, #17657f 58%, #0c3a52); }
.prev-bg.p-moon { background: radial-gradient(120% 100% at 72% 0%, #5b6a99, #2c3757 58%, #141b2f); }
.prev-bg.p-lava { background: radial-gradient(120% 100% at 50% 8%, #8a3423, #4a1719 58%, #1d0a10); }
.prev-bg.p-aurora { background: radial-gradient(120% 100% at 30% 0%, #1f7a75, #163f5e 55%, #101a38); }
.prev-skin { display: grid; place-items: center; background: radial-gradient(90% 70% at 50% 10%, #f4f8fc, #e3ecf4); }
.prev-skin svg { width: 46px; height: 46px; display: block; filter: drop-shadow(0 3px 5px rgba(20, 30, 50, 0.22)); }
.prev-skin.p-classic { --p1: #ff9a6b; --p2: #f0592f; --p3: #b22a16; }
.prev-skin.p-cobalt { --p1: #b3ddff; --p2: #3f8ff0; --p3: #1c3fa8; }
.prev-skin.p-ghost { --p1: #ffffff; --p2: #dfe7f5; --p3: #a6b2c9; }
.prev-skin.p-ember { --p1: #ffd27a; --p2: #f2731f; --p3: #9d1c0c; }
.prev-skin.p-gold { --p1: #fff2b8; --p2: #f2c14a; --p3: #a8791a; }
.prev-deco { display: grid; place-items: center; background: linear-gradient(180deg, #eef4f9, #dbe8f2); }
.prev-deco svg { width: 46px; height: 46px; }

/* 成长页 */
.grow-card {
  padding: 12px 13px 13px; border-radius: 16px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.06); margin-bottom: 9px;
}
.grow-card h3 { margin: 0 0 3px; font-size: 12.5px; font-weight: 800; color: #2f2745; }
.grow-card p { margin: 0 0 9px; font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.grow-row { display: flex; gap: 7px; }
.grow-row input {
  flex: 1; min-width: 0; height: 39px; padding: 0 11px;
  border: 1px solid rgba(29, 24, 48, 0.13); border-radius: 11px;
  background: #faf9f6; font: inherit; font-size: 13px; color: var(--text);
}
.grow-row input:focus { outline: 2px solid rgba(240, 180, 50, 0.5); outline-offset: 1px; }
.grow-btn {
  height: 39px; padding: 0 13px; border: 0; border-radius: 11px;
  font: inherit; font-size: 12px; font-weight: 800; color: #5b3a00;
  background: linear-gradient(135deg, #ffe9a8, #f7c44b); cursor: pointer; white-space: nowrap;
}
.grow-btn:active { transform: translateY(1px); }
.grow-btn:disabled { background: #ece6d9; color: #a9a2b5; cursor: default; }
.grow-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 10px; color: var(--muted); }

/* 商店：每个 tab 顶部的「这东西有什么用」说明 */
.shop-note {
  margin: 0 0 9px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(240, 180, 50, 0.12);
  font-size: 10.5px; line-height: 1.55; color: #8a6a1f;
}
/* 当前装扮总加成：商店里随时能看到买了到底加了多少 */
.shop-perk {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 9px; padding: 7px 10px; border-radius: 11px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.07);
  font-size: 10.5px; color: var(--muted);
}
.shop-perk b { font-size: 13px; font-weight: 800; color: #157f3c; font-variant-numeric: tabular-nums; }
.shop-perk .cap { margin-left: auto; font-size: 9.5px; color: #a09aae; }
/* 成长规则：等级 → 每小时产出 */
.grow-rates {
  margin: 0 0 9px; border-radius: 11px; overflow: hidden;
  background: rgba(29, 24, 48, 0.045);
}
.grow-rates .gr-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; font-size: 10.5px; color: #5a5470;
}
.grow-rates .gr-row + .gr-row { border-top: 1px solid rgba(29, 24, 48, 0.06); }
.grow-rates .gr-row b { font-size: 11px; font-weight: 800; color: #a9710a; font-variant-numeric: tabular-nums; }
.grow-list { margin: 0; padding-left: 15px; }
.grow-list li { font-size: 10.5px; line-height: 1.6; color: var(--muted); margin-bottom: 4px; }
.grow-list li:last-child { margin-bottom: 0; }

/* ================= 经济口径：单一龙虾币资产 ================= */
.asset-split.single { grid-template-columns: 1fr; }
.asset-split.single .asset-col { padding: 2px 6px 8px; cursor: default; }
.asset-split.single .asset-col::after { display: none; }
.asset-amt.big { font-size: 31px; letter-spacing: -0.02em; }
.dep-rate {
  margin: 8px 2px 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}
.dep-unit {
  display: inline-block;
  width: 13px; height: 13px;
  border-radius: 4px;
  margin-inline-start: 4px;
  vertical-align: -1px;
  background: url('logo.jpg') center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* 充值/提现弹层：内容不多时不要撑到 82dvh，避免中间大片空白 */
#wdSheet .sheet-panel, #depSheet .sheet-panel { min-height: 0; max-height: 92dvh; }

/* 充值地址是长串 M 地址，折行后保持左对齐 */
.dep-addr code { text-align: start; word-break: break-all; }

/* ================= 买龙虾 / 空水缸 ================= */
/* 还没买龙虾：首页只留空水缸引导，玩法区全部收起 */
#pageHome.no-pet {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100dvh - 140px);
}
/* 首页在 home-lock 下有针对 .tank 的高优先级规则，这里必须压过去 */
#pageHome.no-pet .tank,
#pageHome.no-pet .s4,
#pageHome.no-pet .yield,
#pageHome.no-pet .g3acts,
#pageHome.no-pet .goal { display: none !important; }
.nopet { width: 100%; text-align: center; padding: 0 14px 30px; }
.nopet-art svg { width: 150px; height: 128px; }
.nopet b { display: block; font-size: 17px; margin: 4px 0 7px; color: #2b2340; }
.nopet p { margin: 0 0 18px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.nopet-btn {
  height: 46px; padding: 0 30px; border: 0; border-radius: 15px;
  background: linear-gradient(180deg, #f6c445, #e2a51c);
  color: #42290a; font: inherit; font-size: 14px; font-weight: 800;
  box-shadow: 0 8px 18px rgba(200, 148, 20, 0.28);
  cursor: pointer;
}
.nopet-btn:active { transform: translateY(1px); }

.buy-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(60, 40, 110, 0.07);
}
.buy-art {
  width: 66px; height: 66px; flex: none; border-radius: 17px;
  background: linear-gradient(160deg, #fff6ef, #ffe6d8);
  display: grid; place-items: center;
}
.buy-art svg { width: 54px; height: 54px; }
.buy-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.buy-info b { font-size: 14.5px; color: #2b2340; }
.buy-sub { font-size: 11px; color: var(--muted); line-height: 1.4; }
.buy-price { font-style: normal; font-size: 13px; font-weight: 800; color: #b07809; }
.buy-btn {
  flex: none; height: 38px; padding: 0 15px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #f6c445, #e2a51c);
  color: #42290a; font: inherit; font-size: 12.5px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
}
.buy-btn:active { transform: translateY(1px); }
.buy-btn:disabled { background: #f1ece2; color: #a9a2b5; cursor: default; box-shadow: none; }

.pets-hd {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 18px 4px 8px; font-size: 13px; font-weight: 800; color: #2b2340;
}
.pets-hd em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.pets-list { display: flex; flex-direction: column; gap: 8px; }
.pet-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 15px; background: #fff;
  border: 1.5px solid transparent;
}
.pet-row.on { border-color: rgba(212, 160, 23, 0.5); background: linear-gradient(180deg, #fffdf5, #fff); }
.pet-ic {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  background: #fff2ea; display: grid; place-items: center;
}
.pet-ic svg { width: 34px; height: 34px; }
.pet-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pet-meta b { font-size: 13.5px; color: #2b2340; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-meta span { font-size: 11px; color: var(--muted); }
.pet-on {
  font-style: normal; font-size: 11px; font-weight: 800; color: #b07809;
  background: rgba(212, 160, 23, 0.13); padding: 5px 9px; border-radius: 9px;
}
.pet-sw {
  height: 30px; padding: 0 12px; border-radius: 9px;
  border: 1px solid rgba(120, 90, 200, 0.22); background: #fff;
  color: #6b5b8a; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.pet-sw:active { opacity: 0.7; }
.pets-note { margin: 14px 4px 0; font-size: 11px; line-height: 1.65; color: var(--muted); }
/* 买龙虾页：余额靠右，别和标题黏在一起 */
#pagePets .page-head { align-items: center; }
#petBal { margin-left: auto; font-size: 12.5px; letter-spacing: 0; }
/* 买龙虾页右上角的充值入口：余额不够时不用绕去「我的」 */
.pet-topup {
  margin-left: 6px; height: 26px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(120, 90, 200, 0.22); background: #fff;
  color: #6b5b8a; font: inherit; font-size: 11.5px; font-weight: 700;
  cursor: pointer; align-self: center;
}
.pet-topup:active { opacity: 0.7; }

/* ---------------- 公告 ---------------- */
/* 左上角入口：跟右上角语言按钮同一排、同一套胶囊外观 */
.notice-btn {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 14px;
  z-index: 30;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.76);
  color: #26314a;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px -12px rgba(20, 30, 50, 0.55);
  backdrop-filter: blur(6px);
}
.notice-btn[hidden] { display: none !important; }
.notice-btn:active { transform: scale(0.97); }
.notice-dot {
  width: 7px; height: 7px; margin-left: 1px;
  border-radius: 50%; background: #f04438;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
}
html[dir='rtl'] .notice-btn { left: auto; right: 14px; }

.notice-panel { min-height: 0; max-height: 88dvh; }
.notice-panel .sheet-head { justify-content: flex-start; gap: 6px; }
.notice-panel .sheet-head h2 {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-panel .sheet-x { margin-left: auto; }
.notice-back {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(29, 24, 48, 0.06);
  color: #4a4360; cursor: pointer;
}
.notice-back[hidden] { display: none !important; }
.notice-back:active { transform: scale(0.94); }
.notice-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  margin-top: 2px; padding-bottom: 4px;
}

/* 列表：一排一条 */
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.nt-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px;
  border: 0; border-radius: 14px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.06);
  font: inherit; text-align: start; cursor: pointer;
}
.nt-row:active { transform: scale(0.99); }
.nt-badge { width: 4px; align-self: stretch; flex: none; border-radius: 2px; background: #e6c46a; }
.nt-badge.tone-gold { background: linear-gradient(#f7cd55, #e09a12); }
.nt-badge.tone-red { background: linear-gradient(#f87171, #dc2626); }
.nt-badge.tone-green { background: linear-gradient(#4ade80, #16a34a); }
.nt-badge.tone-blue { background: linear-gradient(#60a5fa, #2563eb); }
.nt-badge.tone-purple { background: linear-gradient(#a78bfa, #7c3aed); }
.nt-thumb {
  width: 46px; height: 46px; flex: none;
  border-radius: 10px; overflow: hidden; background: #eef2f7;
}
.nt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-main b {
  font-size: 13px; font-weight: 800; color: #2f2745;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nt-main i {
  font-style: normal; font-size: 10.5px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.nt-main em { font-style: normal; font-size: 9.5px; color: #a09aae; }
.nt-arrow { flex: none; color: #c8c2d4; }
.nt-empty { padding: 46px 0; text-align: center; font-size: 12px; color: var(--muted); }

/* 详情 */
.nt-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.nt-meta time { font-size: 10px; color: #a09aae; }
.nt-tag {
  padding: 2px 7px; border-radius: 6px;
  background: #f4f1fa; color: #6b6478;
  font-size: 9px; font-weight: 800;
}
.nt-tag.tone-gold { background: #fdf3dc; }
.nt-tag.tone-red { background: #fde8e8; }
.nt-tag.tone-green { background: #e6f7ec; }
.nt-tag.tone-blue { background: #e7effd; }
.nt-tag.tone-purple { background: #f1eafe; }
.nt-pin { font-size: 9px; font-weight: 800; color: #b45309; }
.notice-detail h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.38; }
.nt-rich { font-size: 12.5px; line-height: 1.72; color: #3a3350; }
.nt-rich p { margin: 0 0 10px; }
.nt-rich p:last-child { margin-bottom: 0; }
.nt-rich b { font-weight: 800; }
.nt-rich .nt-red { color: #dc2626; }
.nt-rich .nt-green { color: #15803d; }
.nt-rich .nt-blue { color: #2563eb; }
.nt-rich .nt-gold { color: #b45309; }
.nt-rich .nt-purple { color: #7c3aed; }
.nt-rich .nt-fig { margin: 10px 0; }
.nt-rich .nt-img { max-width: 100%; display: block; border-radius: 12px; }
.nt-rich .nt-ul { margin: 0 0 10px; padding-inline-start: 18px; }
.nt-rich .nt-ul li { margin: 3px 0; }
.nt-rich hr { border: 0; height: 1px; background: rgba(29, 24, 48, 0.1); margin: 12px 0; }

/* 标题/标题前缀的颜色（列表项、详情标题共用） */
.tone-gold { color: #b45309 !important; }
.tone-red { color: #dc2626 !important; }
.tone-green { color: #15803d !important; }
.tone-blue { color: #2563eb !important; }
.tone-purple { color: #7c3aed !important; }

/* ---------------- 繁育 ---------------- */
.breed-panel { min-height: 0; }
.breed-body { display: grid; gap: 11px; padding-bottom: 4px; }

/* 当前这只的基因卡 */
.bd-me {
  padding: 13px 14px 12px;
  border-radius: 16px;
  background: linear-gradient(160deg, #fff8e8, #ffffff 72%);
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.07), 0 12px 26px -24px rgba(20, 30, 50, 0.5);
}
.bd-me.shiny {
  background: linear-gradient(150deg, #fff2c8, #fffbef 64%, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(214, 160, 26, 0.38), 0 12px 26px -22px rgba(214, 160, 26, 0.6);
}
.bd-me-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bd-me-top b { font-size: 15px; font-weight: 800; color: #2f2745; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-lv { flex: none; padding: 1px 7px 2px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: #7a4c00; background: #ffecc0; }
.bd-spark { flex: none; margin-inline-start: auto; font-style: normal; font-size: 10.5px; font-weight: 800; color: #a9710a; }
.bd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bd-tags i { font-style: normal; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #6b6478; background: rgba(29, 24, 48, 0.05); }
.bd-tags b { color: #b4471f; font-weight: 800; }
.bd-par { margin: 8px 0 0; font-size: 11px; color: #a49cae; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bd-h3 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 5px 0 0; font-size: 12.5px; font-weight: 800; color: #2f2745; letter-spacing: 0.01em;
}
.bd-h3-e { font-style: normal; font-weight: 800; font-size: 11px; color: #a49cae; }

/* 伴侣 */
.bd-mates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bd-mate {
  display: grid; gap: 3px; min-width: 0;
  padding: 10px 11px; text-align: start;
  border: 1.5px solid rgba(29, 24, 48, 0.1); border-radius: 14px;
  background: #fff; font: inherit; color: inherit; cursor: pointer;
}
.bd-mate b { font-size: 13px; font-weight: 800; color: #2f2745; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-mate span { font-size: 10.5px; color: #a49cae; }
.bd-mate i { font-style: normal; font-size: 11px; font-weight: 700; color: #b4471f; }
.bd-mate i b { color: #b4471f; font-size: 11px; }
.bd-mate.on { border-color: #f0ab2a; background: #fff9e8; box-shadow: 0 8px 18px -16px rgba(200, 140, 20, 0.9); }
.bd-mate.shiny b { color: #a9710a; }

.bd-est { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 10px 12px; border-radius: 13px; background: #f7f4ee; }
.bd-est span { font-size: 11px; font-weight: 700; color: #7c7488; }

.bd-btn {
  width: 100%; height: 48px;
  border: 0; border-radius: 15px;
  font: inherit; font-size: 14.5px; font-weight: 800; color: #4a2a00;
  background: linear-gradient(180deg, #ffe08a, #f6b93b 62%, #e5a01c);
  box-shadow: 0 10px 22px -12px rgba(200, 140, 20, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
}
.bd-btn:disabled { opacity: 0.45; box-shadow: none; cursor: default; }
.bd-btn:active:not(:disabled) { transform: translateY(1px); }

/* 孕育中 */
.bd-egg {
  padding: 14px;
  border-radius: 16px;
  color: #fff;
  background: radial-gradient(120% 90% at 50% 0%, #2f6f95, #1b3f66 62%, #142f4d);
  box-shadow: 0 18px 34px -28px rgba(12, 42, 70, 0.9);
}
.bd-egg-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bd-egg-hd b { font-size: 13px; font-weight: 800; }
.bd-ok { flex: none; font-style: normal; font-size: 10.5px; font-weight: 800; color: #0f3; background: #a8f0c0; color: #12502c; padding: 2px 8px 3px; border-radius: 999px; }
.bd-cd { margin: 10px 0 9px; font-size: 30px; font-weight: 800; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.bd-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.bd-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffd76a, #ffb02e); transition: width 0.5s ease; }
.bd-tip { margin: 9px 0 0; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, 0.74); line-height: 1.5; }
.bd-egg .bd-btn { margin-top: 12px; }

/* 等级不够 / 没有伴侣 */
.bd-lock, .bd-empty { padding: 14px; border-radius: 15px; background: #f7f4ee; }
.bd-lock b { font-size: 13px; font-weight: 800; color: #2f2745; }
.bd-lock p, .bd-empty { margin: 6px 0 0; font-size: 11.5px; color: #7c7488; line-height: 1.6; }
.bd-empty { margin: 0; }
.bd-warn { margin: 2px 0 0; font-size: 11.5px; font-weight: 700; color: #c0392b; text-align: center; }

/* 其它卵 / 水缸列表 */
.bd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.08); }
.bd-row-l { display: grid; gap: 2px; min-width: 0; }
.bd-row-l b { font-size: 12.5px; font-weight: 800; color: #2f2745; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-row-l span { font-size: 11px; color: #a49cae; font-variant-numeric: tabular-nums; }
.bd-row-l i { font-style: normal; }
.bd-mini {
  flex: none; height: 32px; padding: 0 12px;
  border: 0; border-radius: 999px;
  font: inherit; font-size: 11.5px; font-weight: 800; color: #4a2a00;
  background: linear-gradient(180deg, #ffe08a, #f0b53a); cursor: pointer;
}

.bd-pets { display: grid; gap: 6px; }
.bd-pet { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.08); }
.bd-pet.cur { background: #fffdf6; box-shadow: inset 0 0 0 1.5px rgba(240, 171, 42, 0.55); }
.bd-pet-l { display: grid; gap: 2px; min-width: 0; }
.bd-pet-l b { font-size: 12.5px; font-weight: 800; color: #2f2745; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-pet-l span { font-size: 10.5px; color: #a49cae; }
.bd-pet.shiny .bd-pet-l b { color: #a9710a; }
.bd-tag { flex: none; font-style: normal; font-size: 10px; font-weight: 800; color: #2d6a8f; background: #e3f1fa; padding: 3px 8px 4px; border-radius: 999px; }
.bd-rel {
  flex: none; height: 30px; padding: 0 11px;
  border: 0; border-radius: 999px;
  font: inherit; font-size: 11px; font-weight: 800;
  color: #9a5a52; background: #fdeeea; cursor: pointer;
}
.bd-rel.arm { color: #fff; background: #d9534f; }

/* 首页多了一个「繁育」按钮，补一档中等高度的压缩：
   840px 以下的机型先收掉可领卡的第二行说明，再把目标卡与按钮压紧，保证「今日目标」不被底栏切掉 */
@media (max-height: 845px) {
  body.home-lock .yield #yTip2 { display: none; }
  body.home-lock .goal { padding: 9px 12px 10px; }
  body.home-lock .goal-items { margin-top: 5px; }
  body.home-lock .g3acts .g-act { padding: 8px 3px 7px; }
  body.home-lock .g3acts .g-act em { font-size: 9px; }
}

/* 闪光（变异）虾：水缸缩略图与名称都带金标，和普通虾一眼分开 */
.tank-pets .tp.shiny { border-color: rgba(255, 214, 106, 0.6); box-shadow: inset 0 0 12px rgba(255, 214, 106, 0.28); }
.tank-pets .tp.shiny::after {
  content: '✦';
  position: absolute; top: 0; right: 4px;
  font-size: 8px; line-height: 1.2; color: #ffd76a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.bd-tag.ok { color: #12502c; background: #d7f7e2; }

/* 白皮书内的「默认值」提示条：说明这些数值后台可改 */
.doc .wp-note {
  padding: 10px 13px;
  border-radius: 12px;
  background: #f6f2ff;
  box-shadow: inset 0 0 0 1px rgba(120, 96, 200, 0.14);
  color: #5e5570;
  font-size: 12.5px;
  line-height: 1.7;
}

/* ---------------- 商店·食物 ---------------- */
.fs-list { display: grid; gap: 8px; }
.fs-card {
  padding: 11px 12px 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(29, 24, 48, 0.06);
}
.fs-top { display: flex; align-items: center; gap: 10px; }
.fs-ico {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px; background: #fbf3e2; color: #a9710a;
}
.fs-main { flex: 1; min-width: 0; }
.fs-main b { display: block; font-size: 13px; font-weight: 800; color: #2f2745; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-main span { font-size: 10.5px; color: var(--muted); }
.fs-own {
  flex: none; padding: 2px 8px 3px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; color: #5a5470; background: rgba(29, 24, 48, 0.06);
  font-variant-numeric: tabular-nums;
}
.fs-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.fs-btns button {
  display: grid; gap: 1px; padding: 7px 6px;
  border: 0; border-radius: 11px;
  font: inherit; color: #4a2a00; cursor: pointer;
  background: linear-gradient(180deg, #ffe08a, #f4b73c);
  box-shadow: 0 8px 16px -14px rgba(200, 140, 20, 0.9);
}
.fs-btns button b { font-size: 12px; font-weight: 800; }
.fs-btns button em { font-style: normal; font-size: 10px; font-weight: 700; color: #7a5210; }
.fs-btns button:disabled { opacity: 0.4; box-shadow: none; cursor: default; }
.fs-btns button:active:not(:disabled) { transform: translateY(1px); }

/* 喂食弹层：库存数 / 售罄引导 */
.food-own { flex: none; font-size: 13px; font-weight: 800; color: #a9710a; font-variant-numeric: tabular-nums; }
.food.empty { opacity: 0.58; }
.food.empty .food-cost { color: #7c7488; font-weight: 700; }
.food-empty { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
