:root {
  --bg: #ffffff;
  --panel: #fff;
  --panel-alt: #fafafa;
  --border: #e8e4dc;
  --accent: #e67e22;
  --accent-dark: #c06510;
  --accent-rgb: 230, 126, 34;
  --title: #a0522d;
  --text: #4a453f;
  --muted: #8a8176;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --theme-glow-one: rgba(0, 0, 0, 0);
  --theme-glow-two: rgba(0, 0, 0, 0);
  --theme-glow-three: rgba(0, 0, 0, 0);
  --theme-bg-top: #ffffff;
  --theme-bg-mid: #ffffff;
  --theme-bg-bottom: #ffffff;
  --theme-top-start: rgba(255, 255, 255, 0.98);
  --theme-top-end: rgba(255, 255, 255, 0.98);
}

body.theme-gold {
  --bg: #ffffff;
  --panel: #fff;
  --panel-alt: #fafafa;
  --border: #e8e4dc;
  --accent: #e67e22;
  --accent-dark: #c06510;
  --accent-rgb: 230, 126, 34;
  --title: #a0522d;
  --text: #4a453f;
  --muted: #8a8176;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --theme-glow-one: rgba(0, 0, 0, 0);
  --theme-glow-two: rgba(0, 0, 0, 0);
  --theme-glow-three: rgba(0, 0, 0, 0);
  --theme-bg-top: #ffffff;
  --theme-bg-mid: #ffffff;
  --theme-bg-bottom: #ffffff;
  --theme-top-start: rgba(255, 255, 255, 0.98);
  --theme-top-end: rgba(255, 255, 255, 0.98);
}

body.theme-ivory {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-alt: #ffffff;
  --border: #e7dfd3;
  --accent: #c79a4a;
  --accent-dark: #875d27;
  --accent-rgb: 199, 154, 74;
  --title: #9a6c2c;
  --text: #675849;
  --muted: #a38f78;
  --shadow: 0 2px 16px rgba(135, 93, 39, 0.08);
  --theme-glow-one: rgba(255, 255, 255, 0);
  --theme-glow-two: rgba(220, 220, 220, 0.05);
  --theme-glow-three: rgba(255, 255, 255, 0);
  --theme-bg-top: #ffffff;
  --theme-bg-mid: #ffffff;
  --theme-bg-bottom: #ffffff;
  --theme-top-start: rgba(255, 255, 255, 0.98);
  --theme-top-end: rgba(255, 255, 255, 0.95);
}

body.theme-amber {
  --bg: #fff9ef;
  --panel: #ffffff;
  --panel-alt: #fff3dc;
  --border: #ecd2a3;
  --accent: #d18b32;
  --accent-dark: #98591f;
  --accent-rgb: 209, 139, 50;
  --title: #a96a21;
  --text: #6d5040;
  --muted: #aa8971;
  --shadow: 0 2px 16px rgba(152, 89, 31, 0.09);
  --theme-glow-one: rgba(255, 255, 255, 0);
  --theme-glow-two: rgba(220, 220, 220, 0.05);
  --theme-glow-three: rgba(255, 255, 255, 0);
  --theme-bg-top: #fff7e8;
  --theme-bg-mid: #fffaf2;
  --theme-bg-bottom: #fff4df;
  --theme-top-start: rgba(255, 253, 248, 0.98);
  --theme-top-end: rgba(255, 247, 233, 0.95);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.stars {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -15%, var(--theme-glow-one), transparent 52%),
    radial-gradient(ellipse at 85% 20%, var(--theme-glow-two), transparent 45%),
    radial-gradient(ellipse at 15% 30%, var(--theme-glow-three), transparent 48%),
    linear-gradient(180deg, var(--theme-bg-top) 0%, var(--theme-bg-mid) 42%, var(--theme-bg-bottom) 100%);
  z-index: -1;
}

