/* ===========================================================
   远程下载站 — 样式
   设计基调：浅色留白 + 柔和渐变，桌面/移动端自适应
   =========================================================== */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #101828;
  --ink-2: #475467;
  --muted: #667085;
  --line: #e8eaf2;
  --line-strong: #dcdfeb;

  --brand-1: #5b6cff;
  --brand-2: #8b5cf6;

  /* 卡片内会被 inline style 覆盖为各品牌色，这里给出兜底 */
  --a1: #5b6cff;
  --a2: #8b5cf6;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 30px -12px rgba(16, 24, 40, .16);
  --shadow-lg: 0 26px 60px -28px rgba(16, 24, 40, .28);

  --wrap: 1080px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -8%, rgba(91, 108, 255, .16), transparent 62%),
    radial-gradient(760px 480px at 92% 2%, rgba(20, 200, 190, .14), transparent 60%),
    radial-gradient(700px 500px at 50% 108%, rgba(255, 154, 84, .10), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(250, 251, 255, .78);
  border-bottom: 1px solid rgba(232, 234, 242, .9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 8px 18px -8px rgba(91, 108, 255, .8);
  flex: none;
}
.brand-mark svg { width: 21px; height: 21px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15.5px; letter-spacing: .2px; }
.brand-text small {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ---------- 主导航 ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: var(--ink); background: rgba(91, 108, 255, .08); }
.nav-link.is-active { color: #4f5bff; background: rgba(91, 108, 255, .1); font-weight: 600; }

.os-switch {
  display: inline-flex;
  margin-left: 12px;
  padding: 4px;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  flex: none;
}

.os-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.os-btn .i { width: 15px; height: 15px; opacity: .85; }
.os-btn:hover { color: var(--ink); background: #f4f5fb; }
.os-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #5b6cff, #7a5cf6);
  box-shadow: 0 6px 16px -8px rgba(91, 108, 255, .95);
}
.os-btn.is-active .i { opacity: 1; }

/* ---------- Hero ---------- */
.hero { padding: 54px 0 30px; text-align: center; }

.detect-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  max-width: 100%;
}
.detect-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: pulse 2.2s infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero h1 {
  margin: 22px auto 0;
  font-size: clamp(28px, 5.2vw, 47px);
  line-height: 1.2;
  letter-spacing: -.6px;
  font-weight: 700;
}
.grad {
  background: linear-gradient(100deg, #4f5bff 0%, #8b5cf6 48%, #0fb5c9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 640px;
  margin: 28px auto 0;
  padding: 6px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.meta {
  padding: 12px 8px;
  border-radius: 12px;
  text-align: center;
}
.meta span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .3px;
  margin-bottom: 5px;
}
.meta strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 移动端提示 ---------- */
.mobile-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(91, 108, 255, .08), rgba(15, 181, 201, .08));
  border: 1px solid rgba(91, 108, 255, .18);
}
.mobile-note[hidden] { display: none; }
.mobile-note .i { width: 22px; height: 22px; color: var(--brand-1); flex: none; }
.mobile-note > div { flex: 1; min-width: 0; }
.mobile-note strong { font-size: 14px; }
.mobile-note p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---------- 卡片区 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  padding-bottom: 10px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
  overflow: hidden;
  animation: rise .55s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  opacity: .9;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }

.logo {
  width: 50px; height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 10px 22px -12px var(--a1);
  flex: none;
}
.logo svg { width: 26px; height: 26px; }

.card-title { min-width: 0; }
.card-title h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: .1px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-title p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  letter-spacing: .3px;
  background: rgba(91, 108, 255, .1);
  color: #4f5bff;
  flex: none;
}

.desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--ink-2);
  min-height: 45px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.chip {
  font-size: 11.5px;
  color: var(--ink-2);
  background: #f4f5fa;
  border: 1px solid #eceef6;
  padding: 4px 9px;
  border-radius: 7px;
  white-space: nowrap;
}

.card-body { margin-top: auto; }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 13px;
  text-decoration: none;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .2px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 12px 24px -14px var(--a1);
  transition: filter .2s var(--ease), transform .12s var(--ease), box-shadow .25s var(--ease);
  border: 0;
  cursor: pointer;
}
.btn-primary svg { width: 17px; height: 17px; flex: none; }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 16px 30px -14px var(--a1); }
.btn-primary:active { transform: scale(.985); }
.btn-primary .ext {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .22);
  letter-spacing: .4px;
}

