:root{
  --bg:#14130f;
  --card:#1c1b19;
  --raise:#232020;
  --line:#4a453e;
  --line-soft:#37332e;
  --ink:#ece8e1;
  --muted:#a39c90;
  --dim:#6f6a62;
  --brand:#7d94d9;
  --brand-hover:#8ea3e0;
  --brand-press:#5c74b8;
  --on-brand:#16182f;
  --seg:#0f0e0c;
  --on-seg:#ece8e1;
  --r-card:26px;
  --r-box:16px;
  --r-pill:999px;
  color-scheme:dark;
}

html{
  background:var(--bg);
  min-height:100%;
  -webkit-text-size-adjust:100%;
}

html[data-theme="light"]{
  --bg:#f6f4f0;
  --card:#ffffff;
  --raise:#eeeadf;
  --line:#e0dad0;
  --line-soft:#e6e1d8;
  --ink:#1c1b19;
  --muted:#5d5a53;
  --dim:#8a8478;
  --brand:#5c74b8;
  --brand-hover:#4f66a8;
  --brand-press:#3f5494;
  --on-brand:#f8f7f4;
  --seg:#1c1b19;
  --on-seg:#f8f7f4;
  color-scheme:light;
}

*{box-sizing:border-box}

/* 关掉安卓浏览器自带的点击高亮方块 */
html,body,a,button,input,label,span,div,svg{-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(0,0,0,0)}
a,button,.tab,.terms,.eye,.input{touch-action:manipulation}
button,input{-webkit-appearance:none;appearance:none}
html,body{margin:0;padding:0}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:"Google Sans","Product Sans","PingFang SC","Hiragino Sans GB","Noto Sans SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  /* 中文回落的字体往往只有 Regular 一档（安卓的 Noto Sans CJK 就是），
     600/700 会被浏览器用「描边加粗」硬合成，笔画密的字（量、疆、赢…）
     会糊成一团黑块。禁止合成，英文数字仍然用我们自带的真字重。 */
  font-synthesis:none;

}

.page{
  max-width:420px;
  margin:0 auto;
  padding:20px 16px 40px;
  min-height:100dvh;
}

/* 登录/注册：整块以中心为原点居中 */
.page-auth{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding-top:32px;
  padding-bottom:32px;
}
.page-auth .tabs,
.page-auth .card{width:100%}
.auth-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  margin-bottom:22px;
  text-decoration:none;
  color:var(--ink);
}
.auth-brand svg{width:26px;height:26px;flex:0 0 26px}
.auth-brand span{font-size:20px;font-weight:700;letter-spacing:-.015em}
.auth-brand .accent{color:var(--brand)}

/* ---------- 切换 ---------- */
.tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  background:var(--card);
  border:1px solid var(--line-soft);
  border-radius:14px;
  padding:4px;
  margin-bottom:14px;
}
.tab{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:15px;
  font-weight:500;
  height:40px;
  border-radius:10px;
  cursor:pointer;
  transition:color .18s ease,background .18s ease;
}
.tab:hover{color:var(--ink)}
.tab.is-active{
  background:var(--raise);
  color:var(--ink);
  font-weight:600;
}
.tab:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* ---------- 卡片 ---------- */
.card{
  background:var(--card);
  border:1px solid var(--line-soft);
  border-radius:20px;
  padding:26px 24px 26px;
}
.card.is-hidden{display:none}

h1{
  margin:0 0 22px;
  font-size:26px;
  line-height:1.25;
  font-weight:600;
  letter-spacing:-.015em;
}
.sub{
  margin:0 0 22px;
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
}

/* ---------- 输入 ---------- */
.field{display:block;margin-bottom:16px}
.label{
  display:block;
  margin-bottom:8px;
  font-size:13.5px;
  font-weight:500;
  color:var(--muted);
}
.input{
  position:relative;
  display:flex;
  align-items:center;
  height:48px;
  background:var(--bg);
  border:1px solid var(--line-soft);
  border-radius:12px;
  padding:0 14px;
  transition:border-color .18s ease,background .18s ease;
}
.input:focus-within{border-color:var(--brand)}
.ico{
  width:18px;height:18px;
  flex:0 0 18px;
  color:var(--dim);
  margin-right:10px;
}
.input input{
  flex:1 1 auto;
  min-width:0;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  font:inherit;
  font-size:15px;
}
.input input::placeholder{color:var(--dim)}