.hub-top-stack {
  flex: 0 0 auto;
  background: var(--zone-bg, var(--bg, #fff));
}

.hub-notice {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: max(0.2rem, env(safe-area-inset-top, 0px)) 0.85rem 0.2rem;
  border-bottom: 1px solid rgba(201, 148, 74, 0.28);
  background: linear-gradient(90deg, #fff6e8 0%, #ffe9c8 48%, #fff3dc 100%);
  color: #8a4d12;
}

.hub-notice[hidden] {
  display: none !important;
}

.hub-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  color: #fff8ef;
  background: linear-gradient(145deg, #e2a84a, #c06510);
  box-shadow: 0 1px 4px rgba(160, 82, 45, 0.2);
  animation: hubNoticePulse 2.2s ease-in-out infinite;
}

.hub-notice-icon svg {
  display: block;
  width: 13px;
  height: 13px;
}

.hub-notice-text {
  margin: 0;
  min-width: 0;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-notice-close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(138, 77, 18, 0.55);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hub-notice-close:hover {
  background: rgba(138, 77, 18, 0.12);
  color: #8a4d12;
}

@keyframes hubNoticePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-notice-icon {
    animation: none;
  }
}

.top-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 3.5rem 1rem 5.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--theme-top-start), var(--theme-top-end));
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.secret-link {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.32rem 0.65rem;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--panel), var(--panel-alt));
  color: var(--accent-dark);
  font-family: "KaiTi", "STKaiti", "FangSong", "SimSun", serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 4px rgba(var(--accent-rgb), 0.12);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.secret-link::after {
  content: "›";
  margin-left: 0.05rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.75;
}

.secret-link:hover {
  color: #7c1d12;
  border-color: rgba(154, 52, 18, 0.7);
  background: linear-gradient(180deg, #fffaf3, #f3d9b0);
  box-shadow: 0 2px 8px rgba(160, 82, 45, 0.18);
}

.secret-link:active {
  transform: translateY(-50%) scale(0.97);
}

.secret-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.secret-modal.hidden,
.secret-modal[hidden] {
  display: none !important;
}

.secret-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 24, 12, 0.45);
}

.secret-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(86vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(255, 248, 235, 0.96));
  box-shadow: 0 18px 48px rgba(60, 30, 10, 0.22);
}

.secret-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(240, 220, 192, 0.9);
}

.secret-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.secret-audio-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #8a6a4a);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.secret-audio-toggle:hover {
  color: var(--title, #5c3317);
  background: rgba(160, 82, 45, 0.08);
}

.secret-audio-toggle.is-playing {
  color: var(--accent-dark, #a0522d);
}

.secret-audio-toggle .bgm-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.secret-audio-toggle.is-playing .bgm-wave {
  transform-origin: center;
}

.secret-audio-toggle.is-playing .bgm-wave-1 {
  animation: bgm-wave 0.9s ease-in-out infinite;
}

.secret-audio-toggle.is-playing .bgm-wave-2 {
  animation: bgm-wave 0.9s ease-in-out 0.15s infinite;
}

.secret-audio-toggle.is-playing .bgm-wave-3 {
  animation: bgm-wave 0.9s ease-in-out 0.3s infinite;
}

.secret-head h2 {
  margin: 0;
  color: var(--title, #5c3317);
  font-family: "KaiTi", "STKaiti", "FangSong", "SimSun", serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.secret-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #8a6a4a);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.secret-close:hover {
  color: var(--title, #5c3317);
  background: rgba(160, 82, 45, 0.08);
}

.secret-body {
  overflow: auto;
  padding: 1.1rem 1.15rem 1.35rem;
  color: #2a2118;
  font-family: "KaiTi", "STKaiti", "FangSong", "SimSun", serif;
  font-size: 0.95rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 134, 11, 0.45) rgba(240, 220, 192, 0.35);
}

.secret-body::-webkit-scrollbar {
  width: 6px;
}

.secret-body::-webkit-scrollbar-track {
  margin: 0.35rem 0;
  background: rgba(240, 220, 192, 0.35);
  border-radius: 999px;
}

.secret-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.55), rgba(160, 82, 45, 0.45));
  border-radius: 999px;
  border: 1px solid rgba(255, 252, 246, 0.5);
}

.secret-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.75), rgba(160, 82, 45, 0.65));
}

.secret-body::-webkit-scrollbar-corner {
  background: transparent;
}

.secret-body p {
  margin: 0 0 0.95rem;
  text-align: justify;
}

.secret-body p:last-child {
  margin-bottom: 0;
}

.secret-hl {
  color: #c62828;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(198, 40, 40, 0.55);
  text-underline-offset: 0.18em;
}

.bgm-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bgm-toggle:hover {
  color: var(--title);
  background: transparent;
}

