/* GG-VPN 客户端下载页 · 视觉 token 与管理后台一致（docs/10-界面设计说明.md），结构见 docs/16 */
:root {
  color-scheme: light dark;
  --ground: #F4F5F7; --surface: #FFFFFF; --border: #DDE1E7; --border-soft: #EDF0F4;
  --ink: #1B1F26; --ink-2: #3A4250; --muted: #5B6472; --faint: #626C7A;
  --brand: #D63F3B; --brand-hover: #BF3531; --brand-bg: #FDECEB;
  --green: #0E7A5F; --green-bg: #E3F3EC; --green-line: #CFE8DD;
  --red: #B42318; --red-bg: #FBEAE7; --red-line: #F1B8B0;
  --amber: #8A5A00; --chip: #EEF1F5;
  --shadow: 0 0 0 1px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04), 0 18px 48px -16px rgba(16, 24, 40, .16);
  --ring: 0 0 0 1px rgba(16, 24, 40, .08); --brand-2: #F06A4F; --on-accent: #FFFFFF;
  --glow: radial-gradient(60% 100% at 50% 0%, rgba(214, 63, 59, .15), transparent 70%);
  --btn-shadow: 0 8px 20px -8px rgba(214, 63, 59, .55);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #111418; --surface: #1A1E24; --border: #2C323B; --border-soft: #242A32;
    --ink: #E8EBF0; --ink-2: #C5CBD4; --muted: #98A1AE; --faint: #8B95A3;
    --brand: #EF534F; --brand-hover: #F0625E; --brand-bg: #3A1C1B;
    --green: #2FA383; --green-bg: #15302A; --green-line: #1F4A3E;
    --red: #F07B6E; --red-bg: #3A1C19; --red-line: #5C2A25;
    --amber: #E0B25A; --chip: #232931;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px -24px rgba(0, 0, 0, .7);
    --ring: 0 0 0 1px rgba(255, 255, 255, .09); --brand-2: #FF8266; --on-accent: #10131A;
    --glow: radial-gradient(60% 100% at 50% 0%, rgba(239, 83, 79, .24), transparent 70%);
    --btn-shadow: 0 8px 22px -8px rgba(239, 83, 79, .6);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ground); color: var(--ink); font: 14px/1.55 -apple-system, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
body { position: relative; isolation: isolate; }
/* 背景品牌光晕：纯装饰，不拦截点击 */
body::before { content: ""; position: absolute; inset: 0 0 auto; height: 560px; z-index: -1; background: var(--glow); pointer-events: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }

/* 顶栏 + 身份胶囊 */
.topbar { height: 56px; padding: 0 24px; background: transparent; display: flex; align-items: center; gap: 12px; }
.logo { width: 26px; height: 26px; flex: none; background: url(/brand/logo.svg) center / contain no-repeat; }
.brand { font-weight: 600; font-size: 15px; }
.spacer { flex: 1; }
.pill { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 4px; border: 0; box-shadow: var(--ring); border-radius: 17px; background: var(--surface); min-width: 0; }
.pill-avatar { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--brand-bg); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 12px; overflow: hidden; }
.pill-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pill-name { font-size: 13px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-expiry { font-size: 12px; color: var(--brand); font-variant-numeric: tabular-nums; }
.pill-clear { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); cursor: pointer; font-size: 11px; }
.pill-clear:hover { background: var(--chip); color: var(--ink); }

/* 主体 */
.wrap { max-width: 640px; margin: 0 auto; padding: 48px 16px 64px; display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }

.hero { padding: 36px 32px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.platform-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--chip); color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.platform-icon svg { width: 34px; height: 34px; }
.platform-icon.muted { color: var(--faint); }
.hero h1 { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.sub { margin: 0; color: var(--muted); max-width: 440px; }
.sub.warn { color: var(--amber); }
.file { color: var(--faint); overflow-wrap: anywhere; }

.action { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.hint { font-size: 12px; color: var(--faint); }

.btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 0; box-shadow: var(--ring); background: var(--surface); cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { background: var(--ground); }
.btn.primary { background: var(--brand); color: var(--on-accent); font-weight: 600; box-shadow: var(--btn-shadow); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.big { height: 48px; min-width: 260px; padding: 0 28px; border-radius: 980px; font-size: 15px; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn.primary:disabled { box-shadow: none; }
.btn.primary:disabled:hover { background: var(--brand); }
.btn-icon { width: 18px; height: 18px; flex: none; }
.spinner { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--on-accent) 40%, transparent); border-top-color: var(--on-accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

.link { border: 0; background: none; padding: 4px; margin-top: 12px; color: var(--brand); cursor: pointer; font-size: 13px; }
.link:hover { text-decoration: underline; }
.link.small { margin: 0; font-size: 12px; }
.link.disabled, .link.disabled:hover { color: var(--faint); cursor: not-allowed; text-decoration: none; }
.started { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 440px; padding: 12px 16px; border-radius: 12px; background: var(--green-bg); box-shadow: 0 0 0 1px var(--green-line); color: var(--green); font-size: 14px; text-align: left; }

.status { width: 100%; max-width: 440px; padding: 10px 14px; border-radius: 10px; box-shadow: var(--ring); font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.status.ok { background: var(--green-bg); box-shadow: 0 0 0 1px var(--green-line); color: var(--green); }
.status.err { background: var(--red-bg); box-shadow: 0 0 0 1px var(--red-line); color: var(--red); }
.wrap > .status { max-width: none; margin: 0; }

/* 平台磁贴：识别到的系统预选，选中带品牌色外环；也用于无推荐平台时的选择 */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 440px; margin-top: 20px; }
.tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px; border: 0; border-radius: 12px; background: var(--ground); box-shadow: var(--ring); cursor: pointer; text-align: left; transition: box-shadow .15s ease, background .15s ease; }
.tile:hover { background: var(--chip); }
.tile.selected { background: var(--surface); box-shadow: 0 0 0 2px var(--brand), 0 8px 20px -10px rgba(214, 63, 59, .45); }
.tile-icon { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--chip); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.tile.selected .tile-icon { background: var(--brand-bg); color: var(--brand); }
.tile-icon svg { width: 20px; height: 20px; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-text strong { font-size: 14px; font-weight: 600; }
.tile-text span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.tile-tag { position: absolute; top: -8px; right: 10px; padding: 0 8px; height: 18px; line-height: 18px; border-radius: 9px; background: var(--brand); color: var(--on-accent); font-size: 11px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }
.copy-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 6px 6px 12px; box-shadow: var(--ring); border-radius: 10px; max-width: 100%; }
.copy-row .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.copy-row .btn { flex: none; height: 30px; }

/* 安装步骤 */
.steps { background: var(--ground); padding: 24px 32px 28px; }
.steps h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: baseline; color: var(--ink-2); }
.steps li::before { content: counter(step); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-bg); color: var(--brand); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.steps .fix { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }

/* 页脚 */
.foot { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.sha { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.sha code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--ink-2); }
.note { font-size: 12px; color: var(--faint); }

@media (max-width: 520px) {
  .wrap { padding-top: 24px; }
  .hero { padding: 28px 20px 24px; }
  .tiles { grid-template-columns: 1fr; }
  .steps { padding: 20px; }
  .btn.big { width: 100%; min-width: 0; }
  .pill-name { display: none; }
}

/* 顶栏品牌回首页（服务介绍页） */
.home { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
