:root {
  --bg: #fff2e8;
  --card: #fffdfa;
  --text: #34231c;
  --muted: #8e6d5d;
  --line: #efb38b;
  --line-soft: #f4d6c1;
  --accent: #f0542d;
  --accent-dark: #d94320;
  --field: #fff8f2;
  --danger: #b42318;
  --success: #16794c;
  --shadow: 0 18px 50px rgba(151, 72, 30, .13);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 15%, rgba(255,255,255,.9), transparent 29rem),
    radial-gradient(circle at 94% 84%, rgba(255,208,171,.38), transparent 27rem),
    linear-gradient(145deg, #fff8f2, var(--bg));
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-dark); text-decoration: none; }
[hidden] { display: none !important; }

.page-shell {
  width: min(1120px, calc(100% - 36px));
  min-height: 100svh;
  margin: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.site-header {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(207,126,76,.18);
}
.site-header p { margin: 0; color: var(--muted); font-size: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--accent-dark); font-weight: 900; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 13px; color: #fff;
  background: linear-gradient(145deg, #ff8b4f, var(--accent));
  box-shadow: 0 9px 20px rgba(240,84,45,.22);
}
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; }

.main-grid { display: grid; grid-template-columns: minmax(0,1fr) 430px; gap: 76px; align-items: center; padding: 56px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 99px;
  color: var(--accent-dark); background: rgba(255,255,255,.58); font-size: 13px; font-weight: 800;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { margin: 22px 0 18px; font-size: clamp(40px,5vw,64px); line-height: 1.1; letter-spacing: -.045em; }
h1 em { color: var(--accent); font-style: normal; }
.lead { max-width: 615px; margin: 0; color: #79594a; font-size: 17px; line-height: 1.9; }
.entry-actions { display: flex; gap: 12px; margin-top: 25px; }
.entry-actions a {
  display: inline-grid; min-height: 46px; padding: 0 20px; place-items: center;
  border-radius: 12px; font-size: 13px; font-weight: 900;
}
.entry-web { color: #fff; background: linear-gradient(180deg,#ff7049,var(--accent)); box-shadow: 0 3px 0 #cf3e1d; }
.entry-app { color: var(--accent-dark); border: 1px solid var(--line); background: rgba(255,255,255,.72); }
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 34px; }
.features article { padding: 17px; border: 1px solid var(--line-soft); border-radius: 17px; background: rgba(255,255,255,.56); }
.features i { display: block; margin-bottom: 12px; color: var(--accent); font: 800 11px/1 ui-monospace,monospace; letter-spacing: .12em; }
.features b { display: block; margin-bottom: 7px; font-size: 14px; }
.features p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.auth-shell { padding: 28px 30px 30px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,250,.96); box-shadow: var(--shadow), 0 5px 0 rgba(210,118,66,.12); }
.auth-heading { margin-bottom: 18px; text-align: center; }
.auth-heading strong { display: block; color: var(--accent-dark); font-size: 24px; }
.auth-heading span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.auth-loading { display: none; min-height: 150px; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 700; }
.auth-loading-dot { width: 18px; height: 18px; border: 3px solid #f7d8c6; border-top-color: var(--accent); border-radius: 50%; animation: auth-spin .72s linear infinite; }
html.auth-pending .auth-loading { display: flex; }
html.auth-pending .auth-shell > :not(.auth-heading):not(.auth-loading) { display: none !important; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-loading-dot { animation: none; border-top-color: #f7d8c6; background: var(--accent); } }
.auth-nav { display: flex; justify-content: center; gap: 4px; margin-bottom: 19px; padding: 4px; border-radius: 12px; background: #fff1e7; }
.auth-nav button, .form-links button { border: 0; cursor: pointer; color: var(--accent-dark); background: transparent; }
.auth-nav button { flex: 1; padding: 9px 4px; border-radius: 9px; font-size: 12px; font-weight: 800; }
.auth-nav button[aria-current="page"] { background: var(--card); box-shadow: 0 2px 8px rgba(151,72,30,.11); }
label { display: block; margin: 13px 0 7px; color: #8e482a; font-size: 13px; font-weight: 800; }
input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px;
  outline: 0; color: var(--text); background: var(--field);
  transition: box-shadow .18s, border-color .18s, background .18s;
}
input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(240,84,45,.1); }
input::placeholder { color: #ad8b7c; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 9px; }
.code-button {
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  color: var(--accent-dark); background: #fff4ec; font-size: 12px; font-weight: 800;
}
.code-button:disabled { cursor: wait; opacity: .62; }
.primary {
  display: grid; place-items: center;
  width: 100%; min-height: 49px; margin-top: 20px; padding: 12px 16px;
  border: 0; border-radius: 12px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg,#ff7049,var(--accent));
  box-shadow: 0 4px 0 #cf3e1d, 0 9px 22px rgba(240,84,45,.18);
  font-weight: 900; letter-spacing: .08em;
}
.primary:disabled { cursor: wait; opacity: .7; box-shadow: none; }
.primary.download { margin-top: 18px; }
.form-links { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.form-links button { padding: 0; font-size: 12px; font-weight: 800; }
.form-links.single { justify-content: flex-start; }
.login-download-note { margin: 16px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.public-download {
  display: block; margin-top: 9px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 11px;
  color: var(--accent-dark); background: #fff8f2;
  text-align: center; font-size: 12px; font-weight: 900;
}
.always-download { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line-soft); text-align: center; }
.always-download > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.always-download .login-download-note { margin-top: 9px; }
.form-message { margin-bottom: 15px; padding: 11px 12px; border-radius: 10px; font-size: 12px; line-height: 1.55; }
.form-message.error { color: var(--danger); border: 1px solid #f2b8b5; background: #fff2f1; }
.form-message.success { color: var(--success); border: 1px solid #b7dfcd; background: #effbf5; }
.authenticated { text-align: center; }
.success-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 5px auto 15px; border-radius: 50%; color: #fff; background: var(--success); font-size: 26px; font-weight: 900; }
.authenticated h2 { margin: 0; font-size: 23px; }
.authenticated p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.secondary-link { display: inline-flex; margin-top: 20px; font-size: 12px; font-weight: 800; }
footer { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #a48270; border-top: 1px solid rgba(207,126,76,.18); font-size: 11px; }

@media (max-width: 900px) {
  .page-shell { width: min(680px, calc(100% - 28px)); }
  .main-grid { grid-template-columns: 1fr; gap: 40px; padding: 44px 0 54px; }
  .intro { text-align: center; }
  .lead { margin-inline: auto; }
  .entry-actions { justify-content: center; }
  .features { text-align: left; }
  .auth-shell { width: min(100%,470px); margin: auto; order: -1; }
  h1 { font-size: 43px; }
}

@media (max-width: 520px) {
  .entry-actions { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { background: linear-gradient(180deg,#fff7f0,#ffe8d8); }
  .page-shell { width: min(100% - 24px,430px); }
  .site-header { height: 64px; border: 0; }
  .site-header p { display: none; }
  .main-grid { display: flex; flex-direction: column; gap: 28px; padding: 20px 0 max(34px,env(safe-area-inset-bottom)); }
  .auth-shell { order: 0; width: 100%; padding: 21px 18px 24px; border-radius: 18px; }
  .intro { order: 1; }
  .tag { display: none; }
  h1 { margin: 0 0 11px; font-size: 28px; letter-spacing: -.03em; }
  h1 br { display: none; }
  .lead { font-size: 13px; line-height: 1.75; }
  .features { grid-template-columns: 1fr; gap: 8px; margin-top: 19px; }
  .features article { display: grid; grid-template-columns: 34px 1fr; column-gap: 3px; padding: 13px; }
  .features i { grid-row: 1 / span 2; margin: 4px 0 0; }
  .features b { margin-bottom: 3px; }
  input { font-size: 16px; }
  .code-row { grid-template-columns: minmax(0, 1fr) 108px; gap: 7px; }
  footer { min-height: auto; padding: 16px 0; justify-content: center; text-align: center; }
  footer span:last-child { display: none; }
}

@media (min-width: 1500px) {
  .page-shell { width: min(1240px, calc(100% - 64px)); }
  .main-grid { grid-template-columns: minmax(0,1fr) 450px; gap: 110px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }


/* ===== 手机端紧凑化 2026-08-31 ===== */
/* 老大反馈「页面拉得太长」。三个功能卡原来每张都带一段描述、单列堆叠，
   在手机上吃掉约三分之一屏。改成一行三列、只留序号与功能名 ——
   描述文字留给 PC，手机上标题已经说清楚是什么功能。 */
@media (max-width: 560px) {
  .main-grid { gap: 20px; }
  h1 { font-size: 25px; margin: 0 0 9px; }
  .lead { font-size: 12.5px; line-height: 1.68; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
  .features article { display: block; text-align: center; padding: 10px 4px; }
  .features i { display: block; grid-row: auto; margin: 0 0 3px; }
  .features b { display: block; margin: 0; font-size: 12px; line-height: 1.3; }
  .features p { display: none; }
  .always-download { margin-top: 14px; }
}


/* ===== 手机端去重 2026-08-31 ===== */
/* 老大反馈「怎么重复下载」：页面上下两组一模一样的下载入口。
   手机端登录框(.auth-shell, order:0)排在最上，它下面的 .always-download
   已经提供了下载入口；宣传区里的 .entry-actions 是第二组，纯重复 —— 隐藏。
   PC 端是左右两栏布局（左 CTA / 右登录框），不构成重复，保持不变。 */
@media (max-width: 560px) {
  .entry-actions { display: none; }
  .intro h1 { margin-top: 2px; }
}

/* 2026-09-05: supporting text remains readable on small screens. */
.auth-heading span, .features p, .login-download-note,
.always-download > span, footer {
  color: #75503e;
  font-size: 13px;
}
footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }


/* 保持登录（2026-11-02） */
.remember { display: flex; align-items: center; gap: 7px; margin: 12px 0 2px; font-size: 13px; font-weight: 700; color: var(--text, #2a2014); cursor: pointer; user-select: none; }
.remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent-dark, #c46a00); flex: none; }
.remember small { font-weight: 500; opacity: .65; font-size: 11.5px; }

/* 2026-11-02 闪登录页修复：确认登录态期间整页先不显示（已登录直接跳内页，不再闪门户）；
   脚本异常时 2.5 秒后自动显示，绝不把页面一直藏住。 */
html.auth-pending .page-shell { visibility: hidden; animation: auth-reveal 0s linear 2.5s forwards; }
@keyframes auth-reveal { to { visibility: visible; } }

/* ===== 安全码（2026-11-06）：注册改安全码、账号+安全码找回、站外留言、首次激活强制补设 ===== */
select, textarea { font: inherit; }
select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  outline: 0; color: var(--text); background: var(--field);
  transition: box-shadow .18s, border-color .18s, background .18s;
}
select { height: 48px; padding: 0 10px; cursor: pointer; }
textarea { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
select:focus, textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(240,84,45,.1); }
textarea::placeholder { color: #ad8b7c; }
.field-hint { margin: 8px 0 0; color: #75503e; font-size: 12px; line-height: 1.6; }
.field-hint b { color: var(--accent-dark); }
.notice { margin: 0 0 4px; padding: 11px 12px; border: 1px dashed var(--line); border-radius: 12px; background: #fff7f0; color: #6d4636; font-size: 12.5px; line-height: 1.7; }
.notice b { color: var(--accent-dark); }
.cap-q { font-size: 14px; letter-spacing: .02em; white-space: nowrap; cursor: pointer; }
.sub-switch { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: #fff1e7; margin-bottom: 4px; }
.sub-switch button { flex: 1; padding: 8px 4px; border: 0; border-radius: 8px; cursor: pointer; color: var(--accent-dark); background: transparent; font-size: 12px; font-weight: 800; }
.sub-switch button[aria-current="page"] { background: var(--card); box-shadow: 0 2px 8px rgba(151,72,30,.11); }
.contact-row { display: grid; grid-template-columns: 124px minmax(0,1fr); gap: 9px; }
.form-links { flex-wrap: wrap; justify-content: space-between; }
.form-links.single { justify-content: flex-start; }
.setcode-head { text-align: center; margin-bottom: 12px; }
.setcode-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: #fff1e7; font-size: 26px; }
.setcode-head h2 { margin: 0; font-size: 21px; }
.setcode-head p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
html.view-setcode .auth-nav, html.view-setcode .always-download { display: none; }
@media (max-width: 560px) {
  select, textarea { font-size: 16px; }
  .contact-row { grid-template-columns: 124px minmax(0,1fr); gap: 7px; }
  .notice { font-size: 12px; }
}

/* 2026-11-06：原 index.html 内联样式移到这里（页面 CSP 只允许同源样式，内联的从来没生效） */
/* 非当前平台的下载入口：保留可见可点，只做弱化，不隐藏 */
.plat-secondary{opacity:.62;font-weight:500}

/* 2026-11-06 注册页提醒：论坛老用户用原账号登录激活 */
.reg-tip { margin-top: 2px; }
.link-btn { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 900; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
