/* ============================================================
   量界互动官网 — 样式表
   优化：兼容回退 / 动画降级 / 代码可读性
   ============================================================ */

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  /* dvh 回退：现代浏览器用 dvh，旧浏览器用 vh */
  height: 100vh;
  height: 100dvh;
  min-width: 300px;
  overflow: hidden;
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--page-bg, #eef1ff);
  color: var(--text, #10142a);
}

button, a {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* --- Page Container --- */
.page {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: var(--page-bg, #eef1ff);
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--bg-before);
  opacity: var(--before-opacity, 0.5);
  animation: bgMove var(--bg-speed, 8s) ease-in-out infinite alternate;
  pointer-events: none;
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--bg-after);
  opacity: var(--after-opacity, 0.4);
  pointer-events: none;
}

@keyframes bgMove {
  to { transform: translate3d(var(--bg-x, 3%), var(--bg-y, 6%), 0) scale(var(--bg-scale, 1.04)) rotate(var(--bg-rotate, 1deg)); }
}

/* --- Motion Canvas --- */
#motionCanvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* --- Top Bar --- */
.topbar {
  position: absolute;
  left: clamp(20px, 5.4vw, 78px);
  right: clamp(20px, 5.4vw, 78px);
  top: clamp(20px, 4vh, 38px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text, #10142a);
  text-decoration: none;
  font-size: clamp(15px, 1.22vw, 18px);
  font-weight: 800;
  letter-spacing: .16em;
  white-space: nowrap;
}

.brand-logo {
  width: clamp(38px, 3.4vw, 46px);
  height: clamp(38px, 3.4vw, 46px);
  flex: 0 0 auto;
  padding: 3px;
  border-radius: var(--logo-radius, 18px);
  background: var(--logo-bg, linear-gradient(135deg, #fff, #5872ff, #00c6ff));
  box-shadow: var(--logo-shadow, 0 20px 56px rgba(88,114,255,.16));
  border: var(--logo-border, 1px solid rgba(255,255,255,.84));
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--logo-radius, 18px) - 3px);
  object-fit: contain;
  background: rgba(255,255,255,.96);
}

.top-tag {
  height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: var(--tag-radius, 999px);
  color: var(--tag-color, rgba(16,20,42,.54));
  background: var(--tag-bg, rgba(255,255,255,.58));
  border: 1px solid var(--tag-border, rgba(255,255,255,.86));
  /* backdrop-filter 回退：加 -webkit- 前缀 */
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font-size: clamp(11px, .95vw, 13px);
  font-weight: 700;
  letter-spacing: .12em;
  white-space: nowrap;
  box-shadow: var(--tag-shadow, 0 16px 44px rgba(88,114,255,.08));
}

/* --- Hero Section --- */
.hero {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .95fr);
  align-items: center;
  gap: clamp(20px, 4vw, 68px);
  padding: clamp(92px, 10vh, 132px) clamp(20px, 5.4vw, 78px) clamp(82px, 9vh, 112px);
}