/* ---------- 自动填充：去掉浏览器白底 ---------- */
.input input:-webkit-autofill,
.input input:-webkit-autofill:hover,
.input input:-webkit-autofill:focus,
.input input:-webkit-autofill:active{
  -webkit-text-fill-color:var(--ink);
  -webkit-box-shadow:0 0 0 1000px transparent inset;
  box-shadow:0 0 0 1000px transparent inset;
  transition:background-color 9999s ease-in-out 0s;
  caret-color:var(--ink);
}
.input input{
  color-scheme:inherit;
}

.eye{
  flex:0 0 auto;
  width:32px;height:32px;
  margin-right:-4px;
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  color:#8a8478;
  cursor:pointer;
  border-radius:50%;
  transition:color .18s ease;
}
.eye:hover{color:var(--ink)}
.eye svg{width:22px;height:22px}
.eye:focus-visible{outline:2px solid var(--brand);outline-offset:1px}

.forgot{
  display:block;
  text-align:right;
  margin:-4px 2px 18px 0;
  color:var(--muted);
  font-size:13.5px;
  text-decoration:none;
  transition:color .18s ease;
}
.forgot:hover{color:var(--ink)}

/* ---------- 按钮 ---------- */
.btn-primary{
  display:block;
  width:100%;
  height:48px;
  margin-top:4px;
  border:0;
  border-radius:12px;
  background:var(--brand);
  color:var(--on-brand);
  font:inherit;
  font-size:15.5px;
  font-weight:600;
  cursor:pointer;
  transition:background .18s ease,transform .12s ease;
}
.btn-primary:hover{background:var(--brand-hover)}
.btn-primary:active{background:var(--brand-press);transform:translateY(1px)}
.btn-primary:disabled{opacity:.55;cursor:default;transform:none}
.btn-primary:focus-visible{outline:2px solid var(--brand);outline-offset:3px}

/* ---------- 提示 ---------- */
.callout{
  display:flex;
  gap:12px;
  align-items:flex-start;
  background:var(--raise);
  border-radius:var(--r-box);
  padding:16px 18px;
  margin:0 0 22px;
}
.ico-info{
  width:22px;height:22px;
  flex:0 0 22px;
  margin-top:2px;
  color:var(--brand);
}
.callout p{
  margin:0;
  font-size:15px;
  line-height:1.7;
  color:var(--muted);
}

