/* ═══════════════════════════════════════════════════════════════
   好评机 H5 · 手机APP风格重构版
   设计参考：小红书 · 抖音 · 美团酒店
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS变量系统 ─────────────────────────────────────────────── */
:root {
  /* 主色调：香槟金 */
  --primary:      #C8974F;
  --primary-light: #F5E6CF;
  --primary-dark:  #A07240;
  --primary-rgb:  200, 151, 79;

  /* 背景色系 */
  --bg:           #F7F3EE;
  --bg-card:      #FFFFFF;
  --bg-overlay:   rgba(0, 0, 0, 0.55);
  --bg-glass:     rgba(255, 255, 255, 0.92);

  /* 文字层级 */
  --text-title:   #1A1A1A;
  --text-body:    #333333;
  --text-sub:     #8C8C8C;
  --text-hint:    #BFBFBF;

  /* 功能色 */
  --success:      #52C41A;
  --success-bg:   #F6FFED;
  --warning:       #FAAD14;
  --warning-bg:    #FFFBE6;
  --danger:        #FF4D4F;
  --danger-bg:     #FFF1F0;
  --info:          #1890FF;
  --info-bg:       #E6F7FF;

  /* 边框 & 分隔 */
  --border:       #EEEEEE;
  --border-light:  #F5F5F5;
  --divider:       #E8E8E8;

  /* 阴影层级 */
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.16);

  /* 圆角 */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* 间距 */
  --gap-xs:  4px;
  --gap-sm:  8px;
  --gap-md:  12px;
  --gap-lg:  16px;
  --gap-xl:  24px;
  --gap-2xl: 32px;

  /* 动效 */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:  0.15s;
  --t-normal: 0.25s;
  --t-slow:  0.4s;

  /* 底部安全区 */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
}

/* ── 全局重置 ─────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: none;
}

html {
  font-size: 16px;
  /* iOS平滑滚动 */
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: -apple-system, BlinkMacSystemFont,
               "PingFang SC", "SF Pro Text", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.5;
  overflow-x: hidden;
  /* 防止iOS橡皮筋效果导致布局抖动 */
  overscroll-behavior: none;
}

/* 滚动条样式 */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ── App容器 ─────────────────────────────────────────────────── */
.app-container {
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.1);
}

/* ── 页面容器 ─────────────────────────────────────────────────── */
.page {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  padding-bottom: calc(70px + var(--safe-bottom));
}
.page.active {
  display: flex;
  animation: pageIn 0.35s var(--ease-out);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── 状态栏占位 ──────────────────────────────────────────────── */
.status-bar {
  height: var(--safe-top);
  background: linear-gradient(180deg, rgba(247,243,238,0.95), rgba(247,243,238,0));
  position: sticky; top: 0; z-index: 200;
  pointer-events: none;
}
.status-bar.dark {
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0));
}

/* ══════════════════════════════════════════════════════════════
   通用组件库
   ══════════════════════════════════════════════════════════════ */

/* ── 导航栏 ───────────────────────────────────────────────────── */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  padding: 10px var(--gap-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  min-height: 52px;
  /* iOS毛玻璃效果 */
  transition: background var(--t-normal);
}
.nav-bar.transparent {
  background: transparent;
  border-bottom: none;
}

.nav-back {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  /* 触觉反馈 */
  user-select: none;
}
.nav-back:active {
  background: rgba(0,0,0,0.12);
  transform: scale(0.92);
}
.nav-back svg {
  width: 18px; height: 18px;
  stroke: var(--text-body);
  stroke-width: 2.5;
  fill: none;
}

.nav-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-title);
  /* 标题左右留出返回按钮空间 */
  padding: 0 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-right {
  width: 36px; flex-shrink: 0;
}

/* ── 底部Tab导航 ──────────────────────────────────────────────── */
.tab-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 200;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 6px 0 calc(6px + var(--safe-bottom));
  display: flex;
  align-items: center;
}

.tab-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--t-fast);
  text-decoration: none;
}
.tab-item:active { transform: scale(0.9); }

.tab-icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: transparent;
  transition: all var(--t-normal) var(--ease-spring);
  position: relative;
}
.tab-icon.animated {
  animation: tabBounce 0.5s var(--ease-spring);
}
@keyframes tabBounce {
  0%   { transform: scale(0.5) rotate(-15deg); }
  60%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-hint);
  transition: all var(--t-fast);
}
.tab-item.active .tab-label {
  color: var(--primary);
  font-weight: 600;
}

