/* ============================================================
   AI助播机器人 · 移动优先样式
   手机端为主，iPad/PC 居中容器模拟手机（max-width: 480px）
   一路旺配色方案：旺金 #D9A94F / 宣纸白 #F5F3EE / 墨青 #182742
   ============================================================ */

:root {
  --primary: #D9A94F;
  --primary-dark: #B8902F;
  --primary-gradient: linear-gradient(135deg, #D9A94F, #F0DCA8);
  --primary-gradient-soft: linear-gradient(135deg, rgba(217,169,79,0.12), rgba(240,220,168,0.12));
  --green: #07C160;
  --green-gradient: linear-gradient(135deg, #07C160, #2BD47A);
  --amber: #FF9500;
  --red: #FF3B30;

  --bg: #F5F3EE;
  --card: #FFFFFF;
  --text: #182742;
  --text-secondary: #7B8398;
  --text-tertiary: #B0B0B5;
  --border: #E8E4DA;
  --border-soft: #EFEBE0;

  --shadow-sm: 0 1px 4px rgba(24,39,66,0.04);
  --shadow: 0 2px 12px rgba(24,39,66,0.06);
  --shadow-lg: 0 8px 32px rgba(24,39,66,0.10);

  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;

  --tabbar-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--safe-bottom);
  overscroll-behavior-y: none;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a { color: var(--primary); text-decoration: none; }

/* 容器：模拟手机 */
#app {
  min-height: 100vh;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 8px);
}

/* 隐藏 Tab 栏的页面（独立页） */
.app-container.no-tabbar {
  padding-bottom: var(--safe-bottom);
}

/* ==================== 顶部状态栏 ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border-soft);
  padding: calc(12px + var(--safe-top)) 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .topbar-title {
  font-size: 17px;
  font-weight: 600;
}

.topbar .topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px 4px 6px 0;
  font-size: 15px;
  color: var(--primary);
  cursor: pointer;
  min-height: 44px;
}

.topbar .topbar-action {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
}

.page-body {
  padding: 16px;
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius);
  background: #EFEBE0;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active { transform: scale(0.97); opacity: 0.85; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.btn.primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(217,169,79,0.25);
}

.btn.green {
  background: var(--green-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(7,193,96,0.25);
}

.btn.ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.icon {
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(217,169,79,0.3);
}

.btn.danger { background: #FFF0F0; color: var(--red); }
.btn.warn { background: #FFF6E5; color: var(--amber); }

/* ==================== 输入框 ==================== */
.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  min-height: 88px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217,169,79,0.12);
}

.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }

.field {
  display: block;
  margin-bottom: 14px;
}

.field .label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-section + .card-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

/* ==================== 标签 / 徽章 ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: #EFEBE0;
  color: var(--text-secondary);
  margin-right: 4px;
}
.tag.green { background: rgba(7,193,96,0.12); color: var(--green); }
.tag.amber { background: rgba(255,149,0,0.12); color: var(--amber); }
.tag.red   { background: rgba(255,59,48,0.12); color: var(--red); }
.tag.violet { background: rgba(88,86,214,0.12); color: #5856D6; }
.tag.primary { background: rgba(217,169,79,0.12); color: var(--primary); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #5A3A00;
}

.badge.gray { background: #E8E4DA; color: var(--text-secondary); }

/* ==================== Tab 栏 ==================== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
  display: flex;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
  height: calc(var(--tabbar-height) + var(--safe-bottom));
}

.tab-item {
  flex: 1;
  padding: 6px 0 4px;
  text-align: center;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  min-height: 44px;
}

.tab-item .tab-icon {
  font-size: 22px;
  line-height: 1;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item:active { background: rgba(24,39,66,0.03); }

/* ==================== 登录页 ==================== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #F5EBC8 0%, var(--bg) 30%);
  padding: calc(48px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}

.login-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(217,169,79,0.3);
}

.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 32px;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}

.tab-switch {
  display: flex;
  background: #EFEBE0;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 18px;
}
.tab-switch button {
  flex: 1;
  background: none;
  border: none;
  padding: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}
.tab-switch button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.code-row {
  display: flex;
  gap: 10px;
}
.code-row .input { flex: 1; }
.code-row .btn { min-width: 110px; padding: 0 12px; font-size: 13px; white-space: nowrap; }

.login-foot {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* ==================== 首页 ==================== */
.home-header {
  padding: calc(20px + var(--safe-top)) 16px 16px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: 0 0 24px 24px;
}

.home-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.4);
}

.home-username { font-size: 17px; font-weight: 600; }
.home-usermeta { font-size: 12px; opacity: 0.85; margin-top: 2px; }

