/* ============================================
 * R132 课堂随机点名工具 H5 · 全局样式
 * 架构: CSS变量主题系统 + 6套预设 + 3种动画引擎
 * 灵感来源: ④灵感库 I01-I37
 * ============================================ */

/* -------- CSS Reset / Base -------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* -------- 6套CSS变量主题 -------- */
/* 灵感I29-I34: 6套配色方案 */
:root, [data-theme="fresh"] {
  --bg-primary: #F0F5FF;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --accent: #1677FF;
  --accent-hover: #4096FF;
  --accent-secondary: #FF8C42;
  --success: #52C41A;
  --warning: #FAAD14;
  --danger: #FF4757;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --contact-footer-h: 72px;
  --bottom-bar-h: 56px;
}

body.has-contact-footer {
  padding-bottom: calc(var(--contact-footer-h) + var(--bottom-bar-h) + env(safe-area-inset-bottom));
}
body.mode-display.has-contact-footer {
  padding-bottom: env(safe-area-inset-bottom);
}
body.has-contact-footer .zw-root .zw-fab {
  bottom: calc(var(--contact-footer-h) + var(--bottom-bar-h) + 12px + env(safe-area-inset-bottom));
}
/* @see CONFIG.app.theme 切换规则，完整6套定义见style.css */

[data-theme="dark"] {
  --bg-primary: #1A1A2E;
  --bg-card: #252540;
  --text-primary: #F0F5FF;
  --text-secondary: #9CA3AF;
  --accent: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-secondary: #FFD700;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --border: #374151;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}
[data-theme="race"] {
  --bg-primary: #FFF5F5;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --accent: #FF4757;
  --accent-hover: #FF6B81;
  --accent-secondary: #6C5CE7;
  --success: #2ED573;
  --warning: #FFA502;
  --danger: #FF4757;
  --border: #FECACA;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 12px rgba(255,71,87,0.12);
  --shadow-lg: 0 8px 24px rgba(255,71,87,0.15);
}

[data-theme="nature"] {
  --bg-primary: #F0FFF4;
  --bg-card: #FFFFFF;
  --text-primary: #1A3A2A;
  --text-secondary: #5C7A6B;
  --accent: #2ED573;
  --accent-hover: #7BED9F;
  --accent-secondary: #8B6914;
  --success: #2ED573;
  --warning: #E1B12C;
  --danger: #E55039;
  --border: #C8E6C9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 12px rgba(46,213,115,0.12);
  --shadow-lg: 0 8px 24px rgba(46,213,115,0.15);
}

[data-theme="kids"] {
  --bg-primary: #FFF0F5;
  --bg-card: #FFFFFF;
  --text-primary: #4A2040;
  --text-secondary: #9B6B8A;
  --accent: #FF6B9D;
  --accent-hover: #FF8CB3;
  --accent-secondary: #FFD93D;
  --success: #6BCB77;
  --warning: #FFD93D;
  --danger: #FF6B6B;
  --border: #FFD6E7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 12px rgba(255,107,157,0.12);
  --shadow-lg: 0 8px 24px rgba(255,107,157,0.15);
}

[data-theme="academy"] {
  --bg-primary: #F5F0FF;
  --bg-card: #FFFFFF;
  --text-primary: #2D1B4E;
  --text-secondary: #7B6B9A;
  --accent: #5C469C;
  --accent-hover: #7B68C4;
  --accent-secondary: #C9A84C;
  --success: #52C41A;
  --warning: #C9A84C;
  --danger: #C0392B;
  --border: #D4C5F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 12px rgba(92,70,156,0.12);
  --shadow-lg: 0 8px 24px rgba(92,70,156,0.15);
}

/* 系统暗色跟随（用户未手动选主题时）*/
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg-primary: #1A1A2E;
    --bg-card: #252540;
    --text-primary: #F0F5FF;
    --text-secondary: #9CA3AF;
    --border: #374151;
  }
}