.btn-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 9px 2px 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}
.btn-caption svg { width: 12px; height: 12px; flex: none; opacity: .8; }

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.btn-ghost {
  appearance: none;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn-ghost svg { width: 14px; height: 14px; opacity: .8; }
.btn-ghost:hover { background: #f7f8fd; color: var(--ink); border-color: #cfd4e6; }
.btn-ghost.sm { flex: none; font-size: 12.5px; padding: 8px 12px; background: #fff; }

/* ---------- 小贴士 ---------- */
.tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 36px 0 8px;
}
.tip {
  padding: 20px 20px 18px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.tip-no {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #8f9bb3;
}
.tip h3 { margin: 8px 0 7px; font-size: 14.5px; }
.tip p { margin: 0; font-size: 12.8px; line-height: 1.72; color: var(--muted); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 52px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .45);
}
.footer-inner { text-align: center; }
.foot-brand { margin: 0 0 8px; font-weight: 600; font-size: 13.5px; }
.foot-note {
  margin: 0 auto 8px;
  max-width: 560px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}
.foot-meta { margin: 0; font-size: 11.5px; color: #98a2b3; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 18px);
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 11px;
  background: rgba(16, 24, 40, .94);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 100;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 焦点可见性 ---------- */
:where(a, button):focus-visible {
  outline: 2px solid #5b6cff;
  outline-offset: 2px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }

  .site-header { position: static; }
  .header-inner {
    height: auto;
    padding: 10px 0 8px;
    flex-wrap: wrap;
    row-gap: 8px;
    gap: 10px;
  }
  .brand { order: 1; flex: none; }
  .os-switch { order: 2; margin-left: auto; padding: 3px; }
  .site-nav { order: 3; gap: 8px; }
  /* 只有带系统切换器的页头，才把导航挤到第二行 */
  .has-os .site-nav {
    width: 100%;
    margin-left: 0;
  }
  .has-os .nav-link {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 8px 10px;
    background: var(--surface);
    border: 1px solid var(--line);
  }
  .has-os .nav-link.is-active { border-color: rgba(91, 108, 255, .3); }

  .brand-text small { display: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .os-switch { padding: 3px; }
  .os-btn { padding: 7px 10px; font-size: 12.5px; }
  .os-btn .i { display: none; }
  .os-btn[data-os="auto"] .i { display: block; }

  .hero { padding: 36px 0 22px; }
  .hero h1 { margin: 18px auto 12px; }
  .lede { font-size: 14.2px; line-height: 1.72; }

  .meta-row { gap: 4px; padding: 5px; margin-top: 24px; }
  .meta { padding: 10px 4px; }
  .meta span { font-size: 10.5px; }
  .meta strong { font-size: 12px; }

  .mobile-note { flex-wrap: wrap; gap: 10px; padding: 14px; }
  .mobile-note .btn-ghost { width: 100%; }

  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 20px 18px 18px; }
  .desc { min-height: 0; }

  .tips { margin-top: 26px; }
  .site-footer { margin-top: 36px; padding: 24px 0 30px; }
  .toast { bottom: 20px; width: calc(100vw - 32px); text-align: center; }
}

@media (max-width: 430px) {
  .brand { flex: none; }
  .brand-text { display: none; }
  .os-switch { flex: none; }
  .os-btn { justify-content: center; padding: 7px 9px; font-size: 12.5px; }
}

@media (max-width: 380px) {
  .os-btn { padding: 7px 9px; font-size: 12px; }
  .brand-text strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- 深色模式 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1017;
    --surface: #151922;
    --ink: #eef2f8;
    --ink-2: #b9c2d4;
    --muted: #8d97ab;
    --line: #232a38;
    --line-strong: #2f3849;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 12px 30px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 26px 60px -28px rgba(0, 0, 0, .85);
  }
  body {
    background-image:
      radial-gradient(900px 520px at 12% -8%, rgba(91, 108, 255, .22), transparent 62%),
      radial-gradient(760px 480px at 92% 2%, rgba(20, 200, 190, .14), transparent 60%),
      radial-gradient(700px 500px at 50% 108%, rgba(255, 154, 84, .10), transparent 62%);
  }
  .site-header { background: rgba(13, 16, 23, .78); border-bottom-color: #1c222e; }
  .os-switch, .detect-chip, .btn-ghost, .meta-row { background: #171b25; }
  .os-btn:hover { background: #1e2431; }
  .chip { background: #1b202b; border-color: #262d3c; }
  .btn-ghost:hover { background: #1e2431; }
  .mobile-note { background: linear-gradient(120deg, rgba(91, 108, 255, .14), rgba(15, 181, 201, .1)); }
  .tip { background: rgba(21, 25, 34, .7); }
  .site-footer { background: rgba(21, 25, 34, .5); }
  .foot-meta { color: #6d788c; }
  .badge { background: rgba(91, 108, 255, .18); color: #a5b4ff; }
}

/* ===========================================================
   远程协助页
   =========================================================== */

.inline-link {
  color: #4f5bff;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.inline-link:hover { border-bottom-style: solid; }

.page-hero { padding: 46px 0 24px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .6px;
  color: #4f5bff;
  background: rgba(91, 108, 255, .1);
  padding: 5px 12px;
  border-radius: 999px;
}
.page-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.25;
  letter-spacing: -.4px;
}
.page-hero .lede { margin: 0; font-size: 14.5px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.panel-head h2 { margin: 0 0 6px; font-size: 17px; letter-spacing: .1px; }
.panel-head p { margin: 0 0 18px; font-size: 13px; line-height: 1.65; color: var(--muted); }

.assist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}
.assist-form { display: grid; gap: 14px; }
.field { display: block; }
.field > span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fbfbfe;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field input::placeholder { color: #a6aec2; }
.field input:focus {
  outline: none;
  border-color: #8b9bff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, .14);
}

.app-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.pick {
  appearance: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  background: #f4f5fa;
  border: 1px solid #eceef6;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.pick:hover { border-color: #d9deee; }
.pick.is-active {
  color: #4f5bff;
  background: rgba(91, 108, 255, .1);
  border-color: rgba(91, 108, 255, .35);
  font-weight: 600;
}

.out-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.preview {
  min-height: 132px;
  padding: 16px;
  border-radius: 14px;
  background: #f7f8fd;
  border: 1px dashed var(--line-strong);
  font-size: 13.5px;
  line-height: 1.8;
  word-break: break-word;
}
.preview.is-empty { color: var(--muted); }
.out-actions { display: flex; gap: 8px; margin-top: 12px; }
.out-actions .btn-ghost { flex: 1; }
.out-tip { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); }

.app-rows { list-style: none; margin: 0; padding: 0; }
.app-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.app-row:first-child { border-top: 0; padding-top: 0; }
.app-row:last-child { padding-bottom: 0; }
.row-name { font-weight: 600; font-size: 13.5px; }
.row-desc { font-size: 13px; line-height: 1.7; color: var(--muted); }
.row-desc b { color: var(--ink-2); font-weight: 600; }
.row-link { font-size: 12.5px; font-weight: 500; color: #4f5bff; text-decoration: none; white-space: nowrap; }
.row-link:hover { text-decoration: underline; }

.warn {
  margin: 20px 0;
  padding: 22px 24px;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(255, 122, 24, .09), rgba(255, 61, 113, .06));
  border: 1px solid rgba(255, 140, 60, .25);
}
.warn h2 { margin: 0 0 10px; font-size: 16px; }
.warn ul { margin: 0; padding-left: 18px; }
.warn li { font-size: 13px; line-height: 1.8; color: var(--ink-2); }

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 6px 0 0;
}
.cta strong { font-size: 15px; }
.cta p { margin: 6px 0 0; font-size: 12.8px; color: var(--muted); }
.cta-btn { width: auto; padding: 12px 22px; flex: none; text-decoration: none; }

@media (max-width: 760px) {
  .page-hero { padding: 28px 0 18px; }
  .panel { padding: 18px 16px; border-radius: 18px; }
  .assist-grid { grid-template-columns: 1fr; gap: 16px; }
  .preview { min-height: 110px; }
  .app-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .row-desc { grid-column: 1 / -1; }
  .warn { padding: 18px 16px; border-radius: 18px; }
  .cta { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 16px; }
  .cta-btn { width: 100%; }
}

@media (prefers-color-scheme: dark) {
  .panel, .cta { background: var(--surface); }
  .field input { background: #1a1f29; border-color: #2f3849; color: var(--ink); }
  .field input:focus { background: #1e2431; }
  .field input::placeholder { color: #5f6a80; }
  .pick { background: #1b202b; border-color: #262d3c; }
  .preview { background: #161b24; border-color: #2f3849; }
  .warn { background: linear-gradient(120deg, rgba(255, 122, 24, .12), rgba(255, 61, 113, .08)); border-color: rgba(255, 140, 60, .22); }
  .warn li { color: var(--ink-2); }
}

/* ===========================================================
   联系工程师 + 二维码弹窗
   =========================================================== */

.panel-engineer {
  padding: 22px 24px;
  background: linear-gradient(118deg, rgba(91, 108, 255, .11), rgba(15, 185, 203, .07) 52%, rgba(139, 92, 246, .11));
  border-color: rgba(91, 108, 255, .22);
  box-shadow: 0 22px 46px -34px rgba(91, 108, 255, .8);
}

.engineer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.engineer-avatar {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #5b6cff, #8b5cf6);
  box-shadow: 0 16px 28px -16px rgba(91, 108, 255, .95);
}
.engineer-avatar svg { width: 27px; height: 27px; }

.engineer-text h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: .1px; }
.engineer-text p {
  margin: 0;
  max-width: 54ch;
  font-size: 13.2px;
  line-height: 1.72;
  color: var(--ink-2);
}
.engineer-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.engineer-facts span {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(91, 108, 255, .16);
  padding: 3px 9px;
  border-radius: 999px;
}

.engineer-cta { text-align: center; --a1: #5b6cff; --a2: #8b5cf6; }
.engineer-btn { width: auto; min-height: 46px; padding: 12px 20px; font-size: 14px; }
.engineer-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }

/* ---------- 弹窗 ---------- */
body.is-locked { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 26, .52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: modal-fade .18s var(--ease);
}

.modal-card {
  position: relative;
  width: min(360px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px 22px 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: modal-pop .22s var(--ease);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f2f4fa;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.modal-close:hover { background: #e7eaf4; color: var(--ink); }
.modal-close:focus { outline: none; }
.modal-close:focus-visible { outline: 2px solid #8b9bff; outline-offset: 2px; }
.modal-close svg { width: 16px; height: 16px; }

.modal-kicker {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #5b6cff;
}
.modal-card h2 { margin: 0 0 16px; font-size: 17px; letter-spacing: .1px; }

.qr-frame {
  position: relative;
  width: min(248px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.qr-frame img[hidden], .qr-fallback[hidden] { display: none; }

.qr-fallback {
  display: grid;
  gap: 8px;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  border: 1.5px dashed #d4d9ea;
  border-radius: 10px;
  color: #5a6480;
}
.qr-fallback strong { font-size: 13.5px; color: #3d4761; }
.qr-fallback small { font-size: 11px; line-height: 1.7; color: #8b95ab; }

.qr-tip { margin: 14px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.qr-close-btn { flex: none; width: 100%; margin-top: 14px; padding: 10px 12px; }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .panel-engineer { padding: 18px 16px; border-radius: 18px; }
  .engineer {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 14px;
    align-items: start;
  }
  .engineer-avatar { width: 44px; height: 44px; border-radius: 14px; }
  .engineer-avatar svg { width: 22px; height: 22px; }
  .engineer-text h2 { font-size: 16.5px; }
  .engineer-text p { font-size: 12.8px; }
  .engineer-cta { grid-column: 1 / -1; text-align: left; }
  .engineer-btn { width: 100%; }
  .engineer-note { text-align: center; margin-top: 7px; }
  .modal { padding: 16px; }
  .modal-card { padding: 22px 18px 16px; border-radius: 20px; }
  .qr-tip { font-size: 11.5px; }
}

@media (prefers-color-scheme: dark) {
  .panel-engineer {
    background: linear-gradient(118deg, rgba(91, 108, 255, .16), rgba(15, 185, 203, .09) 52%, rgba(139, 92, 246, .16));
    border-color: rgba(120, 134, 255, .28);
  }
  .engineer-facts span { background: rgba(255, 255, 255, .07); border-color: rgba(120, 134, 255, .22); }
  .modal-close { background: #1e2431; }
  .modal-close:hover { background: #262d3c; color: var(--ink); }
  .qr-frame { background: #f7f8fb; border-color: #3a4457; }
  .qr-fallback { border-color: #cfd5e4; }
  .qr-fallback strong { color: #2b3348; }
  .qr-fallback small { color: #6b7488; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-card { animation: none; }
}

.modal-card:focus { outline: none; }