/* 会员卡 */
.member-card {
  background: linear-gradient(135deg, #2C2C2E, #1A1A1A);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: -24px 16px 16px;
  position: relative;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.member-card::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,215,0,0.3), transparent 70%);
  pointer-events: none;
}
.member-card .mc-name { font-size: 13px; opacity: 0.8; }
.member-card .mc-days {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
}
.member-card .mc-days small { font-size: 13px; font-weight: 400; opacity: 0.8; margin-left: 4px; }
.member-card .mc-end {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 6px;
}
.member-card .mc-action {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #5A3A00;
  border: none;
  border-radius: 16px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.member-card.expired { background: linear-gradient(135deg, #6B6B6D, #4A4A4C); }

/* 快捷入口 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 16px 16px;
}
.quick-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 4px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: none;
}
.quick-item:active { transform: scale(0.96); }
.quick-item .qi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}
.quick-item .qi-label { font-size: 11px; color: var(--text); }

.qi-1 { background: linear-gradient(135deg, #D9A94F, #F0DCA8); }
.qi-2 { background: linear-gradient(135deg, #5856D6, #8B89F0); }
.qi-3 { background: linear-gradient(135deg, #07C160, #2BD47A); }
.qi-4 { background: linear-gradient(135deg, #FF9500, #FFB340); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin: 6px 0 10px;
}
.section-head .sh-title { font-size: 15px; font-weight: 600; }
.section-head .sh-more { font-size: 12px; color: var(--text-secondary); background: none; border: none; cursor: pointer; }

.task-list {
  margin: 0 16px;
}
.task-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.task-item:active { background: #FAFAFA; }
.task-item .ti-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-gradient-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.task-item .ti-info { flex: 1; min-width: 0; }
.task-item .ti-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-item .ti-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.empty .empty-icon { font-size: 40px; margin-bottom: 8px; opacity: 0.5; }

/* ==================== 直播 Tab ==================== */
.live-task-card {
  margin: 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
}
.live-task-card .ltc-title { font-size: 16px; font-weight: 600; }
.live-task-card .ltc-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.live-subtitle {
  margin: 16px;
  background: linear-gradient(135deg, #1A1A1A, #2C2C2E);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.live-subtitle .ls-seg-title {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 8px;
}
.live-subtitle .ls-text {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 500;
}
.live-subtitle .ls-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary-gradient);
  transition: width 0.3s;
}

.live-controls {
  margin: 0 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.live-controls .ctrl-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--text);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.live-controls .ctrl-btn:active { transform: scale(0.95); }
.live-controls .ctrl-btn.main {
  width: 72px;
  height: 72px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(217,169,79,0.4);
}

.live-settings {
  margin: 0 16px 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
}
.live-settings .ls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.live-settings .ls-row:last-child { border-bottom: none; }
.live-settings .ls-label { font-size: 14px; color: var(--text); }
.live-settings .ls-value { font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.live-settings select {
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  min-height: 32px;
  outline: none;
}
.live-settings input[type=range] {
  flex: 1;
  margin: 0 8px;
  accent-color: var(--primary);
}

.live-display-link {
  margin: 0 16px 16px;
}
.live-display-link button {
  width: 100%;
  background: linear-gradient(135deg, #1A1A1A, #3A3A3C);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-height: 48px;
}

/* ==================== 知识库 ==================== */
.kb-list { padding: 16px; }
.kb-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.kb-card .kbc-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.kb-card .kbc-name { font-size: 15px; font-weight: 600; }
.kb-card .kbc-topic { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.kb-card .kbc-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.kb-card .kbc-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.fab {
  position: fixed;
  bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 16px);
  right: calc(50% - 240px + 16px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  font-size: 26px;
  box-shadow: 0 6px 20px rgba(217,169,79,0.4);
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(0.95); }
@media (max-width: 480px) {
  .fab { right: 16px; }
}

/* 模板列表 */
.tpl-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.tpl-card .tc-name { font-size: 14px; font-weight: 600; }
.tpl-card .tc-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.tpl-card .tc-action { margin-top: 10px; }

/* ==================== 我的 ==================== */
.profile-header {
  padding: calc(28px + var(--safe-top)) 16px 20px;
  background: var(--primary-gradient);
  color: #fff;
  text-align: center;
  border-radius: 0 0 24px 24px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 600;
  margin: 0 auto 10px;
  border: 3px solid rgba(255,255,255,0.5);
}
.profile-name { font-size: 18px; font-weight: 600; }
.profile-meta { font-size: 12px; opacity: 0.85; margin-top: 4px; }

.menu-list {
  margin: 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  min-height: 52px;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #FAFAFA; }
.menu-item .mi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-gradient-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 12px;
}
.menu-item .mi-label { flex: 1; font-size: 15px; }
.menu-item .mi-arrow { color: var(--text-tertiary); font-size: 14px; }
.menu-item .mi-extra { font-size: 12px; color: var(--text-secondary); margin-right: 6px; }

/* ==================== 会员中心 ==================== */
.member-status-card {
  margin: 16px;
  background: linear-gradient(135deg, #2C2C2E, #1A1A1A);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.member-status-card::before {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,215,0,0.3), transparent 70%);
}
.member-status-card .msc-tag { font-size: 12px; opacity: 0.8; }
.member-status-card .msc-days {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
}
.member-status-card .msc-days small { font-size: 14px; font-weight: 400; opacity: 0.8; margin-left: 6px; }
.member-status-card .msc-end { font-size: 12px; opacity: 0.7; margin-top: 8px; }

.plan-list { padding: 0 16px 16px; }
.plan-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
}
.plan-card.popular { border-color: var(--primary); }
.plan-card.popular::after {
  content: "推荐";
  position: absolute;
  top: -8px;
  right: 14px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
}
.plan-card .pc-name { font-size: 15px; font-weight: 600; }
.plan-card .pc-price { font-size: 24px; font-weight: 700; color: var(--primary); margin: 4px 0; }
.plan-card .pc-price small { font-size: 13px; color: var(--text-secondary); font-weight: 400; }
.plan-card .pc-desc { font-size: 12px; color: var(--text-secondary); }

.redeem-card {
  margin: 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}
.redeem-card .rc-row { display: flex; gap: 10px; }
.redeem-card .rc-row .input { flex: 1; }

/* ==================== 直播展示页（全屏） ==================== */
.display-page {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: var(--safe-top) 0 var(--safe-bottom);
  overflow: hidden;
}
.display-exit {
  position: absolute;
  top: calc(8px + var(--safe-top));
  right: 16px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 13px;
  z-index: 10;
  cursor: pointer;
  min-height: 36px;
}
.display-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.visual-zone { margin-bottom: 32px; }
.assistant-figure {
  width: 130px;
  height: 130px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bot-face {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 0 40px rgba(217,169,79,0.6);
}
.voice-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(217,169,79,0.5);
  animation: ring 2.4s ease-out infinite;
}
.voice-ring.two {
  animation-delay: 1.2s;
  border-color: rgba(240,220,168,0.4);
}
.display-page.paused .voice-ring { animation-play-state: paused; }
@keyframes ring {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.subtitle-zone { width: 100%; max-width: 540px; }
.display-topic { margin-bottom: 16px; }
.display-topic .kb-name {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}
.display-topic h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 500;
}
.subtitle-text {
  font-size: 26px;
  line-height: 1.45;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(24,39,66,0.5);
}
.display-bottom {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.display-bottom .qr {
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  flex-shrink: 0;
}
.display-bottom .qr img,
.display-bottom .qr svg { width: 100%; height: 100%; display: block; }
.display-bottom .cta {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  text-align: left;
}
.display-bottom .progress {
  margin-top: 8px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}
.display-bottom .progress > div {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.3s;
}
.ticker {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  padding: 8px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 创建任务 ==================== */
.create-task-form {
  padding: 16px;
}
.create-task-form .field .label { font-size: 14px; color: var(--text); margin-bottom: 8px; }

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 24px);
  transform: translateX(-50%);
  background: rgba(24,39,66,0.82);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 13px;
  z-index: 1000;
  max-width: 80%;
  text-align: center;
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==================== 通用 ==================== */
.muted { color: var(--text-secondary); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.center { text-align: center; }
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* loading 页 */
.loading-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  flex-direction: column;
  gap: 12px;
}
.loading-page .spinner {
  border-color: rgba(217,169,79,0.2);
  border-top-color: var(--primary);
  width: 28px;
  height: 28px;
}

/* 段落列表 */
.seg-list { padding: 0 0 16px; }
.seg-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.seg-item .seg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.seg-item .seg-title { font-size: 14px; font-weight: 600; }
.seg-item .seg-text { font-size: 13px; color: var(--text); line-height: 1.5; }
.seg-item .seg-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }

/* 分段选择器 */
.task-selector {
  margin: 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
}
.task-selector select {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  min-height: 36px;
}

/* 大段文字 */
.text-block {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

/* ============================================================
   注册引导 / 员工工作台 / 列表 / 标签
   ============================================================ */
.onboarding-hero {
  text-align: center;
  padding: 24px 16px 16px;
}
.ob-emoji { font-size: 48px; line-height: 1; }
.ob-title { font-size: 22px; font-weight: 700; margin-top: 8px; color: var(--text); }
.ob-sub { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }

.staff-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.sc-num { font-size: 26px; font-weight: 700; color: var(--primary); }
.sc-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.staff-list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  gap: 8px;
}
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 15px; font-weight: 600; color: var(--text); word-break: break-all; }
.li-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.tag-success { background: #E8F5E9; color: #2E7D32; }
.tag-default { background: #EFEBE0; color: #7B8398; }
.tag-danger  { background: #FFEBEE; color: #C62828; }
.tag-info    { background: #E3F2FD; color: #1565C0; }

.empty-tip {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.btn.sm { padding: 6px 12px; font-size: 12px; min-height: 30px; }
.btn.ghost.sm { background: var(--border-soft); color: var(--text); }

