* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; }
body {
  background:#F4F8EF; color:#14301F;
  font-family:"HarmonyOS Sans SC","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  font-size:17px; line-height:1.55; overflow:hidden;
  -webkit-font-smoothing:antialiased;
}
.page { height:100%; display:flex; flex-direction:column; }

/* ===== 登录 ===== */
#page-login { justify-content:center; align-items:center; background:
  radial-gradient(1200px 500px at 20% -10%, rgba(21,128,61,.16), transparent 60%),
  radial-gradient(900px 400px at 90% 110%, rgba(245,179,1,.12), transparent 60%), #F4F8EF; padding:24px; overflow-y:auto; }
.splash-screen { position:fixed; inset:0; z-index:9999; background:#F4F8EF; display:flex; align-items:center; justify-content:center; opacity:1; transition:opacity .6s ease; }
.splash-screen.hide { opacity:0; pointer-events:none; }
.splash-screen img { width:100%; height:100%; object-fit:cover; }
.login-hero { text-align:center; margin-bottom:26px; }
.login-logo-img { width:150px; max-width:42vw; height:auto; aspect-ratio:1/1; object-fit:contain; display:block; margin:0 auto 10px; filter:drop-shadow(0 10px 26px rgba(21,128,61,.2)); }
.login-sub { color:#5E7A68; font-size:12px; margin-top:4px; letter-spacing:1px; }
.login-card { width:100%; max-width:360px; background:#FFFFFF; border:1px solid #D8E6CF; border-radius:18px; padding:20px; box-shadow:0 8px 30px rgba(31,61,46,.10); }
.tab-row { display:flex; margin-bottom:16px; background:#E8F1DD; border-radius:12px; padding:4px; }
.tab-item { flex:1; text-align:center; padding:12px 6px; border-radius:10px; color:#3F5C4B; font-size:16px; font-weight:600; }
.tab-item.active { background:linear-gradient(135deg,#16A34A,#127038); color:#fff; font-weight:800; }
.in { width:100%; background:#FFFFFF; border:1.5px solid #B7CFA8; border-radius:12px; padding:14px 12px; color:#14301F; font-size:17px; margin-bottom:12px; outline:none; }
.in:focus { border-color:#16A34A; box-shadow:0 0 0 3px rgba(22,163,74,.14); }
textarea.in { min-height:88px; resize:vertical; line-height:1.6; }
.code-row { display:flex; gap:8px; margin-bottom:12px; align-items:center; }
.code-row .in { flex:1; min-width:0; margin-bottom:0; }
.btn-code { flex:none; border:none; border-radius:10px; padding:14px 10px; background:#E4F0DA; color:#127038; font-size:13px; cursor:pointer; white-space:nowrap; font-weight:800; }
.btn-code:disabled { opacity:.55; cursor:not-allowed; }
.btn-primary { width:100%; padding:16px; border:none; border-radius:12px; background:linear-gradient(135deg,#16A34A,#127038); color:#fff; font-size:19px; font-weight:800; letter-spacing:4px; cursor:pointer; }
.btn-primary:active { opacity:.85; }
.btn-primary:disabled { opacity:.6; cursor:not-allowed; }
.btn-primary.sm { letter-spacing:2px; padding:13px; font-size:17px; }
.msg { text-align:center; color:#DC2626; font-size:14px; min-height:18px; margin-top:8px; }
.version-foot { text-align:center; color:#7A8F7A; font-size:12px; margin:18px 0 10px; letter-spacing:1px; }
.chat-box { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; background:#F4F8EF; overflow:hidden; }
.chat-body { flex:1 1 auto; min-height:0; overflow-y:auto; padding:12px; }
.chat-msg { margin-bottom:14px; max-width:82%; display:flex; gap:8px; align-items:flex-start; }
.chat-msg.me { margin-left:auto; text-align:right; justify-content:flex-end; }
.chat-avatar { width:32px; height:32px; border-radius:50%; background:#E4F0DA; color:#15803D; display:flex; align-items:center; justify-content:center; font-weight:800; flex:none; }
.chat-inner { min-width:0; }
.chat-name { font-size:12px; color:#5E7A68; margin-bottom:4px; }
.chat-bubble { display:inline-block; padding:10px 13px; border-radius:12px; background:#FFFFFF; color:#1F3D2E; text-align:left; line-height:1.5; border:1px solid #D8E6CF; }
.chat-msg.me .chat-bubble { background:#16A34A; color:#FFFFFF; border-color:#16A34A; }
.chat-input { display:flex; gap:8px; padding:10px; border-top:1px solid #D8E6CF; align-items:center; flex-shrink:0; background:#FFFFFF; }
.chat-input .in { flex:1 1 auto; min-width:0; height:46px; margin-bottom:0; padding:0 12px; }
.chat-input button { flex:0 0 auto; width:78px; height:46px; padding:0; letter-spacing:2px; }
.server-set { text-align:center; color:#15803D; font-size:12px; margin-top:8px; padding:4px; cursor:pointer; }
.login-demo { color:#5E7A68; font-size:12px; margin-top:18px; }

/* ===== 弹层 ===== */
.modal-mask { position:fixed; inset:0; background:rgba(31,61,46,.45); display:flex; align-items:center; justify-content:center; z-index:100; }
.modal { width:82%; max-width:340px; background:#FFFFFF; border:1px solid #D8E6CF; border-radius:16px; padding:20px; }
.modal h3 { margin-bottom:14px; color:#15803D; }
.hint { color:#5E7A68; font-size:12px; margin:10px 0; line-height:1.6; }
.modal-btns { display:flex; gap:10px; margin-top:6px; }
.btn-ghost { flex:1; padding:11px; background:#E4F0DA; border:none; border-radius:10px; color:#15803D; cursor:pointer; font-weight:700; }

/* ===== 主框架 ===== */
#page-main { background:
  radial-gradient(1000px 420px at 10% -5%, rgba(22,163,74,.12), transparent 55%), #F4F8EF; }
#topBar { display:flex; align-items:center; justify-content:space-between; padding:16px 16px 12px; }
#topTitle { font-size:23px; font-weight:900; color:#14301F; letter-spacing:1px; }
.top-user { font-size:14px; color:#0F6B37; background:#E4F0DA; border:1px solid #B7CFA8; padding:7px 13px; border-radius:20px; font-weight:800; }
#content { flex:1; overflow-y:auto; padding:0 14px calc(96px + env(safe-area-inset-bottom,0px)); }
#tabBar { position:fixed; left:0; right:0; bottom:0; display:flex; background:#FFFFFF; border-top:1px solid #D8E6CF; padding:8px 0 calc(9px + env(safe-area-inset-bottom,0px)); z-index:50; box-shadow:0 -2px 14px rgba(31,61,46,.07); }
#tabBar .tab { flex:1; text-align:center; font-size:24px; line-height:1.05; color:#3F5C4B; padding:2px 0; cursor:pointer; min-height:48px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
#tabBar .tab.active { color:#127038; }
#tabBar .tab span { display:block; margin-top:2px; font-size:14px; font-weight:600; }
#tabBar .tab.active span { font-weight:900; }

/* ===== 通用组件 ===== */
.card { background:#FFFFFF; border:1px solid #D3E3C8; border-radius:16px; padding:16px; margin-bottom:14px; box-shadow:0 2px 10px rgba(31,61,46,.05); }
.card-title { font-size:18px; font-weight:800; color:#14301F; margin-bottom:12px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.card-title .more { font-size:14px; color:#127038; font-weight:700; padding:4px 2px; }
.row { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px dashed #D8E6CF; gap:10px; }
.row:last-child { border-bottom:none; }
.row .l { color:#274736; }
.row .v { color:#14301F; font-weight:800; }
.row .v.up { color:#0F6B37; }
.row .v.down { color:#DC2626; }
.sub { display:block; font-size:13px; color:#5E7A68; margin-top:4px; line-height:1.5; }
.tag { display:inline-block; font-size:13px; padding:4px 10px; border-radius:8px; background:#E4F0DA; color:#0F6B37; margin-right:6px; font-weight:700; }
.tag.gold { background:#FFF3D6; color:#8F5B0E; }
.tag.red { background:#FEE2E2; color:#B91C1C; }
.search-row { display:flex; gap:8px; margin-bottom:12px; }
.search-row .in { margin-bottom:0; flex:1; }
.btn-sm { padding:13px 16px; border:none; border-radius:12px; background:#16A34A; color:#fff; cursor:pointer; font-size:16px; font-weight:800; }
.btn-sm.ghost { background:#E4F0DA; color:#0F6B37; }

/* 交易大厅紧凑操作按钮 */
.act-col { display:flex; flex-direction:column; gap:6px; align-items:stretch; min-width:76px; flex-shrink:0; }
.act { padding:11px 14px; border:none; border-radius:11px; background:linear-gradient(135deg,#16A34A,#127038); color:#fff; cursor:pointer; font-size:15px; font-weight:800; white-space:nowrap; text-align:center; line-height:1.3; min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
.act:active { opacity:.85; }
.act.ghost { background:#FFFFFF; color:#0F6B37; border:1.5px solid #9ECBA6; }
/* 交易大厅卡片：头像 + 昵称 + 品种价格 + 操作 */
.deal { background:#FFFFFF; border:1px solid #D3E3C8; border-radius:16px; padding:15px; margin-bottom:13px; box-shadow:0 2px 10px rgba(31,61,46,.05); }
.deal-head { display:flex; align-items:center; gap:10px; }
.avatar { width:40px; height:40px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:16px; }
.deal-who { flex:1; min-width:0; }
.deal-name { font-size:16px; font-weight:800; color:#14301F; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.deal-time { font-size:13px; color:#5E7A68; margin-top:2px; }
.deal-main { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:12px; }
.deal-info { flex:1; min-width:0; }
.deal-item { font-size:20px; font-weight:900; color:#14301F; line-height:1.35; }
.deal-item small { font-size:14px; font-weight:600; color:#3F5C4B; }
.deal-meta { font-size:14px; color:#3F5C4B; margin-top:5px; line-height:1.55; }
.deal-price { flex-shrink:0; color:#A96A0B; font-size:23px; font-weight:900; }
.deal-price small { font-size:12px; font-weight:700; color:#7A5A16; }
.deal-foot { margin-top:12px; display:flex; justify-content:flex-end; }
.deal-act { display:flex; gap:9px; flex-wrap:wrap; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.kpi { background:#FFFFFF; border:1px solid #D3E3C8; border-radius:14px; padding:14px; }
.kpi .k { color:#3F5C4B; font-size:14px; font-weight:700; }
.kpi .v { font-size:25px; font-weight:900; color:#14301F; margin-top:4px; }
.kpi .v.gold { color:#A96A0B; }
.kpi .sub { margin-top:5px; font-size:12px; }
/* 行情分类筛选条 */
.tag-row { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-start; padding:4px 0 10px !important; border-bottom:none !important; }
.tag-row .tag { font-size:15px; padding:9px 16px; border-radius:22px; margin-right:0; cursor:pointer; }
/* 官方指数紧凑横滑条 */
.idx-strip { display:flex; gap:8px; overflow-x:auto; padding:4px 2px 8px; -webkit-overflow-scrolling:touch; }
.idx-strip::-webkit-scrollbar { display:none; }
.idx-tile { flex:0 0 112px; background:#FFFFFF; border:1px solid #D3E3C8; border-radius:12px; padding:10px 11px; }
.idx-name { font-size:12px; color:#3F5C4B; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.idx-val { font-size:21px; font-weight:900; color:#14301F; margin-top:3px; }
.idx-val small { font-size:11px; font-weight:600; color:#5E7A68; }
.idx-chgrow { margin-top:3px; font-size:12px; font-weight:700; }
.idx-chg.up { color:#0F6B37; }
.idx-chg.down { color:#DC2626; }
.empty { text-align:center; color:#5E7A68; padding:42px 0; font-size:15px; }
.h5pager { display:flex; gap:10px; align-items:center; justify-content:center; padding:16px 0 4px; color:#3F5C4B; font-size:14px; }
.h5pager button { padding:10px 16px; border-radius:10px; border:1px solid #B7CFA8; background:#FFFFFF; color:#0F6B37; font-weight:800; font-size:14px; }
.h5pager button:disabled { opacity:.4; }
.chart { width:100%; height:260px; }
.list-item { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 2px; border-bottom:1px solid #E2EBD9; cursor:pointer; }
.list-item .nm { font-size:18px; color:#14301F; font-weight:800; }
.list-item .sub { font-size:13px; color:#3F5C4B; margin-top:3px; }
.list-item .pr { color:#0F6B37; font-size:20px; font-weight:900; white-space:nowrap; }
.list-item .pr small { font-size:12px; color:#5E7A68; font-weight:600; }

/* 表单 */
.frm { display:flex; flex-direction:column; }
.frm label { font-size:15px; color:#274736; font-weight:700; margin:10px 0 6px; }
.frm .in { margin-bottom:4px; }
.frm-row { display:flex; gap:10px; }
.frm-row .in { flex:1; min-width:0; }
.pub-tip { font-size:14px; color:#3F5C4B; line-height:1.7; margin:4px 0 10px; background:#F2F8EC; border-left:3px solid #9ECBA6; border-radius:8px; padding:9px 11px; }
.quick-row { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 10px; }
.quick-chip { font-size:15px; padding:9px 14px; border-radius:20px; background:#E4F0DA; border:1.5px solid #B7CFA8; color:#0F6B37; cursor:pointer; font-weight:700; }
.quick-chip.active { background:#16A34A; border-color:#16A34A; color:#fff; }
.pub-cats { display:flex; gap:8px; margin:8px 0 10px; overflow-x:auto; padding-bottom:2px; }
.pub-cat { flex:none; font-size:15px; padding:9px 16px; border-radius:18px; background:#E4F0DA; border:1.5px solid #B7CFA8; color:#0F6B37; cursor:pointer; font-weight:700; }
.pub-cat.active { background:#16A34A; border-color:#16A34A; color:#fff; }
.pub-item-page { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.pub-item-chip { text-align:center; font-size:16px; padding:11px 4px; border-radius:12px; background:#E4F0DA; border:1.5px solid #B7CFA8; color:#0F6B37; cursor:pointer; font-weight:700; }
.pub-item-chip.active { background:#16A34A; border-color:#16A34A; color:#fff; }
.pub-calc { font-size:15px; color:#8F5B0E; margin:6px 0 10px; font-weight:800; }
.pub-msg { color:#B91C1C; font-size:14px; margin:6px 0; min-height:20px; }

/* 签到 */
.ck-hero { background:linear-gradient(135deg,#16A34A,#15803D); color:#fff; border-radius:18px; padding:18px; margin-bottom:14px; box-shadow:0 6px 18px rgba(21,128,61,.22); }
.ck-hero-row { display:flex; justify-content:space-between; align-items:center; font-size:14px; opacity:.95; }
.ck-hero-row b { font-size:26px; font-weight:800; }
.ck-progress { height:10px; background:rgba(255,255,255,.28); border-radius:999px; overflow:hidden; margin:12px 0; }
.ck-progress i { display:block; height:100%; background:#FFD166; border-radius:999px; }
.ck-points { font-size:14px; opacity:.95; }
.ck-points b { font-size:20px; margin-left:6px; }
.ck-cta { width:100%; margin-top:14px; padding:13px; border:none; border-radius:12px; background:#FFD166; color:#5A3A00; font-size:17px; font-weight:800; cursor:pointer; }
.ck-done-hero { margin-top:14px; padding:11px; border-radius:12px; background:rgba(255,255,255,.18); text-align:center; font-size:14px; font-weight:700; }
.ck-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.ck-cell { aspect-ratio:1; border-radius:16px; background:#F7FAF2; border:1.5px solid #C9DAC0; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; }
.ck-cell .h { font-size:17px; color:#1F3D2E; font-weight:800; }
.ck-cell .p { font-size:12px; color:#15803D; margin-top:3px; font-weight:700; }
.ck-cell.done { background:linear-gradient(145deg,#16A34A,#15803D); border-color:transparent; }
.ck-cell.done .h { color:#fff; }
.ck-cell.done .p { color:#E4F0DA; }
.ck-cell.now { border-color:#B7791F; box-shadow:0 0 0 3px rgba(183,121,31,.16); }
.ck-cell.locked { opacity:.45; cursor:not-allowed; }
.rule-list { display:grid; gap:0; }
.rule-row { display:grid; grid-template-columns:88px 1fr; gap:10px; padding:11px 0; border-bottom:1px dashed #DDE7D3; align-items:start; }
.rule-row:last-child { border-bottom:none; padding-bottom:0; }
.rule-row .k { color:#5E7A68; font-size:15px; font-weight:700; line-height:1.5; }
.rule-row .v { color:#1F3D2E; font-size:15px; font-weight:700; line-height:1.6; }

/* 广告弹层 */
#adModal .modal { width:88%; max-width:360px; padding:0; overflow:hidden; background:#FFFFFF; }
.ad-box { position:relative; display:flex; flex-direction:column; }
#adModal .ad-box { padding:0; text-align:center; }
.ad-top { display:flex; align-items:center; justify-content:space-between; padding:12px 14px 8px; }
.ad-box .ad-badge { display:inline-block; background:#FFF3D6; color:#B7791F; font-size:11px; padding:3px 12px; border-radius:20px; font-weight:700; }
.ad-count { width:36px; height:36px; border-radius:50%; background:#FFF3D6; color:#B7791F; font-size:17px; font-weight:800; display:flex; align-items:center; justify-content:center; flex:none; }
.ad-img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; background:#EDF3E5; cursor:pointer; }
.ad-info { padding:12px 14px 14px; }
.ad-title { color:#1F3D2E; font-size:16px; font-weight:700; line-height:1.5; }
.ad-tip { color:#5E7A68; font-size:12px; margin-top:6px; }
.ad-done { font-size:16px; color:#15803D; font-weight:700; padding:20px 0; text-align:center; }

/* 商城 */
.shop-hero {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:linear-gradient(135deg,#0F7A42,#16A34A);
  border-radius:16px; padding:16px 18px; margin-bottom:12px;
  box-shadow:0 6px 18px rgba(22,163,74,.22);
}
.shop-hero .sh-label { font-size:12px; color:#CDEFD9; letter-spacing:1px; }
.shop-hero .sh-pts { font-size:30px; font-weight:900; color:#fff; line-height:1.1; margin-top:2px; }
.shop-hero .sh-right { font-size:12px; color:#E4F7EA; text-align:right; line-height:1.7; }

.shop-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.shop-item {
  background:#FFFFFF; border:1px solid #DCEBDA; border-radius:16px; overflow:hidden;
  box-shadow:0 2px 10px rgba(31,61,46,.06); display:flex; flex-direction:column;
}
.si-pic {
  position:relative; width:100%; aspect-ratio:1/1; background:#F2F8EE;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.si-emoji { font-size:44px; opacity:.9; }
.si-pic img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  background:#F2F8EE;
}
.si-pts {
  position:absolute; left:8px; top:8px; z-index:2;
  background:rgba(183,121,31,.94); color:#fff; font-size:12px; font-weight:800;
  padding:3px 9px; border-radius:20px; letter-spacing:.5px;
  box-shadow:0 2px 8px rgba(0,0,0,.14);
}
.si-body { padding:10px 11px 11px; display:flex; flex-direction:column; flex:1; }
.si-name { font-size:16px; font-weight:900; color:#14301F; line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:43px; }
.si-desc { font-size:13px; color:#3F5C4B; margin-top:5px; line-height:1.45;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:38px; }
.si-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding-top:10px; }
.si-stock { font-size:12px; color:#5E7A68; white-space:nowrap; font-weight:600; }
.si-btn {
  border:none; background:#16A34A; color:#fff; font-size:15px; font-weight:800;
  padding:10px 16px; border-radius:22px; cursor:pointer; min-height:40px;
  box-shadow:0 3px 10px rgba(22,163,74,.28); white-space:nowrap;
}
.si-btn:active { transform:translateY(1px); }
.si-btn.dim { background:#DCE7D3; color:#3F5C4B; box-shadow:none; font-weight:700; }

/* 顶部详情页返回 */
.detail-head { display:flex; align-items:center; gap:8px; margin:calc(10px + env(safe-area-inset-top,0px)) 0 12px; padding-top:6px; }
.back-btn { font-size:22px; color:#15803D; cursor:pointer; padding:2px 6px; }
.detail-title { font-size:19px; font-weight:800; color:#1F3D2E; }
.chat-room-row { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #D8E6CF; border-radius:14px; padding:12px; margin-bottom:10px; box-shadow:0 2px 8px rgba(31,61,46,.04); }
.chat-room-name { display:flex; align-items:center; gap:6px; font-size:16px; font-weight:800; color:#1F3D2E; }
.chat-room-msg { display:block; font-size:13px; color:#5E7A68; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.unread-dot { width:8px; height:8px; border-radius:50%; background:#DC2626; display:inline-block; }
.chat-del { flex:none; border:none; background:#FEE2E2; color:#DC2626; border-radius:10px; padding:7px 12px; font-size:12px; font-weight:700; cursor:pointer; }

/* 公告富文本 */
.ann-rich h3 { font-size:16px; font-weight:700; margin:12px 0 6px; color:#1F3D2E; }
.ann-rich ul, .ann-rich ol { padding-left:22px; margin:6px 0; }
.ann-rich li { margin:4px 0; }
.ann-rich a { color:#16A34A; text-decoration:underline; }
.ann-rich b, .ann-rich strong { color:#1F3D2E; }

/* Toast */
#toast { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:rgba(31,61,46,.94); border:1px solid rgba(22,163,74,.4); color:#FFFFFF; padding:12px 22px; border-radius:12px; font-size:15px; z-index:200; display:none; box-shadow:0 8px 24px rgba(31,61,46,.25); }

/* ===== 桌面浏览器：居中手机宽栏 ===== */
@media (min-width: 768px) {
  body { overflow:auto; }
  #page-main { max-width:420px; margin:0 auto; min-height:100vh; box-shadow:0 0 40px rgba(31,61,46,.15); }
  #tabBar { left:50%; right:auto; width:420px; transform:translateX(-50%); border-radius:16px 16px 0 0; }
  #content { padding-bottom:96px; }
}