/* ---------- 条款 ---------- */
.terms{
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid var(--line-soft);
  border-radius:14px;
  padding:16px 18px;
  margin:2px 0 24px;
  cursor:pointer;
}
.terms input{position:absolute;opacity:0;width:22px;height:22px;margin:0;pointer-events:none}
.terms .box{
  flex:0 0 22px;
  width:22px;height:22px;
  display:grid;
  place-items:center;
  border:1.5px solid var(--line);
  border-radius:6px;
  color:transparent;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
.terms .box svg{width:14px;height:14px}
.terms input:checked + .box{
  background:var(--brand);
  border-color:var(--brand);
  color:var(--on-brand);
}
.terms input:focus-visible + .box{outline:2px solid var(--brand);outline-offset:3px}
.terms-text{
  font-size:15px;
  color:var(--brand);
  line-height:1.5;
}
.terms-text a{color:inherit;text-decoration:none;border-bottom:1px solid rgba(125,148,217,.45)}
.terms-text a:hover{border-bottom-color:var(--brand)}

/* ---------- 脚注 ---------- */
.foot{
  margin:22px 0 0;
  text-align:center;
  color:var(--muted);
  font-size:15px;
}
.foot a{
  color:var(--brand);
  text-decoration:none;
  margin-left:4px;
}
.foot a:hover{text-decoration:underline}

.msg{
  margin:14px 0 0;
  min-height:0;
  font-size:14px;
  line-height:1.6;
  text-align:center;
  color:var(--muted);
}
.msg.is-error{color:#ff6b6b}
.msg.is-ok{color:#46b96e}

.cf-slot{
  display:flex;
  justify-content:center;
  margin:0 0 16px;
  min-height:0;
}
.cf-slot:empty{display:none}

@media (max-width:380px){
  h1{font-size:29px}
  .card{padding:24px 18px 26px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}
/* ================= 官网 ================= */
.home{
  display:flex;
  flex-direction:column;
  min-height:100dvh;
  padding-top:18px;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:44px;
  margin-bottom:clamp(28px,9vh,88px);
}
.mark{
  font-size:16px;
  font-weight:600;
  letter-spacing:.02em;
  color:var(--ink);
}
.nav-login{
  font-size:14px;
  font-weight:500;
  color:var(--ink);
  text-decoration:none;
  padding:8px 18px;
  border:1px solid var(--line-soft);
  border-radius:var(--r-pill);
  background:transparent;
  transition:background .18s ease,border-color .18s ease;
}
.nav-login:hover{background:var(--raise);border-color:var(--line)}

.hero{
  padding:0;
}
.eyebrow{
  margin:0 0 16px;
  font-size:14px;
  letter-spacing:.06em;
  color:var(--brand);
}
.home h1{
  margin:0 0 18px;
  font-size:clamp(29px,7.6vw,40px);
  line-height:1.16;
  font-weight:700;
  letter-spacing:-.02em;
}
.home h1 .accent{color:var(--brand)}
.lede{
  margin:0 0 28px;
  font-size:16px;
  line-height:1.7;
  color:var(--muted);
}
.btn-primary{
  text-decoration:none;
  display:flex;
  align-items:center;
  justify-content:center;
}

.facts{
  margin:32px 0 0;
  border-top:1px solid var(--line-soft);
  padding:0;
}
.facts > div{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  border-bottom:1px solid var(--line-soft);
}
.facts dt{
  font-size:14px;
  color:var(--muted);
}
.facts dd{
  margin:0;
  font-size:15px;
  color:var(--ink);
  font-variant-numeric:tabular-nums;
}

.note{
  margin:auto 0 0;
  padding:26px 0 6px;
  font-size:13px;
  line-height:1.6;
  color:var(--dim);
}

@media (max-width:380px){
  .home h1{font-size:34px}
}

/* ================= 控制台 ================= */
a.mark{text-decoration:none;color:var(--ink)}
button.nav-login{
  border:0;background:transparent;font:inherit;font-size:15px;
  color:var(--muted);cursor:pointer;padding:8px 4px;
  -webkit-tap-highlight-color:transparent;
}
button.nav-login:hover{color:var(--ink)}

.keybox{
  margin-top:6px;
  background:var(--card);
  border-radius:20px;
  padding:20px 20px 18px;
}
.klabel{display:block;font-size:13px;color:var(--muted);margin-bottom:12px}
.keyval{
  display:block;
  font-family:"Google Sans","Product Sans","PingFang SC","Hiragino Sans GB","Noto Sans SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  font-size:13px;
  line-height:1.55;
  color:var(--ink);
  word-break:break-all;
  margin-bottom:16px;
}
.btn-primary.small{
  height:44px;
  font-size:15px;
}

/* ---------- 注册成功态 ---------- */
.card.is-sent > h1,
.card.is-sent > .field,
.card.is-sent > form,
.card.is-sent > .foot{display:none}

.sent{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:34px 0 10px;
}
.sent[hidden]{display:none}
.sent-check{
  width:64px;height:64px;
  color:var(--brand);
  margin-bottom:22px;
  animation:pop .45s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes pop{
  from{transform:scale(.6);opacity:0}
  to{transform:scale(1);opacity:1}
}
.sent-text{
  margin:0 0 30px;
  font-size:22px;
  line-height:1.55;
  font-weight:600;
  color:var(--ink);
}
.btn-ghost{
  height:48px;
  padding:0 40px;
  border:1px solid var(--line);
  border-radius:var(--pill,999px);
  background:transparent;
  color:var(--ink);
  font:inherit;
  font-size:15px;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease;
}
.btn-ghost:hover{background:var(--raise);border-color:var(--dim)}

/* ---------- 激活结果页 ---------- */
.verify-page{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:26px;
  padding:24px;
  text-align:center;
}
.verify-check{
  width:76px;
  height:76px;
  color:var(--brand);
  animation:pop .45s cubic-bezier(.2,.9,.3,1.3) both;
}
.verify-text{
  margin:0;
  font-size:21px;
  font-weight:600;
  line-height:1.4;
  letter-spacing:.01em;
  color:var(--ink);
}

/* 激活结果页按钮 */
.verify-btn{
  display:inline-block;
  margin-top:26px;
  padding:13px 38px;
  border-radius:999px;
  background:var(--brand,#7d94d9);
  color:#16182f;
  font-size:15px;
  font-weight:600;
  text-decoration:none;
  transition:opacity .16s ease;
}
.verify-btn:hover{opacity:.88}

/* ---------- 群验证页 ---------- */
.join-tut{
  margin:0 0 18px;
  padding:16px 18px;
  background:var(--card, #1c1b19);
  border:1px solid var(--line, #4a453e);
  border-radius:16px;
  font-family:inherit;
  font-size:14px;
  line-height:1.85;
  color:var(--ink, #ece8e1);
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.btn-link{text-align:center}
