* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --brand: #5b6cff;
  --brand-2: #8b5cf6;
  --brand-grad: linear-gradient(135deg, #5b6cff 0%, #8b5cf6 100%);
  --brand-soft: rgba(91, 108, 255, 0.12);
  --ok: #22c08a;
  --err: #ef4444;
  --fg: #171a2b;
  --fg-2: #5a6079;
  --fg-3: #9aa1b9;
  --line: #e6e8f0;
  --shadow: 0 8px 30px rgba(23, 26, 43, 0.06);
  --mask: rgba(8, 10, 24, 0.55);
}

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  background: #f6f7fb;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#app { width: 100%; }
.page { width: 100%; display: flex; justify-content: center; }

/* 全局隐藏滚动条（沿用 Tato 系列硬标准） */
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }

/* ============ 通用控件 ============ */
button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand-grad); color: #fff; font-weight: 600; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.15s, background 0.15s, color 0.15s;
  box-shadow: 0 6px 16px rgba(91, 108, 255, 0.35);
  white-space: nowrap; user-select: none; font-family: inherit; font-size: 14px;
}
button.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(91, 108, 255, 0.45); }
button.btn:active { transform: translateY(0) scale(0.98); }
button.btn[disabled] { opacity: 0.55; pointer-events: none; }
button.btn.plain { background: #fff; color: var(--fg-2); border-color: var(--line); box-shadow: none; }
button.btn.plain:hover { color: var(--fg); background: #fbfbff; }
button.btn.sm { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
button.btn.lg { height: 46px; padding: 0 28px; border-radius: 12px; font-size: 15px; }
button.btn.grow { flex: 1; }

.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.field .req::after { content: ' *'; color: var(--err); }
.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--fg);
  font-family: inherit; font-size: 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
select.input { cursor: pointer; }
.input:hover { border-color: var(--fg-3); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
.input::placeholder { color: var(--fg-3); }
.input.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

.muted { color: var(--fg-2); font-size: 13px; line-height: 1.7; }
.ok { color: #16a37a; font-size: 13px; margin: 8px 0; }
.err { color: var(--err); font-size: 13px; margin: 8px 0; }

/* ============ 安装向导外壳 ============ */
.wiz-root {
  position: fixed; inset: 0; z-index: 30;
  display: flex; padding: 28px 20px; overflow: auto;
  background: linear-gradient(180deg, #eef1ff 0%, #f6f7fb 45%, #f2f0fd 100%);
}
.blobbox { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; animation: float 9s ease-in-out infinite alternate; }
.b1 { width: 420px; height: 420px; background: radial-gradient(#8b9bff, transparent 70%); top: -140px; left: -100px; }
.b2 { width: 380px; height: 380px; background: radial-gradient(#c4a8ff, transparent 70%); top: -60px; right: -80px; animation-delay: -3s; }
.b3 { width: 320px; height: 320px; background: radial-gradient(#9fd8ff, transparent 70%); bottom: -140px; left: 38%; animation-delay: -6s; }
@keyframes float { from { transform: translateY(0) scale(1); } to { transform: translateY(26px) scale(1.06); } }

.panel-card {
  margin: auto; width: min(1040px, 100%); height: min(680px, 100%);
  display: flex; background: #fff; border: 1px solid #e6e8f0; border-radius: 26px; overflow: hidden;
  position: relative; z-index: 1; box-shadow: 0 30px 80px rgba(67, 56, 202, 0.18);
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* 左品牌栏 */
.brand {
  width: 352px; flex: none; position: relative; display: flex; flex-direction: column;
  padding: 34px 26px 22px; color: #fff; overflow: hidden;
  background: linear-gradient(165deg, #5b6cff 0%, #7b5cf6 55%, #9a5cff 100%);
}
.ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.16); pointer-events: none; animation: spin 26s linear infinite; }
.r1 { width: 300px; height: 300px; right: -130px; top: -80px; }
.r2 { width: 200px; height: 200px; left: -90px; bottom: 90px; border-color: rgba(255, 255, 255, 0.12); animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand::after {
  content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  right: -110px; bottom: -110px; background: radial-gradient(rgba(255, 255, 255, 0.22), transparent 70%); pointer-events: none;
}
.bhead { position: relative; z-index: 1; animation: rise 0.5s 0.1s ease both; }
.bhead .logo { width: 56px; height: 56px; border-radius: 16px; display: block; margin-bottom: 14px; object-fit: cover; box-shadow: 0 12px 28px rgba(20, 10, 80, 0.35); }
.wordmark { font-size: 15px; font-weight: 800; letter-spacing: 2px; color: rgba(255, 255, 255, 0.92); }
.bhead h1 { font-size: 22px; margin: 8px 0 8px; color: #fff; line-height: 1.35; font-weight: 700; }
.bhead p { color: rgba(255, 255, 255, 0.72); font-size: 12.5px; line-height: 1.7; }

.vsteps { list-style: none; margin: 26px 0 0; padding: 0; position: relative; z-index: 1; flex: 1; animation: rise 0.5s 0.18s ease both; }
.st { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; position: relative; color: rgba(255, 255, 255, 0.62); transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
.st + .st { margin-top: 6px; }
.st:not(:last-child)::after {
  content: ''; position: absolute; left: 25px; top: 50px; width: 2px; height: calc(100% - 28px);
  background: rgba(255, 255, 255, 0.22); border-radius: 2px; transition: background 0.3s;
}
.st.fin:not(:last-child)::after { background: rgba(255, 255, 255, 0.75); }
.st .n {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; border: 1.5px solid rgba(255, 255, 255, 0.35); transition: all 0.3s;
}
.st .chk { width: 13px; height: 13px; }
.st.cur { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 8px 20px rgba(20, 10, 80, 0.18); transform: translateX(4px); }
.st.cur .n { background: #fff; color: #5b6cff; border-color: #fff; box-shadow: 0 4px 12px rgba(20, 10, 80, 0.3); }
.st.fin { color: rgba(255, 255, 255, 0.92); }
.st.fin .n { background: rgba(255, 255, 255, 0.24); border-color: transparent; color: #fff; }
.st .st-lb { font-size: 13.5px; font-weight: 600; }
.st .st-ds { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); margin-top: 1px; }
.st.cur .ds { color: rgba(255, 255, 255, 0.8); }
.brand footer { position: relative; z-index: 1; margin-top: 18px; font-size: 11px; color: rgba(255, 255, 255, 0.55); line-height: 1.6; }
.brand footer .ver { margin-bottom: 4px; color: rgba(255, 255, 255, 0.75); font-weight: 600; }

/* 右表单区 */
.form { flex: 1; min-width: 0; overflow-y: auto; padding: 34px 38px; background: #fff; display: flex; flex-direction: column; }

/* 步骤内容入场动画 */
.wcard { width: 100%; margin: auto; font-family: var(--font); }
.wcard > * { animation: wrise 0.45s ease both; }
.wcard > *:nth-child(1) { animation-delay: 0.05s; }
.wcard > *:nth-child(2) { animation-delay: 0.11s; }
.wcard > *:nth-child(3) { animation-delay: 0.17s; }
.wcard > *:nth-child(4) { animation-delay: 0.23s; }
.wcard > *:nth-child(5) { animation-delay: 0.29s; }
.wcard > *:nth-child(6) { animation-delay: 0.35s; }
.wcard > *:nth-child(7) { animation-delay: 0.41s; }
@keyframes wrise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 区块头：渐变图标胶囊 + 标题 + 副标 */
.whead { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.whead .wh-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--brand-grad); color: #fff; box-shadow: 0 6px 16px rgba(91, 108, 255, 0.35); }
.whead .wh-ic svg { width: 19px; height: 19px; }
.whead .wt { font-size: 17.5px; font-weight: 700; color: #171a2b; }
.whead .wd { font-size: 12.5px; color: #8a90b8; margin-top: 2px; }

/* 提示条 */
.wiz-tip { display: flex; align-items: flex-start; gap: 10px; background: #f4f6ff; border: 1px solid #e2e7fb; border-radius: 12px; padding: 12px 14px; margin-bottom: 20px; font-size: 12.5px; color: #5a6079; line-height: 1.7; }
.wiz-tip svg { flex: none; margin-top: 2px; color: #5b6cff; }
.wiz-tip b { color: #4636d1; }

/* 分组小标题 */
.sec { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; font-size: 12px; font-weight: 600; color: #9aa1b9; letter-spacing: 1px; }
.sec::after { content: ''; flex: 1; height: 1px; background: #eef0f6; }

.wtitle { font-size: 18px; font-weight: 700; margin-bottom: 4px; color: #171a2b; }
.wsub { color: #5a6079; font-size: 13.5px; margin-bottom: 20px; line-height: 1.7; }
.wfoot { display: flex; gap: 10px; margin-top: 24px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* 协议区 */
.agree-box { background: linear-gradient(180deg, #f8f9ff 0%, #fff 60%); border: 1px solid #e6e8f0; border-radius: 14px; padding: 4px 18px; max-height: 320px; overflow-y: auto; }
.ag { padding: 13px 0; font-size: 13px; color: #3c425c; line-height: 1.9; }
.ag + .ag { border-top: 1px dashed #dfe4f5; }
.ag b { color: #171a2b; }
.agree-check { display: flex; align-items: center; gap: 9px; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: #171a2b; cursor: pointer; }
.agree-check input { width: 16px; height: 16px; accent-color: #5b6cff; cursor: pointer; }

/* 安装方式三选一 */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode {
  border: 1.5px solid #e6e8f0; border-radius: 13px; padding: 12px 13px; cursor: pointer;
  background: #fff; transition: 0.18s ease; text-align: left;
}
.mode:hover { border-color: #b9c2ff; background: #fafbff; }
.mode.on { border-color: #5b6cff; background: #f4f6ff; box-shadow: 0 6px 16px rgba(91, 108, 255, 0.14); }
.mode .mt { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #171a2b; }
.mode .mt .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c7cbe0; flex: none; }
.mode.on .mt .dot { border-color: #5b6cff; background: radial-gradient(circle, #fff 0 2px, #5b6cff 3px 100%); }
.mode .md { font-size: 11.5px; color: #8a90b8; margin-top: 5px; line-height: 1.6; }

/* 环境信息卡 */
.envcard { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 22px; margin-bottom: 4px; background: linear-gradient(160deg, #f8f9ff, #f1f4fd); border: 1px solid #e4e8fa; border-radius: 14px; padding: 15px 18px; }
.envr { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.envr .ek { font-size: 11px; font-weight: 600; color: #9aa1b9; letter-spacing: 1px; }
.envr .ev { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #171a2b; min-width: 0; }
.envr .ev .etxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envr .ev.mono { font-weight: 500; font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.envr .ev.dim { color: #b3b9cf; font-weight: 500; }
.cpy { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1px solid #e2e6f6; background: #fff; color: #6a7093; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.15s ease; padding: 0; }
.cpy:hover { color: #4636d1; border-color: #b9c2ff; background: #f4f6ff; }
.cpy svg { width: 12px; height: 12px; }
.env-note { font-size: 12px; color: #8a90b8; line-height: 1.7; margin-top: 12px; }

/* 拉取授权按钮 */
.pullbtn { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 16px; margin-top: 18px; border-radius: 13px; cursor: pointer; border: 1.5px dashed #b9c2ff; background: #f7f8ff; transition: 0.18s ease; font-family: inherit; }
.pullbtn:hover { border-color: #5b6cff; background: #f0f3ff; box-shadow: 0 6px 16px rgba(91, 108, 255, 0.14); transform: translateY(-1px); }
.pullbtn .pb-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--brand-grad); color: #fff; }
.pullbtn .pb-ic svg { width: 16px; height: 16px; }
.pullbtn .pb-t { display: block; font-size: 13.5px; font-weight: 700; color: #171a2b; }
.pullbtn .pb-d { display: block; font-size: 11.5px; color: #8a90b8; margin-top: 2px; }
.pullbtn .pb-go { margin-left: auto; flex: none; color: #5b6cff; font-size: 12.5px; font-weight: 600; }

/* 完成安装：待办清单 */
.dl-list { margin: 14px 0 0; background: #f8f9ff; border: 1px solid #e8ebfa; border-radius: 14px; padding: 4px 18px; }
.dl { display: flex; align-items: center; gap: 11px; padding: 13px 0; font-size: 13.5px; color: #3c425c; }
.dl + .dl { border-top: 1px dashed #dfe4f5; }
.dl .dl-ic { width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(91, 108, 255, 0.3); }
.dl .dl-ic svg { width: 11px; height: 11px; }

/* 摘要卡 */
.sumcard { background: linear-gradient(160deg, #f8f9ff, #f1f4fd); border: 1px solid #e4e8fa; border-radius: 14px; padding: 15px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px 22px; }
.sumcard .sr { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sumcard .sk { font-size: 11px; font-weight: 600; color: #9aa1b9; letter-spacing: 1px; }
.sumcard .sv { font-size: 13px; font-weight: 600; color: #171a2b; word-break: break-all; }

/* 圆环进度 */
.ringbox { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 0 8px; }
.ringbox svg { display: block; }
.ringbox .pct { font-size: 22px; font-weight: 700; color: #5b6cff; }
.ringbox .rt { font-size: 12.5px; color: #8a90b8; }

/* 成功标记 */
.okbox { display: flex; gap: 14px; align-items: center; }
.okring { width: 46px; height: 46px; flex: none; border-radius: 50%; background: rgba(34, 192, 138, 0.14); color: #16a37a; display: flex; align-items: center; justify-content: center; animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.okring.big { width: 64px; height: 64px; }
.okring svg { width: 26px; height: 26px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.6s 0.25s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 初始 Token 展示 */
.tokenbox { background: #f8f9ff; border: 1px dashed #c3caff; border-radius: 14px; padding: 14px 16px; margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.tokenbox code { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; color: #171a2b; }

/* 轻提示 */
.ttoast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%);
  background: rgba(23, 26, 43, 0.92); color: #fff; font-size: 13px; font-weight: 500;
  padding: 10px 20px; border-radius: 10px; z-index: 200; box-shadow: 0 10px 30px rgba(23, 26, 43, 0.3);
  animation: wrise 0.28s ease both; pointer-events: none;
}

/* 弹窗 */
.modal { position: fixed; inset: 0; background: var(--mask); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; backdrop-filter: blur(3px); }
.modal-box { background: #fff; border-radius: 18px; padding: 24px 26px; width: 480px; max-width: 100%; max-height: 84vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(23, 26, 43, 0.28); animation: rise 0.3s ease both; }
.modal-box h3 { font-size: 16.5px; font-weight: 700; color: #171a2b; margin-bottom: 12px; }
.pl-tip { font-size: 12.5px; color: #5a6079; line-height: 1.7; background: #f4f6ff; border: 1px solid #e2e7fb; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.pl-tip b { color: #4636d1; }
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 12.5px; color: #5a6079; }
.pl-head .again { color: #5b6cff; cursor: pointer; font-weight: 600; border: 0; background: none; font-size: 12.5px; font-family: inherit; }
.pl-head .again:hover { text-decoration: underline; }
.pl-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.pl-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e6e9f5; border-radius: 12px; background: #fff; transition: 0.15s ease; }
.pl-item:hover { border-color: #8b96ff; background: #fafbff; }
.pl-main { flex: 1; min-width: 0; }
.pl-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #171a2b; }
.pl-ver { flex: none; font-size: 11px; font-weight: 600; color: #4636d1; background: #eceffd; border-radius: 6px; padding: 2px 7px; }
.pl-meta { margin-top: 4px; font-size: 11.5px; color: #8a90b8; line-height: 1.7; word-break: break-all; }
.pl-meta em { font-style: normal; color: #c2c7db; margin: 0 5px; }
.pl-pk { color: #5a6079; }
.pl-foot { display: flex; gap: 10px; margin-top: 18px; }

/* 未安装 / 授权失效 / 安装成功 三个独立页 */
.solo { margin: auto; width: min(560px, 100%); background: #fff; border: 1px solid #e6e8f0; border-radius: 22px; padding: 40px 38px; text-align: center; box-shadow: 0 30px 80px rgba(67, 56, 202, 0.16); animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.solo .slogo { width: 62px; height: 62px; border-radius: 18px; object-fit: cover; margin: 0 auto 16px; box-shadow: 0 14px 32px rgba(91, 108, 255, 0.28); display: block; }
.solo h2 { font-size: 22px; font-weight: 700; color: #171a2b; margin-bottom: 8px; }
.solo .muted { margin-bottom: 22px; }
.solo .wfoot { justify-content: center; }

@media (max-width: 920px) {
  .wiz-root { padding: 16px 12px; }
  .panel-card { flex-direction: column; height: auto; }
  .brand { width: auto; }
  .form { overflow: visible; padding: 24px 22px; }
}
@media (max-width: 560px) {
  .grid2, .envcard, .sumcard { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
  .form { padding: 20px 16px; }
}

/* ---------- 应用主界面 ---------- */
.app {
  position: relative; width: 100%; align-self: stretch; min-height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #eef1ff 0%, #f6f7fb 45%, #f2f0fd 100%);
}
.app .blobbox { position: fixed; }

.appbar {
  background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 232, 240, 0.85); padding: 12px 28px;
  display: flex; align-items: center; gap: 24px; position: sticky; top: 0; z-index: 20;
}
.appbar-brand { display: flex; align-items: center; gap: 11px; }
.appbar-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; box-shadow: 0 4px 12px rgba(23, 26, 43, 0.14); }
.appbar-name { font-size: 16.5px; font-weight: 800; letter-spacing: 0.3px; }
.appnav { display: flex; gap: 6px; margin-left: auto; }
.appnav a {
  font-size: 13.5px; font-weight: 600; color: var(--fg-2); cursor: pointer; text-decoration: none;
  padding: 7px 15px; border-radius: 999px; transition: all 0.16s ease;
}
.appnav a:hover { color: var(--brand); background: var(--brand-soft); }
.appnav a.on { color: #fff; background: var(--brand-grad); box-shadow: 0 4px 12px rgba(91, 108, 255, 0.35); }
.appmain { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 36px 20px 56px; position: relative; z-index: 1; }

/* 首页 Hero */
.home-hero { text-align: center; padding: 26px 0 34px; animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 16px; border-radius: 999px;
  background: rgba(91, 108, 255, 0.1); border: 1px solid rgba(91, 108, 255, 0.22);
  color: var(--brand); font-size: 12.5px; font-weight: 700; letter-spacing: 0.4px; margin-bottom: 18px;
}
.home-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: 0.5px; color: var(--fg); line-height: 1.25; margin-bottom: 12px; }
.home-hero h1 em {
  font-style: normal; background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.home-hero .muted { font-size: 14.5px; }
.hero-chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-chips span {
  padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line); color: var(--fg-2); font-size: 12.5px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(23, 26, 43, 0.04);
}

/* 上传拖拽区 */
.dropzone {
  position: relative; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(8px);
  border: 2px dashed #c9cfef; border-radius: 22px; padding: 52px 24px 46px; text-align: center;
  cursor: pointer; transition: all 0.18s ease; overflow: hidden;
  box-shadow: var(--shadow); animation: rise 0.55s 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dropzone::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 180px at 50% 0%, rgba(91, 108, 255, 0.09), transparent 70%);
  opacity: 0; transition: opacity 0.2s;
}
.dropzone:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(91, 108, 255, 0.18); }
.dropzone:hover::before, .dropzone.drag::before { opacity: 1; }
.dropzone.drag { border-color: var(--brand); background: #f4f6ff; transform: scale(1.01); }
.dz-icon {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px; color: #fff;
  background: var(--brand-grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 26px rgba(91, 108, 255, 0.4);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dropzone:hover .dz-icon { transform: translateY(-4px) scale(1.05); }
.dz-title { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; position: relative; }
.dropzone .muted { position: relative; font-size: 13px; }
.dz-foot { display: flex; justify-content: center; margin-top: 16px; animation: rise 0.55s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* 上传结果 */
.results { margin-top: 26px; }
.result {
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(230, 232, 240, 0.9);
  border-radius: 18px; padding: 16px; display: flex; gap: 16px; margin-bottom: 14px;
  box-shadow: var(--shadow); animation: rise 0.4s ease both;
}
.thumb {
  width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: #f0f0f6; flex: none;
  border: 1px solid var(--line);
}
.rmeta { flex: 1; min-width: 0; }
.rline { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rline label { width: 72px; flex: none; font-size: 12px; color: var(--fg-3); font-weight: 600; }
.rline input {
  flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; background: #f6f7fb; color: var(--fg-2);
}
.rline .btn { padding: 6px 14px; font-size: 12px; flex: none; height: auto; border-radius: 8px; }
.rinfo { font-size: 12px; color: var(--fg-3); margin-top: 8px; }

.doc { background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(230, 232, 240, 0.9); border-radius: 16px; padding: 18px 20px; font-size: 14px; line-height: 1.9; box-shadow: var(--shadow); }
.doc code { background: #f2f2f8; padding: 1px 6px; border-radius: 5px; font-size: 13px; }

/* ---------- P4 API 文档页 ---------- */
.docs-wrap { display: flex; flex-direction: column; gap: 18px; }
.docs-wrap .home-hero { margin-bottom: 0; }
.doc-card {
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
  border: 1px solid rgba(230, 232, 240, 0.9); border-radius: 18px; padding: 22px 24px;
  box-shadow: var(--shadow); animation: rise 0.5s 0.05s cubic-bezier(0.22,1,0.36,1) both;
}
.dc-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin-bottom: 12px; color: var(--fg); }
.dc-idx { font-size: 12px; font-weight: 800; color: #fff; background: var(--brand-grad); border-radius: 7px; padding: 3px 7px; letter-spacing: 0.5px; }
.dc-desc { color: var(--fg-2); font-size: 14px; line-height: 1.8; margin-bottom: 14px; }

/* 端点到卡片 */
.ep { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.ep:last-child { margin-bottom: 0; }
.ep-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.method { font-size: 12px; font-weight: 800; letter-spacing: 0.5px; color: #fff; border-radius: 7px; padding: 4px 9px; }
.method.POST { background: linear-gradient(135deg, #5b6cff, #7c5cff); }
.method.GET { background: linear-gradient(135deg, #22c08a, #2bb6c4); }
.method.DELETE { background: linear-gradient(135deg, #ef5a6f, #f0936b); }
.ep-path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; color: var(--fg); background: #f4f5fb; padding: 4px 9px; border-radius: 7px; }
.ep-tag { font-size: 11.5px; font-weight: 700; color: #b06a00; background: #fff4e0; border-radius: 6px; padding: 3px 8px; }
.ep-tag.free { color: var(--ok); background: #e3f9f1; }
.ep-desc { color: var(--fg-2); font-size: 13.5px; line-height: 1.8; margin: 2px 0 12px; }

/* 表格 */
.tbl { margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tbl-cap { font-size: 12px; font-weight: 700; color: var(--fg-2); background: #f7f8fc; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 9px 14px; border-bottom: 1px solid #f0f1f6; vertical-align: top; }
.tbl th { font-size: 12px; color: var(--fg-2); background: #fbfbfe; font-weight: 700; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td code { background: #f2f2f8; padding: 1px 6px; border-radius: 5px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.td-note { color: var(--fg-2); line-height: 1.6; }

/* 代码块 */
.ep-row, .ex-row { display: block; }
.req-col { margin-bottom: 12px; }
.cap { font-size: 12px; font-weight: 700; color: var(--fg-2); margin-bottom: 6px; }
pre.code {
  background: #161a2e; color: #e6e9f5; border-radius: 12px; padding: 14px 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7;
  overflow-x: auto; white-space: pre; margin: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.ex-row pre.code { margin-top: 4px; }

/* 约定列表 */
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid #f0f1f6; font-size: 14px; color: var(--fg-2); line-height: 1.75; }
.notes li:last-child { border-bottom: none; }
.notes li::before { content: ''; position: absolute; left: 4px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-grad); }
.notes li code { background: #f2f2f8; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }

@media (min-width: 860px) {
  .ep-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .req-col { margin-bottom: 0; }
}
@media (max-width: 640px) {
  .doc-card { padding: 18px 16px; }
  .tbl { overflow-x: auto; }
  .tbl table { min-width: 480px; }
  pre.code { font-size: 11.5px; }
}
.appmain .hero h1 {
  font-size: 30px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 8px;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- 图床广场 ---------- */
.sq-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sq-head h1 { margin-bottom: 4px; }
.sq-grid { column-count: 4; column-gap: 14px; }
.sq-item { break-inside: avoid; width: 100%; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: 0.16s; }
.sq-item:hover { border-color: #b9c2ff; box-shadow: 0 8px 22px rgba(91, 108, 255, 0.16); transform: translateY(-2px); }
.sq-ph { position: relative; width: 100%; background: #f2f2f8; overflow: hidden; }
.sq-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sq-meta { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px 2px; font-size: 12px; color: #777; }
.sq-time { padding: 0 10px 10px; font-size: 11px; color: #aaa; }
.sq-skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.sk { height: 170px; border-radius: 12px; background: #ececf4; animation: skpulse 1.2s ease-in-out infinite; }
@keyframes skpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.sq-state { text-align: center; padding: 28px 0; }

/* ---------- 灯箱 ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(14, 14, 20, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px 16px; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; width: 100%; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-spin { position: absolute; color: #bbb; font-size: 13px; }
.lb-close, .lb-nav { position: absolute; background: rgba(255,255,255,0.1); border: none; color: #fff; cursor: pointer; border-radius: 8px; line-height: 1; }
.lb-close { top: 14px; right: 16px; width: 38px; height: 38px; font-size: 26px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 64px; font-size: 30px; }
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,0.22); }
.lb-bar { flex: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; color: #d8d8e2; font-size: 12px; padding-top: 12px; }
.lb-bar .btn { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.25); text-decoration: none; padding: 6px 14px; height: auto; box-shadow: none; }
.lb-bar .btn:hover { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.4); }
.lb-pre { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.appfoot { text-align: center; font-size: 12px; color: #999; padding: 18px 12px; border-top: 1px solid var(--line); background: #fff; }

@media (max-width: 640px) {
  .sq-head { flex-direction: column; align-items: flex-start; }
  .sq-grid { column-count: 1; }
  .lb-nav { width: 36px; height: 52px; font-size: 24px; }
  .appbar { padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
  .appnav { gap: 12px; }
  .appnav a { font-size: 13px; }
  .appmain { padding: 20px 14px 32px; }
  .home-hero { padding: 12px 0 26px; }
  .home-hero h1 { font-size: 28px; }
  .hero-chips span { padding: 5px 11px; font-size: 11.5px; }
  .hero h1 { font-size: 24px; }
  .dropzone { padding: 40px 18px 36px; }
  .dz-icon { width: 58px; height: 58px; border-radius: 17px; }
  .result { flex-direction: column; }
  .thumb { width: 100%; height: 180px; }
  .rline label { width: 60px; }
}
@media (min-width: 641px) and (max-width: 900px) { .sq-grid { column-count: 2; } }
@media (min-width: 901px) and (max-width: 1200px) { .sq-grid { column-count: 3; } }

/* ============ P5 后台登录 ============ */
.admin-login { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.al-card {
  width: 100%; max-width: 380px; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border: 1px solid rgba(230,232,240,0.9); border-radius: 22px; padding: 34px 30px 28px;
  box-shadow: 0 20px 60px rgba(23,26,43,0.12); text-align: center;
}
.al-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; margin: 0 auto 14px; display: block; }
.al-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }
.al-card h2 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.al-card .muted { margin-bottom: 20px; font-size: 13px; }
.al-card .field { text-align: left; margin-bottom: 14px; }
.al-card .field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--fg-2); margin-bottom: 6px; }
.al-card .input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; outline: none; background: #f6f7fb; color: var(--fg); transition: border-color .15s, box-shadow .15s, background .15s; }
.al-card .input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.al-card .btn { margin-top: 6px; width: 100%; }
.al-back { display: block; margin-top: 16px; font-size: 13px; color: var(--fg-3); cursor: pointer; }
.al-back:hover { color: var(--brand); }

/* ============ P5 后台管理 ============ */
.admin { position: relative; z-index: 2; flex: 1; display: flex; align-items: stretch; min-height: 100vh; }
.ad-side { width: 232px; flex: none; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.ad-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; }
.ad-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.ad-brand span { font-size: 15px; font-weight: 800; }
.ad-user { font-size: 12.5px; color: var(--fg-3); padding: 0 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.ad-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ad-nav a { font-size: 14px; color: var(--fg-2); text-decoration: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: .15s; }
.ad-nav a:hover { background: #f3f4fb; color: var(--fg); }
.ad-nav a.on { background: var(--brand-grad); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(91,108,255,0.28); }
.ad-logout { margin-top: 10px; }
.ad-main { flex: 1; padding: 26px 30px 40px; max-width: 980px; }
.ad-h { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.ad-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ad-stat { background: rgba(255,255,255,0.94); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; box-shadow: var(--shadow); }
.ad-stat .n { font-size: 26px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.ad-stat .l { font-size: 12.5px; color: var(--fg-2); margin-top: 4px; }
.ad-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; background: #f0f0f6; }
.pill { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.pill.ok { color: var(--ok); background: #e3f9f1; }
.pill.bad { color: var(--err); background: #fdeaea; }
.ad-actions { margin-top: 14px; }
.st-driver { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-driver label { border: 1.5px solid var(--line); background: rgba(255,255,255,0.9); border-radius: 12px; padding: 14px 16px; cursor: pointer; font-weight: 700; font-size: 14px; display: block; }
.st-driver label.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108,92,231,0.12); }
.st-driver .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-right: 7px; vertical-align: 1px; }
.st-driver .ds { font-weight: 400; font-size: 12px; color: var(--fg-2); margin-top: 5px; }
.st-checks { display: flex; gap: 22px; margin-top: 10px; font-size: 13px; color: var(--fg-2); }
.st-checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
@media (max-width: 720px) { .st-driver { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .admin { flex-direction: column; }
  .ad-side { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line); }
  .ad-brand { width: 100%; }
  .ad-user { display: none; }
  .ad-nav { flex-direction: row; flex: none; }
  .ad-logout { margin: 0 0 0 auto; }
  .ad-main { padding: 18px 14px 30px; }
  .ad-stats { grid-template-columns: repeat(2, 1fr); }
}
