/* ═══════════════════════════════════════════════════════════
   每日搞笑运势签 · 全局样式
   配色：浅黄色 + 浅粉色（解压搞笑风格）
   布局：全 Flex，适配 375px-414px 手机屏幕
   ═══════════════════════════════════════════════════════════ */

/* ── CSS 变量 ───────────────────────────────────────────── */
:root {
  /* 主字体 */
  --font: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 主色调：浅黄 + 浅粉 */
  --color-yellow:    #FFE066;  /* 主黄色 */
  --color-yellow-dk: #F5C800;  /* 深黄色（按钮） */
  --color-pink:      #FFB5C8;  /* 主粉色 */
  --color-pink-dk:   #FF80A0;  /* 深粉色（强调） */
  --color-coral:     #FF8FA3;  /* 珊瑚粉（主按钮） */
  --color-peach:     #FFD4A0;  /* 桃色 */

  /* 背景渐变 */
  --bg-home:      linear-gradient(160deg, #FFF9E6 0%, #FFF0F5 60%, #FFDDE8 100%);
  --bg-fortune:   #FBF6F0;
  --bg-pay:       linear-gradient(180deg, #FFFBE6 0%, #FFF8F0 100%);

  /* 签文分类渐变 */
  --grad-workplace: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);
  --grad-stress:    linear-gradient(135deg, #34D399 0%, #059669 100%);
  --grad-social:    linear-gradient(135deg, #FB7185 0%, #E11D48 100%);

  /* 卡片 */
  --card-bg:      #FFFFFF;
  --card-radius:  20px;
  --card-shadow:  0 8px 32px rgba(255, 150, 170, 0.15), 0 2px 8px rgba(0,0,0,0.06);

  /* 文字 */
  --text-primary:   #2D2D2D;
  --text-secondary: #666666;
  --text-hint:      #AAAAAA;

  /* 安全区 */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── 全局重置 ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  background: var(--bg-home);
  width: 100%; height: 100vh;
  overflow: hidden;
}
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
img    { display: block; max-width: 100%; }

/* ── 屏幕容器（SPA 路由） ────────────────────────────────── */
.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateX(16px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  opacity: 1; pointer-events: auto; transform: translateX(0);
}

/* ════════════════════════════════════════════════════════════
   首页
   ════════════════════════════════════════════════════════════ */
#screen-home {
  background: var(--bg-home);
  justify-content: flex-start;
}

/* 背景装饰圆 */
.home-bg-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.deco-circle  {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,220,100,0.35), transparent 70%);
}
.deco-circle-1 { width: 260px; height: 260px; top: -80px; right: -60px; background: radial-gradient(circle, rgba(255,182,206,0.4), transparent 70%); }
.deco-circle-2 { width: 200px; height: 200px; top: 30%;  left: -60px; background: radial-gradient(circle, rgba(255,224,102,0.3), transparent 70%); }
.deco-circle-3 { width: 180px; height: 180px; bottom: 10%; right: -40px; background: radial-gradient(circle, rgba(255,182,206,0.3), transparent 70%); }

.home-content {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 56px 24px calc(40px + var(--safe-bottom));
}

/* Logo */
.logo-area  { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; }
.logo-icon  {
  font-size: 72px; line-height: 1; margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(255, 140, 100, 0.3));
  animation: floatBounce 3s ease-in-out infinite;
}
@keyframes floatBounce {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%     { transform: translateY(-10px) rotate(3deg); }
}
.logo-title {
  font-size: 24px; font-weight: 900; letter-spacing: 2px;
  color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(255,150,150,0.2);
}
.logo-sub {
  font-size: 13px; color: var(--text-secondary);
  margin-top: 6px; letter-spacing: 0.5px;
}

/* 日期胶囊 */
.today-date-pill {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.7); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,182,206,0.5);
  padding: 7px 20px; border-radius: 50px;
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 24px; font-weight: 500;
}