.copy {
  position: relative;
  min-width: 0;
  max-width: 860px;
  text-align: var(--copy-align, left);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(18px, 2.3vw, 28px);
  color: var(--accent, #5872ff);
  font-size: clamp(14px, 1.35vw, 18px);
  letter-spacing: .12em;
  white-space: nowrap;
  animation: rise .76s ease both;
}

.eyebrow::before {
  content: "";
  display: var(--eyebrow-line, block);
  width: 38px;
  height: 1px;
  background: var(--accent, #5872ff);
  box-shadow: 0 0 16px var(--accent-glow, rgba(88,114,255,.55));
}

h1 {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(50px, 8.6vw, 128px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -.085em;
  animation: rise .86s ease .08s both;
}

h1 span { display: block; }

.line-a {
  color: var(--title-a, #10142a);
  text-shadow: var(--title-a-shadow, none);
}

.line-b {
  color: var(--title-b, transparent);
  background: var(--title-gradient, linear-gradient(90deg, #10142a, #5872ff, #00c6ff, #10142a));
  -webkit-background-clip: var(--title-clip, text);
  background-clip: var(--title-clip, text);
  -webkit-text-stroke: var(--title-stroke, 0);
  text-shadow: var(--title-b-shadow, none);
}

.desc {
  display: block;
  width: max-content;
  max-width: none;
  margin-top: clamp(22px, 3vw, 34px);
  color: var(--muted, rgba(16,20,42,.58));
  font-size: min(20px, max(8px, calc((100vw - 44px) / 38)));
  line-height: 1.88;
  letter-spacing: .01em;
  white-space: nowrap;
  word-break: keep-all;
  animation: rise .86s ease .18s both;
}

.actions {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 18px);
  flex-wrap: wrap;
  margin-top: clamp(30px, 4vw, 44px);
  animation: rise .86s ease .28s both;
  justify-content: var(--actions-align, flex-start);
}

/* --- Buttons --- */
.btn {
  height: clamp(48px, 4.5vw, 56px);
  min-width: clamp(140px, 13vw, 176px);
  padding: 0 clamp(20px, 2.4vw, 30px);
  border-radius: var(--btn-radius, 16px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 1.22vw, 16px);
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
  transition: .24s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover { transform: translateY(-3px); }

.primary {
  color: var(--primary-color, #fff);
  background: var(--primary-bg, linear-gradient(90deg, #5872ff, #00c6ff));
  border: 1px solid var(--primary-border, transparent);
  box-shadow: var(--primary-shadow, 0 20px 52px rgba(88,114,255,.22));
}

.secondary {
  color: var(--secondary-color, rgba(16,20,42,.70));
  background: var(--secondary-bg, rgba(255,255,255,.58));
  border: 1px solid var(--secondary-border, rgba(255,255,255,.86));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--secondary-shadow, none);
}

/* --- Visual Stack --- */
.visual {
  position: relative;
  height: min(62vh, 620px);
  min-height: 360px;
  display: grid;
  place-items: center;
  z-index: 1;
}

.stack {
  position: relative;
  width: min(40vw, 460px);
  min-width: 300px;
  aspect-ratio: 1;
}

.elegant-stack .layer {
  position: absolute;
  inset: 12%;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 28px 86px rgba(88,114,255,.14);
  overflow: hidden;
}

.layer-one {
  transform: translate(-34px, 34px) rotate(-8deg);
  background: linear-gradient(135deg, rgba(0,198,255,.20), rgba(255,255,255,.52));
}

.layer-one::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.46);
}

.layer-two {
  transform: translate(28px, -22px) rotate(8deg);
  background: linear-gradient(135deg, rgba(88,114,255,.22), rgba(255,255,255,.58));
}

.layer-two::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: 26px;
  top: 26px;
  border-radius: 26px;
  background: rgba(255,255,255,.36);
  border: 1px solid rgba(255,255,255,.48);
}

.layer-main {
  padding: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.90), rgba(255,255,255,.54));
  animation: stack 5.8s ease-in-out infinite;
}

.layer-main::before {
  content: "";
  position: absolute;
  right: -18%;
  top: -18%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88,114,255,.22), transparent 68%);
}

.layer-main::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88,114,255,.32), rgba(0,198,255,.28), transparent);
}

@keyframes stack {
  50% { transform: translateY(-18px) rotate(3deg); }
}

.soft-mark {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 46px;
  height: 46px;
  border-radius: 17px;
  background: linear-gradient(135deg, #5872ff, #00c6ff);
  box-shadow: 0 18px 42px rgba(88,114,255,.22);
}

.brand-capsule {
  position: relative;
  z-index: 2;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(88,114,255,.08);
  border: 1px solid rgba(88,114,255,.12);
  color: rgba(16,20,42,.48);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  white-space: nowrap;
}

.clean-title {
  position: relative;
  z-index: 2;
  margin-top: 54px;
  color: #10142a;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -.06em;
}

.clean-lines {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 48px;
  display: grid;
  gap: 12px;
}

.clean-lines span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(16,20,42,.075);
  overflow: hidden;
}

.clean-lines span::before {
  content: "";
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5872ff, #00c6ff);
  opacity: .78;
}

.clean-lines span:nth-child(1)::before { width: 82%; }
.clean-lines span:nth-child(2)::before { width: 58%; }
.clean-lines span:nth-child(3)::before { width: 70%; }

.light-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(0,198,255,.20);
  filter: blur(.2px);
}

