html, body.no-bouncing { overscroll-behavior-y: none; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
main.home-bright-scroll > *:not(#home-scroll-cue).home-bright-section {
  opacity: 0;
  transform: translate3d(0, 2rem, 0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
main.home-bright-scroll > *:not(#home-scroll-cue).home-bright-section.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  main.home-bright-scroll > *:not(#home-scroll-cue).home-bright-section {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
.home-scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
  padding: 0.5rem 1rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.92);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.home-scroll-cue.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.home-scroll-cue__text {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
.home-scroll-cue__mouse {
  width: 1.5rem;
  height: 2.25rem;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  position: relative;
}
.home-scroll-cue__wheel {
  position: absolute;
  left: 50%;
  top: 0.4rem;
  width: 0.2rem;
  height: 0.45rem;
  margin-left: -0.1rem;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  animation: home-cue-wheel 1.6s ease-in-out infinite;
}
@keyframes home-cue-wheel {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.35; transform: translateY(0.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .home-scroll-cue__wheel { animation: none; }
}

:where(.split-hover-text) {
  line-height: 1.25;
}
.split-hover-text .word {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  max-width: 100%;
  box-sizing: border-box;
}
.split-hover-text .word .char {
  display: inline-block;
  position: relative;
  transition: transform 0.33s ease-in-out;
  will-change: transform;
}
.split-hover-text .word .char::before {
  content: attr(data-ch);
  display: inline-block;
  transform: translateY(0);
  transition: transform 0.33s ease-in-out;
}
.split-hover-text .word .char::after {
  content: attr(data-ch);
  display: inline-block;
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-100%);
  transition: transform 0.33s ease-in-out;
}
.split-hover-text .word .char:nth-child(even)::after {
  transform: translateY(100%);
}
.split-hover-text .word:hover .char::before {
  transform: translateY(100%);
}
.split-hover-text .word:hover .char:nth-child(even)::before {
  transform: translateY(-100%);
}
.split-hover-text .word:hover .char::after {
  transform: translateY(0);
}
.home-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#xscanner .feature-tilt-zone {
  position: relative;
  perspective: 800px;
  width: 100%;
}
#xscanner .feature-tilt-zone .popup {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  --tx: 0px;
  --ty: 0px;
  --rx: 0deg;
  --ry: 0deg;
  transform: translate3d(var(--tx), var(--ty), 0) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 120ms ease-out;
}
#xscanner .feature-tilt-zone .popup:before {
  content: '';
  position: absolute;
  left: 4%;
  top: 6%;
  width: 92%;
  height: 88%;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  transform: translateZ(-40px);
  pointer-events: none;
}
#xscanner .feature-tilt-zone .popup-content {
  transform: translateZ(12px);
}

@media (prefers-reduced-motion: reduce) {
  #xscanner .feature-tilt-zone .popup {
    transition: none !important;
    transform: none !important;
  }
}

.progress-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  height: 46px;
  width: 46px;
  cursor: pointer;
  display: block;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: opacity 200ms linear, visibility 200ms linear, transform 200ms linear, box-shadow 200ms linear;
}
.progress-wrap.active-progress {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.progress-wrap:hover {
  box-shadow: inset 0 0 0 2px rgba(248, 171, 55, 0.35);
}
.progress-wrap .progress-icon {
  position: absolute;
  left: 0;
  top: 0;
  height: 46px;
  width: 46px;
  display: grid;
  place-items: center;
  z-index: 2;
  color: rgba(226, 232, 240, 0.92);
  font-size: 20px;
  transition: transform 200ms linear, color 200ms linear, opacity 200ms linear;
}
.progress-wrap:hover .progress-icon {
  transform: translateY(-1px);
  color: #f8ab37;
}
.progress-wrap svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: rotate(-90deg);
}
.progress-wrap svg path {
  fill: none;
  stroke: rgba(226, 232, 240, 0.85);
  stroke-width: 4;
  box-sizing: border-box;
  transition: stroke 200ms linear;
}
@media (prefers-reduced-motion: reduce) {
  .progress-wrap { transition: none; }
  .progress-wrap .progress-icon { transition: none; }
  .progress-wrap svg path { transition: none; }
}