.bgm-toggle.is-playing {
  color: var(--accent-dark);
  box-shadow: none;
}

.bgm-icon {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

.bgm-lyrics {
  margin-bottom: 1.5rem;
  min-height: 1.55em;
  text-align: center;
  letter-spacing: 0.06em;
  font-family: "KaiTi", "STKaiti", "FangSong", "SimSun", serif;
}

.bgm-lyrics-text {
  margin: 0;
  height: 1.55em;
  line-height: 1.55em;
  font-size: 0.84rem;
  color: transparent;
  white-space: nowrap;
  overflow: hidden;
}

.bgm-lyrics.is-active .bgm-lyrics-text {
  font-weight: 600;
  color: #9a6b2f;
}

.bgm-toggle.is-playing .bgm-wave {
  transform-origin: center;
}

.bgm-toggle.is-playing .bgm-wave-1 {
  animation: bgm-wave 0.9s ease-in-out infinite;
}

.bgm-toggle.is-playing .bgm-wave-2 {
  animation: bgm-wave 0.9s ease-in-out 0.15s infinite;
}

.bgm-toggle.is-playing .bgm-wave-3 {
  animation: bgm-wave 0.9s ease-in-out 0.3s infinite;
}

@keyframes bgm-wave {
  0%, 100% { opacity: 0.35; transform: scaleY(0.75); }
  50% { opacity: 1; transform: scaleY(1); }
}

.hidden { display: none !important; }

.logo {
  text-align: center;
}

.logo-glow {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-size: 1.35rem;
  font-weight: 700;
  color: #c06510;
  letter-spacing: 0.2em;
  text-shadow: 0 0 20px rgba(230, 126, 34, 0.15);
}

.logo-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(201, 162, 39, 0.28) 50%,
    rgba(230, 126, 34, 0.14) 55%,
    transparent 70%
  );
  background-size: 220% 100%;
  animation: logo-shine 3s ease-in-out 1 forwards;
  pointer-events: none;
}

@keyframes logo-shine {
  0% { background-position: 130% 0; opacity: 1; }
  100% { background-position: -30% 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-glow::after {
    animation: none;
    opacity: 0;
  }
}

.hub {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  flex: 1;
  width: 100%;
}

.hub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hub-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.hub-card[hidden] {
  display: none !important;
}

.hub-card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.14);
  transform: translateY(-2px);
}

.hub-card-index {
  flex: 0 0 2.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--title);
  opacity: 0.95;
}

.hub-card-body {
  flex: 1;
  min-width: 0;
}

.hub-card-body h2 {
  font-size: 1.05rem;
  color: var(--accent-dark);
  font-weight: 600;
  margin: 0;
}

.hub-card-arrow {
  flex: 0 0 auto;
  color: var(--title);
  font-size: 1.2rem;
  opacity: 0.8;
}

/* 嫁娶：红金点缀 */
.hub-list .hub-card:nth-child(1) .hub-card-index {
  color: #c41e3a;
}

.hub-list .hub-card:nth-child(1):hover {
  border-color: rgba(196, 30, 58, 0.35);
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.1);
}

/* 入宅：橙金点缀 */
.hub-list .hub-card:nth-child(3) .hub-card-index {
  color: #e67e22;
}

.hub-list .hub-card:nth-child(3):hover {
  border-color: rgba(230, 126, 34, 0.4);
  box-shadow: 0 4px 20px rgba(230, 126, 34, 0.12);
}

/* 微观八字：波浪扫光 */
.hub-card-bazi {
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), 0.28);
  background: #fff;
}

.hub-card-bazi::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(230, 126, 34, 0.1) 50%,
    transparent 65%
  );
  background-size: 220% 100%;
  animation: bazi-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

.hub-card-bazi .hub-card-index {
  color: #e67e22;
}

.hub-card-bazi .hub-card-body h2 {
  color: #c06510;
}

.hub-char-ai {
  position: relative;
  display: inline-block;
  padding-right: 1.15em;
}

.hub-ai-badge {
  position: absolute;
  top: -0.42em;
  right: -0.05em;
  font-size: 0.58em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  color: #ea580c;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid rgba(234, 88, 12, 0.45);
  border-radius: 0.35em;
  padding: 0.16em 0.34em 0.12em;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.18);
  transform: none;
  pointer-events: none;
}

