:root {
  --bg: #fbadb7;
  --bg-2: #f69aaa;
  --bg-3: #fff0e6;
  --text: #2a0714;
  --muted: #5f2a3a;
  --card: linear-gradient(160deg, rgba(255, 225, 230, 0.55), rgba(251, 173, 183, 0.20));
  --card-border: rgba(251, 173, 183, 0.42);
  --card-highlight: rgba(255, 240, 230, 0.6);
  --card-shadow: 0 30px 70px rgba(58, 13, 30, 0.14), 0 6px 20px rgba(58, 13, 30, 0.06);
  --pink: #fbadb7;
  --hot: #e83a6e;
  --red: #d42452;
  --cream: #fff0e6;
  --shadow: rgba(232, 58, 110, 0.22);
  --link: #4a0e1e;
  --ghost-bg: rgba(251, 173, 183, 0.28);
  --chip-bg: linear-gradient(135deg, rgba(255, 225, 230, 0.55), rgba(251, 173, 183, 0.20));
  --chip-border: rgba(251, 173, 183, 0.38);

  --page-max: 1160px;
  --page-pad: clamp(16px, 3vw, 32px);
  --section-gap: clamp(20px, 4vw, 56px);
}

:root.dark {
  --bg: #2a0a16;
  --bg-2: #3e0e20;
  --bg-3: #4e1228;
  --text: #fff1f6;
  --muted: #e0aaba;
  --card: linear-gradient(160deg, rgba(78, 18, 40, 0.58), rgba(42, 10, 22, 0.28));
  --card-border: rgba(251, 173, 183, 0.18);
  --card-highlight: rgba(251, 173, 183, 0.22);
  --card-shadow: 0 30px 70px rgba(0, 0, 0, 0.50), 0 6px 20px rgba(0, 0, 0, 0.30);
  --pink: #fbadb7;
  --hot: #f04870;
  --red: #ff7ca0;
  --cream: #d9c0a6;
  --shadow: rgba(240, 72, 112, 0.28);
  --link: #fbd9e4;
  --ghost-bg: rgba(251, 173, 183, 0.12);
  --chip-bg: linear-gradient(135deg, rgba(251, 173, 183, 0.20), rgba(251, 173, 183, 0.06));
  --chip-border: rgba(251, 173, 183, 0.24);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
img, svg { display: block; max-width: 100%; height: auto; }

a, button, .btn, .brand, .theme-toggle, .mascot { cursor: pointer; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 4px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: clamp(15px, 1vw + 11px, 17px);
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 225, 235, 0.55), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(255, 178, 196, 0.5), transparent 28%),
    radial-gradient(circle at 20% 88%, rgba(255, 240, 210, 0.5), transparent 32%),
    radial-gradient(circle at 82% 86%, rgba(232, 58, 110, 0.32), transparent 34%),
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(255, 245, 235, 0.75), transparent 72%),
    linear-gradient(145deg, #ffc1cf 0%, #fbadb7 40%, #f79aaa 75%, #e57d94 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root.dark body {
  background:
    radial-gradient(circle at 12% 18%, rgba(200, 70, 120, 0.30), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(240, 72, 112, 0.25), transparent 28%),
    radial-gradient(circle at 20% 88%, rgba(120, 30, 60, 0.35), transparent 32%),
    radial-gradient(circle at 82% 86%, rgba(232, 58, 110, 0.30), transparent 34%),
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(80, 20, 40, 0.4), transparent 72%),
    linear-gradient(145deg, #3a1020 0%, #2a0a16 45%, #1d0510 100%);
}

a { color: inherit; text-decoration: none; }
.bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.blob { display: none; }