.tab-badge {
  position: absolute;
  top: -2px; right: calc(50% - 18px);
  min-width: 16px; height: 16px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0);
  transition: all var(--t-normal) var(--ease-spring);
}
.tab-badge.show {
  opacity: 1; transform: scale(1);
}

/* ── 按钮系统 ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none; cursor: pointer;
  font-size: 15px; font-weight: 600;
  transition: all var(--t-normal) var(--ease-spring);
  text-decoration: none; white-space: nowrap;
  outline: none; position: relative; overflow: hidden;
  user-select: none;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.3);
  opacity: 0; transition: opacity 0.1s;
}
.btn:active::after { opacity: 1; }
.btn:active { transform: scale(0.96); box-shadow: var(--shadow-xs); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.45);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text-body);
  border: 1.5px solid var(--border);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-block { width: 100%; }
.btn-lg { padding: 15px 32px; font-size: 17px; border-radius: var(--radius-full); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-full); }

/* ── 卡片 ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--t-normal) var(--ease-smooth);
}
.card:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-xs);
}

/* ── 标签 ─────────────────────────────────────────────────────── */
.tag-bar {
  display: flex; gap: 8px;
  padding: var(--gap-md) var(--gap-lg);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.tag-bar::-webkit-scrollbar { display: none; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-sub);
  cursor: pointer; white-space: nowrap;
  transition: all var(--t-fast) var(--ease-spring);
  scroll-snap-align: start;
  flex-shrink: 0;
  user-select: none;
}
.tag:active { transform: scale(0.94); }
.tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

/* ── Toast 提示 ───────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 80px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}
.toast {
  background: rgba(30, 30, 30, 0.88);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px) scale(0.9);
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.toast.show {
  opacity: 1; transform: translateY(0) scale(1);
}
.toast-icon { font-size: 16px; }
.toast.success { background: rgba(82, 196, 26, 0.92); }
.toast.error   { background: rgba(255, 77, 79, 0.92); }
.toast.warning { background: rgba(250, 173, 20, 0.92); }

/* ── 骨架屏 ───────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e8e8e8 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── 加载动画 ─────────────────────────────────────────────────── */
.loading-dots {
  display: flex; gap: 6px;
  justify-content: center; align-items: center;
}
.loading-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: dotBounce 1.2s infinite ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ── 徽章 ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
  gap: 3px;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-bg);   color: var(--success); }
.badge-warning { background: var(--warning-bg);    color: #d48806; }
.badge-danger  { background: var(--danger-bg);     color: var(--danger); }
.badge-info     { background: var(--info-bg);       color: var(--info); }

/* ── 进度条 ───────────────────────────────────────────────────── */
.progress-bar {
  height: 4px; background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-full);
  transition: width 0.8s var(--ease-smooth);
}

/* ── 底部安全区 ───────────────────────────────────────────────── */
.safe-bottom {
  padding-bottom: calc(var(--gap-lg) + var(--safe-bottom));
}
.safe-top {
  padding-top: calc(var(--gap-lg) + var(--safe-top));
}

/* ── 分隔线 ───────────────────────────────────────────────────── */
.divider {
  height: 1px; background: var(--divider);
  margin: 0 var(--gap-lg);
}

/* ── 弹性布局 ─────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--gap-xs); }
.gap-sm { gap: var(--gap-sm); }
.gap-md { gap: var(--gap-md); }
.gap-lg { gap: var(--gap-lg); }
.flex-1 { flex: 1; }

/* ── 文字 ─────────────────────────────────────────────────────── */
.text-xs  { font-size: 12px; }
.text-sm  { font-size: 13px; }
.text-md  { font-size: 15px; }
.text-lg  { font-size: 17px; }
.text-xl  { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-bold   { font-weight: 700; }
.text-medium { font-weight: 600; }
.text-sub    { color: var(--text-sub); }
.text-hint   { color: var(--text-hint); }
.text-center { text-align: center; }

/* ── 弹层遮罩 ─────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.overlay.show { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ── Bottom Sheet ────────────────────────────────────────────── */
.bottom-sheet {
  width: 100%; max-width: 430px;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 12px 0 calc(24px + var(--safe-bottom));
  animation: sheetUp 0.35s var(--ease-out);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* ── 浮动操作按钮 ─────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  right: 20px;
  width: 52px; height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.4);
  transition: all var(--t-normal) var(--ease-spring);
  z-index: 100;
}
.fab:active { transform: scale(0.9); }
.fab.hidden { opacity: 0; transform: scale(0) translateY(20px); pointer-events: none; }