/* 分类选择 */
.category-section { width: 100%; margin-bottom: 24px; }
.section-label {
  text-align: center; font-size: 13px; color: var(--text-secondary);
  margin-bottom: 12px;
}
.category-tabs {
  display: flex; gap: 8px; justify-content: center;
}
.cat-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 4px; border-radius: 14px;
  background: rgba(255,255,255,0.6); border: 2px solid transparent;
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  transition: all 0.2s ease; backdrop-filter: blur(4px);
}
.cat-btn.active {
  background: #fff;
  border-color: var(--color-pink-dk);
  color: var(--color-coral); font-weight: 700;
  box-shadow: 0 4px 16px rgba(255,128,160,0.2);
}
.cat-icon { font-size: 22px; }
.cat-name { font-size: 11px; }

/* 生成按钮 */
.generate-btn {
  width: 100%; max-width: 300px;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--color-coral), #FF6080);
  border-radius: 50px;
  box-shadow: 0 6px 24px rgba(255,100,130,0.45), 0 2px 8px rgba(255,100,130,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 14px;
}
.generate-btn:active {
  transform: scale(0.97);
  box-shadow: 0 3px 12px rgba(255,100,130,0.35);
}
/* 流光效果 */
.btn-shimmer {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2.5s ease infinite;
}
@keyframes shimmer {
  0%   { left: -100%; }
  60%  { left: 120%;  }
  100% { left: 120%;  }
}
.btn-content {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 17px 32px;
  font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.5px;
}
.btn-icon { font-size: 20px; }

/* 免费提示 */
.free-hint {
  font-size: 12px; color: var(--text-hint);
  text-align: center; margin-bottom: 20px;
}

/* 会员入口 */
.vip-entry-btn {
  width: 100%; max-width: 300px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.65); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,215,0,0.5); border-radius: 16px;
  padding: 14px 18px; color: var(--text-primary); font-size: 14px;
  transition: background 0.2s; font-weight: 500;
}
.vip-entry-btn:active { background: rgba(255,255,255,0.85); }
.vip-entry-left  { display: flex; align-items: center; gap: 8px; }
.vip-crown       { font-size: 20px; }
.vip-entry-arrow { font-size: 20px; color: var(--text-hint); font-weight: 300; }

/* ════════════════════════════════════════════════════════════
   签文展示页
   ════════════════════════════════════════════════════════════ */
#screen-fortune { background: var(--bg-fortune); }

/* 通用顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,182,206,0.2);
  min-height: 52px; flex-shrink: 0;
}
.topbar-back {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; color: var(--text-secondary); padding: 4px 0;
}
.topbar-back svg { color: var(--text-secondary); }
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.topbar-save-btn {
  background: linear-gradient(135deg, var(--color-coral), #FF6080);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 50px;
  box-shadow: 0 2px 8px rgba(255,100,130,0.35);
}

/* 签文卡片容器 */
.fortune-card-wrap {
  padding: 16px 16px 0; display: flex; justify-content: center;
  flex-shrink: 0;
}

/* 签文卡片 */
.fortune-card {
  width: 100%; max-width: 380px;
  background: var(--card-bg); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  position: relative; overflow: hidden;
  padding-bottom: 20px;
}

/* 顶部色条 */
.card-top-bar { height: 8px; background: var(--grad-workplace); }
.fortune-card.cat-stress .card-top-bar { background: var(--grad-stress); }
.fortune-card.cat-social  .card-top-bar { background: var(--grad-social); }