/* 四角星：两条十字细线交叠，中间一粒高光点 */
.spark {
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
  animation: sparkTwinkle 5s ease-in-out infinite;
}
.spark::before,
.spark::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95), transparent);
  border-radius: 999px;
}
.spark::before {
  width: 100%; height: 2px;
  transform: translate(-50%, -50%);
}
.spark::after {
  width: 2px; height: 100%;
  transform: translate(-50%, -50%);
}
/* 随机分布 + 错位时间 + 尺寸差 */
.s1  { top:  5%; left:  4%; animation-delay: -0.2s; transform: scale(1.1); }
.s2  { top:  9%; left: 16%; animation-delay: -1.6s; transform: scale(.8); }
.s3  { top:  4%; left: 28%; animation-delay: -3.0s; transform: scale(1.2); }
.s4  { top: 12%; left: 40%; animation-delay: -2.2s; transform: scale(.7); }
.s5  { top:  6%; left: 54%; animation-delay: -4.1s; transform: scale(1); }
.s6  { top: 14%; left: 66%; animation-delay: -1.1s; transform: scale(.9); }
.s7  { top:  7%; left: 80%; animation-delay: -3.5s; transform: scale(1.1); }
.s8  { top: 11%; left: 92%; animation-delay: -2.8s; transform: scale(.75); }
.s9  { top: 22%; left:  8%; animation-delay: -0.6s; transform: scale(1); }
.s10 { top: 26%; left: 22%; animation-delay: -2.4s; transform: scale(1.2); }
.s11 { top: 20%; left: 46%; animation-delay: -3.8s; transform: scale(.85); }
.s12 { top: 24%; left: 72%; animation-delay: -1.3s; transform: scale(.95); }
.s13 { top: 28%; left: 88%; animation-delay: -4.5s; transform: scale(1.1); }
.s14 { top: 36%; left:  3%; animation-delay: -2.0s; transform: scale(.7); }
.s15 { top: 40%; left: 14%; animation-delay: -3.3s; transform: scale(1); }
.s16 { top: 34%; left: 26%; animation-delay: -0.9s; transform: scale(.9); }
.s17 { top: 42%; left: 78%; animation-delay: -2.6s; transform: scale(1.1); }
.s18 { top: 38%; left: 94%; animation-delay: -4.3s; transform: scale(.8); }
.s19 { top: 52%; left:  6%; animation-delay: -1.4s; transform: scale(1.2); }
.s20 { top: 56%; left: 18%; animation-delay: -3.1s; transform: scale(.75); }
.s21 { top: 50%; left: 82%; animation-delay: -0.3s; transform: scale(.95); }
.s22 { top: 58%; left: 96%; animation-delay: -2.9s; transform: scale(1.05); }
.s23 { top: 66%; left: 10%; animation-delay: -4.0s; transform: scale(.85); }
.s24 { top: 70%; left: 24%; animation-delay: -1.8s; transform: scale(1); }
.s25 { top: 64%; left: 76%; animation-delay: -3.6s; transform: scale(1.1); }
.s26 { top: 72%; left: 90%; animation-delay: -2.3s; transform: scale(.7); }
.s27 { top: 80%; left:  5%; animation-delay: -0.5s; transform: scale(.9); }
.s28 { top: 84%; left: 18%; animation-delay: -2.7s; transform: scale(1.2); }
.s29 { top: 82%; left: 34%; animation-delay: -4.2s; transform: scale(.8); }
.s30 { top: 86%; left: 50%; animation-delay: -1.5s; transform: scale(1); }
.s31 { top: 80%; left: 66%; animation-delay: -3.4s; transform: scale(1.1); }
.s32 { top: 88%; left: 82%; animation-delay: -0.7s; transform: scale(.85); }
.s33 { top: 92%; left: 94%; animation-delay: -2.1s; transform: scale(.95); }
.s34 { top: 94%; left: 42%; animation-delay: -3.9s; transform: scale(.75); }
.s35 { top: 30%; left: 58%; animation-delay: -1.0s; transform: scale(.85); }
.s36 { top: 46%; left: 38%; animation-delay: -3.7s; transform: scale(.9); }

