/* ============================================================
   styles.tokens.v2.css · 设计 tokens + 开关组件 + 左滑抽屉容器
   走查-16-W8 · 2026-10-27 · Trae
   ------------------------------------------------------------
   用途：Qoder 在 index.html 引一次即可被 Q-4(字号) / Q-5(switch) / Q-7(行卡) / Q-8(抽屉) 使用
   硬约束：只定义新类，不覆盖任何在用样式（不用 !important，不碰已有 class）
   ============================================================ */

/* --- 字号 tokens（标题 17 / 正文 15 / 辅助 13 / 大按钮 16） --- */
.qw-fs-title   { font-size: 17px; line-height: 1.45; }
.qw-fs-body    { font-size: 15px; line-height: 1.55; }
.qw-fs-helper  { font-size: 13px; line-height: 1.5;  opacity: .72; }
.qw-fs-btn-lg  { font-size: 16px; line-height: 1;    font-weight: 600; }

/* --- 行卡结构（Q-4 设置/帮助页统一用） --- */
.qw-row-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg, #fff);
  border: 1px solid var(--line, #eee);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background .15s, border-color .15s;
}
.qw-row-card:hover { background: var(--bg-hover, #f7f7f8); border-color: var(--purple-light, #e0d8ff); }
.qw-row-card:active { background: var(--bg-active, #f0edff); }

.qw-row-label { flex: 1; min-width: 0; }
.qw-row-title { font-size: 15px; font-weight: 500; }
.qw-row-sub   { font-size: 12px; opacity: .55; margin-top: 2px; }

/* --- 右侧开关（Q-5 通知设置用） --- */
.qw-switch {
  position: relative;
  display: inline-block;
  width: 44px; height: 26px;
  flex-shrink: 0;
  flex: 0 0 auto;
}
.qw-switch input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.qw-switch .track {
  position: absolute; inset: 0;
  background: #ddd;
  border-radius: 26px;
  cursor: pointer;
  transition: background .2s;
}
.qw-switch .track::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.qw-switch input:checked + .track {
  background: var(--purple, #5B4ACF);
}
.qw-switch input:checked + .track::before {
  transform: translateX(18px);
}
.qw-switch input:disabled + .track {
  background: #e5e5e5;
  cursor: not-allowed;
}
.qw-switch input:disabled + .track::before {
  background: #f5f5f5;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.qw-switch.is-wechat input:not(:checked):not(:disabled) + .track {
  /* 非微信端且开关未开 → 保持可操作态但不做任何特殊处理 */
}

/* --- 左滑抽屉容器（Q-8 三横线改抽屉用） --- */
/* 【2026-10-27 Media】底卡改「很透明的玻璃」——对齐首页右侧嘉宾收缩卡片那种通透感：
   半透明白 + 大半径模糊 + 饱和提升，能透出下面的页面而不是一块死白板。
   同时给 safe-area 留白，文案整体下移，不再顶在刘海/状态栏上。 */
.qw-drawer-left {
  position: fixed;
  top: 0; left: 0;
  width: 288px;
  height: 100vh;
  height: 100dvh;
  /* 【2026-10-27 Media 第6批】抽屉改极透明玻璃：之前白底 .56 叠在浅色页面上几乎成实色，
     打开像"整页被蒙一层"。降到 .34 + 更强模糊，让底层页面透出来，呈轻玻璃质感。 */
  background: rgba(255,255,255,.34);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid rgba(255,255,255,.55);
  box-shadow: 4px 0 30px rgba(58,40,120,.10), inset -1px 0 0 rgba(255,255,255,.35);
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 1300;
  overflow-y: auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.qw-drawer-left.open {
  transform: translateX(0);
}
.qw-drawer-mask {
  position: fixed; inset: 0;
  /* 【2026-10-27 Media 第6批】去掉"整页蒙一层"的暗化：遮罩只剩极淡一层用于点击关闭，
     不再压暗主页面（之前 .34 暗紫 + 2px 模糊，Media 反馈"全部页面都被蒙了一层"）。 */
  background: rgba(20,12,45,.08);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 1250;
}
.qw-drawer-mask.show {
  opacity: 1;
  pointer-events: auto;
}
/* 【2026-10-30 Media】极简模式下抽屉背后只有纯浅色渐变，34% 白玻璃几乎看不出层次，
   被误认为"点不开"。极简态换成更实的底，保证一眼看出抽屉已展开。 */
body.launcher-mode .qw-drawer-left {
  background: rgba(252,251,255,.96);
  box-shadow: 6px 0 34px rgba(58,40,120,.18);
}

/* 抽屉内部建议结构（不是强制，是给 Qoder 的参考） */
/* 【2026-10-27 Media】标题下移 + 加大留白，视觉上不再贴顶 */
.qw-drawer-header {
  padding: 30px 22px 16px;
  border-bottom: 1px solid rgba(120,100,180,.10);
}
.qw-drawer-list {
  list-style: none;
  padding: 8px 0 18px; margin: 0;
}
.qw-drawer-item {
  padding: 10px 18px;
  margin: 1px 10px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  color: #2A2633;
  transition: background .15s, box-shadow .15s;
}
.qw-drawer-item:active { background: rgba(123,104,238,.12); }
.qw-drawer-item.qw-divider-top {
  border-top: 1px solid rgba(120,100,180,.12);
  margin-top: 9px;
  padding-top: 13px;
  border-radius: 0 0 15px 15px;
}

/* --- 无 emoji 规则辅助类（Q-4 统一去表情用） --- */
.qw-no-emoji {
  /* 本身不改，Qoder 加这个类只是标记"此行不含 emoji"，
     方便 code review 时一眼看出哪些文案已清理 */
}

/* ===== 【豆包 2026-10-30】抽屉改版：用户卡片 + 分组 + 开关 + 分段选择 ===== */
.drawer-profile-card {
  display: flex; align-items: center; gap: 14px;
  margin: 14px 16px 6px; padding: 12px 16px;
  background: rgba(255,255,255,.55);
  border-radius: 18px;
  border: 1px solid rgba(123,104,238,.14);
  cursor: pointer;
  transition: background .15s;
}
.drawer-profile-card:active { background: rgba(255,255,255,.8); }
.dpc-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #7B68EE, #A878E2);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(123,104,238,.30);
}
.dpc-meta { flex: 1; min-width: 0; }
.dpc-name-row { display: flex; align-items: center; gap: 8px; }
.dpc-name { font-size: 16px; font-weight: 700; color: #1A1A26; }
.dpc-lv {
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #7B68EE, #9B59B6);
  padding: 2px 8px; border-radius: 999px;
}
.dpc-sub { font-size: 12px; color: #7a7290; margin-top: 3px; }

.drawer-group-title {
  padding: 13px 22px 5px;
  font-size: 14px; font-weight: 700;
  color: #8a7fa4; letter-spacing: .5px;
  text-transform: uppercase;
}

.drawer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 18px; margin: 1px 10px;
  border-radius: 13px;
}
.drawer-row-label { font-size: 15.5px; color: #2A2633; font-weight: 500; }

/* 分段选择器（常规 / 极简） */
.drawer-seg {
  display: inline-flex; background: rgba(123,104,238,.10);
  border-radius: 999px; padding: 3px;
}
.drawer-seg-btn {
  border: none; background: transparent;
  padding: 5px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #7a7290;
  cursor: pointer; transition: all .15s;
}
.drawer-seg-btn.active {
  background: #7B68EE; color: #fff;
  box-shadow: 0 2px 8px rgba(123,104,238,.35);
}

/* 开关 */
.drawer-switch { position: relative; display: inline-block; width: 44px; height: 26px; }
.drawer-switch input { opacity: 0; width: 0; height: 0; }
.drawer-switch-ui {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(120,100,160,.25);
  transition: background .2s;
  cursor: pointer;
}
.drawer-switch-ui::before {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.drawer-switch input:checked + .drawer-switch-ui {
  background: #7B68EE;
}
.drawer-switch input:checked + .drawer-switch-ui::before {
  transform: translateX(18px);
}

.drawer-item-badge {
  display: inline-block; margin-left: 6px;
  min-width: 18px; padding: 1px 6px; border-radius: 999px;
  background: #D4537E; color: #fff;
  font-size: 11px; font-weight: 700; text-align: center;
}
.drawer-logout { color: #D4537E; }
.drawer-logout:active { background: rgba(212,83,126,.12); }

/* ===== 【豆包 2026-10-30】极简 Launcher 全屏 overlay ===== */
.launcher-overlay {
  position: fixed; inset: 0; z-index: 900; /* 低于抽屉(1300)，极简模式下三杠菜单仍可点开 */
  background: linear-gradient(160deg, #f3efff 0%, #faf5ff 50%, #fff 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.launcher-greeting {
  font-size: 28px; font-weight: 800; color: #2A2633;
  text-align: center; line-height: 1.4;
  max-width: 320px; margin-bottom: 36px;
}
.launcher-input-wrap {
  position: relative; width: 100%; max-width: 360px;
  display: flex; align-items: center;
}
.launcher-input {
  width: 100%; height: 56px;
  border: 2px solid rgba(123,104,238,.25);
  border-radius: 999px;
  padding: 0 68px 0 24px;
  font-size: 16px; color: #2A2633;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 8px 28px rgba(123,104,238,.12);
}
.launcher-input:focus {
  border-color: #7B68EE;
  box-shadow: 0 8px 32px rgba(123,104,238,.22);
}
.launcher-mic {
  position: absolute; right: 6px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #7B68EE, #9B59B6);
  color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(123,104,238,.4);
}
/* 「确定」：极简页唯一的主按钮 */
.launcher-go {
  margin-top: 14px;
  min-width: 132px; height: 46px;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, #7B68EE, #9B59B6);
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(123,104,238,.35);
  transition: transform .15s, box-shadow .15s;
}
.launcher-go:active { transform: scale(.96); box-shadow: 0 4px 14px rgba(123,104,238,.3); }

.launcher-chips {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-top: 28px;
  max-width: 360px;
}
.launcher-chip {
  border: 1.5px solid rgba(123,104,238,.30);
  background: rgba(255,255,255,.8);
  color: #4A3AA8;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.launcher-chip:active {
  background: rgba(123,104,238,.15);
  transform: scale(.96);
}
.launcher-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px);
  left: 16px;
  border: none; background: rgba(255,255,255,.7);
  color: #7B68EE; font-size: 15px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(123,104,238,.15);
}

/* ===== 【2026-10-30 Nova】极简模式可达性修复 ===== */
/* 极简模式下「☰」是唯一入口：必须能盖过 Launcher 打开抽屉 */
.launcher-menu {
  display: none;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  left: 16px;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,.72);
  color: #4A3AA8; font-size: 18px; line-height: 1;
  cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(123,104,238,.15);
  z-index: 2; /* 【2026-10-30】压在 overlay 内容之上，确保一定能点开抽屉 */
}
body.launcher-mode .launcher-menu { display: flex; }
/* 极简模式下不显示「关闭」：关闭不改模式会让人以为已退出极简 */
body.launcher-mode .launcher-close { display: none; }
.launcher-hint {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  font-size: 12px; color: #9a90b0; letter-spacing: .5px;
}
body.launcher-mode .launcher-hint { display: block; }
body:not(.launcher-mode) .launcher-hint { display: none; }

/* 抽屉：桌面宠物改成可点行 */
.drawer-row-tap { cursor: pointer; }
.drawer-row-tap:active { background: rgba(123,104,238,.08); }
.drawer-row-hint {
  margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: rgba(123,104,238,.12); color: #7B68EE;
  font-size: 11px; font-weight: 700; vertical-align: middle;
}
.drawer-row-arrow { color: #b3aac6; font-size: 18px; line-height: 1; }