/* ── 空状态 ───────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--gap-2xl) var(--gap-xl);
  gap: var(--gap-md);
  text-align: center;
}
.empty-icon { font-size: 56px; opacity: 0.6; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text-title); }
.empty-desc { font-size: 13px; color: var(--text-sub); max-width: 260px; }

/* ── 头像/图标占位 ───────────────────────────────────────────── */
.avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   首页 · 欢迎页
   ══════════════════════════════════════════════════════════════ */
#page-home {
  background: var(--bg);
  padding-bottom: calc(76px + var(--safe-bottom));
}

/* 顶部区域 */
.home-hero {
  background: linear-gradient(165deg, #FFF9F0 0%, #FFF5E6 40%, var(--primary-light) 100%);
  padding: var(--gap-2xl) var(--gap-xl) var(--gap-xl);
  position: relative;
  overflow: hidden;
}
/* 背景装饰圆 */
.home-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.08);
}
.home-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.06);
}

.home-hotel-header {
  display: flex; align-items: center; gap: var(--gap-md);
  margin-bottom: var(--gap-lg);
  position: relative; z-index: 1;
}
.home-hotel-avatar {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
  flex-shrink: 0;
}
.home-hotel-info { flex: 1; }
.home-welcome-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary-dark);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}
.home-hotel-name {
  font-size: 20px; font-weight: 800;
  color: var(--text-title);
  line-height: 1.2;
}
.home-stars { font-size: 14px; letter-spacing: 1px; }

.home-guest-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  display: flex; align-items: center; gap: var(--gap-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--gap-md);
  position: relative; z-index: 1;
}
.home-guest-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 600;
  flex-shrink: 0;
}
.home-guest-info { flex: 1; }
.home-guest-name { font-size: 15px; font-weight: 700; color: var(--text-title); }
.home-guest-room { font-size: 13px; color: var(--text-sub); margin-top: 2px; }
.home-guest-tag {
  background: var(--info-bg); color: var(--info);
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* 问候语 */
.home-greeting {
  position: relative; z-index: 1;
  margin-bottom: var(--gap-lg);
}
.home-greeting-title {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark), #8B5E2F);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.home-greeting-sub {
  font-size: 13px; color: var(--text-sub);
  line-height: 1.6;
}

/* 操作入口卡片 */
.home-section { padding: var(--gap-lg) var(--gap-lg) 0; }
.home-section-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-title);
  margin-bottom: var(--gap-md);
  display: flex; align-items: center; gap: var(--gap-sm);
}
.home-section-title::before {
  content: '';
  width: 3px; height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.home-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap-md);
}
.home-action-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-lg) var(--gap-md);
  text-align: center; cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-normal) var(--ease-spring);
  border: 2px solid transparent;
  position: relative; overflow: hidden;
}
.home-action-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), transparent);
  opacity: 0; transition: opacity var(--t-normal);
}
.home-action-card:active {
  transform: scale(0.96);
  border-color: var(--primary);
}
.home-action-card:active::before { opacity: 1; }
.home-action-card.selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-light), #fff);
}
.action-icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  margin: 0 auto var(--gap-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  transition: transform var(--t-normal) var(--ease-spring);
}
.home-action-card:active .action-icon-wrap { transform: scale(1.15); }
.action-label { font-size: 14px; font-weight: 700; color: var(--text-title); margin-bottom: 2px; }
.action-desc  { font-size: 11px; color: var(--text-sub); }
.action-check {
  position: absolute; top: 6px; right: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0);
  transition: all var(--t-normal) var(--ease-spring);
}
.home-action-card.selected .action-check { opacity: 1; transform: scale(1); }

/* 已选摘要条 */
.home-selection-bar {
  margin: var(--gap-lg);
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: var(--gap-md) var(--gap-lg);
  display: flex; align-items: center; gap: var(--gap-md);
  border: 1.5px solid rgba(var(--primary-rgb), 0.2);
  transition: all var(--t-normal);
}
.home-selection-bar.hidden { display: none; }
.home-selection-icon { font-size: 18px; flex-shrink: 0; }
.home-selection-text { flex: 1; font-size: 13px; color: var(--primary-dark); font-weight: 500; }
.home-selection-clear {
  font-size: 12px; color: var(--primary);
  cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(var(--primary-rgb), 0.15);
  transition: background var(--t-fast);
}
.home-selection-clear:active { background: rgba(var(--primary-rgb), 0.3); }

