/* ================= 成长体系（growth.js） =================
   首页成长卡 / 宝箱 / 体质测定弹窗与等待卡 / 邀请弹窗。沿用 app.css 的纸墨金配色变量。 */

/* ---- 首页成长卡 ---- */
#home-growth { margin-top: 18px; }
.gw-card { background: var(--card); border: 1px solid var(--line-2); padding: 16px 18px 14px; }
.gw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gw-k { font-size: 11px; letter-spacing: 0.18em; color: var(--text-3); font-weight: 700;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gw-chip { letter-spacing: 0.04em; font-weight: 600; color: var(--gold); background: var(--gold-soft);
  padding: 2px 8px; font-size: 11px; }
.gw-link { white-space: nowrap; font-size: 12px; color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.gw-score { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.gw-score b { font-family: var(--serif); font-size: 32px; line-height: 1; color: var(--text); }
.gw-score span { font-size: 13px; color: var(--text-2); }
.gw-score em { font-style: normal; font-size: 13px; color: var(--gold); margin-left: 10px; }
.gw-bar { position: relative; height: 6px; background: var(--paper-4); margin: 22px 14px 30px 0; }
.gw-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold-2); transition: width .6s var(--spring); }
.gw-chest { position: absolute; top: 50%; transform: translate(-50%, -50%); background: none; border: 0;
  padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.gw-box { width: 26px; height: 22px; display: block; background: var(--paper); border: 1.5px solid var(--text-4);
  position: relative; }
.gw-box::before { content: ""; position: absolute; left: -1.5px; right: -1.5px; top: 6px; border-top: 1.5px solid var(--text-4); }
.gw-box::after { content: ""; position: absolute; left: 50%; top: 4px; width: 5px; height: 5px; margin-left: -2.5px;
  background: var(--text-4); }
.gw-need { position: absolute; top: 28px; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.gw-chest.is-ready .gw-box { border-color: var(--gold); background: var(--gold-soft); animation: gw-glow 1.6s ease-in-out infinite; }
.gw-chest.is-ready .gw-box::before, .gw-chest.is-ready .gw-box::after { border-color: var(--gold); background: var(--gold); }
.gw-chest.is-ready .gw-need { color: var(--gold); font-weight: 700; }
.gw-chest.is-claimed .gw-box { border-color: var(--text); background: var(--text); }
.gw-chest.is-claimed .gw-box::before { border-color: var(--paper); }
.gw-chest.is-claimed .gw-box::after { background: var(--paper); }
@keyframes gw-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 74, .5); } 50% { box-shadow: 0 0 0 6px rgba(201, 162, 74, 0); } }
.gw-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-2); }
.gw-foot b { color: var(--text); }
.gw-invite { color: var(--gold); font-weight: 700; text-decoration: none; }

/* ---- 弹窗 ---- */
.gw-mask { position: fixed; inset: 0; z-index: 900; background: rgba(17, 17, 16, .42);
  display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.gw-mask.on { opacity: 1; }
.gw-modal { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--paper); border-top: 3px solid var(--rule); padding: 26px 24px 22px; box-shadow: var(--shadow-lift); }
.gw-modal.gw-result, .gw-modal.gw-invite-modal { max-width: 560px; }
.gw-x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 24px; color: var(--text-3);
  cursor: pointer; width: 44px; height: 44px; }