/* -------- 布局: Top Bar + 主内容区 + Bottom Bar -------- */
/* 灵感I11,I13: 全屏展示区居中 + 底部固定控制栏 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.2s ease;
  position: sticky;
  top: 0;
  z-index: 100;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.main-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px calc(var(--bottom-bar-h) + var(--contact-footer-h) + 24px);
}

.bottom-bar {
  /* 灵感I09: 底部栏毛玻璃吸附 */
  position: fixed;
  bottom: calc(var(--contact-footer-h) + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px env(safe-area-inset-bottom, 12px);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

/* -------- 投屏端 vs 教师端 显示控制 -------- */
body.mode-teacher .teacher-only { display: revert; }
body.mode-display .teacher-only { display: none !important; }
body.mode-display .display-zone { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

/* -------- 大屏展示区 -------- */
.name-display {
  text-align: center;
  padding: 40px;
}
.name-text {
  /* 灵感I07: 名字缩放popIn */
  font-size: var(--display-font-size, 48px);
  font-weight: 800;
  color: var(--accent);
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes popIn {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.name-subtitle {
  display: block;
  font-size: 20px;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* -------- CSS转盘（conic-gradient） -------- */
/* 灵感I01: conic-gradient转盘旋转 */
/* 灵感I35: 色环自动生成（hue色环算法见helpers.js） */
.wheel-container {
  width: 320px;
  height: 320px;
  margin: 0 auto;
  position: relative;
}
.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* colors由JS动态设置（根据名单人数生成conic-gradient） */
  transition: transform 4s cubic-bezier(0.17,0.67,0.12,0.99);
  box-shadow: var(--shadow-lg), inset 0 0 0 3px var(--bg-card);
}
.wheel.spinning {
  transform: rotate(var(--target-angle));
}
.wheel-pointer {
  /* 锥形指针，固定在12点钟方向 */
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 20px solid var(--danger);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  animation: none;
}
.wheel-pointer.active {
  animation: pointerPulse 0.5s ease-in-out 3;
}
@keyframes pointerPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.3); }
}

/* -------- 打字机动画 -------- */
/* 灵感I03: 打字机逐字动画 */
.name-typewriter {
  font-family: 'Menlo', 'SF Mono', 'Courier New', monospace;
  font-size: var(--display-font-size, 48px);
  font-weight: 700;
  border-right: 3px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
  animation: cursorBlink 0.8s step-end infinite;
}
@keyframes cursorBlink {
  50% { border-right-color: transparent; }
}

/* -------- 弹跳盒动画 -------- */
/* 灵感I04: 弹跳盒入场 + 灵感I02: cubic-bezier弹性缓出 */
.name-bouncing {
  font-size: var(--display-font-size, 48px);
  font-weight: 800;
  color: var(--accent);
  animation: nameBounce 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes nameBounce {
  0%   { transform: scale(0) rotate(-5deg); opacity: 0; }
  50%  { transform: scale(1.15) rotate(2deg); opacity: 1; }
  70%  { transform: scale(0.95) rotate(-0.5deg); }
  85%  { transform: scale(1.03) rotate(0.3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* -------- 按钮/交互组件 -------- */
/* 灵感I10: 按钮按压缩放 */
.btn-pick {
  display: block;
  width: 200px;
  height: 56px;
  margin: 20px auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  border: none;
  border-radius: 28px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 16px rgba(22,119,255,0.3);
}
.btn-pick:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(22,119,255,0.2);
}
.btn-pick:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 模式Tab */
.mode-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mode-tab {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mode-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 评价标签行 - 灵感I25 */
.eval-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.eval-tag {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.eval-tag:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
/* 评价标签选中后颜色闪烁 */
.eval-tag.selected {
  animation: tagFlash 0.4s ease;
}
@keyframes tagFlash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* -------- 名单管理面板 -------- */
/* 灵感I12: 双列名单网格 */
/* 灵感I05: stagger延迟入场 */
.namelist-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}
.student-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: fadeSlideUp 0.3s ease backwards;
  transition: box-shadow 0.2s ease;
}
/* stagger: 每个卡片延迟入场 */
.student-card:nth-child(1) { animation-delay: 0ms; }
.student-card:nth-child(2) { animation-delay: 60ms; }
/* ... 通过JS设置style或CSS变量 --stagger-index */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------- Confetti Canvas -------- */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* -------- 响应式 -------- */
/* 小屏(手机端教师控制) */
@media (max-width: 640px) {
  .namelist-body { grid-template-columns: 1fr; }
  .mode-tabs { flex-direction: column; align-items: stretch; }
  .wheel-container { width: 240px; height: 240px; }
}

/* 打印样式 */
@media print {
  .bottom-bar, .teacher-only { display: none !important; }
  .name-text { font-size: 36px; color: #000; }
}

/* -------- 暗色模式底部栏适配 -------- */
[data-theme="dark"] .bottom-bar,
[data-theme="race"] .bottom-bar,
[data-theme="academy"] .bottom-bar {
  background: rgba(26,26,46,0.85);
}

/* -------- 工具类 -------- */
.hidden { display: none !important; }

/* -------- Top Bar 细节 -------- */
.app-title { font-size: 1.1rem; font-weight: 700; }
.app-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-left: 8px; }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.theme-switcher {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-primary);
}
.btn-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 16px;
}

/* -------- 主内容分区 -------- */
.display-zone {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}
.teacher-controls { margin-bottom: 20px; }
.pick-area { text-align: center; }
.multi-config, .group-config { margin-top: 8px; font-size: 14px; }
.multi-config input, .group-config input {
  width: 60px; padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-left: 4px;
}
.animation-selector {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.animation-selector .label { font-size: 14px; color: var(--text-secondary); }
.anim-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  cursor: pointer;
}
.anim-btn.active { background: var(--accent-secondary); color: #fff; border-color: var(--accent-secondary); }

/* -------- 名单面板 -------- */
.namelist-panel, .history-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}
.namelist-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.namelist-header h2 { font-size: 1rem; }
.namelist-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.namelist-filters {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.namelist-filters input, .namelist-filters select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  font-size: 14px;
}
.namelist-footer {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; flex-wrap: wrap;
}
.namelist-count { font-size: 13px; color: var(--text-secondary); flex: 1; }
.student-name { font-weight: 600; flex: 1; }
.student-group { font-size: 12px; color: var(--text-secondary); }
.student-weight { font-size: 11px; }
.student-tags .tag {
  font-size: 11px; padding: 2px 6px;
  background: var(--bg-primary);
  border-radius: 10px; margin-right: 4px;
}
.student-actions { display: flex; gap: 4px; }
.btn-sm, .btn-xs {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 12px;
  cursor: pointer;
}
.btn-xs { padding: 4px 6px; font-size: 11px; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-primary {
  display: block; width: 100%;
  margin-top: 12px; padding: 10px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 15px; cursor: pointer;
}
.empty-state {
  text-align: center; padding: 24px;
  color: var(--text-secondary); font-size: 14px;
}

/* -------- 底部栏按钮 -------- */
.bottom-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  cursor: pointer;
}
.bottom-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* -------- 分组/多人结果 -------- */
.group-results, .multi-results { text-align: center; }
.group-card {
  display: inline-block;
  vertical-align: top;
  margin: 8px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  min-width: 140px;
  animation: fadeSlideUp 0.4s ease backwards;
}
.group-card h3 { color: var(--accent); margin-bottom: 8px; }
.group-card ul { list-style: none; font-size: 14px; }
.multi-names { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.multi-name-tag {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
}

/* -------- 历史记录 -------- */
.history-panel details summary {
  cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.history-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}
.history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  animation: fadeSlideUp 0.3s ease backwards;
}
.history-name { font-weight: 600; flex: 1; }
.history-time { color: var(--text-secondary); font-size: 12px; }
.eval-tag-sm { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.chart-bars { margin-top: 8px; }
.chart-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; font-size: 13px;
}
.chart-label { width: 60px; text-align: right; flex-shrink: 0; }
.chart-bar-wrapper {
  flex: 1; height: 16px;
  background: var(--bg-primary);
  border-radius: 8px; overflow: hidden;
}
.chart-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 8px;
  transition: width 0.5s ease;
}
.chart-value { font-size: 12px; color: var(--text-secondary); width: 40px; }

/* -------- 模态弹窗 -------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.hidden { display: none !important; }
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.3s ease;
}
.modal-title { margin-bottom: 16px; font-size: 1.1rem; }
.modal-content label {
  display: block; margin-bottom: 12px; font-size: 14px;
}
.modal-content input, .modal-content select, .modal-content textarea {
  display: block; width: 100%; margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.modal-content .hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }

/* -------- 通知条 -------- */
.notify {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%) translateY(-120%);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-width: 90vw;
  text-align: center;
  background: var(--bg-card);
  color: var(--text-primary);
}
.notify-visible { transform: translateX(-50%) translateY(0); }
.notify-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.notify-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.notify-warning { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.notify-info { background: #e6f4ff; color: #0958d9; border: 1px solid #91caff; }

/* -------- P1 投屏工具 / 快捷键 -------- */
.display-tools {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: center; margin-top: 12px;
  padding: 10px; background: var(--bg-primary); border-radius: var(--radius-sm);
}
.display-tools-label { font-size: 12px; color: var(--text-secondary); }
.shortcut-hint-btn {
  position: fixed; right: 16px; bottom: calc(var(--contact-footer-h) + var(--bottom-bar-h) + 16px + env(safe-area-inset-bottom));
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 14px; font-weight: 700; cursor: pointer; z-index: 90;
  box-shadow: var(--shadow-sm);
}
.display-status {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  padding: 8px 20px; border-radius: 20px;
  background: var(--bg-card); box-shadow: var(--shadow);
  font-size: 14px; z-index: 150;
}
.display-status-live { background: var(--success); color: #fff; }
.history-export-btn { margin-top: 8px; }

/* -------- 分享页 / 邀请页 -------- */
.share-page, .invite-page { background: var(--bg-primary); min-height: 100vh; }
.share-main, .invite-main {
  max-width: 480px; margin: 0 auto; padding: 24px 16px;
}
.share-hero { text-align: center; margin-bottom: 20px; }
.share-hero h1 { font-size: 1.5rem; margin-bottom: 8px; }
.share-features { background: var(--bg-card); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.share-features p { font-size: 14px; margin-bottom: 8px; color: var(--text-secondary); }
.share-cta {
  display: block; text-align: center; padding: 14px;
  background: var(--accent); color: #fff; border-radius: var(--radius);
  font-weight: 700; margin-bottom: 10px; text-decoration: none;
}
.share-cta-display { background: var(--accent-secondary); }
.share-qr { text-align: center; margin-top: 20px; }
.share-qr p { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.invite-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; box-shadow: var(--shadow);
}
.invite-from { font-size: 14px; color: var(--text-secondary); }
.invite-card h1 { margin: 12px 0; }
.invite-copy-btn { margin-top: 12px; width: 100%; }

/* -------- 固定底栏 -------- */
.contact-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  background: #fff; border-top: 1px solid var(--border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.contact-footer__btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 88px));
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
  justify-content: center;
}
.contact-footer__cta,
.contact-footer__btn {
  display: block;
  text-align: center;
  padding: .48rem .2rem;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.contact-footer__cta {
  background: #c41e1e !important;
  color: #fff !important;
}
.contact-footer__btn {
  background: #f5f5f5;
  color: #333;
}
.contact-footer__brand {
  margin: 6px 0 0;
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-secondary);
}
[data-theme="dark"] .contact-footer { background: var(--bg-card); }
