/* ==========================================================================
   爆款内容工作台 · 手机端自适应 UI（mobile.css）
   版本：v1.0 ｜ 2026-08-20
   定位：纯覆盖式样式。在 index.html 的 <link> 末尾追加本文件即生效，
         不改动任何 HTML / JS 结构，删除引入即可完整回退。
   覆盖范围：≤760px 移动端全面改造 + ≤480px 小屏微调 + 触屏(hover:none)反馈
   当前设计契约：design.md；历史预览不作为发布源。
   ========================================================================== */

/* ============================ 1. 全局基调 ============================ */
@media (max-width: 760px) {
  /* 页面留白 + 底部导航安全区 */
  main { padding: 0 14px calc(92px + env(safe-area-inset-bottom)); }
  .shell { display: block; }

  /* 移动端禁用触屏 hover 弹跳（无 hover 语义），保留 :active 按压反馈 */
  @media (hover: none) {
    :is(button, a.button, a.nav-item, .capture-shortcut):not(.local-queue-main):hover {
      transform: none !important;
      animation: none !important;
      filter: none !important;
      box-shadow: none !important;
    }
  }

  /* iOS 输入聚焦不缩放：所有表单控件 ≥16px */
  input, select, textarea { font-size: 16px !important; }
}

/* ====================== 2. 底部导航：4 tab → 5 tab ====================== */
@media (max-width: 760px) {
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: auto; height: auto;
    flex-direction: row; align-items: stretch;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    z-index: 30;
    border-top: 1px solid var(--line); border-right: 0;
    background: color-mix(in srgb, var(--sidebar) 96%, transparent);
    backdrop-filter: blur(20px);
  }

  /* 恢复设置入口：桌面端被隐藏的 settings 按钮在底部导航重新出现 */
  .sidebar .nav-item[data-view="settings"] { display: flex; }

  nav {
    display: flex; width: 100%;
    justify-content: space-around;
    gap: 2px;
  }
  .sidebar .nav-item {
    flex: 1 1 0;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 2px;
    min-height: 48px;
    padding: 6px 2px;
    border-radius: 12px;
    /* 覆盖 styles.css 的 font-size:0!important，恢复 tab 文字标签 */
    font-size: 10px !important;
    line-height: 1.25;
    text-align: center;
    color: var(--t2);
  }
  .sidebar .nav-item .nav-icon { display: flex; }
  .sidebar .nav-item span { font-size: 21px !important; color: var(--t3); }
  .sidebar .nav-item.active {
    background: linear-gradient(180deg, color-mix(in srgb, var(--lime) 14%, transparent), transparent);
    color: var(--t1);
    /* 移动端底部导航惯例：active 高亮条在顶部 */
    box-shadow: inset 0 3px 0 var(--lime);
  }
  .sidebar .nav-item.active span { color: var(--lime); }

  /* 隐藏桌面侧边栏专属元素 */
  .brand, .sidebar-foot, .service-dot { display: none !important; }

  /* 底部 tab 最小命中区域 */
  .sidebar .nav-item:active { transform: scale(.96); }
}

/* ====================== 3. 顶部栏：标题 + 主操作 ====================== */
@media (max-width: 760px) {
  .topbar {
    height: auto;
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    padding: 14px 0 12px;
  }
  /* 英文 eyebrow 纯噪音，手机端隐藏 */
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 22px; margin: 0; }

  /* 顶部操作区：第二行，主按钮撑满 */
  .top-actions {
    display: flex; flex-wrap: nowrap; align-items: center;
    gap: 8px; justify-content: stretch; width: 100%;
  }
  .top-actions .date-field { display: none !important; }

  /* 检查微信：icon-only 圆形按钮 */
  .top-actions #refreshBtn {
    flex: 0 0 48px; width: 48px; height: 48px;
    border-radius: 999px;
    display: grid; place-items: center;
    padding: 0;
  }
  .top-actions #refreshBtn span { display: none; }
  .top-actions #refreshBtn i { margin: 0; }

  /* 立即抓取：主按钮，占满剩余宽度，进度条内嵌保留 */
  .top-actions .run-progress-card {
    flex: 1 1 auto; width: auto; min-width: 0;
    margin: 0;
  }
  .top-actions #runBtn {
    width: 100%; min-height: 48px;
    border-radius: 999px;
    font-size: 15px;
  }
  .top-actions .run-progress-card .run-status,
  .top-actions .run-progress-card .run-progress-track {
    display: none; /* 手机上进度百分比数字即可，避免按钮被撑高 */
  }

  /* 抓取进度弹层：全宽下拉 */
  .top-actions .run-progress-popover {
    left: 0; right: 0; width: auto;
    top: calc(100% + 8px);
    max-height: 70dvh;
    overflow: auto;
    border-radius: 18px;
  }

  /* 上次抓取时间：并入标题行下方 */
  .last-capture { font-size: 11px; margin-top: 2px; }
}