.gw-mk { font-size: 11px; letter-spacing: 0.18em; color: var(--text-3); font-weight: 700; }
.gw-mh { font-family: var(--serif); font-size: 22px; line-height: 1.4; margin-top: 8px; color: var(--text); }
.gw-mh b { color: var(--gold); }
.gw-mp { font-size: 14px; line-height: 1.75; color: var(--text-2); margin-top: 10px; }
.gw-mbtns { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.gw-fine { font-size: 12px; line-height: 1.7; color: var(--text-3); margin-top: 10px; }
.gw-off { border: 0; background: none; color: var(--text-4); font-size: 12px; margin-top: 12px; padding: 0; cursor: pointer; }

.gw-rules { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.gw-rules td { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.gw-rules td:last-child { text-align: right; color: var(--text); font-weight: 700; white-space: nowrap; }
.gw-rules i { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--text-3); }
.gw-chests { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; color: var(--text-2); line-height: 2; }
.gw-chests b { color: var(--gold); display: inline-block; min-width: 56px; }

/* 体质 */
.gw-cz-ill { display: flex; gap: 6px; margin: -6px 0 10px; }
.gw-cz-av { width: 25%; height: auto; }
.gw-steps { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14px; }
.gw-steps li { padding: 6px 0 6px 24px; position: relative; color: var(--text-4); }
.gw-steps li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 8px; height: 8px; border: 1.5px solid var(--text-4); border-radius: 50%; }
.gw-steps li.on { color: var(--text); }
.gw-steps li.on::before { border-color: var(--gold); animation: gw-spin 1s linear infinite; border-top-color: transparent; }
.gw-steps li.done { color: var(--text-2); }
.gw-steps li.done::before { background: var(--gold); border-color: var(--gold); }
@keyframes gw-spin { to { transform: rotate(360deg); } }
.gw-res { display: grid; grid-template-columns: 220px 1fr; gap: 18px; margin-top: 12px; align-items: start; }
.gw-res-fig .cz-card { transform-origin: top left; }
.gw-res-name { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.gw-res-pts { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.gw-res-pts span { font-weight: 700; color: var(--text); margin-right: 6px; }

.gw-pill { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 800;
  background: var(--ink); color: var(--paper); border: 0; padding: 10px 16px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lift); }
.gw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-2); animation: gw-pulse 1.2s ease-in-out infinite; }
.gw-dot.ok { animation: none; background: #5fbf8a; }
@keyframes gw-pulse { 50% { opacity: .3; } }

/* 邀请 */
.gw-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.gw-perks > div { background: var(--gold-soft); padding: 10px 12px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.gw-perks b { display: block; color: var(--gold); font-size: 12px; letter-spacing: .12em; }
.gw-code { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--text-3); }
.gw-code b { font-size: 26px; letter-spacing: .2em; color: var(--text); font-family: var(--serif); }
.gw-linkrow, .gw-bind, .gw-vrow { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.gw-linkrow input, .gw-bind input, .gw-vrow input { flex: 1; min-width: 0; margin: 0; }
.gw-verify { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.gw-friends { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.gw-friends li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }

/* 注册页邀请码 */
.auth-field .ref-ok { font-size: 12px; color: var(--gold); margin-top: 4px; }

@media (max-width: 640px) {
  .gw-card { padding: 14px 14px 12px; }
  .gw-score b { font-size: 28px; }
  .gw-bar { margin: 20px 12px 28px 0; }
  .gw-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gw-mask { align-items: flex-end; padding: 0; }
  .gw-modal { max-width: none; max-height: 88vh; padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); }
  .gw-mh { font-size: 19px; }
  .gw-res { grid-template-columns: 1fr; }
  .gw-res-fig { width: 100%; max-width: 320px; margin: 0 auto; }
  .gw-res-name { display: none; }   /* 卡片上已经有名字了 */
  .gw-perks { grid-template-columns: 1fr; }
  .gw-mbtns .btn { flex: 1; text-align: center; }
  .gw-vrow.cap-row { flex-wrap: wrap; }
  .gw-pill { left: 16px; right: 16px; justify-content: center; }
}

/* ---------- 邀请二维码 ---------- */
.gw-qr-row { display: flex; gap: 18px; align-items: center; margin-top: 16px; }
.gw-qr { flex: 0 0 148px; width: 148px; height: 148px; background: #fff; border: 1px solid var(--line-2); padding: 4px; }
.gw-qr-svg { display: block; width: 100%; height: 100%; }
.gw-qr-side { flex: 1; min-width: 0; }
.gw-qr-side .gw-code { margin-top: 0; }
.gw-qr-side .btn { margin-top: 8px; }
.gw-qr-img { margin-top: 12px; text-align: center; }
.gw-qr-img img { width: 100%; max-width: 300px; border: 1px solid var(--line-2); }
@media (max-width: 620px) {
  .gw-qr-row { flex-direction: column; align-items: stretch; text-align: center; }
  .gw-qr { align-self: center; flex-basis: auto; width: 190px; height: 190px; }
  .gw-qr-side .gw-code { justify-content: center; }
}

/* ---------- 提示小条 / 持仓截图识别弹窗（nudge.js） ---------- */
.nd-strips { display: grid; gap: 10px; margin: 16px 0; }
.nd-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; text-align: left;
  padding: 13px 16px; background: var(--paper); border: 1px solid var(--line-2); border-left: 3px solid var(--gold-2);
  color: var(--text); text-decoration: none; font: inherit; cursor: pointer; }
.nd-strip:hover { border-color: var(--gold, #c8a24a); }
.nd-strip .k { font-size: 11px; letter-spacing: .16em; color: var(--text-3); font-weight: 700; white-space: nowrap; }
.nd-strip b { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 12em; }
.nd-strip .go { font-size: 13px; color: var(--gold, #c8a24a); white-space: nowrap; margin-left: auto; }
.nd-strip.nd-hold { border-left-color: var(--forest, #2f5d50); }
.nd-strip.nd-hold .go { color: var(--forest, #2f5d50); }
.nd-dots { display: inline-flex; gap: 5px; margin-left: auto; }
.nd-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--gold, #c8a24a); }
.nd-dots i.on { background: var(--gold, #c8a24a); }
.nd-top { margin-top: 4px; }
.nd-ill { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 14px; color: var(--forest, #2f5d50); }
.nd-phone { width: 52px; height: 84px; border: 2px solid var(--text); border-radius: 9px; padding: 12px 7px; display: grid; gap: 6px; align-content: start; }
.nd-phone i { height: 6px; background: var(--line-2); border-radius: 2px; }
.nd-phone i:nth-child(2) { width: 70%; }
.nd-arrow { font-size: 22px; color: var(--text-3); }
.nd-k { width: 92px; height: 60px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; background: #fff; }
.nd-k svg { width: 78px; height: 46px; }
.ref-banner { text-align: left; margin: 0 0 16px; padding: 12px 14px; background: var(--gold-soft); border-left: 3px solid var(--gold-2);
  font-size: 14px; line-height: 1.7; color: var(--text); }
.ref-banner b { letter-spacing: .12em; color: var(--gold); }
.ref-banner span { font-size: 12.5px; color: var(--text-2); }