/* 底部提示 */
.home-tips {
  margin: var(--gap-lg);
  background: var(--warning-bg);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  display: flex; gap: var(--gap-sm);
  align-items: flex-start;
}
.home-tip-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.home-tip-text { font-size: 12px; color: #7c5a00; line-height: 1.6; flex: 1; }

.home-start-btn {
  margin: var(--gap-md) var(--gap-lg) 0;
  position: relative; z-index: 1;
}
.home-stats {
  text-align: center;
  font-size: 12px; color: var(--text-hint);
  padding: var(--gap-sm) 0 var(--gap-lg);
}

/* ══════════════════════════════════════════════════════════════
   文案选择页
   ══════════════════════════════════════════════════════════════ */
#page-text { background: var(--bg); }

.text-header-card {
  margin: var(--gap-md) var(--gap-lg) 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-md) var(--gap-lg);
  display: flex; align-items: center; gap: var(--gap-md);
  box-shadow: var(--shadow-xs);
}
.text-header-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  flex-shrink: 0;
}
.text-header-info { flex: 1; }
.text-header-title { font-size: 14px; font-weight: 700; color: var(--text-title); }
.text-header-sub { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

.text-action-bar {
  padding: var(--gap-md) var(--gap-lg);
  display: flex; gap: var(--gap-sm); align-items: center;
}
.text-regen-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1.5px solid rgba(var(--primary-rgb), 0.25);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.text-regen-btn:active { background: rgba(var(--primary-rgb), 0.2); transform: scale(0.96); }
.text-regen-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* 文案卡片列表 */
.text-list {
  padding: var(--gap-md) var(--gap-lg);
  display: flex; flex-direction: column; gap: var(--gap-md);
}

.text-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all var(--t-normal) var(--ease-smooth);
  cursor: pointer;
}
.text-card.selected {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.2);
}
.text-card:active { transform: scale(0.99); }

.text-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--gap-md) var(--gap-lg) var(--gap-sm);
}
.text-card-type {
  display: flex; align-items: center; gap: var(--gap-xs);
  font-size: 13px; font-weight: 700;
}
.text-type-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.text-card-type-dot.service  { background: var(--info); }
.text-card-type-dot.hardware { background: var(--success); }
.text-card-type-dot.location { background: var(--warning); }
.text-card-type-dot.food     { background: var(--danger); }
.text-card-type-dot.value    { background: #722ed1; }
.text-card-type-dot.overall  { background: var(--primary); }

.text-card-wordcount {
  font-size: 11px; color: var(--text-hint);
  background: var(--bg);
  padding: 2px 8px; border-radius: var(--radius-full);
}

.text-card-body {
  padding: 0 var(--gap-lg) var(--gap-sm);
  font-size: 14px; line-height: 1.8;
  color: var(--text-body);
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}
.text-card-body.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-card-expand {
  padding: 0 var(--gap-lg) var(--gap-md);
  font-size: 12px; color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.text-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--gap-sm) var(--gap-lg);
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}
.text-card-meta { font-size: 12px; color: var(--text-sub); display: flex; align-items: center; gap: 4px; }
.text-select-btn {
  padding: 7px 18px;
  background: var(--primary);
  color: #fff;
  border: none; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex; align-items: center; gap: 4px;
}
.text-select-btn.selected {
  background: var(--success);
}
.text-select-btn:active { transform: scale(0.94); }

/* 文案底部栏 */
.text-bottom-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  padding: var(--gap-md) var(--gap-lg) calc(var(--gap-md) + var(--safe-bottom));
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: none;
  align-items: center; gap: var(--gap-md);
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.text-bottom-bar.show { display: flex; animation: slideUpBar 0.25s var(--ease-out); }
@keyframes slideUpBar {
  from { transform: translateX(-50%) translateY(100%); }
  to   { transform: translateX(-50%) translateY(0); }
}
.text-bottom-preview {
  flex: 1;
  font-size: 13px; color: var(--text-sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  max-width: 0;
  transition: max-width var(--t-normal);
}
.text-bottom-bar.show .text-bottom-preview { max-width: 200px; }

/* ══════════════════════════════════════════════════════════════
   照片选择页
   ══════════════════════════════════════════════════════════════ */
#page-photo { background: var(--bg); }

.photo-info-bar {
  margin: var(--gap-md) var(--gap-lg) 0;
  background: var(--info-bg);
  border-radius: var(--radius-md);
  padding: var(--gap-sm) var(--gap-md);
  display: flex; align-items: center; gap: var(--gap-sm);
  font-size: 12px; color: var(--info);
}
.photo-info-bar svg { width: 14px; height: 14px; flex-shrink: 0; }

/* 图片瀑布流网格 */
.photo-grid {
  padding: var(--gap-md) var(--gap-md);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.photo-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: all var(--t-fast);
  background: #f0f0f0;
}
.photo-item:active { transform: scale(0.97); }
.photo-item-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  position: relative;
}
.photo-item-label {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 500;
}