.dot-a { width: 11px; height: 11px; left: 34px; top: 48%; }
.dot-b { width: 7px; height: 7px; right: 42px; bottom: 82px; background: rgba(88,114,255,.26); }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Footer --- */
.footer {
  position: absolute;
  z-index: 22;
  left: clamp(14px, 5vw, 72px);
  right: clamp(14px, 5vw, 72px);
  bottom: clamp(12px, 2.8vh, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  color: var(--footer-color, rgba(16,20,42,.42));
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.6;
  text-align: center;
}

.footer a {
  color: var(--footer-link, rgba(16,20,42,.52));
  text-decoration: none;
  transition: .22s ease;
  white-space: nowrap;
}

.footer a:hover { color: var(--accent, #5872ff); }

.copyright { white-space: nowrap; }

.beian {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.divider { color: var(--divider, rgba(16,20,42,.18)); }

.mps-link { display: inline-flex; align-items: center; gap: 4px; }

.mps-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  object-fit: contain;
  display: inline-block;
}

/* --- QR Modal --- */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .28s ease;
}

.qr-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.qr-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
}

.qr-dialog {
  position: relative;
  width: min(92vw, 430px);
  padding: 1px;
  border-radius: var(--modal-radius, 34px);
  background: var(--modal-border);
  box-shadow: var(--modal-shadow, 0 38px 120px rgba(88,114,255,.18));
  transform: translateY(16px) scale(.96);
  transition: .28s ease;
  overflow: hidden;
}

.qr-modal.show .qr-dialog {
  transform: translateY(0) scale(1);
}

.qr-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--modal-radius, 34px) - 1px);
  padding: 34px 30px 30px;
  background: var(--modal-bg, rgba(255,255,255,.88));
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  text-align: center;
  color: var(--modal-text, #10142a);
}

.qr-content { position: relative; z-index: 2; }

.qr-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: var(--close-radius, 50%);
  cursor: pointer;
  color: var(--modal-close-color, rgba(16,20,42,.52));
  background: var(--modal-close-bg, rgba(255,255,255,.76));
  border: 1px solid var(--modal-close-border, rgba(16,20,42,.08));
  font-size: 22px;
  line-height: 32px;
  transition: .22s ease;
}

.qr-close:hover {
  transform: rotate(90deg);
  color: var(--accent, #5872ff);
}

.qr-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: var(--badge-radius, 999px);
  color: var(--modal-badge-color, #5872ff);
  background: var(--modal-badge-bg, rgba(88,114,255,.08));
  border: 1px solid var(--modal-badge-border, rgba(88,114,255,.14));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .10em;
}

.qr-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #5872ff);
  box-shadow: 0 0 16px var(--accent-glow, rgba(88,114,255,.55));
}

.qr-title {
  margin-bottom: 10px;
  color: var(--modal-title, #10142a);
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: -.04em;
}

.qr-subtitle {
  margin-bottom: 24px;
  color: var(--modal-muted, rgba(16,20,42,.58));
  font-size: 15px;
  line-height: 1.7;
}

.qr-image-wrap {
  width: min(270px, 68vw);
  height: min(270px, 68vw);
  margin: 0 auto;
  padding: 13px;
  border-radius: var(--qr-radius, 30px);
  background: var(--qr-bg, #fff);
  border: 1px solid var(--qr-border, rgba(255,255,255,.92));
  box-shadow: var(--qr-shadow, 0 28px 72px rgba(88,114,255,.14));
}

.qr-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: calc(var(--qr-radius, 30px) - 10px);
}

.qr-tip {
  margin-top: 22px;
  color: var(--modal-muted, rgba(16,20,42,.58));
  font-size: 14px;
  letter-spacing: .04em;
}

/* --- Mobile QR Modal Fix --- */
.qr-modal {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left)) !important;
  overflow: hidden !important;
}

.qr-backdrop { position: fixed !important; inset: 0 !important; }

.qr-dialog {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: auto !important;
  width: min(92vw, 430px) !important;
  max-height: calc(100dvh - 32px) !important;
  max-height: calc(100vh - 32px) !important;  /* dvh 回退 */
  overflow: hidden !important;
  transform-origin: center center !important;
}

.qr-modal.show .qr-dialog {
  transform: translate3d(0, 0, 0) scale(1) !important;
}