/* ====================== 4. 今日榜单（Dashboard） ====================== */
@media (max-width: 760px) {
  /* --- Hero 区：恢复封面，标题/数据并排 --- */
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-card { grid-column: 1 / -1; padding: 18px; min-height: 0; }

  .hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 14px;
    align-items: center;
  }
  .hero-card .hero-copy { min-width: 0; }
  .hero-card .hero-kicker { margin: 0 0 6px !important; font-size: 10px !important; }
  .hero-card .hero-copy h2 {
    font-size: 19px; line-height: 1.35;
    margin: 0 0 6px;
    -webkit-line-clamp: 2;
  }
  .hero-card .hero-copy p { font-size: 12px; line-height: 1.5; margin: 0; }

  /* 封面恢复显示（桌面版在 760px 被隐藏） */
  .hero-visual {
    display: flex !important;
    flex-direction: column; align-items: center;
    gap: 8px;
    grid-column: 2; grid-row: 1;
  }
  .hero-cover { width: 68px; height: 96px; border-radius: 9px; }
  .hero-hit-stats { min-width: 0; display: grid; gap: 1px; text-align: center; }
  .hero-hit-stats b { font-size: 20px; }
  .hero-hit-stats span { font-size: 9px; }
  .hero-hit-stats strong { font-size: 14px; margin-top: 2px; }
  .hero-hit-stats small { font-size: 10px; }

  /* 两个指标卡：并排 2 列 */
  .metric-card { min-height: 0; padding: 16px; }
  .metric-card > span { font-size: 12px; }
  .metric-card strong { font-size: 30px; }
  .metric-card small { font-size: 11px; }

  /* 状态条：横向滚动，不换行撑高 */
  .hero-status-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    justify-content: flex-start;
    gap: 18px;
    margin-top: 10px;
    scrollbar-width: none;
  }
  .hero-status-strip::-webkit-scrollbar { display: none; }

  /* --- 榜单：8 列表格 → 单列卡片流 --- */
  .leaderboard-panel { padding: 10px; }
  .table-wrap { overflow: visible; }

  #leaderboard thead { display: none; }

  #leaderboard tr[data-id] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "video status"
      "stats1 stats2"
      "stats3 stats4";
    gap: 8px 10px;
    position: relative;
    margin: 0 0 12px;
    padding: 13px 13px 11px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow-sm, none);
    cursor: pointer;
    transition: border-color .18s ease;
  }
  #leaderboard tr[data-id]:active { transform: scale(.985); }

  /* 清空 td 默认表格盒模型 */
  #leaderboard tr[data-id] td { display: block; padding: 0; border: 0; }

  /* 排名：左上角徽标 */
  #leaderboard tr[data-id] td:nth-child(1) {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: var(--elevated);
    font-family: var(--font-mono);
  }
  #leaderboard tr[data-id] td:nth-child(1) .rank-num {
    font-size: 14px; font-weight: 800;
  }
  #leaderboard tr[data-id] td:nth-child(1) .rank-num.top { color: var(--orange); }

  /* 视频主区：标题 + 账号/老师 + 运营人 */
  #leaderboard tr[data-id] td:nth-child(2) { grid-area: video; padding-left: 40px; min-width: 0; }
  #leaderboard .video-cell { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
  #leaderboard .cover-thumb { width: 42px; height: 58px; border-radius: 7px; flex: 0 0 auto; }
  #leaderboard .video-meta { min-width: 0; }
  #leaderboard .video-meta strong {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: 14px; line-height: 1.45;
  }
  #leaderboard .video-meta small { font-size: 11px; }
  #leaderboard .operator-line { font-size: 11px; margin-top: 4px; }
  #leaderboard .mapping-source { font-size: 10px; padding: 2px 6px; margin-left: 4px; }
  #leaderboard .mapping-edit { font-size: 11px; margin-left: 6px; }

  /* 状态 pill：右上角 */
  #leaderboard tr[data-id] td:nth-child(7) { grid-area: status; align-self: start; }
  #leaderboard .status-pill { font-size: 10px; padding: 4px 8px; border-radius: 999px; }

  /* 数字列 → 底部 2×2 数据网格（订单/成交/消耗/ROI） */
  #leaderboard tr[data-id] td:nth-child(3) { grid-area: stats1; }
  #leaderboard tr[data-id] td:nth-child(4) { grid-area: stats2; }
  #leaderboard tr[data-id] td:nth-child(5) { grid-area: stats3; }
  #leaderboard tr[data-id] td:nth-child(6) { grid-area: stats4; }
  #leaderboard tr[data-id] td:nth-child(3),
  #leaderboard tr[data-id] td:nth-child(4),
  #leaderboard tr[data-id] td:nth-child(5),
  #leaderboard tr[data-id] td:nth-child(6) {
    display: block;
    min-width: 0;
    padding: 7px 10px 8px;
    border-radius: 10px;
    background: var(--elevated);
    font-size: 13px;
    font-weight: 700;
    color: var(--t1);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #leaderboard tr[data-id] td:nth-child(3)::before { content: "订单"; }
  #leaderboard tr[data-id] td:nth-child(4)::before { content: "成交"; }
  #leaderboard tr[data-id] td:nth-child(5)::before { content: "消耗"; }
  #leaderboard tr[data-id] td:nth-child(6)::before { content: "ROI"; }
  #leaderboard tr[data-id] td:nth-child(3)::before,
  #leaderboard tr[data-id] td:nth-child(4)::before,
  #leaderboard tr[data-id] td:nth-child(5)::before,
  #leaderboard tr[data-id] td:nth-child(6)::before {
    display: block;
    margin-bottom: 2px;
    font-size: 9px; font-weight: 600;
    letter-spacing: .08em;
    color: var(--t3);
  }
  #leaderboard .number-strong { font-size: 15px; }
  #leaderboard .trend-line { display: block; font-size: 10px; margin-top: 2px; }
  #leaderboard .appearance-days { font-size: 10px; }
  #leaderboard .arrow { display: none; }

  /* 空态 / 缺日期提示整行卡片化 */
  #leaderboard td.empty,
  #leaderboard tr td.empty.missing-range {
    display: block; padding: 28px 16px;
    width: 100%; max-width: 100%;
    border: 1px dashed var(--line);
    border-radius: 16px;
    margin: 12px 0;
    background: transparent;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #leaderboard tr:not([data-id]) {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  /* --- 榜单工具栏：按钮换行全宽 --- */
  .section-head { flex-wrap: wrap; gap: 8px; align-items: flex-start; }
  .section-head .row-actions { width: 100%; flex-wrap: wrap; gap: 8px; }
  .section-head .row-actions .button { flex: 1 1 auto; min-height: 44px; }
  .section-head .row-actions .legend { width: 100%; }

  /* --- 处理链路 / 快捷入口 --- */
  .dashboard-bottom { gap: 12px; }
  .pipeline-workflow { grid-template-columns: 1fr; gap: 14px; }
  .capture-shortcut-grid { grid-template-columns: 1fr 1fr; }
  .capture-shortcut { min-height: 60px; padding: 12px; }
  .account-rule { display: none !important; }
}