.hub-char-ai--zhengba {
  padding-right: 3.6em;
}

.hub-title-zhengba {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2em;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  white-space: normal;
}

.hub-title-zhengba-text {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  word-break: keep-all;
}

.hub-zhengba-badge {
  position: static;
  flex: 0 0 auto;
  align-self: flex-start;
  max-width: 100%;
  font-size: 0.48em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #ea580c;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid rgba(234, 88, 12, 0.45);
  border-radius: 0.35em;
  padding: 0.16em 0.34em 0.12em;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.18);
  transform: none;
  pointer-events: none;
  z-index: 2;
}

.hub-zhengba-badge.hidden {
  display: none;
}

.hub-card-bazi:hover {
  border-color: rgba(230, 126, 34, 0.55);
  box-shadow: 0 6px 22px rgba(230, 126, 34, 0.16);
  transform: translateY(-2px);
}

@keyframes bazi-shine {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

/* 紫微斗数：紫金星曜 */
.hub-card-ziwei {
  position: relative;
}

/* 钦天四化：紫金偏深 */
.hub-card-qintian {
  position: relative;
}

.hub-card-qintian .hub-card-body h2 {
  letter-spacing: 0.02em;
}

.hub-card-ziwei-star {
  position: absolute;
  right: 1rem;
  color: rgba(121, 54, 130, 0.22);
  font-size: 1.8rem;
  pointer-events: none;
}

/* 演海立向：轻扫光，略强于八字但不刺眼 */
.hub-card-yanhai {
  position: relative;
  overflow: hidden;
  z-index: 1;
  border-color: rgba(184, 134, 11, 0.38);
  background: linear-gradient(135deg, #fff 0%, #fff9ee 55%, #fff 100%);
  box-shadow: 0 3px 16px rgba(184, 134, 11, 0.1);
}

.hub-card-yanhai::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 32%,
    rgba(212, 160, 23, 0.12) 50%,
    transparent 68%
  );
  background-size: 220% 100%;
  animation: yanhai-shine 3.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.hub-card-yanhai::after {
  display: none;
}

.hub-card-yanhai-aura {
  display: none;
}

.hub-card-yanhai .hub-card-index,
.hub-card-yanhai .hub-card-body,
.hub-card-yanhai .hub-card-arrow {
  position: relative;
  z-index: 1;
}

.hub-card-yanhai .hub-card-index {
  color: #b8860b;
}

.hub-card-yanhai .hub-card-body h2 {
  color: #9a6b2f;
  font-weight: 600;
}

.hub-card-yanhai .hub-card-arrow {
  color: #b8860b;
  opacity: 0.9;
}

.hub-card-yanhai:hover {
  border-color: rgba(184, 134, 11, 0.55);
  box-shadow: 0 6px 22px rgba(184, 134, 11, 0.16);
  transform: translateY(-2px);
}


@keyframes yanhai-shine {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-card-bazi::before {
    animation: none !important;
  }

  .hub-card-yanhai::before {
    animation: none !important;
  }
}

@media (max-width: 480px) {
  .hub-notice {
    gap: 0.28rem;
    padding: max(0.14rem, env(safe-area-inset-top, 0px)) 0.65rem 0.14rem;
  }

  .hub-notice-icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .hub-notice-icon svg {
    width: 12px;
    height: 12px;
  }

  .hub-notice-text {
    font-size: 0.64rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
  }

  .hub-notice-close {
    width: 1rem;
    height: 1rem;
    font-size: 0.75rem;
  }

  .top-bar {
    padding-left: 4.6rem;
    padding-right: 2.5rem;
  }

  .secret-link {
    left: 0.4rem;
    padding: 0.28rem 0.5rem;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
  }

  .secret-panel {
    width: min(100%, 100%);
    max-height: 88vh;
  }

  .secret-body {
    font-size: 0.9rem;
    padding: 0.95rem 1rem 1.15rem;
  }

  .bgm-lyrics-text {
    font-size: 0.8rem;
  }

  .hub { padding: 1.5rem 1rem 2.5rem; }
  .hub-card { padding: 1rem; gap: 0.75rem; }
  .hub-card-body h2 { font-size: 0.98rem; }
}

.site-footer {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 0.35rem 1rem max(0.5rem, calc(0.2rem + env(safe-area-inset-bottom, 0px)));
  border-top: 1px solid rgba(240, 220, 192, 0.85);
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.85), rgba(255, 252, 246, 0.98));
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0.45rem 1rem 0.5rem;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(160, 82, 45, 0.06);
}