/* 卡片头部 */
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 0;
}
.card-date { font-size: 12px; color: var(--text-hint); }
.card-cat-badge {
  display: flex; align-items: center; gap: 4px;
  background: #F3EEFF; color: #7C3AED;
  padding: 4px 12px; border-radius: 50px;
  font-size: 12px; font-weight: 700;
}
.fortune-card.cat-stress .card-cat-badge { background: #E8FFF5; color: #059669; }
.fortune-card.cat-social  .card-cat-badge { background: #FFF0F3; color: #E11D48; }

/* 分割线 */
.card-divider {
  text-align: center; color: #DDD; font-size: 14px;
  margin: 14px 0 12px; letter-spacing: 6px;
}

/* 签文标题 */
.card-title { display: none; }
.card-subtitle {
  text-align: center; font-size: 15px; font-weight: 700;
  color: #7C3AED; margin-bottom: 16px; letter-spacing: 4px;
  padding: 0 20px;
}
.fortune-card.cat-stress .card-subtitle { color: #059669; }
.fortune-card.cat-social  .card-subtitle { color: #E11D48; }

/* 正文 */
.card-main {
  margin: 0 16px 16px; padding: 14px 16px;
  background: linear-gradient(135deg, #F8F4FF, #FFF);
  border-left: 4px solid #A78BFA;
  border-radius: 12px; font-size: 13.5px; line-height: 1.85;
  color: var(--text-primary); position: relative;
}
.fortune-card.cat-stress .card-main { background: linear-gradient(135deg, #F0FDF9, #FFF); border-left-color: #34D399; }
.fortune-card.cat-social  .card-main { background: linear-gradient(135deg, #FFF0F3, #FFF); border-left-color: #FB7185; }

/* 宜忌 */
.card-yiji {
  display: flex; gap: 10px; margin: 0 16px 14px;
}
.yiji-block {
  flex: 1; padding: 10px 12px; border-radius: 12px; min-height: 64px;
}
.yiji-yi { background: #F0FDF4; }
.yiji-ji { background: #FFF5F5; }
.yiji-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 12px; font-weight: 900; color: #fff; margin-bottom: 4px;
}
.yi-tag { background: #4ADE80; }
.ji-tag { background: #F87171; }
.yiji-text { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* 幸运元素 */
.card-lucky {
  display: flex; gap: 8px; margin: 0 16px 14px;
  font-size: 12px; color: var(--text-secondary);
}
.card-lucky span { flex: 1; }
.card-lucky strong { color: var(--text-primary); }

/* 卡片底部 */
.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px 0;
  border-top: 1px solid #F5F5F5;
  font-size: 11px; color: var(--text-hint);
}
.card-watermark-badge {
  font-size: 10px; color: var(--text-hint);
  /* 免费用户展示；会员通过 JS 隐藏 */
}

/* 水印覆盖层（免费用户）*/
.card-watermark-overlay {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-content: center; justify-content: center;
  transform: rotate(-30deg) scale(1.3);
  font-size: 12px; color: rgba(0,0,0,0.13);
  font-weight: 700; letter-spacing: 1px;
  overflow: hidden; white-space: nowrap;
}
.card-watermark-overlay.hidden { display: none; }

/* 操作按钮区 */
.fortune-actions {
  display: flex; gap: 10px; padding: 14px 16px;
  flex-shrink: 0;
}
.action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 13px 8px; border-radius: 14px;
  font-size: 13px; font-weight: 600; transition: transform 0.15s;
}
.action-btn:active { transform: scale(0.96); }
.btn-save   { background: linear-gradient(135deg, var(--color-coral), #FF6080); color: #fff; box-shadow: 0 4px 14px rgba(255,100,130,0.35); }
.btn-share  { background: linear-gradient(135deg, #4ADE80, #22C55E); color: #fff; box-shadow: 0 4px 14px rgba(34,197,94,0.3); }
.btn-reroll { background: #fff; color: #7C3AED; border: 2px solid #A78BFA; }

/* 升级横幅 */
.upgrade-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 0 16px calc(16px + var(--safe-bottom));
  padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #FFF8DC, #FFE4B5);
  border: 1.5px solid #FFD700;
  box-shadow: 0 4px 16px rgba(255,215,0,0.2);
  cursor: pointer; flex-shrink: 0;
}
.upgrade-banner.hidden { display: none; }
.upgrade-icon { font-size: 28px; }
.upgrade-info { flex: 1; }
.upgrade-info strong { display: block; font-size: 14px; color: var(--text-primary); }
.upgrade-info span   { font-size: 12px; color: var(--text-secondary); }
.upgrade-arrow { font-size: 22px; color: var(--text-secondary); font-weight: 300; }

/* ════════════════════════════════════════════════════════════
   支付页
   ════════════════════════════════════════════════════════════ */
#screen-payment { background: var(--bg-pay); }
.topbar-pay { background: rgba(255,252,240,0.9); border-color: rgba(255,215,0,0.2); }

.pay-body {
  flex: 1; padding: 0 16px calc(32px + var(--safe-bottom));
}

.pay-hero {
  text-align: center; padding: 24px 16px 20px;
}
.pay-crown-anim {
  font-size: 60px; margin-bottom: 12px;
  animation: crownPulse 2s ease infinite;
}
@keyframes crownPulse {
  0%,100% { transform: scale(1) rotate(-5deg); }
  50%     { transform: scale(1.08) rotate(5deg); }
}
.pay-title    { font-size: 22px; font-weight: 900; color: var(--text-primary); margin-bottom: 6px; }
.pay-subtitle { font-size: 13px; color: var(--text-secondary); }

/* 权益列表 */
.benefit-list {
  list-style: none; background: #fff; border-radius: 16px;
  padding: 4px 16px; margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(255,150,170,0.08);
}
.benefit-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid #FAF0F5;
}
.benefit-item:last-child { border-bottom: none; }
.b-icon  { font-size: 26px; width: 32px; text-align: center; }
.b-info  { flex: 1; }
.b-info strong { display: block; font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.b-info span   { font-size: 12px; color: var(--text-hint); }
.b-check { font-size: 16px; color: #4ADE80; font-weight: 900; }

/* 套餐选择 */
.plan-section       { margin-bottom: 20px; }
.plan-section-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.plan-grid          { display: flex; gap: 10px; }
.plan-card {
  flex: 1; background: #fff; border: 2px solid #EEE; border-radius: 16px;
  padding: 16px 8px; text-align: center; cursor: pointer;
  position: relative; transition: all 0.2s;
}
.plan-card.plan-selected,
.plan-card.plan-featured {
  border-color: var(--color-yellow-dk);
  box-shadow: 0 4px 16px rgba(255,200,0,0.2);
  background: linear-gradient(135deg, #FFFBEA, #fff);
}
.plan-hot-tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--color-coral); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 50px;
  white-space: nowrap;
}
.plan-name  { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.plan-price { font-size: 11px; color: var(--color-coral); font-weight: 700; margin-bottom: 4px; }
.plan-price span { font-size: 26px; }
.plan-desc  { font-size: 10px; color: var(--text-hint); }

/* 支付按钮 */
.pay-cta-btn {
  width: 100%; padding: 17px;
  background: linear-gradient(135deg, #FFD32A, #FF9500);
  border-radius: 50px; font-size: 17px; font-weight: 700; color: #fff;
  box-shadow: 0 6px 20px rgba(255,150,0,0.4);
  margin-bottom: 12px; transition: transform 0.15s;
  position: relative; overflow: hidden;
}
.pay-cta-btn:active { transform: scale(0.98); }

.pay-note    { text-align: center; font-size: 11px; color: var(--text-hint); margin-bottom: 8px; }
.restore-btn { display: block; margin: 0 auto; color: var(--text-hint); font-size: 13px; text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
   签筒摇签加载动画
   ════════════════════════════════════════════════════════════ */
.loading-mask {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(255,248,240,0.88); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.loading-mask.show { opacity: 1; pointer-events: auto; }

.loading-box {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

/* 签筒容器（摇动动画） */
.qiantong-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  animation: shakeQiantong 0.55s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes shakeQiantong {
  0%   { transform: rotate(-18deg); }
  25%  { transform: rotate(18deg);  }
  50%  { transform: rotate(-14deg); }
  75%  { transform: rotate(14deg);  }
  100% { transform: rotate(-18deg); }
}

/* 签筒主体 */
.qiantong-body {
  width: 60px; height: 80px;
  background: linear-gradient(180deg, #D4A855 0%, #A07830 100%);
  border-radius: 8px 8px 4px 4px;
  border: 2px solid #8B6320;
  position: relative; overflow: visible;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), 0 2px 8px rgba(0,0,0,0.2);
}

/* 签筒内的竹签 */
.qiantong-sticks {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-evenly; align-items: flex-end;
  padding: 0 6px;
}
.qs {
  width: 6px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #FDE68A 0%, #D97706 100%);
  border: 1px solid rgba(0,0,0,0.1);
  animation: stickBounce 0.55s ease-in-out infinite;
}
.qs1 { height: 60px; animation-delay: 0s;    }
.qs2 { height: 72px; animation-delay: 0.1s;  }
.qs3 { height: 55px; animation-delay: 0.05s; }
.qs4 { height: 68px; animation-delay: 0.15s; }
@keyframes stickBounce {
  0%,100% { transform: translateY(4px); }
  50%     { transform: translateY(-8px);}
}

/* 签筒上沿 */
.qiantong-rim {
  position: absolute; top: -6px; left: -3px; right: -3px; height: 12px;
  background: linear-gradient(180deg, #E8C060, #B8901A);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 签筒底座 */
.qiantong-base {
  width: 68px; height: 10px;
  background: linear-gradient(180deg, #8B6320, #5C4010);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* 加载文字 */
.loading-text {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary); letter-spacing: 1px;
}

/* 跳动圆点 */
.loading-dots {
  display: flex; gap: 6px; align-items: center;
}
.loading-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-coral);
  animation: dotBounce 1.2s ease infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; background: var(--color-yellow-dk); }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; background: var(--color-pink-dk);  }
@keyframes dotBounce {
  0%,80%,100% { transform: scale(0.8); opacity: 0.5; }
  40%         { transform: scale(1.2); opacity: 1;   }
}

/* ════════════════════════════════════════════════════════════
   成功反馈弹窗
   ════════════════════════════════════════════════════════════ */
.success-modal {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.success-box {
  background: #fff; border-radius: 24px; padding: 32px 40px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.success-icon-wrap {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #4ADE80, #22C55E);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.success-icon  { font-size: 32px; color: #fff; font-weight: 900; }
.success-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.success-sub   { font-size: 13px; color: var(--text-hint); }

/* ════════════════════════════════════════════════════════════
   Toast 提示
   ════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(88px + var(--safe-bottom)); left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(40,40,40,0.88); color: #fff;
  padding: 10px 22px; border-radius: 50px;
  font-size: 14px; z-index: 9800;
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 80vw; text-align: center;
  backdrop-filter: blur(4px);
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════════════════════════════════
   分享底部弹层
   ════════════════════════════════════════════════════════════ */
.share-modal   { position: fixed; inset: 0; z-index: 9600; }
.share-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
}
.share-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 16px 20px calc(20px + var(--safe-bottom));
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.share-handle {
  width: 40px; height: 4px; background: #E0E0E0; border-radius: 2px;
  margin: 0 auto 16px;
}
.share-sheet-title {
  text-align: center; font-size: 16px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px;
}
.share-img-wrap {
  border-radius: 12px; overflow: hidden; margin-bottom: 14px;
  box-shadow: var(--card-shadow); max-height: 44vh;
}
.share-preview-img { width: 100%; object-fit: contain; display: block; }
.share-long-press-tip {
  text-align: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 16px;
}
.share-btn-row  { display: flex; gap: 12px; }
.share-btn-close {
  flex: 1; padding: 14px; border-radius: 14px;
  background: #F5F5F5; color: var(--text-secondary);
  font-size: 15px; font-weight: 600; font-family: var(--font);
}

/* ════════════════════════════════════════════════════════════
   响应式适配
   ════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .logo-icon   { font-size: 58px; }
  .logo-title  { font-size: 20px; }
  .btn-content { font-size: 15px; padding: 15px 24px; }
  .cat-btn     { padding: 10px 2px; }
  .action-btn  { font-size: 12px; padding: 12px 6px; }
}

@media (min-width: 414px) {
  .home-content     { padding-top: 64px; }
  .fortune-card-wrap{ padding: 20px 20px 0; }
}