@keyframes sparkTwinkle {
  0%, 100% { opacity: 0; transform: scale(var(--sc, .6)) rotate(0deg); }
  40%      { opacity: .9; transform: scale(var(--sc, 1)) rotate(25deg); }
  60%      { opacity: .9; transform: scale(var(--sc, 1)) rotate(-25deg); }
}
/* 轻微暗角，让中间更亮 */
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 75% at 50% 50%, transparent 55%, rgba(168, 26, 63, 0.22) 100%);
  pointer-events: none;
}
:root.dark .vignette {
  background: radial-gradient(ellipse 85% 75% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}
:root.dark .spark { filter: drop-shadow(0 0 8px rgba(255, 200, 220, 0.75)); }
.petal {
  position: absolute;
  top: -4vh;
  width: 10px;
  height: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 220, 230, 0.55) 70%, transparent);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  filter: drop-shadow(0 2px 4px rgba(168, 26, 63, 0.15));
  animation: featherFall 14s linear infinite;
  opacity: 0;
}
.petal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 48%, rgba(168, 26, 63, 0.25) 50%, transparent 52%);
  border-radius: inherit;
}
.p1  { left: 4%;  animation-delay: 0s;    animation-duration: 13s; transform: scale(1); }
.p2  { left: 9%;  animation-delay: -2s;   animation-duration: 16s; transform: scale(.7); }
.p3  { left: 14%; animation-delay: -5s;   animation-duration: 11s; transform: scale(1.1); }
.p4  { left: 19%; animation-delay: -1s;   animation-duration: 15s; transform: scale(.8); }
.p5  { left: 24%; animation-delay: -7s;   animation-duration: 12s; transform: scale(1); }
.p6  { left: 29%; animation-delay: -9s;   animation-duration: 17s; transform: scale(.9); }
.p7  { left: 34%; animation-delay: -3s;   animation-duration: 10s; transform: scale(1.2); }
.p8  { left: 39%; animation-delay: -11s;  animation-duration: 14s; transform: scale(.75); }
.p9  { left: 44%; animation-delay: -6s;   animation-duration: 18s; transform: scale(1); }
.p10 { left: 49%; animation-delay: -4s;   animation-duration: 13s; transform: scale(.85); }
.p11 { left: 54%; animation-delay: -8s;   animation-duration: 16s; transform: scale(1.05); }
.p12 { left: 59%; animation-delay: -12s;  animation-duration: 11s; transform: scale(.9); }
.p13 { left: 64%; animation-delay: -2s;   animation-duration: 15s; transform: scale(1.15); }
.p14 { left: 69%; animation-delay: -10s;  animation-duration: 12s; transform: scale(.8); }
.p15 { left: 74%; animation-delay: -5s;   animation-duration: 17s; transform: scale(1); }
.p16 { left: 79%; animation-delay: -13s;  animation-duration: 14s; transform: scale(.7); }
.p17 { left: 84%; animation-delay: -1s;   animation-duration: 16s; transform: scale(1.1); }
.p18 { left: 89%; animation-delay: -6s;   animation-duration: 10s; transform: scale(.95); }
.p19 { left: 94%; animation-delay: -9s;   animation-duration: 15s; transform: scale(1); }
.p20 { left: 12%; animation-delay: -14s;  animation-duration: 13s; transform: scale(.85); }
.p21 { left: 27%; animation-delay: -15s;  animation-duration: 18s; transform: scale(1.1); }
.p22 { left: 47%; animation-delay: -7s;   animation-duration: 11s; transform: scale(.75); }
.p23 { left: 67%; animation-delay: -3s;   animation-duration: 19s; transform: scale(1.05); }
.p24 { left: 87%; animation-delay: -11s;  animation-duration: 12s; transform: scale(.9); }