/* ====================== 5. 素材抓取（Capture） ====================== */
@media (max-width: 760px) {
  .two-columns { gap: 12px; }
  /* 释放桌面端 calc(100vh-220px) 内部滚动限制 */
  #view-capture .tool-card { max-height: none; display: block; }
  #view-capture .tool-card > .wx-title-search,
  #view-capture #wxSearchResults,
  #view-capture #douyinResult { flex: none; overflow: visible; max-height: none; }

  .tool-card { padding: 16px; }
  .tool-heading h3 { font-size: 16px; }
  .tool-heading p { font-size: 12px; line-height: 1.6; }

  /* 搜索区按钮全宽 */
  .wx-title-search .button.primary,
  #view-capture .button.primary { width: 100%; min-height: 48px; }

  /* 本地转写面板 */
  .local-transcribe-panel { padding: 16px; }
  .local-transcribe-panel > .panel-title { flex-direction: column; align-items: flex-start; gap: 10px; }
  .local-transcribe-panel > .panel-title > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .local-transcribe-panel .local-transcribe-description {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .local-transcribe-panel .model-select { width: 100%; }
  .local-transcribe-panel .model-select select { width: 100%; min-height: 44px; }
  .local-video-drop { min-height: 150px; padding: 18px; }
  .local-queue-actions .button { min-height: 48px; }
  .local-transcript-result { min-height: 200px; font-size: 14px; line-height: 1.8; }
  .local-result-head .compact-actions .button { min-height: 40px; padding: 8px 12px; }
}

/* ====================== 6. 下载管理（Download） ====================== */
@media (max-width: 760px) {
  .section-head .model-select { width: 100%; }
  .section-head .model-select select { width: 100%; min-height: 44px; }
  #refreshDownloadsBtn { flex: 1 1 auto; min-height: 44px; }

  .download-manager-note {
    flex-direction: column; align-items: stretch;
    gap: 12px;
  }
  .download-manager-note .tool-logo { display: none; }
  #wxCapturesBtn { margin-left: 0; width: 100%; min-height: 44px; }
  .download-job-list .download-job { padding: 12px; }
}

/* ====================== 7. 文案库（Library） ====================== */
@media (max-width: 760px) {
  .copywriter-head { flex-direction: column; align-items: stretch; gap: 10px; }

  /* tabs → 横向滑动容器 */
  .copywriter-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding-bottom: 2px;
  }
  .copywriter-tabs::-webkit-scrollbar { display: none; }
  .copywriter-tabs button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    white-space: nowrap;
  }

  /* 工具栏：全宽换行 */
  .library-toolbar { width: 100%; flex-wrap: wrap; gap: 8px; justify-content: stretch; }
  .library-assets-panel > .library-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }
  .library-filter,
  .library-assets-panel > .library-toolbar .library-filter {
    width: 100%;
    min-width: 0;
    height: 44px;
  }
  .library-toolbar .search,
  .library-assets-panel > .library-toolbar .search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    height: 44px;
    font-size: 16px;
  }

  /* 内容单列 */
  .library-layout { grid-template-columns: 1fr; gap: 12px; }
   /* 弹药库上移，紧邻操作区 */

  .library-copy-card { padding: 14px; }
  .library-copy-head > strong { font-size: 14px; }
  .library-copy-meta { gap: 4px 12px; font-size: 11px; }

  /* 裂变 / 制造工具区 */
  
  
  
  
  

  /* 标题裂变：grid 布局改 2 列 */
  .title-fission-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
  }
  .title-fission-controls .title-seed-label { grid-column: 1 / -1; }
  .title-fission-controls > .button { grid-column: 1 / -1; width: 100%; height: 48px; }
  .title-fission-controls select,
  .title-fission-controls input { min-height: 44px; }
  #generateTitlesBtn { width: 100%; min-height: 48px; }

  
  
  
  #generateCopiesBtn { min-height: 48px; }
  
  
}