/* 选中样式 */
.photo-item.selected::after {
  content: '';
  position: absolute; inset: 0;
  border: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  z-index: 2;
}
.photo-item-check {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  opacity: 0; transform: scale(0);
  transition: all var(--t-normal) var(--ease-spring);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.4);
}
.photo-item.selected .photo-item-check { opacity: 1; transform: scale(1); }

/* 多选数字角标 */
.photo-item-num {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  opacity: 0; transform: scale(0);
  transition: all var(--t-normal) var(--ease-spring);
}
.photo-item.selected .photo-item-num { opacity: 1; transform: scale(1); }

/* 照片选择计数浮动条 */
.photo-count-float {
  position: fixed;
  top: calc(60px + var(--safe-top));
  right: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 13px; font-weight: 700;
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
  z-index: 90;
  opacity: 0; transform: scale(0);
  transition: all var(--t-normal) var(--ease-spring);
}
.photo-count-float.show { opacity: 1; transform: scale(1); }

/* 照片底部栏 */
.photo-bottom-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  /* 底部留出 tab-bar 的高度，避免被遮挡 */
  padding: var(--gap-md) var(--gap-lg) calc(var(--gap-md) + var(--safe-bottom) + 56px);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--gap-md);
  z-index: 250;
  transition: all var(--t-normal);
}
.photo-tip { flex: 1; font-size: 13px; color: var(--text-sub); }
.photo-download-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
  transition: all var(--t-fast);
  display: flex; align-items: center; gap: 6px;
}
.photo-download-btn:active { transform: scale(0.96); }
.photo-download-btn:disabled { opacity: 0.5; pointer-events: none; }

/* 图片全屏预览 */
.photo-preview-overlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 800;
  display: none;
  flex-direction: column;
}
.photo-preview-overlay.show { display: flex; }
.photo-preview-swipe {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.photo-preview-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
  pointer-events: none;
}
.photo-preview-counter {
  position: absolute; bottom: 90px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
}
.photo-preview-toolbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  padding: var(--gap-md) var(--gap-lg) calc(var(--gap-md) + var(--safe-bottom));
  display: flex; gap: var(--gap-md); justify-content: center;
}
.photo-preview-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.photo-preview-close {
  position: absolute; top: calc(16px + var(--safe-top)); right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none; color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   视频选择页
   ══════════════════════════════════════════════════════════════ */
#page-video { background: var(--bg); }

.video-list {
  padding: var(--gap-md) var(--gap-lg);
  display: flex; flex-direction: column; gap: var(--gap-md);
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all var(--t-normal);
}
.video-card.selected { border-color: var(--primary); }

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}
.video-thumb-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; opacity: 0.3;
}
.video-play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all var(--t-fast);
}
.video-play-btn:active { transform: translate(-50%, -50%) scale(0.9); }
.video-play-btn svg { width: 22px; height: 22px; fill: var(--primary); margin-left: 3px; }
.video-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
}
.video-tag { position: absolute; top: 8px; left: 8px; }

.video-info { padding: var(--gap-md) var(--gap-lg); }
.video-title { font-size: 15px; font-weight: 700; color: var(--text-title); margin-bottom: 4px; }
.video-meta { font-size: 12px; color: var(--text-sub); display: flex; gap: var(--gap-md); }