@keyframes featherFall {
  0%   { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  8%   { opacity: .85; }
  25%  { transform: translate(22px, 28vh) rotate(140deg); }
  50%  { transform: translate(-24px, 55vh) rotate(260deg); }
  75%  { transform: translate(28px, 82vh) rotate(400deg); }
  92%  { opacity: .85; }
  100% { transform: translate(-14px, 112vh) rotate(520deg); opacity: 0; }
}

.nav {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(10px, 1.4vh, 18px) var(--page-pad);
  padding-top: calc(clamp(10px, 1.4vh, 18px) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap;
  border-bottom: 1px solid rgba(168, 26, 63, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
:root.dark .nav {
  border-bottom-color: rgba(251, 173, 183, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}
.brand { flex-shrink: 0; }
.nav-links {
  flex-shrink: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links > * { flex-shrink: 0; }
.brand, .nav-links { display: flex; align-items: center; }
.brand {
  gap: 10px;
  font-weight: 800;
  font-size: clamp(15px, 1.1vw + 12px, 18px);
  letter-spacing: .03em;
  color: var(--link);
  transition: color .25s ease, transform .35s cubic-bezier(.3,1.6,.5,1), text-shadow .35s ease;
}
.brand:hover {
  color: var(--hot);
  transform: translateY(-3px) scale(1.05);
  text-shadow: 0 0 18px rgba(232, 58, 110, .55);
}
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--hot));
  box-shadow: 0 0 22px var(--shadow);
  transition: transform .6s cubic-bezier(.4,1.8,.4,1), box-shadow .35s ease, background .35s ease;
}
.brand:hover .brand-mark {
  transform: rotate(360deg) scale(1.3);
  background: linear-gradient(135deg, var(--hot), var(--red));
  box-shadow:
    0 0 0 6px rgba(232, 58, 110, 0.18),
    0 0 25px var(--hot),
    0 10px 30px rgba(168, 26, 63, .4);
}
.nav-links {
  gap: clamp(4px, .4vw + 2px, 10px);
  color: var(--muted);
  font-size: clamp(13px, .6vw + 11px, 15px);
  justify-content: flex-end;
}
.nav-links > span {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: currentColor;
  opacity: .35;
  color: transparent;
  text-indent: -999px;
  overflow: hidden;
  align-self: center;
}
.nav-links a {
  position: relative;
  padding: 4px 6px;
  transition: color .25s ease, transform .3s cubic-bezier(.3,1.5,.4,1), text-shadow .3s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 6px; right: 6px; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--hot));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s cubic-bezier(.4,.8,.3,1);
  box-shadow: 0 0 8px var(--hot);
}
.nav-links a:hover {
  color: var(--hot);
  transform: translateY(-3px);
  text-shadow: 0 0 12px rgba(232, 58, 110, .55);
}
.nav-links a:hover::after { transform: scaleX(1); }
.theme-toggle {
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text);
  width: 34px; height: 34px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s ease, border-color .3s ease, color .3s ease, transform .45s cubic-bezier(.3,1.6,.4,1), box-shadow .3s ease;
}
.theme-toggle:hover {
  background: var(--ghost-bg);
  border-color: var(--hot);
  color: var(--hot);
  transform: rotate(-180deg) scale(1.2);
  box-shadow: 0 0 0 5px rgba(232, 58, 110, .16), 0 0 20px var(--hot);
}
.theme-toggle:active { transform: rotate(-180deg) scale(.95); }

