html { scroll-behavior: smooth; }
body { background: #FFFBF4; color: #0F2744; }
.btn { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* 首屏地图光点 */
.ping::before, .ping::after {
  content: ''; position: absolute; inset: 0; border-radius: 9999px;
  background: rgba(255,159,28,.55); animation: pingSoft 2.4s cubic-bezier(0,0,.2,1) infinite;
}
.ping::after { animation-delay: 1.2s; }
@keyframes pingSoft { 0% { transform: scale(.6); opacity: .85 } 100% { transform: scale(2.6); opacity: 0 } }

/* 手表心率线 */
@keyframes heartbeat { 0%,100% { transform: scale(1) } 12% { transform: scale(1.18) } 24% { transform: scale(1) } 36% { transform: scale(1.12) } }
.heartbeat { animation: heartbeat 1.4s ease-in-out infinite; }

@keyframes floaty { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.floaty { animation: floaty 5s ease-in-out infinite; }

.grain { background-image: radial-gradient(rgba(31,143,232,.10) 1px, transparent 1px); background-size: 22px 22px; }
::selection { background: #FFC44D; color: #0F2744; }
summary::-webkit-details-marker { display: none; }

/* ===== 移动端优化 ===== */
html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* 图片默认自适应，避免布局抖动 */
img { max-width: 100%; height: auto; display: block; }
.ph { background: linear-gradient(110deg, #EAF5FF 25%, #F6FBFF 40%, #EAF5FF 55%); background-size: 220% 100%; animation: shine 1.6s linear infinite; }
@keyframes shine { 0% { background-position: 120% 0 } 100% { background-position: -60% 0 } }

/* 移动端触控热区：所有可点元素至少 44px 高 */
@media (pointer: coarse) {
  a, button, summary, select, input { min-height: 44px; }
  nav a, footer a { min-height: 0; }
  .btn:hover { transform: none; }        /* 手机端取消 hover 位移，避免"卡住" */
  .reveal { transform: translateY(14px); } /* 移动端进场位移更小 */
}

/* iOS 输入框聚焦不自动放大（需 >=16px） */
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px !important; }
  .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
  .no-scrollbar::-webkit-scrollbar { display: none; }
}

/* 移动端横向滑动卡片 */
.snap-row { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.snap-row > * { scroll-snap-align: start; }

/* 底部移动端固定 CTA，避开 iPhone 安全区 */
.safe-b { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* 尊重系统"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ping::before, .ping::after, .heartbeat, .floaty, .ph { animation: none; }
}