.video-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--gap-sm) var(--gap-lg);
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}
.video-desc { font-size: 12px; color: var(--text-sub); flex: 1; margin-right: var(--gap-md); }
.video-select-btn {
  padding: 7px 18px;
  background: var(--primary);
  color: #fff;
  border: none; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.video-select-btn.selected { background: var(--success); }
.video-select-btn:active { transform: scale(0.94); }

/* ══════════════════════════════════════════════════════════════
   OTA平台选择页
   ══════════════════════════════════════════════════════════════ */
#page-ota { background: var(--bg); }

.ota-summary-card {
  margin: var(--gap-md) var(--gap-lg) 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-md) var(--gap-lg);
  box-shadow: var(--shadow-xs);
}
.ota-summary-title {
  font-size: 12px; color: var(--text-sub);
  margin-bottom: var(--gap-sm);
}
.ota-summary-chips {
  display: flex; gap: var(--gap-sm); flex-wrap: wrap;
}
.ota-chip {
  display: flex; align-items: center; gap: 4px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12px; font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.ota-platform-section { padding: var(--gap-lg) var(--gap-lg) 0; }
.ota-section-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-title);
  margin-bottom: var(--gap-md);
}

.ota-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-md);
  padding-bottom: var(--gap-lg);
}

.ota-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-lg) var(--gap-md);
  text-align: center; cursor: pointer;
  border: 2px solid transparent;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-normal) var(--ease-spring);
}
.ota-card:active { transform: scale(0.96); }
.ota-card.selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-light), #fff);
}
.ota-card-logo {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  margin: 0 auto var(--gap-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  transition: transform var(--t-normal) var(--ease-spring);
}
.ota-card:active .ota-card-logo { transform: scale(1.1); }
.ota-card-name { font-size: 14px; font-weight: 700; color: var(--text-title); margin-bottom: 2px; }
.ota-card-desc { font-size: 11px; color: var(--text-sub); }

.ota-guide-card {
  margin: 0 var(--gap-lg);
  background: linear-gradient(135deg, #fff8f0, #fff5e6);
  border-radius: var(--radius-md);
  padding: var(--gap-lg);
  border-left: 4px solid var(--primary);
}
.ota-guide-title {
  font-size: 14px; font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: var(--gap-md);
  display: flex; align-items: center; gap: var(--gap-sm);
}
.ota-guide-step {
  display: flex; align-items: flex-start; gap: var(--gap-md);
  margin-bottom: var(--gap-sm);
}
.ota-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.ota-step-text { font-size: 13px; color: var(--text-body); line-height: 1.5; flex: 1; }

.ota-go-btn { padding: 0 var(--gap-lg) var(--gap-lg); }

/* ══════════════════════════════════════════════════════════════
   等待验证页
   ══════════════════════════════════════════════════════════════ */
#page-waiting { background: var(--bg); }

.waiting-hero {
  text-align: center;
  padding: var(--gap-2xl) var(--gap-xl) var(--gap-xl);
}
.waiting-icon-wrap {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #fff);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--gap-lg);
  box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.2);
  animation: waitingPulse 2.5s ease-in-out infinite;
}
@keyframes waitingPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.2); }
  50%       { box-shadow: 0 8px 48px rgba(var(--primary-rgb), 0.4); }
}
.waiting-icon { font-size: 48px; }
.waiting-title { font-size: 22px; font-weight: 800; color: var(--text-title); margin-bottom: var(--gap-sm); }
.waiting-sub {
  font-size: 14px; color: var(--text-sub);
  line-height: 1.6;
}

.waiting-progress-card {
  margin: 0 var(--gap-lg) var(--gap-xl);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-xs);
}
.progress-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--gap-sm);
}
.progress-title { font-size: 13px; font-weight: 600; color: var(--text-title); }
.progress-pct { font-size: 13px; font-weight: 700; color: var(--primary); }

.waiting-steps { padding: 0 var(--gap-lg); }
.w-step {
  display: flex; align-items: center; gap: var(--gap-md);
  padding: var(--gap-md) 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.w-step:last-child { border-bottom: none; }

.w-step-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--bg);
  transition: all var(--t-normal);
}
.w-step-icon-wrap.done   { background: var(--success-bg); }
.w-step-icon-wrap.active { background: var(--info-bg); animation: iconPulse 1.5s ease-in-out infinite; }
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}
.w-step-icon-wrap.spinning svg { animation: spin 1s linear infinite; }