.site-footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 0.35rem;
  column-gap: 0.65rem;
}

.site-footer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  font-size: 0.84rem;
  line-height: 1.35;
}

.site-footer-label {
  color: #8a6a48;
  letter-spacing: 0.04em;
}

button.site-footer-douyin .site-footer-label::after {
  content: "";
}

.site-footer-value {
  color: #9a5c12;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.site-footer-divider {
  flex: 0 0 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e67e22);
  opacity: 0.75;
}

.site-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0.6rem;
  min-width: 0;
}

.site-footer-douyin {
  position: relative;
}

button.site-footer-douyin {
  margin: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  min-height: 2.4rem;
  padding: 0.3rem 1rem 0.3rem 0.55rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #2b2b31 0%, #1a1a1f 100%);
  font: inherit;
  font-size: 0.85rem;
  color: #f2ead9;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

button.site-footer-douyin::before {
  display: none;
}

button.site-footer-douyin::after {
  display: none;
}

.site-footer-douyin-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #ffffff;
  background: linear-gradient(145deg, #ff4966 0%, #e60023 100%);
  box-shadow:
    0 2px 8px rgba(230, 0, 35, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

button.site-footer-douyin .site-footer-label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #f2ead9;
  white-space: nowrap;
}

button.site-footer-douyin:hover {
  filter: brightness(1.12);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

button.site-footer-douyin:active {
  transform: scale(0.98);
}

button.site-footer-douyin.is-copied {
  box-shadow:
    0 0 0 2px rgba(230, 194, 122, 0.4),
    0 4px 14px rgba(0, 0, 0, 0.25);
}

button.site-footer-douyin.is-copied .site-footer-value {
  color: #ffd98a;
}

.site-footer-douyin .site-footer-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  font-size: 0.76rem;
  font-weight: 800;
  color: #e8c27a;
  white-space: nowrap;
  min-width: 0;
  text-align: left;
}

.site-footer-hint {
  margin: 0;
  width: 100%;
  text-align: center;
  color: #7a4510;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.site-footer-actions > .site-footer-link {
  min-width: 0;
  max-width: 100%;
}

.site-footer-actions > .site-footer-tip {
  flex: 0 0 auto;
}

.site-footer-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 0.32rem;
  min-width: 7.8rem;
  height: 2rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(201, 120, 60, 0.4);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff4e4, #f5d9b0);
  color: #8a4510;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(160, 82, 45, 0.1);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.site-footer-tip[hidden] {
  display: none !important;
}

.site-footer-tip:hover {
  filter: brightness(1.03);
  box-shadow: 0 6px 18px rgba(160, 82, 45, 0.16);
}

.site-footer-tip:active {
  transform: scale(0.98);
}

.site-footer-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #e67e22, #c0392b);
  color: #fff8e8;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.site-footer-disclaimer {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #a08a6e;
  letter-spacing: 0.08em;
}

.site-footer-extra {
  margin: 0.55rem 0 0;
  text-align: center;
}