.hero {
  width: 100%;
  max-width: var(--page-max);
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(8px, 1.5vh, 20px) var(--page-pad);
  overflow: hidden;
}
.hero-card {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: clamp(8px, 2vh, 24px);
  width: 100%;
  max-width: 720px;
  text-align: center;
  max-height: 100%;
}
.copy {
  position: relative;
  width: 100%;
  max-width: 52ch;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mascot {
  width: 100%;
  display: grid;
  place-items: center;
}
.eyebrow {
  margin: 0 0 clamp(10px, 1.2vw, 16px);
  color: var(--hot);
  font-size: clamp(11px, .5vw + 9px, 13px);
  font-weight: 900;
  letter-spacing: .2em;
}
h1 {
  margin: 0;
  font-size: clamp(30px, 3.5vw + 1.5vh + 6px, 58px);
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--red);
  text-shadow: 0 0 18px rgba(255, 143, 179, .45), 0 10px 42px var(--shadow);
  overflow-wrap: break-word;
  word-break: break-word;
}
h1::after {
  content: "";
  display: block;
  width: clamp(50px, 6vw, 100px);
  height: 3px;
  margin: clamp(8px, 1.2vh, 16px) auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hot), var(--red));
  box-shadow: 0 0 18px rgba(232, 58, 110, .45);
}
.slogan {
  margin: clamp(10px, 1.4vh, 18px) 0 0;
  font-size: clamp(16px, 1.2vw + .6vh + 8px, 26px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.35;
}
.desc {
  margin: clamp(10px, 1.2vh, 16px) 0 0;
  max-width: 42ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: clamp(13px, .4vw + 11px, 15px);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.2vw, 14px);
  margin-top: clamp(14px, 2vh, 24px);
}
.service-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 22px);
  margin-top: clamp(14px, 2vh, 24px);
  color: var(--muted);
  font-size: clamp(14px, .4vw + 11px, 16px);
}

/* 接入地址 */
.endpoints {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  width: 100%;
}
.endpoint {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(232, 58, 110, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: left;
}
.endpoint dt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: clamp(13px, .3vw + 12px, 15px);
  font-weight: 800;
  color: var(--hot);
  letter-spacing: .04em;
}
.endpoint dt em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: clamp(11px, .2vw + 10px, 12.5px);
  letter-spacing: 0;
  opacity: .82;
  text-align: right;
  flex-shrink: 1;
  min-width: 0;
}
.endpoint dd {
  margin: 0;
}
.copy-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  border: 1px solid rgba(232, 58, 110, 0.45);
  border-radius: 999px;
  background: rgba(255, 235, 240, 0.45);
  color: var(--link);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: clamp(13px, .3vw + 12px, 15px);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
  overflow: hidden;
}
.copy-btn code {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.copy-btn:hover {
  background: var(--hot);
  border-color: var(--hot);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(232, 58, 110, .22);
}
.copy-icon {
  flex-shrink: 0;
  font-size: 14px;
  opacity: .75;
}
.copy-btn.copied {
  background: var(--hot);
  border-color: var(--hot);
  color: #fff;
}
.copy-btn.copied .copy-icon::before { content: "✓"; }
.copy-btn.copied .copy-icon { font-size: 15px; opacity: 1; }
.copy-btn.copied code::after {
  content: " 已复制";
  color: rgba(255, 255, 255, 0.9);
  font-size: .88em;
}

/* API 端点弹层 */
.dialog-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
}
.dialog-root[hidden] { display: none; }
.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 8, 20, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dlgFade .22s ease-out;
}
.dialog-card {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: clamp(22px, 3vh, 32px) clamp(20px, 2.5vw, 32px);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 240, 244, 0.95), rgba(255, 225, 232, 0.9));
  border: 1px solid rgba(232, 58, 110, 0.28);
  box-shadow: 0 30px 80px rgba(168, 26, 63, 0.25), 0 0 0 1px rgba(255, 255, 255, .4) inset;
  animation: dlgPop .28s cubic-bezier(.3, 1.4, .5, 1);
}
:root.dark .dialog-card {
  background: linear-gradient(160deg, rgba(62, 16, 36, 0.95), rgba(36, 8, 20, 0.92));
  border-color: rgba(251, 173, 183, 0.25);
}
.dialog-title {
  margin: 0 0 6px;
  font-size: clamp(18px, 1.6vw + 10px, 24px);
  color: var(--red);
  letter-spacing: .02em;
}
.dialog-sub {
  margin: 0 0 clamp(14px, 2vh, 20px);
  color: var(--muted);
  font-size: clamp(12px, .3vw + 11px, 14px);
  line-height: 1.6;
}
.dialog-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border: 1px solid rgba(232, 58, 110, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--link);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .25s ease;
}
.dialog-close:hover {
  background: var(--hot);
  border-color: var(--hot);
  color: #fff;
  transform: rotate(90deg);
}