.w-step-info { flex: 1; }
.w-step-title { font-size: 14px; font-weight: 600; color: var(--text-title); }
.w-step-desc  { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

.w-step-status {
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: var(--radius-full);
}
.w-step-status.pending { background: var(--bg); color: var(--text-hint); }
.w-step-status.active  { background: var(--info-bg); color: var(--info); }
.w-step-status.done    { background: var(--success-bg); color: var(--success); }

.waiting-tip-card {
  margin: var(--gap-xl) var(--gap-lg);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-xs);
  text-align: center;
}
.waiting-tip-icon { font-size: 20px; margin-bottom: var(--gap-sm); }
.waiting-tip-title { font-size: 14px; font-weight: 700; color: var(--text-title); margin-bottom: 4px; }
.waiting-tip-desc { font-size: 12px; color: var(--text-sub); line-height: 1.5; margin-bottom: var(--gap-md); }

/* ══════════════════════════════════════════════════════════════
   抽奖页
   ══════════════════════════════════════════════════════════════ */
#page-lottery {
  background: linear-gradient(165deg, #FFF5E0 0%, #FFE8B8 50%, #FFD085 100%);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--safe-bottom));
}

.lottery-nav {
  display: flex; align-items: center;
  padding: 10px var(--gap-lg);
  background: transparent;
  position: relative; z-index: 10;
}
.lottery-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}
.lottery-back:active { transform: scale(0.9); background: rgba(255,255,255,0.9); }
.lottery-back svg { width: 18px; height: 18px; stroke: var(--primary-dark); }
.lottery-nav-title {
  flex: 1; text-align: center;
  font-size: 16px; font-weight: 700;
  color: var(--primary-dark);
  padding-right: 36px;
}

.lottery-header {
  text-align: center;
  padding: var(--gap-md) var(--gap-xl) var(--gap-lg);
}
.lottery-confetti-anim { font-size: 48px; margin-bottom: var(--gap-sm); }
.lottery-congrats {
  font-size: 28px; font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(160,114,64,0.2);
}
.lottery-sub {
  font-size: 14px; color: #a06830;
  margin-top: var(--gap-xs);
}

/* 转盘 */
.lottery-wheel-section {
  display: flex; justify-content: center;
  padding: 0 var(--gap-lg);
  position: relative;
}
.wheel-wrap {
  position: relative;
  width: 300px; height: 300px;
}
.wheel-canvas {
  width: 300px; height: 300px;
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(255,255,255,0.6),
    0 0 0 12px rgba(var(--primary-rgb), 0.15),
    0 16px 48px rgba(200,120,0,0.2);
}
.wheel-pointer {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  /* CSS三角箭头 */
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 30px solid #e85d04;
  filter: drop-shadow(0 4px 8px rgba(232,93,4,0.3));
}
.wheel-pointer::after {
  content: '';
  position: absolute;
  top: -35px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
}
.wheel-center-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e85d04, #dc2f02);
  border: 4px solid #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900;
  color: #fff; letter-spacing: 1px;
  box-shadow: 0 6px 24px rgba(220,47,2,0.4);
  transition: all var(--t-fast);
  text-align: center; line-height: 1.2;
  z-index: 5;
}
.wheel-center-btn:active { transform: translate(-50%, -50%) scale(0.94); }
.wheel-center-btn.spinning { pointer-events: none; }

/* 奖品列表 */
.lottery-prizes {
  padding: var(--gap-xl) var(--gap-lg) 0;
}
.lottery-prizes-title {
  font-size: 14px; font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: var(--gap-md);
}
.prize-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-sm);
}
.prize-item {
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  display: flex; align-items: center; gap: var(--gap-sm);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  backdrop-filter: blur(10px);
}
.prize-icon { font-size: 22px; flex-shrink: 0; }
.prize-info { flex: 1; min-width: 0; }
.prize-name { font-size: 13px; font-weight: 700; color: var(--text-title); }
.prize-remain { font-size: 11px; color: var(--text-sub); }
.prize-prob {
  font-size: 13px; font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.lottery-footer {
  padding: var(--gap-xl) var(--gap-lg) var(--gap-2xl);
  text-align: center;
  font-size: 12px; color: rgba(160,104,48,0.7);
}

/* ══════════════════════════════════════════════════════════════
   中奖/未中奖弹层
   ══════════════════════════════════════════════════════════════ */
.win-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  z-index: 900;
  display: none; align-items: center; justify-content: center;
  padding: var(--gap-xl);
}
.win-overlay.show { display: flex; }