.qr-card {
  max-height: calc(100dvh - 34px) !important;
  max-height: calc(100vh - 34px) !important;  /* dvh 回退 */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

html.modal-open,
html.modal-open body {
  overflow: hidden !important;
  width: 100% !important;
  height: 100% !important;
}

/* ============================================================
   Theme — CSS 变量（亮色主题）
   所有变量都加了回退值，确保不支持 CSS 变量的浏览器也能正常渲染
   ============================================================ */
:root {
  --particle: 88,114,255;
  --page-bg: #eef1ff;
  --text: #10142a;
  --muted: rgba(16,20,42,.58);
  --accent: #5872ff;
  --accent-glow: rgba(88,114,255,.55);
  --title-a: #10142a;
  --title-b: transparent;
  --title-gradient: linear-gradient(90deg,#10142a,#5872ff,#00c6ff,#10142a);
  --title-clip: text;
  --title-stroke: 0;
  --title-a-shadow: none;
  --title-b-shadow: none;
  --copy-align: left;
  --actions-align: flex-start;
  --eyebrow-line: block;
  --logo-radius: 18px;
  --logo-bg: linear-gradient(135deg,#fff,#5872ff,#00c6ff);
  --logo-shadow: 0 20px 56px rgba(88,114,255,.16);
  --logo-border: 1px solid rgba(255,255,255,.84);
  --tag-radius: 999px;
  --tag-color: rgba(16,20,42,.54);
  --tag-bg: rgba(255,255,255,.58);
  --tag-border: rgba(255,255,255,.86);
  --tag-shadow: 0 16px 44px rgba(88,114,255,.08);
  --btn-radius: 16px;
  --primary-color: #fff;
  --primary-bg: linear-gradient(90deg,#5872ff,#00c6ff);
  --primary-border: transparent;
  --primary-shadow: 0 20px 52px rgba(88,114,255,.22);
  --secondary-color: rgba(16,20,42,.70);
  --secondary-bg: rgba(255,255,255,.58);
  --secondary-border: rgba(255,255,255,.86);
  --secondary-shadow: none;
  --footer-color: rgba(16,20,42,.42);
  --footer-link: rgba(16,20,42,.52);
  --divider: rgba(16,20,42,.18);
  --modal-radius: 34px;
  --modal-backdrop: radial-gradient(circle at 50% 42%,rgba(88,114,255,.18),transparent 34%),rgba(238,241,255,.66);
  --modal-border: linear-gradient(135deg,#fff,rgba(88,114,255,.42),rgba(0,198,255,.34),#fff);
  --modal-shadow: 0 38px 120px rgba(88,114,255,.18);
  --modal-bg: rgba(255,255,255,.88);
  --modal-text: #10142a;
  --modal-title: #10142a;
  --modal-muted: rgba(16,20,42,.58);
  --modal-close-color: rgba(16,20,42,.52);
  --modal-close-bg: rgba(255,255,255,.76);
  --modal-close-border: rgba(16,20,42,.08);
  --close-radius: 50%;
  --badge-radius: 999px;
  --modal-badge-color: #5872ff;
  --modal-badge-bg: rgba(88,114,255,.08);
  --modal-badge-border: rgba(88,114,255,.14);
  --qr-radius: 30px;
  --qr-bg: #fff;
  --qr-border: rgba(255,255,255,.92);
  --qr-shadow: 0 28px 72px rgba(88,114,255,.14);
  --bg-before: radial-gradient(circle at 78% 40%,rgba(88,114,255,.22),transparent 30%),radial-gradient(circle at 20% 72%,rgba(0,198,255,.18),transparent 24%),radial-gradient(circle at 56% 16%,rgba(255,255,255,.72),transparent 38%);
  --before-opacity: 0.5;
  --bg-after: radial-gradient(circle at 28% 88%,rgba(88,114,255,.14),transparent 20%),radial-gradient(circle at 82% 22%,rgba(0,198,255,.08),transparent 16%);
  --after-opacity: 0.4;
  --bg-speed: 8s;
  --bg-x: 3%;
  --bg-y: 6%;
  --bg-scale: 1.04;
  --bg-rotate: 1deg;
  --visual-mobile-right: -18%;
  --visual-mobile-bottom: -6%;
  --visual-mobile-size: 54vw;
  --visual-mobile-opacity: 0.24;
}

/* ============================================================
   Responsive — 移动端适配
   ============================================================ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .visual {
    position: absolute;
    right: var(--visual-mobile-right, -18%);
    bottom: var(--visual-mobile-bottom, -6%);
    width: var(--visual-mobile-size, 54vw);
    height: var(--visual-mobile-size, 54vw);
    min-height: 220px;
    opacity: var(--visual-mobile-opacity, 0.24);
    pointer-events: none;
  }
  .copy { text-align: left; }
  .actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .page { min-height: 590px; }
  .topbar { left: 22px; right: 22px; top: 22px; }
  .top-tag { display: none; }
  .hero { padding: 98px 22px 112px; }
  h1 { font-size: clamp(50px, 15.2vw, 86px); letter-spacing: -.078em; }
  .desc { font-size: min(16px, max(8px, calc((100vw - 44px) / 38))); }
  .actions { margin-top: 28px; gap: 12px; }
  .btn { height: 48px; min-width: 132px; padding: 0 18px; font-size: 14px; }
  .footer { left: 14px; right: 14px; bottom: 12px; font-size: 11px; gap: 4px 8px; }
  .copyright { width: 100%; }
  .qr-card { padding: 30px 22px 24px !important; }

  .stack { min-width: 230px; width: 220px; }
  .layer-main { padding: 22px; }
  .soft-mark { width: 38px; height: 38px; border-radius: 14px; right: 22px; top: 22px; }
  .brand-capsule { font-size: 9px; padding: 7px 10px; }
  .clean-title { font-size: 28px; margin-top: 42px; }
  .clean-lines { left: 22px; right: 22px; bottom: 36px; gap: 9px; }
  .clean-lines span { height: 7px; }

  .qr-modal {
    padding:
      max(14px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left)) !important;
  }
  .qr-dialog { width: min(90vw, 390px) !important; max-height: calc(100vh - 28px) !important; }
  .qr-card { max-height: calc(100vh - 30px) !important; }
  .qr-image-wrap { width: min(240px, 64vw) !important; height: min(240px, 64vw) !important; }
  .qr-title { font-size: 25px !important; }
  .qr-subtitle { margin-bottom: 20px !important; }
  .qr-tip { margin-top: 18px !important; }
}

@media (max-width: 380px) {
  .hero { padding-left: 18px; padding-right: 18px; }
  .desc { font-size: min(15px, max(8px, calc((100vw - 36px) / 38))); }
  .secondary { display: none; }
}

@media (max-height: 650px) {
  .page { min-height: 540px; }
  .topbar { top: 18px; }
  .hero { padding-top: 84px; padding-bottom: 76px; }
  .eyebrow { margin-bottom: 14px; }
  .desc { margin-top: 16px; }
  .actions { margin-top: 20px; }
  .visual { opacity: .22; }
  .footer { bottom: 8px; }
}

@media (max-height: 620px) {
  .qr-card { padding-top: 24px !important; padding-bottom: 22px !important; }
  .qr-badge { margin-bottom: 10px !important; }
  .qr-title { margin-bottom: 6px !important; }
  .qr-subtitle { margin-bottom: 14px !important; line-height: 1.5 !important; }
  .qr-image-wrap { width: min(210px, 58vw) !important; height: min(210px, 58vw) !important; }
  .qr-tip { margin-top: 12px !important; }
}

/* ============================================================
   动画降级策略（优化版）
   原版：prefers-reduced-motion 直接全砍所有动画
   优化：减弱装饰性动画速度和幅度，保留核心入场动画（只是快一些）
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* 背景流动动画：减缓但保留 */
  .page::before {
    animation-duration: 30s;
    animation-direction: normal;
  }
  /* 卡片浮动：减缓但保留 */
  .layer-main {
    animation-duration: 18s;
  }
  /* 入场动画：加速但不消失（0.3s 替代原来的 0.76~0.86s） */
  .eyebrow { animation-duration: .3s; }
  h1 { animation-duration: .3s; animation-delay: .04s; }
  .desc { animation-duration: .3s; animation-delay: .08s; }
  .actions { animation-duration: .3s; animation-delay: .12s; }
  /* 悬停效果：减弱位移 */
  .btn:hover { transform: translateY(-1px); }
  .qr-close:hover { transform: none; }
}
