* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #3a2f5c;
  --accent: #b38cff;
  --accent-dark: #8e63f0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, #ffd6e8 0%, #e6d9ff 60%, #d4e6ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 24px;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  text-align: center;
  margin-top: 8px;
}
.site-header h1 {
  font-size: clamp(26px, 6vw, 38px);
  letter-spacing: 3px;
  text-shadow: 0 2px 0 #fff;
}
.subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #6a5a8e;
}

.stage-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 70vh;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff7fb 0%, #f1e9ff 100%);
  box-shadow: 0 12px 34px rgba(90, 60, 140, 0.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.girl {
  width: 92%;
  height: 92%;
  overflow: visible;
  transition: transform 0.4s ease;
}

/* 呼吸 */
.girl { animation: breathe 4s ease-in-out infinite; transform-origin: 50% 100%; }
/* 头发轻摇 */
.hair-front { transform-origin: 150px 80px; animation: sway 5s ease-in-out infinite; }
.hair-back  { transform-origin: 150px 60px; animation: sway 5s ease-in-out infinite reverse; }
.hairpin    { animation: sparkle 2.4s ease-in-out infinite; transform-origin: 206px 132px; }

/* 眨眼：眼球纵向压扁 */
.eye .iris,
.eye circle,
.eye ellipse {
  transform-box: fill-box;
  transform-origin: center;
}
.eye { animation: blink 5s infinite; transform-box: fill-box; transform-origin: center; }

/* 视线跟随（由 JS 设置变量） */
.iris { transform: translate(var(--gx, 0px), var(--gy, 0px)); transition: transform 0.15s ease-out; }

/* 微笑：嘴形变化 */


.girl.blink .eye { animation: none; transform: scaleY(0.1); }

.hint {
  position: absolute;
  left: 0; right: 0;
  bottom: 12px;
  text-align: center;
  font-size: 13px;
  color: #6a5a8e;
  pointer-events: none;
  opacity: 0.85;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #c9a6ff, var(--accent-dark));
  box-shadow: 0 4px 0 #6e47c9, 0 8px 16px rgba(110, 71, 201, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #6e47c9, 0 4px 10px rgba(110, 71, 201, 0.25);
}
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn-ghost {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 0 #e2d6f5, 0 8px 16px rgba(90, 60, 140, 0.12);
}
.btn-ghost:active { box-shadow: 0 1px 0 #e2d6f5; }

.info {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255,255,255,0.7);
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.7;
}
.info h2 { font-size: 16px; margin-bottom: 6px; }
.info p + p { margin-top: 8px; }
.info a { color: var(--accent-dark); font-weight: 600; }

.site-footer {
  margin-top: 20px;
  font-size: 13px;
  color: #6a5a8e;
  text-align: center;
}

/* 动画关键帧 */
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.005); }
}
@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(1.2deg); }
}
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}
@keyframes sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