@keyframes dlgFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes dlgPop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

body.dialog-open { overflow: hidden; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px;
  padding: 0 clamp(14px, 1.2vw, 20px);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Hiragino Sans GB", "Source Han Sans SC", system-ui, sans-serif;
  font-size: clamp(13px, .4vw + 11px, 15px);
  letter-spacing: .02em;
  border-radius: 999px;
  font-weight: 900;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s cubic-bezier(.3,1.6,.4,1), box-shadow .3s ease, border-color .3s ease, color .3s ease, letter-spacing .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 70%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.8), transparent);
  transform: skewX(-20deg);
  transition: left .75s ease;
  z-index: 1;
  pointer-events: none;
}
.btn > * { position: relative; z-index: 2; }
.btn:hover { transform: translateY(-6px) scale(1.05); letter-spacing: .1em; }
.btn:hover::before { left: 130%; }
.btn:active { transform: translateY(-2px) scale(.97); }
.primary {
  color: var(--hot);
  background: rgba(255, 235, 240, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--hot);
  box-shadow: 0 10px 24px rgba(232, 58, 110, .14);
  transition:
    transform .35s cubic-bezier(.3,1.6,.4,1),
    box-shadow .3s ease,
    background .35s ease,
    color .3s ease,
    letter-spacing .3s ease;
}
.primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--hot), var(--red));
  border-color: transparent;
  box-shadow:
    0 20px 45px var(--shadow),
    0 0 0 5px rgba(232, 58, 110, 0.16),
    0 0 22px var(--hot);
}
.ghost {
  color: var(--hot);
  background: rgba(255, 235, 240, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--hot);
  box-shadow: 0 10px 24px rgba(232, 58, 110, .10);
}
.ghost:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--hot), var(--red));
  border-color: transparent;
  box-shadow:
    0 18px 40px var(--shadow),
    0 0 0 5px rgba(232, 58, 110, 0.14),
    0 0 20px var(--hot);
}

:root.dark .primary,
:root.dark .ghost {
  color: var(--hot);
  background: rgba(255, 200, 216, 0.08);
  border-color: var(--hot);
}
:root.dark .primary:hover,
:root.dark .ghost:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--hot), var(--red));
}
.service-strip span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: .72;
  letter-spacing: .08em;
}
.service-strip span::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}
.service-strip a {
  position: relative;
  color: var(--link);
  font-weight: 700;
  padding: 2px 2px 4px;
  transition: color .25s ease, transform .3s cubic-bezier(.3,1.5,.4,1), text-shadow .3s ease;
}
.service-strip a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--hot));
  border-radius: 2px;
  transform: scaleX(.3);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.3,.9,.3,1);
  box-shadow: 0 0 10px var(--hot);
}
.service-strip a:hover {
  color: var(--hot);
  transform: translateY(-3px) scale(1.06);
  text-shadow: 0 0 12px rgba(232, 58, 110, .6);
}
.service-strip a:hover::after { transform: scaleX(1.1); }