/* ====================== 8. 设置（Settings） ====================== */
@media (max-width: 760px) {
  .settings-status-grid { grid-template-columns: 1fr; gap: 10px; }
  .settings-status-card { padding: 16px; }
  .settings-advanced-list { gap: 10px; }
  .settings-advanced-card { padding: 0; }
  .settings-advanced-card summary { min-height: 56px; padding: 14px; }
  .settings-advanced-body { padding: 14px; }
  .settings-advanced-body .button { min-height: 44px; }
  .wechat-admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .wechat-admin-actions .button { min-height: 44px; width: 100%; }
  .wechat-admin-actions #adminLogoutBtn { grid-column: 1 / -1; }
  .ai-provider-list .provider-row,
  .ai-provider-list .provider-card { padding: 12px; }
}

/* ====================== 9. 弹窗 → 全屏底部抽屉 ====================== */
@media (max-width: 760px) {
  .modal-backdrop {
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  .modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 92dvh;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    /* 底部滑入动效 */
    transform: translateY(100%);
    transition: transform .24s cubic-bezier(.32, .72, .28, 1), opacity .2s ease;
  }
  .modal-backdrop.open .modal { transform: translateY(0); }

  .modal header {
    flex: 0 0 auto;
    padding: 16px 18px 14px;
    border-radius: 20px 20px 0 0;
    position: sticky; top: 0; z-index: 3;
    background: color-mix(in srgb, var(--drawer-bg) 96%, transparent);
    backdrop-filter: blur(12px);
  }
  .modal header h2 { font-size: 19px; margin: 0 0 3px; }
  .modal header .muted { font-size: 11px; line-height: 1.5; }
  .modal header .icon-button { width: 40px; height: 40px; font-size: 22px; flex: 0 0 40px; }
  .modal > div:not(.modal-backdrop) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

  /* 底部操作区：网格化、按钮全高、safe-area 保护 */
  .modal footer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-radius: 0;
    position: sticky; bottom: 0; z-index: 3;
    background: color-mix(in srgb, var(--drawer-bg) 96%, transparent);
    backdrop-filter: blur(12px);
  }
  .modal footer .button {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 12px 10px;
    white-space: normal;
  }
  .modal footer .button:only-child { grid-column: 1 / -1; }

  /* 详情抽屉操作按钮 */
  #detailModal footer { grid-template-columns: 1fr 1fr; }
  #detailModal footer .button { font-size: 13px; }

  /* 校对运营人弹窗：删除按钮独占一行 */
  #mappingModal footer { grid-template-columns: 1fr 1fr; }
  #mappingModal footer #deleteMappingBtn { grid-column: 1 / -1; background: var(--danger); color: #fff; border: 0; }
  #mappingModal footer .button { min-height: 46px; }

  /* 表单类弹窗：输入框全宽 46px+ */
  .auth-form, .ai-provider-form, .mapping-form, .wechat-login-body { padding: 18px; }
  .auth-form label, .ai-provider-form label, .mapping-form label { gap: 6px; }
  .auth-form .input, .ai-provider-form .input, .mapping-form .input { min-height: 46px; width: 100%; }
  .ai-provider-form select { min-height: 44px; }
  .ai-provider-form label.ai-provider-wide { grid-column: 1 / -1; }

  /* 微信登录弹窗 */
  .wechat-login-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .wechat-login-actions .button { width: 100%; min-height: 46px; }
  .wechat-qr-wrap img { width: min(200px, 52vw); }

  /* 下载建议弹窗 */
  .wx-download-prompt-actions { flex-direction: column; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .wx-download-prompt-actions .button { width: 100%; min-height: 48px; }

  /* 播报详情弹窗 */
  .report-modal-body { padding: 14px; }
  .report-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .report-actions .button { min-height: 46px; }
  .workspace-report-preview { min-height: 300px; font-size: 12px; }

  /* 待下载捕获记录 */
  .wx-captures-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .wx-captures-actions .button { min-height: 44px; }
  .wx-captures-actions #clearWxBtn { grid-column: 1 / -1; }

  /* 待手动打开的视频 */
  .pending-videos-modal { height: auto; max-height: 92dvh; }
  .pending-video-list { padding: 14px; }
  .pending-video-item { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .pending-video-actions { grid-column: 2; justify-self: start; }

  /* 视频播放弹窗 */
  .video-player-body { padding: 14px; }
  .video-player-body video { width: 100%; max-height: 68dvh; border-radius: 12px; }

  /* AI 供应商弹窗 footer */
  #aiProviderModal footer { grid-template-columns: 1fr 1fr; }
}

/* ====================== 10. 小屏微调（≤480px） ====================== */
@media (max-width: 480px) {
  main { padding: 0 12px calc(88px + env(safe-area-inset-bottom)); }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { grid-column: auto; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 28px; }

  /* 榜单数据 2×2 → 订单/成交/消耗/ROI 保持 2×2（360px 仍可容纳） */
  #leaderboard tr[data-id] td:nth-child(3),
  #leaderboard tr[data-id] td:nth-child(4),
  #leaderboard tr[data-id] td:nth-child(5),
  #leaderboard tr[data-id] td:nth-child(6) { padding: 7px 8px; font-size: 12px; }

  .capture-shortcut-grid { grid-template-columns: 1fr; }
  
  .title-fission-controls { grid-template-columns: 1fr; }
  
  .local-queue-actions { grid-template-columns: 1fr; }

  /* 弹窗 footer 在极窄屏下退化为单列 */
  .modal footer { grid-template-columns: 1fr; }
  .modal footer .button:only-child,
  #mappingModal footer #deleteMappingBtn { grid-column: auto; }
  #detailModal footer,
  #mappingModal footer,
  #aiProviderModal footer { grid-template-columns: 1fr 1fr; } /* 两列仍优于一列，保留 */
  #mappingModal footer #deleteMappingBtn { grid-column: 1 / -1; }

  .wechat-admin-actions { grid-template-columns: 1fr; }
  .wechat-admin-actions #adminLogoutBtn { grid-column: auto; }
}

/* ====================== 11. 主题切换按钮（移动端定位） ====================== */
@media (max-width: 760px) {
  .theme-toggle {
    right: 14px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    width: 40px; height: 40px;
    font-size: 15px;
  }
}

/* ====================== 12. 触屏设备通用反馈 ====================== */
@media (max-width: 760px) and (hover: none) {
  :is(button, a.button, .capture-shortcut):not(.local-queue-main):active {
    transform: scale(.97);
    animation: none !important;
  }
}