.win-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--gap-2xl) var(--gap-xl);
  text-align: center;
  width: 100%; max-width: 320px;
  animation: winPop 0.5s var(--ease-spring);
  position: relative;
  overflow: visible;
}
@keyframes winPop {
  0%   { transform: scale(0.4) translateY(40px); opacity: 0; }
  60%  { transform: scale(1.05) translateY(-5px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.win-card::before {
  content: '';
  position: absolute;
  top: -20px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
  z-index: 1;
}

.win-emoji { font-size: 56px; margin-bottom: var(--gap-sm); margin-top: var(--gap-md); }
.win-title { font-size: 26px; font-weight: 900; color: var(--primary-dark); }
.win-sub { font-size: 13px; color: var(--text-sub); margin-bottom: var(--gap-md); }

.win-prize-card {
  background: linear-gradient(135deg, var(--primary-light), #fff);
  border-radius: var(--radius-md);
  padding: var(--gap-lg);
  margin-bottom: var(--gap-md);
  border: 2px solid rgba(var(--primary-rgb), 0.2);
}
.win-prize-icon { font-size: 32px; margin-bottom: var(--gap-sm); }
.win-prize-name { font-size: 20px; font-weight: 800; color: var(--text-title); }
.win-prize-desc { font-size: 13px; color: var(--text-sub); margin-top: 4px; }

.win-code-label { font-size: 12px; color: var(--text-sub); margin-bottom: var(--gap-sm); }
.win-code {
  font-size: 22px; font-weight: 900;
  color: var(--primary);
  letter-spacing: 3px;
  background: var(--bg);
  border: 2px dashed rgba(var(--primary-rgb), 0.4);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  margin-bottom: var(--gap-sm);
  cursor: pointer;
  transition: all var(--t-fast);
}
.win-code:active { background: var(--primary-light); transform: scale(0.98); }
.win-code-tip { font-size: 11px; color: var(--text-sub); margin-bottom: var(--gap-lg); }
.win-expire { font-size: 12px; color: var(--text-sub); margin-bottom: var(--gap-lg); }
.win-close {
  font-size: 14px; color: var(--text-sub);
  cursor: pointer; padding: var(--gap-sm);
  text-decoration: underline;
}

/* 未中奖 */
.lose-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--gap-2xl) var(--gap-xl);
  text-align: center;
  width: 100%; max-width: 320px;
  animation: winPop 0.5s var(--ease-spring);
}
.lose-emoji { font-size: 64px; margin-bottom: var(--gap-md); }
.lose-title { font-size: 22px; font-weight: 800; color: var(--text-title); margin-bottom: var(--gap-sm); }
.lose-sub { font-size: 14px; color: var(--text-sub); line-height: 1.6; margin-bottom: var(--gap-xl); }

/* ══════════════════════════════════════════════════════════════
   下拉刷新指示器
   ══════════════════════════════════════════════════════════════ */
.pull-indicator {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--gap-md) 0;
  gap: var(--gap-xs);
  font-size: 12px; color: var(--text-sub);
  opacity: 0; height: 0;
  transition: all var(--t-normal);
}
.pull-indicator.show {
  opacity: 1; height: 60px;
}
.pull-indicator svg {
  width: 20px; height: 20px;
  stroke: var(--primary);
  transition: transform var(--t-normal);
}
.pull-indicator.pulled svg { transform: rotate(180deg); }
.pull-indicator.loading svg { animation: spin 1s linear infinite; }

/* ══════════════════════════════════════════════════════════════
   动画实用类
   ══════════════════════════════════════════════════════════════ */
.fade-in    { animation: fadeIn 0.3s ease; }
.slide-up   { animation: slideUp 0.3s var(--ease-out); }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.stagger-in > * {
  opacity: 0;
  transform: translateY(16px);
  animation: staggerItem 0.4s var(--ease-out) forwards;
}
.stagger-in > *:nth-child(1) { animation-delay: 0ms; }
.stagger-in > *:nth-child(2) { animation-delay: 80ms; }
.stagger-in > *:nth-child(3) { animation-delay: 160ms; }
.stagger-in > *:nth-child(4) { animation-delay: 240ms; }
.stagger-in > *:nth-child(5) { animation-delay: 320ms; }
.stagger-in > *:nth-child(6) { animation-delay: 400ms; }
@keyframes staggerItem {
  to { opacity: 1; transform: translateY(0); }
}

/* 按钮点击涟漪效果 */
.ripple {
  position: relative; overflow: hidden;
}
.ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   响应式
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 431px) {
  body { background: #e8e3dc; }
  .app-container {
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  .tab-bar, .text-bottom-bar, .photo-bottom-bar {
    border-radius: 0;
  }
}