.site-footer-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
  width: 100%;
  min-width: 0;
  min-height: 2.4rem;
  padding: 0.3rem 1rem 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7a4510;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(201, 148, 74, 0.48);
  background:
    linear-gradient(180deg, #fdf3da 0%, #f6e2b8 55%, #eed29a 100%);
  box-shadow:
    0 4px 14px rgba(160, 82, 45, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.site-footer-link-glow {
  position: absolute;
  inset: -40% -30%;
  background: linear-gradient(
    110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 62%
  );
  transform: translateX(-55%);
  animation: farmLinkShine 3.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.site-footer-link-icon,
.site-footer-link-text,
.site-footer-link-arrow {
  position: relative;
  z-index: 1;
}

.site-footer-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff8e8;
  background: linear-gradient(145deg, #e2a84a, #b86a18);
  box-shadow: 0 0 0 0 rgba(201, 148, 74, 0.45);
  animation: farmLinkPulse 2.4s ease-out infinite;
}

.site-footer-link-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-footer-link-arrow {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 1.05rem;
  opacity: 0.72;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-footer-link:hover {
  filter: brightness(1.04);
  box-shadow:
    0 8px 20px rgba(160, 82, 45, 0.18),
    0 0 18px rgba(212, 168, 90, 0.28);
}

.site-footer-link:hover .site-footer-link-arrow {
  transform: translateX(2px);
  opacity: 1;
}

.site-footer-link:active {
  transform: scale(0.98);
}

@keyframes farmLinkShine {
  0%, 55% { transform: translateX(-60%); opacity: 0; }
  65% { opacity: 0.9; }
  78% { transform: translateX(60%); opacity: 0; }
  100% { transform: translateX(60%); opacity: 0; }
}

@keyframes farmLinkPulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 148, 74, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(201, 148, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 148, 74, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer-link-glow,
  .site-footer-link-icon {
    animation: none;
  }
}

.site-footer-qq {
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

.site-footer-qq:hover {
  color: #c06510;
  text-shadow: 0 0 10px rgba(230, 126, 34, 0.18);
}

.tip-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.tip-modal.hidden,
.tip-modal[hidden] {
  display: none !important;
}

.tip-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 24, 12, 0.48);
}

.tip-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.99), rgba(255, 248, 235, 0.97));
  box-shadow: 0 18px 48px rgba(60, 30, 10, 0.24);
}

.tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(240, 220, 192, 0.9);
}

.tip-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #5c3317;
  letter-spacing: 0.06em;
}

.tip-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #8a6a4a;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.tip-close:hover {
  background: rgba(160, 82, 45, 0.08);
  color: #5c3317;
}

.tip-body {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  padding: 1rem 1rem 1.15rem;
}

.tip-qr {
  display: block;
  width: min(100%, 260px);
  height: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(160, 82, 45, 0.08);
  -webkit-touch-callout: default;
  user-select: none;
}

.tip-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #8a6a48;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .site-footer {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .site-footer-inner {
    gap: 0.35rem;
    padding: 0.4rem 0.75rem 0.45rem;
    border-radius: 12px;
  }

  .site-footer-item {
    font-size: 0.8rem;
  }

  /* 窄屏隐藏圆点分隔，避免挤出文字 */
  .site-footer-divider {
    display: none;
  }

  .site-footer-actions {
    gap: 0.45rem;
  }

  .site-footer-link {
    min-height: 2.4rem;
    padding: 0.3rem 0.7rem 0.3rem 0.45rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }

  button.site-footer-douyin {
    min-height: 2.4rem;
    padding: 0.3rem 0.7rem 0.3rem 0.45rem;
    font-size: 0.78rem;
    gap: 0.4rem;
  }

  button.site-footer-douyin::after {
    display: none;
  }

  .site-footer-douyin-mark,
  .site-footer-link-icon {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.78rem;
  }

  button.site-footer-douyin .site-footer-label {
    font-size: 0.7rem;
  }

  button.site-footer-douyin .site-footer-value {
    font-size: 0.7rem;
  }

  .site-footer-link-text {
    white-space: nowrap;
  }

  .site-footer-link-arrow {
    font-size: 0.9rem;
  }

  .site-footer-tip {
    width: auto;
    max-width: none;
  }
}

button.hub-card {
  font: inherit;
  color: inherit;
  text-align: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  width: 100%;
}

.hub-card-install {
  border-color: rgba(96, 165, 250, 0.42);
}

.hub-card-install:hover {
  border-color: rgba(59, 130, 246, 0.58);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
  transform: translateY(-2px);
}

.hub-card-install .hub-card-index {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.12);
}

.hub-card-install-tip {
  margin: 0.2rem 0 0;
  color: #3b82f6;
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

.install-body {
  justify-items: stretch;
  text-align: left;
}

.install-msg {
  margin: 0;
  color: #4a5568;
  font-size: 0.92rem;
  line-height: 1.55;
}

.install-msg--warn {
  color: #b45309;
}

.install-msg--lead {
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  color: #334155;
}

.install-msg--note {
  margin-top: 0.65rem;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.5;
}

.install-steps {
  margin: 0.55rem 0 0;
  padding-left: 1.15rem;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.6;
}

.install-steps li + li {
  margin-top: 0.35rem;
}

.install-action-btn {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.72rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.install-action-btn:hover {
  filter: brightness(1.04);
}

.install-action-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.install-action-btn.hidden {
  display: none;
}