.mascot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  flex-shrink: 1;
}
.mascot img {
  position: relative;
  width: auto;
  max-width: min(100%, 420px);
  max-height: min(38vh, 380px);
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(111, 18, 48, .22));
  transform: translateY(6px);
  transition: transform .5s cubic-bezier(.4,1.2,.5,1), filter .4s ease;
  animation: mascotIdle 6s ease-in-out infinite;
}
.mascot:hover img {
  transform: translateY(-6px) scale(1.03) rotate(-1deg);
  filter: drop-shadow(0 38px 52px rgba(111, 18, 48, .28));
  animation-play-state: paused;
}
@keyframes mascotIdle {
  0%, 100% { transform: translateY(6px); }
  50%      { transform: translateY(-4px); }
}
.footer {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(10px, 1.2vh, 16px) var(--page-pad);
  padding-bottom: calc(clamp(10px, 1.2vh, 16px) + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1.2vw, 14px);
  color: var(--muted);
  font-size: clamp(11px, .4vw + 10px, 13px);
  letter-spacing: .12em;
  border-top: 1px solid rgba(168, 26, 63, 0.18);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
:root.dark .footer {
  border-top-color: rgba(251, 173, 183, 0.18);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.05);
}
.footer i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--hot);
  opacity: .65;
  transition: transform .3s ease, opacity .3s ease, box-shadow .3s ease;
}
.footer:hover i {
  transform: scale(1.6);
  opacity: 1;
  box-shadow: 0 0 10px var(--shadow);
}

/* 平板 / 小笔记本：缩小主视觉留白，看板娘保持可见 */
@media (max-width: 1024px) {
  .hero-card { gap: clamp(18px, 3vw, 40px); }
  .mascot img { max-width: 480px; }
}

/* 平板竖屏以下：允许纵向滚动，字段自由展开 */
@media (max-width: 768px) {
  html, body { height: auto; }
  body { min-height: 100dvh; }
  .nav { padding-top: clamp(12px, 3vw, 18px); }
  .nav-links { font-size: 13px; }
  .hero {
    flex: 0 0 auto;
    overflow: visible;
    padding: clamp(16px, 3vw, 28px) var(--page-pad) clamp(24px, 4vw, 40px);
  }
  .hero-card {
    gap: clamp(14px, 3vw, 28px);
    max-width: 100%;
    max-height: none;
  }
  .copy { order: 2; max-width: 100%; }
  .mascot { order: 1; }
  .mascot img { max-width: min(100%, 360px); max-height: 360px; }
  .desc { max-width: 100%; line-height: 1.75; }
}

/* 手机 */
@media (max-width: 560px) {
  :root { --page-pad: clamp(14px, 4vw, 20px); }
  .brand-mark { width: 28px; height: 28px; font-size: 14px; }
  .nav-links { gap: 8px 10px; font-size: 12.5px; }
  .nav-links span { opacity: .5; }
  .theme-toggle { width: 32px; height: 32px; }
  .mascot img { max-width: 320px; max-height: 340px; }
  .actions { width: 100%; }
  .btn { flex: 0 1 auto; min-width: 0; padding: 0 16px; }
  .service-strip { gap: 12px 14px; }
  .service-strip span::after { width: 18px; }
  .footer {
    flex-wrap: wrap;
    row-gap: 4px;
    letter-spacing: .06em;
  }
}

/* 超窄屏（360 及以下）：最小字号、最紧间距 */
@media (max-width: 380px) {
  .brand span:last-child { display: none; }
  h1 { letter-spacing: -.02em; }
  .btn { width: 100%; }
  .actions { flex-direction: column; }
}

/* 横屏手机：避免 hero 被压太扁 */
@media (max-height: 520px) and (orientation: landscape) {
  html, body { height: 100vh; }
  .hero { padding: 8px var(--page-pad); }
  .mascot img { max-height: min(32vh, 200px); }
  h1 { font-size: clamp(24px, 4vw + 8px, 40px); }
  .slogan { font-size: clamp(14px, 1.5vw + 8px, 20px); }
  .desc { display: none; }
}

/* 抽奖弹层 */
.lottery-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.32);
  border: 1px solid rgba(232, 58, 110, .22);
}
:root.dark .lottery-box { background: rgba(251, 173, 183, .08); }
.lottery-status { margin: 0; color: var(--muted); line-height: 1.7; }
.lottery-status.success { color: var(--red); font-weight: 800; }
.lottery-status.error { color: #b31234; font-weight: 800; }
.lottery-user {
  color: var(--link);
  font-weight: 800;
  font-size: 14px;
}
.lottery-draw, .lottery-login { width: fit-content; }
.lottery-rules {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
