/* ============================================================
   渠道账号层(PC) — 官网外观之上叠加「注册 / 找回密码 / 修改安全码」
   全部类名用 ch- 前缀，避免与官网 public.css / style.css 冲突。
   尺寸用 rem，跟随官网 html 字号(1rem≈66px@<1280) 等比缩放。
   ============================================================ */
:root {
  --ch-gold: #ffe9a8;
  --ch-gold-deep: #c89b4a;
  --ch-red: #c23a2a;
  --ch-red-deep: #8f2418;
  --ch-wood: #3a2a1b;
  --ch-wood-deep: #241811;
  --ch-txt: #f6edd6;
  --ch-dim: #cdbf9d;
  --ch-kai: "KaiTi", "STKaiti", "楷体", "Songti SC", serif;
}

/* ---------- 右上角账号入口(固定，跟随所有屏) ---------- */
.ch-account {
  position: fixed; right: .25rem; top: .25rem; z-index: 45;
  display: flex; flex-direction: column; gap: .14rem;
  animation: fadeInDown .6s ease-out .4s both;
}
.ch-abtn {
  display: flex; align-items: center; justify-content: center;
  width: 1.74rem; height: .5rem; cursor: pointer;
  font-family: var(--ch-kai); font-size: .24rem; letter-spacing: .04rem; font-weight: 700;
  color: #fff6df; text-shadow: 0 .02rem .03rem rgba(0,0,0,.45);
  background: linear-gradient(180deg, #d9533c, var(--ch-red-deep));
  border: .02rem solid var(--ch-gold); border-radius: .12rem;
  box-shadow: 0 .04rem 0 rgba(0,0,0,.28), 0 .06rem .12rem rgba(0,0,0,.28);
  transition: transform .12s ease, filter .12s ease;
}
.ch-abtn--find { background: linear-gradient(180deg, #4f8b5c, #2f6b3d); }
.ch-abtn--security { background: linear-gradient(180deg, #4a6d94, #324a66); }
.ch-abtn:hover { filter: brightness(1.08); transform: translateY(-.02rem); }
.ch-abtn:active { transform: translateY(.02rem); box-shadow: 0 .01rem 0 rgba(0,0,0,.28); }

/* ---------- 弹窗 ---------- */
.ch-modal { position: fixed; inset: 0; z-index: 120; display: none; }
.ch-modal.is-open { display: block; }
.ch-mask { position: absolute; inset: 0; background: rgba(8,6,10,.7); backdrop-filter: blur(2px); }
.ch-panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.94);
  width: 5.3rem; max-width: 92vw; max-height: 92vh; overflow-y: auto;
  padding: .36rem .36rem .42rem;
  background: linear-gradient(180deg, #3b2c1d, #251812);
  border: .03rem solid var(--ch-gold); border-radius: .22rem;
  box-shadow: 0 .2rem .6rem rgba(0,0,0,.55), inset 0 0 0 .01rem rgba(255,233,168,.14);
  opacity: 0; transition: transform .22s cubic-bezier(.2,.9,.3,1.2), opacity .22s ease;
}
.ch-modal.is-open .ch-panel { transform: translate(-50%,-50%) scale(1); opacity: 1; }
.ch-close { position: absolute; top: .18rem; right: .18rem; width: .42rem; height: .42rem; border: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.ch-close::before, .ch-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: .22rem; height: .03rem; background: var(--ch-dim); }
.ch-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.ch-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.ch-close:hover::before, .ch-close:hover::after { background: var(--ch-gold); }

.ch-head { text-align: center; margin-bottom: .26rem; }
.ch-title { margin: 0; font-family: var(--ch-kai); font-size: .38rem; letter-spacing: .05rem; color: var(--ch-gold); text-shadow: 0 .02rem .06rem rgba(0,0,0,.45); }
.ch-title::before, .ch-title::after { content: "·"; color: var(--ch-gold-deep); margin: 0 .14rem; }

.ch-form { display: flex; flex-direction: column; gap: .2rem; }
.ch-field { display: flex; flex-direction: column; gap: .08rem; }
.ch-field > label { font-size: .2rem; color: var(--ch-dim); letter-spacing: .02rem; padding-left: .03rem; }
.ch-input-wrap { position: relative; display: flex; align-items: center; }
.ch-input-wrap input {
  width: 100%; padding: .18rem .56rem .18rem .2rem; font-size: .22rem; color: var(--ch-txt);
  background: rgba(255,255,255,.06); border: .02rem solid rgba(255,233,168,.3); border-radius: .14rem;
  outline: none; transition: border-color .12s ease, background .12s ease; font-family: inherit;
}
.ch-input-wrap input::placeholder { color: #9a8c6f; }
.ch-input-wrap input:focus { border-color: var(--ch-gold); background: rgba(255,255,255,.1); }
.ch-field.has-error .ch-input-wrap input { border-color: #e06a5a; }
.ch-eye { position: absolute; right: .12rem; width: .4rem; height: .4rem; border: 0; padding: 0; cursor: pointer; background: transparent;
  --eye: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z'/><circle cx='12' cy='12' r='3'/></svg>");
  --eye-off: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/><line x1='1' y1='1' x2='23' y2='23'/></svg>"); }
.ch-eye::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: .3rem; height: .3rem; background-color: var(--ch-dim); -webkit-mask: center/contain no-repeat var(--eye); mask: center/contain no-repeat var(--eye); }
.ch-eye[aria-pressed="true"]::before { background-color: var(--ch-gold); -webkit-mask-image: var(--eye-off); mask-image: var(--eye-off); }
.ch-helper { margin: 0; font-size: .17rem; color: #9a8c6f; padding-left: .03rem; }
.ch-err { margin: 0; min-height: 0; font-size: .18rem; color: #e9897a; padding-left: .03rem; }
.ch-field.has-error .ch-err { min-height: .24rem; }

.ch-submit {
  margin-top: .12rem; padding: .2rem; cursor: pointer;
  font-family: var(--ch-kai); font-size: .3rem; font-weight: 700; letter-spacing: .06rem; color: #fff;
  background: linear-gradient(180deg, #e3523f, var(--ch-red-deep));
  border: .02rem solid var(--ch-gold); border-radius: .16rem;
  box-shadow: 0 .05rem 0 rgba(0,0,0,.3), 0 .08rem .16rem rgba(0,0,0,.25);
  transition: transform .1s ease, filter .1s ease;
}
.ch-submit:hover { filter: brightness(1.06); }
.ch-submit:active { transform: translateY(.02rem); box-shadow: 0 .01rem 0 rgba(0,0,0,.3); }
.ch-submit.is-loading { opacity: .65; pointer-events: none; }

/* ---------- 成功 / Toast ---------- */
.ch-success { position: fixed; inset: 0; z-index: 130; display: none; align-items: center; justify-content: center; }
.ch-success.is-open { display: flex; }
.ch-success-panel { background: rgba(20,14,10,.94); border: .03rem solid var(--ch-gold); border-radius: .22rem; padding: .4rem .56rem; text-align: center; color: var(--ch-txt); animation: chPop .3s cubic-bezier(.2,.9,.3,1.3); }
@keyframes chPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ch-check { width: .9rem; height: .9rem; margin: 0 auto .2rem; border-radius: 50%; background: linear-gradient(180deg,#5bbf63,#3f9a48); display: flex; align-items: center; justify-content: center; }
.ch-check svg { width: .5rem; height: .5rem; }
.ch-success-text { margin: 0; font-size: .26rem; letter-spacing: .02rem; }

.ch-toast { position: fixed; left: 50%; top: .5rem; transform: translateX(-50%) translateY(-.3rem); z-index: 140; max-width: 86vw; background: #241811; color: var(--ch-txt); border: .01rem solid var(--ch-gold-deep); padding: .16rem .28rem; border-radius: .14rem; font-size: .22rem; box-shadow: 0 .1rem .3rem rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.ch-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 整页：推广链接无效 */
.ch-invalid { position: fixed; inset: 0; z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; background: #1a1a2e; color: #fff; }
.ch-invalid .t { font-size: .4rem; font-weight: 600; letter-spacing: .05rem; }
.ch-invalid .s { font-size: .22rem; color: #9892a8; }