.ai-kf-bot {
  position: fixed;
  right: 22px;
  bottom: 82px;
  width: max-content;
  max-width: min(100vw - 32px, 360px);
  min-height: 0;
  height: auto;
  padding-bottom: 0;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: opacity 200ms linear, visibility 200ms linear, transform 200ms linear;
  pointer-events: none;
}
.ai-kf-bot.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.ai-kf-bot__btn {
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.ai-kf-bot__btn:hover {
  box-shadow: none;
}
.ai-kf-bot__label {
  display: inline-block;
  flex-shrink: 0;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.2;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, #359eee 0%, #03cea4 50%, #ef476f 100%);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
  white-space: nowrap;
  animation: ai-kf-label-pulse 2.4s ease-in-out infinite;
}
@keyframes ai-kf-label-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22); }
  50% { transform: scale(1.04); box-shadow: 0 6px 20px rgba(53, 158, 238, 0.35); }
}
.ai-kf-bot svg {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: block;
  margin-top: -2px;
  visibility: hidden;
}
.ai-kf-bot .ell,
.ai-kf-bot #ai {
  fill: none;
}
.ai-kf-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 50%;
  transform: translateY(50%) translateX(6px);
  max-width: 360px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ai-kf-tooltip:after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: rgba(15, 23, 42, 0.88);
  transform: translateY(-50%) rotate(45deg);
  border-radius: 2px;
}
.ai-kf-bot:hover .ai-kf-tooltip,
.ai-kf-bot:focus-within .ai-kf-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(50%) translateX(0);
}
@media (prefers-reduced-motion: reduce) {
  .ai-kf-bot { transition: none; }
  .ai-kf-bot svg { visibility: visible; }
  .ai-kf-tooltip { transition: none; }
  .ai-kf-bot__label { animation: none; }
}

/* 首页：浮动咨询 / 购买（下滑后显示，与详情页同款） */
.floating-buy-buttons {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.floating-buy-buttons.scrolled {
  top: 80px;
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.floating-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.floating-btn i {
  font-size: 18px;
}
.floating-btn-cart {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}
.floating-btn-cart:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateX(-5px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}
.floating-btn-buy {
  background: linear-gradient(135deg, #0d58b8 0%, #5e86e2 100%);
  color: #fff;
}
.floating-btn-buy:hover {
  background: linear-gradient(135deg, #5e86e2 0%, #0d58b8 100%);
  transform: translateX(-5px);
  box-shadow: 0 6px 25px rgba(13, 88, 184, 0.5);
}
@keyframes home-contact-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes home-contact-slide-up {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.contact-modal {
  display: none;
  position: fixed;
  z-index: 10002;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: home-contact-fade-in 0.3s ease;
  align-items: center;
  justify-content: center;
}
.contact-modal.active {
  display: flex;
}
.contact-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: home-contact-slide-up 0.3s ease;
  overflow: hidden;
}
.contact-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #64748b;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  line-height: 1;
}
.contact-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #0f172a;
  transform: rotate(90deg);
}
.contact-modal-header {
  background: linear-gradient(135deg, #0d58b8 0%, #5e86e2 100%);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  color: #fff;
}
.contact-modal-header h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
}
.contact-modal-body {
  padding: 2rem;
  text-align: center;
}
.contact-image-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.contact-message-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
  .floating-buy-buttons {
    right: 10px;
    gap: 10px;
  }
  .floating-buy-buttons.scrolled {
    top: 70px;
  }
  .floating-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  .floating-btn span {
    display: none;
  }
  .floating-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
  }
  .contact-modal-content {
    width: 95%;
    max-width: 95%;
  }
  .contact-modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  .contact-modal-header h3 {
    font-size: 1.5rem;
  }
  .contact-modal-body {
    padding: 1.5rem;
  }
}
