/* =========================================================
   LifeEcho · Android 移动端
   只作用于 ≤760px；桌面端所有规则保持原样。
   ========================================================= */

/* 移动端专属区块在桌面端不出现（路由页面里始终渲染，靠这里藏起来） */
.m-today, .m-tasks, .m-cal, .m-more-page, .m-me, .m-fab, .m-page-head { display: none; }
.rv-mobile { display: none; }

/* 桌面端始终不应看到移动专属的 FAB 图标按钮 */
.m-fab { display: none; }
.inbox-more { display: none; }

/* ---------- 连续语音浮条：点一下麦克风后出现，播完自动接着听 ----------
   桌面与手机共用；只改位置与最大宽度，不另起一套皮肤。
   没有全屏遮罩：说话时对话流、输入框和结束按钮都还要能点。 */
.mvs {
  position: fixed; left: 50%; bottom: 168px; z-index: 70;
  transform: translateX(-50%);
  display: flex; justify-content: center;
  width: max-content; max-width: calc(100vw - 28px);
  pointer-events: none;
}
.mvs[hidden] { display: none; }
.mvs-panel {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 9px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 14px 36px rgba(16, 24, 32, .16), 0 2px 6px rgba(16, 24, 32, .06);
  animation: mvs-in .2s var(--ease);
}
.mvs-live {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: mvs-pulse 1.6s ease-out infinite;
}
.mvs-bars { flex: none; display: flex; align-items: center; gap: 2px; height: 20px; }
.mvs-bars i {
  width: 3px; border-radius: 2px; background: var(--ink-3);
  transform-origin: center; animation: mvs-b .95s ease-in-out infinite;
}
.mvs-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mvs-hint { font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--ink); white-space: nowrap; }
.mvs-sub { font-size: 11.5px; line-height: 1.25; color: var(--ink-3); white-space: nowrap; }
.mvs-stop {
  flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-sunk); color: var(--ink-2);
  -webkit-tap-highlight-color: transparent;
}
.mvs-stop .ic { width: 14px; height: 14px; }
.mvs-stop:active { transform: scale(.92); }
.mvs-open {
  flex: none; width: 26px; height: 30px; padding: 0; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--ink-3);
  -webkit-tap-highlight-color: transparent;
}
.mvs-open .ic { width: 14px; height: 14px; transform: rotate(180deg); }
.mvs-open:active { transform: scale(.92); }
.mvs.is-thinking .mvs-bars i { animation-play-state: paused; transform: scaleY(.4); }
.mvs.is-speaking .mvs-bars i { background: var(--accent); }
@keyframes mvs-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes mvs-b { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes mvs-pulse { 0% { box-shadow: 0 0 0 0 rgba(78, 106, 134, .35); } 100% { box-shadow: 0 0 0 7px rgba(78, 106, 134, 0); } }
@media (prefers-reduced-motion: reduce) {
  .mvs-panel, .mvs-bars i, .mvs-live { animation: none; }
}

@media (max-width: 760px) {
  /* 浮条压在输入区之上、底部导航之上，不挡对话流 */
  .mvs { bottom: calc(var(--m-nav-h) + 86px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }

  /* ---------- 1. 移动端令牌（primitive → semantic → component） ---------- */
  :root {
    /* primitive：默认底色 = 雾蓝灰，与花青强调色同色温 */
    --m-paper: #EDF1F4;
    --m-surface: #FBFCFD;
    --m-soft: #E3E8EC;
    --m-ink: #172029;
    --m-ink-2: #6B747D;
    --m-ink-3: #98A1A9;
    --m-border: #DAE2E8;
    --m-indigo: #4E6A86;
    --m-indigo-soft: #E9EEF2;
    --m-sage: #879786;
    --m-sage-soft: #E9EEE9;
    --m-sand: #9A8E82;
    --m-sand-soft: #F1ECE6;

    /* radius / elevation / motion：与参考稿同一套刻度 */
    --m-r-sheet: 24px;
    --m-r-lg: 16px;
    --m-r-card: 14px;
    --m-r-btn: 10px;
    --m-r-sm: 8px;
    --m-shadow: 0 8px 30px rgba(0, 0, 0, .04);
    --m-shadow-nav: 0 10px 34px rgba(28, 28, 28, .08);
    --m-ease: cubic-bezier(.22, 1, .36, 1);
    --m-nav-h: 62px;
    --m-nav-bottom: max(10px, env(safe-area-inset-bottom));
    --m-gutter: 18px;

    /* semantic：把既有页面的语义令牌接到移动端灰阶上 */
    --bg: var(--m-paper);
    --bg-sunk: var(--m-soft);
    --slab: var(--m-paper);
    --card: var(--m-surface);
    --card-hover: #F6F9FB;
    --line: var(--m-border);
    --line-strong: #C9D5DD;
    --ink: var(--m-ink);
    --ink-2: var(--m-ink-2);
    --ink-3: var(--m-ink-3);
    --ink-4: #B2BBC2;
    --primary: var(--m-ink);
    --primary-ink: var(--m-ink);
    --primary-soft: var(--m-indigo-soft);
    --primary-line: #D5DEE6;
    /* 手机端默认强调色改用花青（靛蓝墨），与水墨漂流瓶同源；桌面绿不硬搬 */
    --accent: var(--m-indigo);
    --accent-strong: #33475E;
    --accent-soft: var(--m-indigo-soft);
    --accent-line: #D5DEE6;
    --accent-fg: #ffffff;
    --lavender: var(--m-indigo);
    --lavender-soft: var(--m-indigo-soft);
    --done: var(--m-sage);
    --done-soft: var(--m-sage-soft);
    --progress: var(--m-sage);
    --urgent: #9B6F6F;
    --urgent-soft: #F4ECEA;
    --rose: #A98388;
    --rose-soft: #F4EBEC;
    --orange: var(--m-sand);
    --orange-soft: var(--m-sand-soft);
    --area-work: var(--m-indigo);
    --area-work-soft: var(--m-indigo-soft);
    --area-study: var(--m-sand);
    --area-study-soft: var(--m-sand-soft);
    --area-life: var(--m-sage);
    --area-life-soft: var(--m-sage-soft);
    --area-health: #9B8175;
    --area-health-soft: #F1E9E4;
    --sea-top: #EFF2F4;
    --sea-mid: #E3E9ED;
    --sea-deep: #D1DBE1;
    --warm-paper: #FCFBF8;
    --shadow-1: 0 1px 2px rgba(28, 28, 28, .03);
    --shadow-2: var(--m-shadow);
    --shadow-3: 0 18px 44px -18px rgba(28, 28, 28, .22);
    --shadow-workspace: none;
    --scrim: rgba(28, 28, 25, .26);
    --toast-bg: #242422;
    --toast-ink: #FAFAF8;
    --view-pad-x: var(--m-gutter);
    --r-md: var(--m-r-btn);
    --r-lg: var(--m-r-card);
    --r-xl: var(--m-r-lg);
    --r-workspace: var(--m-r-sheet);
    --shell-pad: 0px;
  }

  [data-mode="dark"] {
    --m-paper: #10151A;
    --m-surface: #191F26;
    --m-soft: #212932;
    --m-ink: #E6EDF3;
    --m-ink-2: #A2AEB9;
    --m-ink-3: #8B96A1;
    --m-border: #29333D;
    --m-indigo: #8FA9C4;
    --m-indigo-soft: #222B34;
    --m-sage: #93A492;
    --m-sage-soft: #232B25;
    --m-sand: #B3A496;
    --m-sand-soft: #2B2723;
    --m-shadow: 0 8px 30px rgba(0, 0, 0, .22);
    --m-shadow-nav: 0 12px 34px rgba(0, 0, 0, .34);
    --bg: var(--m-paper);
    --bg-sunk: var(--m-soft);
    --slab: var(--m-paper);
    --card: var(--m-surface);
    --card-hover: #1E252D;
    --line: var(--m-border);
    --line-strong: #394652;
    --ink: var(--m-ink);
    --ink-2: var(--m-ink-2);
    --ink-3: var(--m-ink-3);
    --ink-4: #76828D;
    --primary: #EDEDEA;
    --primary-ink: #FAFAF8;
    --primary-soft: var(--m-indigo-soft);
    --primary-line: #323D48;
    --accent: var(--m-indigo);
    --accent-strong: var(--m-ink);
    --accent-soft: var(--m-indigo-soft);
    --accent-line: #323D48;
    --accent-fg: #1C1C1E;
    --lavender: var(--m-indigo);
    --lavender-soft: var(--m-indigo-soft);
    --done: var(--m-sage);
    --done-soft: var(--m-sage-soft);
    --progress: var(--m-sage);
    --urgent: #C08A8A;
    --urgent-soft: #2E2424;
    --rose: #C39A9F;
    --rose-soft: #2E2527;
    --orange: var(--m-sand);
    --orange-soft: var(--m-sand-soft);
    --area-work: var(--m-indigo);
    --area-work-soft: var(--m-indigo-soft);
    --area-study: var(--m-sand);
    --area-study-soft: var(--m-sand-soft);
    --area-life: var(--m-sage);
    --area-life-soft: var(--m-sage-soft);
    --area-health: #C0A294;
    --area-health-soft: #2E2622;
    --sea-top: #15181C;
    --sea-mid: #1B2129;
    --sea-deep: #232D38;
    --warm-paper: #1A1A1C;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .2);
    --shadow-2: var(--m-shadow);
    --shadow-3: 0 18px 44px -18px rgba(0, 0, 0, .6);
    --scrim: rgba(0, 0, 0, .42);
    --toast-bg: #EDEDEA;
    --toast-ink: #1C1C1E;
  }


  /* ---------- 2. 壳层：无 Android Toolbar，内容直接开始 ---------- */
  html, body { background: var(--m-paper); }
  .shell, .shell-slab { background: var(--m-paper); }
  .shell-slab { border-radius: 0; box-shadow: none; }
  .topbar { display: none; }
  .sidebar { display: none; }
  .side-resizer { display: none; }
  .mobile-nav { display: none; }

  .view {
    padding: calc(var(--m-gutter) / 2) var(--m-gutter)
      calc(var(--m-nav-h) + 100px + env(safe-area-inset-bottom));
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  .page { max-width: 620px; margin: 0 auto; }
  .page:not(:has(.page-head)) { padding-top: 8px; }
  .m-desktop { display: none; }

  body { font-size: 15px; }
  .page.enter { animation-duration: .22s; }

  /* 通用页头（项目 / 习惯 / 专注 / 设置等仍复用桌面结构的页面） */
  .page-head {
    position: static; z-index: auto;
    display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
    margin: 0; padding: 16px 2px 16px;
    background: none;
  }
  .page-title { font-size: 26px; line-height: 1.16; font-weight: 600; letter-spacing: -.02em; }
  .page-sub { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--m-ink-2); }
  .page-actions { width: 100%; margin-left: 0; gap: 8px; flex-wrap: wrap; }
  .page-actions > .seg { flex: 1 1 auto; max-width: 100%; overflow-x: auto; }
  .page-actions > .btn { flex: 0 0 auto; }

  /* 字体与控件密度 */
  .card { border-radius: var(--m-r-card); box-shadow: none; border-color: var(--m-border); }
  .card-pad { padding: 16px; }
  .eyebrow { font-size: 13px; color: var(--m-ink-2); }
  .mono { letter-spacing: 0; }
  .muted { color: var(--m-ink-3); }
  .small { font-size: 12px; }

  .btn { height: 44px; min-height: 44px; padding: 0 16px; border-radius: var(--m-r-btn); font-size: 14px; }
  .btn-sm { height: 44px; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
  .btn:has(> .ic:only-child) { min-width: 44px; }
  .btn-primary { background: var(--m-ink); border-color: var(--m-ink); color: var(--m-surface); }
  .btn-primary .ic { color: var(--m-surface); }
  .btn-primary:hover { background: var(--m-ink); border-color: var(--m-ink); transform: none; }
  .btn-ghost { color: var(--m-ink-2); }
  .icon-btn { min-width: 44px; min-height: 44px; border-radius: 12px; }
  .icon-btn.sm { min-width: 44px; min-height: 44px; }
  .seg { border-radius: 12px; padding: 3px; }
  .seg button { height: 44px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
  .chip { height: 30px; font-size: 12px; }
  .chip-btn { height: 44px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
  button.chip, a.chip { min-height: 44px; }
  .chip-tag { padding: 0 11px; }
  .input-bare { min-height: 44px; }
  .radio-chip span { height: 44px; }
  .input, .select, .textarea { min-height: 44px; font-size: 16px; border-radius: var(--m-r-btn); background: var(--m-soft); border-color: transparent; }
  .textarea { min-height: 100px; padding: 12px 14px; }
  .input:focus, .select:focus, .textarea:focus { border-color: var(--primary-line); background: var(--m-surface); box-shadow: 0 0 0 3px var(--m-indigo-soft); }
  .field > label, .label { font-size: 12px; color: var(--m-ink-2); }
  .field { gap: 6px; }

  /* 通用任务行：触控面积与正文可读性 */
  .task-row { padding: 12px; gap: 12px; border-radius: 12px; }
  .task-row .t-title { font-size: 15px; }
  .task-row .t-time { width: 42px; }
  .task-row .t-field { padding: 0 10px; max-width: none; }
  .check { width: 22px; height: 22px; }
  .check::before { content: ""; position: absolute; inset: -11px; }
  .task-row .t-actions { opacity: 1; }

  /* 收件箱：常用动作留在行内，其余收进「更多」 */
  .inbox-actions { overflow: visible; }
  .inbox-actions .ib-secondary { display: none; }
  .inbox-actions .inbox-more { display: grid; opacity: 1; }
  .inbox-actions .btn { min-height: 44px; }
  .inbox-actions .icon-btn { width: 44px; height: 44px; }
  .inbox-main { min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
  .tg-list { padding: 4px; }
  .tg-head { margin-bottom: 8px; }
  .tg-title { font-size: 16px; }

  .empty { padding: 48px 20px; }
  .divider { margin: 14px 0; }

  /* ---------- 3. 底部导航：悬浮胶囊 ---------- */
  #mobile-nav {
    position: fixed; z-index: 40;
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: var(--m-nav-bottom);
    height: var(--m-nav-h);
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--m-border) 88%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--m-surface) 88%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: var(--m-shadow-nav);
  }
  .m-tab {
    height: 50px; min-height: 50px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 0; border-radius: 15px;
    font-size: 11px; line-height: 1.1; letter-spacing: .01em;
    color: var(--m-ink-3);
    transition: background .18s var(--m-ease), color .18s var(--m-ease);
  }
  .m-tab .ic { stroke-width: 1.7; }
  .m-tab[aria-current="page"] {
    color: var(--accent-strong);
    background: var(--accent-soft);
  }
  [data-mode="dark"] .m-tab[aria-current="page"] { color: var(--accent-strong); }
  /* 触屏点完 tab 焦点会留在上面，全局 :focus-visible 的方形外描边和 Dock 很冲；
     换成贴合 tab 圆角的柔光晕：box-shadow 沿 border-radius 走，边缘发雾不发硬 */
  .m-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
  }

  /* v22：Dock 只剩 tab 一行。tab 收进 .m-tabs 包装，五个格子在这一层排。
     grid-column: 1 / -1 是必需的——Dock 本身仍是五列网格（日光/玻璃皮肤写死的），
     不跨满的话 .m-tabs 只占第一列，五个 tab 会被挤成 14px 宽、文字竖排。
     原来这里的 .m-cmd 指令条（打字 + ➕ + 长按说话）已整体搬进助理页的输入区，
     键盘抬起改由 css/assistant-chat.css 的 .ac-comp 负责。 */
  .m-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-column: 1 / -1; align-items: center; }

  /* 连续语音浮条的位置在文件顶部统一定义（桌面/手机共用），这里不再重复。 */

  /* ---------- 4. 悬浮按钮 / Toast ---------- */
  #fab.fab-stack {
    display: flex; position: fixed; z-index: 31;
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(var(--m-nav-h) + 26px + env(safe-area-inset-bottom));
    align-items: center; gap: 10px;
  }
  #fab .fab-ai, #fab .fab-desk { display: none; }
  .m-fab {
    display: grid; place-items: center;
    width: 56px; height: 56px; padding: 0;
    border-radius: 50%;
    background: var(--m-ink); color: var(--m-paper);
    border: 0;
    box-shadow: 0 10px 26px rgba(28, 28, 28, .16);
    transition: transform .16s var(--m-ease), box-shadow .16s var(--m-ease);
  }
  .m-fab:active { transform: scale(.94); }
  [data-mode="dark"] .m-fab { background: #EDEDEA; color: #1C1C1E; box-shadow: 0 10px 26px rgba(0, 0, 0, .4); }
  body:has(.page-today) .fab-stack { display: flex; }
  /* v22：助理页的新建入口收进了对话输入区的 ➕，悬浮键再压上去只会挡住输入框 */
  body:has(.page-assistant) #fab.fab-stack { display: none; }
  /* 资料页整屏都是可点的资料项，新建按钮压在上面只会挡住内容 */
  body:has(.page-profile) #fab.fab-stack { display: none; }

  .toasts {
    bottom: calc(var(--m-nav-h) + 26px + 56px + 12px + env(safe-area-inset-bottom));
    width: calc(100vw - 36px);
    max-width: 480px;
  }
  .toast { width: auto; max-width: 100%; border-radius: 14px; font-size: 13px; }

  /* ---------- 5. 今天 ---------- */
  .m-today { display: block; padding: 8px 2px 0; }
  .m-hero { padding: 10px 0 26px; }
  .m-hero-kicker { font-size: 13px; color: var(--m-ink-2); letter-spacing: .01em; }
  .m-hero-title {
    margin-top: 8px;
    font-size: 31px; line-height: 1.18; font-weight: 600; letter-spacing: -.03em;
    color: var(--m-ink);
  }
  .m-hero-summary { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--m-ink-2); }
  .m-progress { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
  .m-progress-track { flex: 1; height: 4px; border-radius: 999px; background: var(--m-soft); overflow: hidden; }
  .m-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--progress); transition: width .3s var(--m-ease); }
  .m-progress span { font-family: var(--font-mono); font-size: 11px; color: var(--m-ink-3); }

  .m-section { margin-top: 26px; }
  .m-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 10px; }
  .m-section-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--m-ink); }
  .m-section-head > span { font-size: 12px; color: var(--m-ink-3); }
  .m-soft-actions { display: flex; justify-content: center; padding: 26px 0 8px; }
  .m-quiet-link {
    display: inline-flex; align-items: center; gap: 4px;
    min-height: 44px; padding: 0 6px;
    font-size: 13px; color: var(--m-ink-2);
  }
  .m-quiet-add {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px; margin-top: 8px; padding: 0 10px;
    font-size: 14px; color: var(--m-ink-2);
  }

  .m-empty {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 34px 22px;
    border-radius: var(--m-r-card);
    background: var(--m-surface);
    text-align: center;
  }
  .m-empty p { font-size: 14px; line-height: 1.65; color: var(--m-ink-2); max-width: 26em; }
  .m-empty .btn { margin-top: 2px; }
  .m-empty-icon {
    width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 50%; background: var(--m-soft); color: var(--m-ink-2);
  }
  .m-empty-first { margin-top: 4px; }

  /* ---------- 6. 任务列表（今天 / 任务 / 日历共用） ---------- */
  .m-list {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-r-card);
    overflow: hidden;
  }
  .m-list + .m-list-label, .m-list-label + .m-list { margin-top: 0; }
  .m-list-label {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 34px; margin: 22px 4px 8px;
    font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--m-ink-3);
  }
  .m-list-label:first-child { margin-top: 18px; }

  .m-task-wrap {
    position: relative; overflow: hidden;
    background: var(--m-surface);
  }
  .m-task-wrap + .m-task-wrap { border-top: 1px solid var(--m-border); }
  .m-task-wrap.is-pressing .m-task { background: var(--m-soft); }
  .m-task-behind {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px;
    background: linear-gradient(90deg, var(--m-sand-soft), var(--m-surface) 42%, var(--m-surface) 58%, var(--m-sage-soft));
    color: var(--m-ink-2);
  }
  .m-swipe-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; opacity: 0; transition: opacity .15s; }
  .swiping-right .m-swipe-hint.schedule { opacity: 1; }
  .swiping-left .m-swipe-hint.complete { opacity: 1; }

  .m-task {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 40px 44px minmax(0, 1fr) 44px;
    align-items: center; gap: 6px;
    min-height: 62px;
    padding: 8px 10px 8px 12px;
    background: var(--m-surface);
    touch-action: pan-y;
    transition: background .15s;
  }
  .m-task:not(.has-time) { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .m-task-time { font-size: 11px; color: var(--m-ink-3); letter-spacing: 0; align-self: center; }
  .m-check-hit {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    color: transparent;
  }
  .m-tick {
    width: 23px; height: 23px; display: grid; place-items: center;
    border: 1.6px solid #C9C6BF; border-radius: 50%;
    color: transparent;
    transition: background .16s var(--m-ease), border-color .16s var(--m-ease);
  }
  .m-tick .ic { width: 11px; height: 11px; stroke-width: 2.6; }
  .m-check-hit.is-done .m-tick { background: var(--m-sage); border-color: var(--m-sage); color: #fff; }
  .m-check-hit.is-progress .m-tick { border-color: var(--m-indigo); }
  .m-check-hit.is-progress .m-tick::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--m-indigo); }
  [data-mode="dark"] .m-tick { border-color: #4B4B48; }

  .m-task-main {
    min-width: 0; min-height: 44px;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 3px;
    text-align: left;
  }
  .m-task-title {
    max-width: 100%;
    font-size: 15px; line-height: 1.4; font-weight: 400; color: var(--m-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .m-task-meta {
    max-width: 100%;
    font-size: 12px; line-height: 1.35; color: var(--m-ink-3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .m-task.is-done .m-task-title { color: var(--m-ink-3); text-decoration: line-through; text-decoration-color: #C9C6BF; }
  .m-task-more {
    width: 44px; height: 44px; display: grid; place-items: center;
    color: var(--m-ink-3); border-radius: 10px;
  }
  .m-task-more:active { background: var(--m-soft); }

  /* 每日回顾：移动端把桌面任务行换成同一套轻量行 */
  .rv-mobile { display: block; }
  .rv-head { flex-wrap: nowrap; align-items: flex-start; }
  .rv-head > div:first-child { flex: 1; min-width: 0; }
  .rv-head .page-actions { width: auto; margin-left: auto; flex-wrap: nowrap; gap: 0; }
  .rv-mobile > .section-head { margin: 0 4px 8px; }
  .rv-mlist .m-task + .m-task { border-top: 1px solid var(--m-border); }
  .rv-mtask.has-next { grid-template-columns: 40px 44px minmax(0, 1fr) 58px; }
  .rv-mtask.has-next:not(.has-time) { grid-template-columns: 44px minmax(0, 1fr) 58px; }
  .rv-next-btn {
    width: 58px; height: 44px; border-radius: 10px;
    background: var(--m-soft); font-size: 13px; color: var(--m-ink-2);
  }
  .rv-next-btn:active { background: var(--m-border); }
  .rv-all-next { min-height: 44px; padding: 0 4px; }
  .rv-m-note { padding: 12px 2px 2px; line-height: 1.6; }

  /* ---------- 7. 任务页 ---------- */
  .m-tasks { display: block; padding-top: 8px; }
  .m-page-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding: 12px 2px 18px;
  }
  .m-page-kicker { font-size: 12px; font-weight: 500; color: var(--m-ink-3); letter-spacing: .06em; }
  .m-page-title { margin-top: 5px; font-size: 27px; line-height: 1.16; font-weight: 600; letter-spacing: -.025em; color: var(--m-ink); }
  .m-page-sub { margin-top: 7px; font-size: 13px; line-height: 1.5; color: var(--m-ink-2); }
  .m-icon-btn {
    flex: none; width: 44px; height: 44px;
    display: grid; place-items: center;
    border: 1px solid var(--m-border); border-radius: 13px;
    background: var(--m-surface); color: var(--m-ink-2);
  }
  .m-icon-btn.has-filter { background: var(--m-indigo-soft); border-color: transparent; color: var(--accent-strong); }
  .m-icon-btn.is-on { background: var(--m-indigo-soft); border-color: transparent; color: var(--accent-strong); }

  .m-tabbar {
    display: flex; align-items: center; gap: 2px;
    padding: 4px;
    background: var(--m-soft);
    border-radius: 14px;
  }
  .m-tabbtn {
    flex: 1; min-width: 0; height: 44px;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    border-radius: 10px;
    font-size: 13px; color: var(--m-ink-2);
    transition: background .18s var(--m-ease), color .18s var(--m-ease);
  }
  .m-tabbtn .mono { font-size: 10px; color: var(--m-ink-3); }
  .m-tabbtn[aria-selected="true"] { background: var(--m-surface); color: var(--m-ink); font-weight: 500; box-shadow: 0 1px 2px rgba(28, 28, 28, .04); }
  .m-tabbtn[aria-selected="true"] .mono { color: var(--m-indigo); }

  .m-tasks-body, .m-stage-head + .m-list, .m-stage-hint + .m-list { margin-top: 16px; }
  .m-filter-panel {
    margin-top: 12px; padding: 16px;
    background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-r-card);
  }
  .m-filter-group + .m-filter-group { margin-top: 16px; }
  .m-filter-label { margin-bottom: 8px; font-size: 12px; font-weight: 500; color: var(--m-ink-3); }
  .m-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .m-filter-chips .chip[aria-pressed="true"] { background: var(--m-indigo-soft); border-color: transparent; color: var(--accent-strong); }
  .m-filter-panel > .m-quiet-link { margin-top: 10px; min-height: 44px; padding-left: 0; }
  .m-stage-head {
    display: flex; align-items: center; gap: 8px;
    margin-top: 20px; padding: 0 4px 8px;
  }
  .m-stage-head b { font-size: 16px; font-weight: 600; }
  .m-stage-head > span { font-family: var(--font-mono); font-size: 11px; color: var(--m-ink-3); }
  .m-stage-head .m-quiet-link { margin-left: auto; }
  .m-stage-hint { margin: 0 4px 10px; font-size: 13px; line-height: 1.6; color: var(--m-ink-2); }
  .m-wide-btn { width: 100%; margin-top: 14px; }

  /* ---------- 8. 日历 ---------- */
  .m-cal { display: block; padding-top: 8px; }
  .m-cal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 12px 2px 14px; }
  .m-cal-head .m-page-title { font-size: clamp(22px, 6.2vw, 27px); white-space: nowrap; }
  .m-cal-tools { display: flex; align-items: center; gap: 0; flex: none; }
  .m-cal-tools .m-icon-btn { width: 44px; height: 44px; border: 0; background: transparent; }
  .m-chip-btn {
    height: 44px; padding: 0 10px;
    border-radius: 12px;
    background: var(--m-soft); color: var(--m-ink-2);
    font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .m-cal-tools .m-chip-btn { background: transparent; border: 1px solid var(--m-border); }

  .m-week {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 2px;
  }
  .m-week-day {
    min-width: 0; min-height: 68px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border-radius: 16px;
    color: var(--m-ink-2);
  }
  .mwd-w { font-size: 11px; color: var(--m-ink-3); }
  .mwd-n {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-family: var(--font-mono); font-size: 15px; color: var(--m-ink);
    transition: background .18s var(--m-ease), color .18s var(--m-ease);
  }
  .mwd-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
  .mwd-dot.has { background: var(--m-indigo); }
  .mwd-dot.is-done { background: var(--m-sage); }
  .m-week-day.is-sel { background: var(--m-surface); box-shadow: 0 1px 2px rgba(28, 28, 28, .03); }
  .m-week-day.is-sel .mwd-w { color: var(--m-ink-2); }
  .m-week-day.is-sel .mwd-n { background: var(--m-indigo-soft); color: var(--accent-strong); font-weight: 500; }
  .m-week-day.is-today:not(.is-sel) .mwd-n { box-shadow: inset 0 0 0 1px var(--m-indigo); color: var(--m-indigo); }

  .m-agenda { margin-top: 22px; }
  .m-agenda .m-section-head { margin-bottom: 10px; }
  .m-agenda > .m-list + .m-quiet-add { margin-top: 4px; }

  .m-month { margin-top: 12px; padding: 14px 10px 16px; background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-r-card); }
  .m-month-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; }
  .m-month-week span { text-align: center; font-size: 11px; color: var(--m-ink-3); }
  .m-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
  .m-month-cell {
    min-width: 0; min-height: 52px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: 12px;
    color: var(--m-ink-2);
  }
  .mmc-n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-mono); font-size: 13px; }
  .mmc-dots { display: flex; gap: 2px; height: 4px; }
  .mmc-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--m-indigo); }
  .mmc-dots i.is-done { background: var(--m-sage); }
  .m-month-cell.is-out { opacity: .35; }
  .m-month-cell.is-sel { background: var(--m-indigo-soft); }
  .m-month-cell.is-sel .mmc-n { color: var(--accent-strong); font-weight: 500; }
  .m-month-cell.is-today .mmc-n { box-shadow: inset 0 0 0 1px var(--m-indigo); color: var(--m-indigo); }

  /* ---------- 8.5 我的（个人资料） ---------- */
  .m-me { display: block; padding: 6px 2px 0; }
  .m-me-head {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 16px;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-r-card);
  }
  .m-me-avatar-btn { position: relative; flex: none; width: 72px; height: 72px; padding: 0; border-radius: 50%; }
  .m-me-avatar { width: 72px; height: 72px; font-size: 22px; box-shadow: inset 0 0 0 1px var(--primary-line); }
  .m-me-avatar-btn:active .m-me-avatar { filter: brightness(.96); }
  .m-me-avatar-badge {
    position: absolute; right: -3px; bottom: -3px;
    width: 25px; height: 25px; display: grid; place-items: center;
    border-radius: 50%;
    background: var(--m-ink); color: var(--m-paper);
    box-shadow: 0 0 0 2px var(--m-surface);
  }
  .m-me-id { flex: 1; min-width: 0; }
  .m-me-name {
    margin: 0;
    font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em;
    color: var(--m-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .m-me-sub {
    margin: 4px 0 0;
    font-size: 13px; line-height: 1.4; color: var(--m-ink-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .m-me-edit {
    flex: none; width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--m-border); border-radius: 12px;
    background: var(--m-paper); color: var(--m-ink-2);
  }
  .m-me-edit:active { background: var(--m-soft); }

  .m-me-group { margin-top: 22px; }
  .m-me-group-title { margin: 0 6px 8px; font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--m-ink-3); }
  .m-me-list { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-r-card); overflow: hidden; }
  .m-me-row {
    display: flex; align-items: center; gap: 10px;
    width: 100%; min-height: 54px; padding: 8px 14px;
    text-align: left; font-size: 15px; color: var(--m-ink);
  }
  button.m-me-row:active { background: var(--m-soft); }
  .m-me-row + .m-me-row { border-top: 1px solid var(--m-border); }
  .m-me-k { flex: none; font-size: 14px; color: var(--m-ink-2); }
  .m-me-v {
    margin-left: auto; min-width: 0;
    font-size: 14px; color: var(--m-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .m-me-v.is-muted { color: var(--m-ink-3); }
  .m-me-row > .ic:last-child { flex: none; color: var(--m-ink-3); }
  .m-me-row .set-state { margin-left: auto; }
  .m-me-logout, .m-me-login {
    width: 100%; height: 48px; margin-top: 26px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--m-r-btn);
    font-size: 15px;
  }
  .m-me-logout { background: var(--m-surface); border: 1px solid var(--m-border); color: var(--urgent); }
  .m-me-logout:active { background: var(--urgent-soft); }
  .m-me-login { background: var(--m-ink); border: 1px solid var(--m-ink); color: var(--m-paper); font-weight: 500; }
  .m-me-note { margin: 12px 8px 0; font-size: 12px; line-height: 1.6; color: var(--m-ink-3); }

  /* 头像与昵称弹层 */
  .me-av-top { display: flex; justify-content: center; padding: 2px 0 10px; }
  .me-av-big { width: 96px; height: 96px; font-size: 28px; box-shadow: inset 0 0 0 1px var(--primary-line), var(--m-shadow); }
  .me-av-msg { min-height: 1.2em; margin-bottom: 10px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--m-ink-3); }
  .me-av-msg:empty { display: none; }
  .me-av-msg[data-tone="ok"] { color: var(--done); }
  .me-av-msg[data-tone="err"] { color: var(--urgent); }
  .me-av-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .me-av-actions .btn { flex: 1 1 auto; }
  .me-av-save { display: flex; gap: 8px; margin-top: 10px; }
  .me-av-save[hidden] { display: none; }
  .me-av-save .btn-primary { flex: 1; }
  .me-av-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--m-border);
    font-size: 13px; color: var(--m-ink-2);
  }
  .me-av-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
  .me-av-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px; border-radius: 12px; }
  .me-av-item:active { background: var(--m-soft); }
  .me-av-item small { font-size: 11px; color: var(--m-ink-3); }
  .me-av-item[aria-pressed="true"] { background: var(--m-indigo-soft); }
  .me-av-item[aria-pressed="true"] .me-av-swatch { box-shadow: 0 0 0 2px var(--m-indigo); }
  .me-av-item[aria-pressed="true"] small { color: var(--accent-strong); font-weight: 500; }
  [data-mode="dark"] .me-av-item[aria-pressed="true"] small { color: var(--m-ink); }
  .me-av-swatch { width: 46px; height: 46px; }
  .me-av-hint { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--m-ink-3); }
  .me-field { display: flex; flex-direction: column; gap: 6px; }
  .me-field > span { font-size: 13px; color: var(--m-ink-2); }
  .me-field small { font-size: 12px; line-height: 1.5; color: var(--m-ink-3); }

  /* ---------- 9. 更多 ---------- */
  .m-more-page { display: block; padding: 8px 2px 0; }
  .m-me-entry {
    display: flex; align-items: center; gap: 12px;
    margin-top: 2px; padding: 14px;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-r-card);
    color: var(--m-ink); text-decoration: none;
  }
  .m-me-entry:active { background: var(--m-soft); }
  .m-me-entry-avatar { width: 48px; height: 48px; font-size: 16px; }
  .m-me-entry-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .m-me-entry-text b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-me-entry-text span { font-size: 12px; color: var(--m-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-me-entry > .ic { flex: none; color: var(--m-ink-3); }
  .m-more-group { margin-top: 24px; }
  .m-more-group-title { margin: 0 6px 8px; font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--m-ink-3); }
  .m-more-list { background: var(--m-surface); border: 1px solid var(--m-border); border-radius: var(--m-r-card); overflow: hidden; }
  .m-more-row {
    display: flex; align-items: center; gap: 12px;
    width: 100%; min-height: 62px; padding: 10px 14px;
    text-align: left; color: var(--m-ink);
  }
  .m-more-row + .m-more-row { border-top: 1px solid var(--m-border); }
  .m-more-row:active { background: var(--m-soft); }
  .m-more-icon {
    flex: none; width: 36px; height: 36px;
    display: grid; place-items: center; border-radius: 12px;
    background: var(--m-soft); color: var(--m-ink-2);
  }
  .m-more-icon[data-tone="lavender"] { background: var(--m-indigo-soft); color: var(--accent-strong); }
  .m-more-icon[data-tone="sage"] { background: var(--m-sage-soft); color: #556255; }
  .m-more-icon[data-tone="sand"] { background: var(--m-sand-soft); color: #6C6158; }
  [data-mode="dark"] .m-more-icon[data-tone="lavender"] { color: var(--m-indigo); }
  [data-mode="dark"] .m-more-icon[data-tone="sage"] { color: var(--m-sage); }
  [data-mode="dark"] .m-more-icon[data-tone="sand"] { color: var(--m-sand); }
  .m-more-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .m-more-text b { font-size: 15px; font-weight: 400; color: var(--m-ink); }
  .m-more-text span { font-size: 12px; color: var(--m-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-more-meta { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--m-ink-3); }
  .m-more-row > .ic:last-child { flex: none; color: var(--m-ink-3); }
  .m-more-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 30px 0 6px; font-size: 12px; color: var(--m-ink-3); }

  /* ---------- 10. 底部弹层 / 键盘 / 安全区 ---------- */
  .modal, .drawer {
    max-height: min(92dvh, calc(var(--m-vvh, 100dvh) - 8px));
    border-radius: var(--m-r-sheet) var(--m-r-sheet) 0 0;
    border: 0;
    box-shadow: 0 -18px 60px -24px rgba(28, 28, 25, .28);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal::before, .drawer::before {
    content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 4px; border-radius: 999px;
    background: color-mix(in srgb, var(--m-ink-3) 45%, transparent);
    pointer-events: none;
  }
  .modal.palette::before { display: none; }
  /* 瞬间 / 漂流瓶编辑层在桌面是 580px 居中卡；移动端必须跟其它弹层一样贴底全宽，
     否则 views.css 的 width:min(580px,…) 特异性更高，会把弹层缩窄又仍贴左边 → 看起来偏左。 */
  .modal.composer, .modal.bottle-composer {
    left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; max-width: none; transform: none;
  }
  .modal-head { padding: 26px 20px 0; }
  .modal-title { font-size: 18px; font-weight: 600; }
  .modal-body { padding: 16px 20px; max-height: none; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }
  .modal-foot {
    position: sticky; bottom: 0; z-index: 1;
    padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--m-surface) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--m-border);
  }
  .modal-foot .btn { flex: 1; }
  .modal-foot .spacer { display: none; }
  .modal-foot .btn-ghost { flex: 0 0 auto; }
  .palette {
    top: max(10px, env(safe-area-inset-top)); bottom: auto;
    left: 50%; width: calc(100vw - 24px); max-height: min(80dvh, calc(var(--m-vvh, 100dvh) - 24px));
    transform: translateX(-50%);
    border-radius: var(--m-r-lg);
  }
  textarea { resize: none; }
  .modal-foot .kbd-hint { display: none; }
  .palette-input { padding: 14px 16px; }
  .palette-input input { font-size: 16px; }
  .palette-list { max-height: 58dvh; padding: 6px; }
  .palette-item { min-height: 46px; border-radius: 10px; }

  html[data-keyboard] .modal:not(.palette), html[data-keyboard] .drawer {
    bottom: var(--m-kb, 0px);
  }
  html[data-keyboard] .modal-foot { position: static; }

  /* 菜单在移动端更宽松 */
  .menu { min-width: 220px; padding: 6px; border-radius: 14px; }
  .menu-item { height: 44px; font-size: 14px; border-radius: 10px; }

  /* ---------- 11. 其余页面：移动端收敛 ---------- */
  /* 项目 */
  .proj-grid, .proj-cards, .project-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .proj-stats { grid-template-columns: 1fr 1fr; }
  .proj-detail-grid { gap: 16px; }
  .proj-side { position: static; }
  .pc-head { gap: 10px; }
  .proj-card { padding: 16px; }

  /* 专注 */
  .focus-layout { gap: 16px; }
  .focus-rail { grid-template-columns: 1fr 1fr; gap: 12px; }
  .fs-dial { width: min(264px, 72vw); height: auto; aspect-ratio: 1; margin: 0 auto; }
  .fs-clock { font-size: clamp(38px, 13vw, 52px); }
  .fs-controls { gap: 8px; }
  .focus-cards { gap: 10px; }

  /* 生活 / 瞬间 / 回忆 */
  .life-grid { gap: 18px; }
  .life-rail { gap: 14px; }
  .mem-grid { grid-template-columns: minmax(0, 1fr); }
  .m-gallery { grid-template-columns: repeat(2, 1fr); }
  .moment-card img, .mem-card img { border-radius: 14px; }
  .life-tl { padding-left: 30px; }

  /* AI 助手 */
  .ai-layout { display: flex; flex-direction: column; gap: 16px; }
  .ai-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .ai-q span { max-width: 92%; }
  .ai-composer { position: sticky; bottom: calc(var(--m-nav-h) + 18px); }
  .ai-thread:has(.ai-empty) { order: -1; }
  .ai-thread .ai-empty { display: block; padding: 0 4px; border: 0; background: none; box-shadow: none; }
  .ai-thread .ai-empty .echo-rings, .ai-thread .ai-empty .ai-empty-title { display: none; }
  .ai-thread .ai-empty p { max-width: none; margin: 0; font-size: 12px; line-height: 1.6; }

  /* 习惯 / 目标 / 洞察 / 回顾 / 设置 */
  .habit-grid, .goal-grid, .review-grid, .insights-grid, .in-grid { grid-template-columns: minmax(0, 1fr); }
  .ht-head, .ht-row { grid-template-columns: minmax(0, 1fr) auto 40px; }
  .set-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .set-v .input, .set-v .select { width: 100%; }
  .settings .row { flex-wrap: wrap; }
  .settings .row .btn { flex: 1 1 auto; }
  .set-v .seg { max-width: 100%; }
  /* 入口行窄屏仍左右排：图标在左、标题居中、状态与箭头在右；竖排会把箭头甩到下一行 */
  a.set-link { grid-template-columns: 30px minmax(0, 1fr) auto var(--s-4); gap: 10px; margin: 0 -10px; padding: 12px 10px; }
  .set-chip { width: 30px; height: 30px; }
  .set-link .set-v { gap: 8px; }
  /* 窄屏入口行让位给标题与说明：右侧状态胶囊会挤掉两行文字，只留箭头 */
  a.set-link > .set-v { display: none; }
  .set-state { max-width: 42vw; }
  a.card.set-link { padding: 14px 16px; }

  .set-hero { padding: 20px 4px 16px; }
  .set-hero-acts { width: 100%; }
  .set-hero-acts > .btn { flex: 1 1 auto; }
  .cmp-bars > div { grid-template-columns: 90px minmax(0, 1fr) 44px; }
  .yr-line { font-size: 20px; }
  .bl-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .bl-date { display: none; }
  .br-answers { grid-template-columns: 1fr; }

  /* 图表一律不许撑破页面 */
  .card canvas, .chart canvas { max-width: 100% !important; }
  .insights-grid > *, .in-grid > *, .goal-grid > *, .review-grid > * { min-width: 0; }
  table { max-width: 100%; }

  /* 去掉桌面端固定在页内的悬浮件 */
  .drop-dock { display: none !important; }
  .tl-hint, .timeline:not(.m-tl-card):not(.m-weekgrid-body) { display: none; }

  @media (prefers-reduced-motion: reduce) {
    .m-tab, .m-fab, .m-tick, .m-progress-track i, .mwd-n { transition: none; }
  }
}

/* =========================================================
   手机「今天」· 列表/时间轴两种显示 + 触摸拖拽（v3）
   拖拽协议：时间块的 ⠿ 把手与任意时间 chip 自身 touch-action:none，
   按住即拖、不与页面滚动抢手势；其余区域照常滚动。
   ========================================================= */

/* 显示方式切换 */
.m-style-switch {
  display: inline-flex; gap: 2px; margin-top: 16px;
  padding: 3px; border-radius: 12px; background: var(--m-soft, #EAE6F0);
  align-self: flex-start;
}
.m-style-switch .chip {
  border: 0; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px;
  padding: 7px 18px; border-radius: 10px; transition: transform .3s var(--spring, ease), background .18s, color .18s;
  font-family: inherit; cursor: pointer;
}
.m-style-switch .chip[aria-pressed="true"] { background: var(--card, #fff); color: var(--ink); box-shadow: 0 1px 4px rgba(40,40,60,.12); }
.m-style-switch .chip:active { transform: scale(.94); }

/* 时间轴模式容器 */
.m-tl-card { padding: 12px 10px 12px 0; border-radius: 18px; }
.m-tl-card .time-gutter { width: 42px; }
.m-tl-card .time-gutter span { right: 8px; font-size: 10.5px; }
.m-tl-card .tl-block { border-radius: 10px; }
.m-tl-card .tl-title { font-size: 12.5px; line-height: 1.25; }
.m-tl-card .tl-time { font-size: 10.5px; }
.m-tl-card .tl-meta { display: none; }
/* 底边拖拽条：下拉变长、上收变短（15 分钟一格）；轻点不放仍是打开任务。
   右端留出 ⠿ 移动把手的位置，勾选框压在条上面照常可点。 */
/* 手指按在块身上仍能上下滚页面；只有 ⠿ 和底边条接管手势 */
.m-tl-card .tl-block { touch-action: pan-y; }
.m-tl-card .tl-resize { display: block; height: 14px; left: 0; right: 30px; bottom: 0; touch-action: none; }
.m-tl-card .tl-resize::after { left: 50%; margin-left: -12px; bottom: 3px; width: 24px; height: 3px; opacity: .38; }
.m-tl-card .tl-block.is-xs .tl-resize { height: 12px; }
.m-tl-card .tl-block.is-xs .tl-resize::after { bottom: 2px; width: 20px; margin-left: -10px; opacity: .3; }
.m-tl-card .tl-block .check { position: relative; z-index: 3; }
.m-tl-card .tl-block.is-resizing { box-shadow: inset 4px 0 0 var(--area), 0 8px 18px -8px rgba(30, 30, 40, .3); }

/* ⠿ 拖拽把手：仅触摸设备显示 */
.tl-grip {
  position: absolute; right: 2px; top: 50%; width: 30px; height: 26px; margin-top: -13px;
  border-radius: 8px; touch-action: none; display: grid; place-items: center; cursor: grab;
  background: radial-gradient(circle, var(--ink-4) 1.3px, transparent 1.4px) center / 5px 10px repeat-x;
  opacity: .85;
}
.tl-grip:active { background-color: color-mix(in srgb, var(--ink-4) 18%, transparent); }
.tl-block.is-xs .tl-grip, .tl-block.is-short .tl-grip { margin-top: -11px; height: 22px; }
@media (pointer: fine) { .tl-grip { display: none; } }

/* 任意时间拖拽 chip（时间轴模式下替换滑动行） */
.m-any-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.m-any-chips .any-chip { touch-action: none; height: 38px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
body.is-dragging { touch-action: none; }

/* =========================================================
   手机日历三视图 + 我的页（v4）
   ========================================================= */

/* 干净月视图：无框线、大圆角格、今天实心圆、选中细环 */
.m-month-grid { row-gap: 6px; }
.m-month-cell { min-height: 50px; border-radius: 14px; transition: transform .3s var(--spring, ease); }
.m-month-cell:active { transform: scale(.92); }
.mmc-n { width: 32px; height: 32px; font-size: 13.5px; }
.m-month-cell.is-today .mmc-n { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent); }
.m-month-cell.is-sel .mmc-n { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-strong); }
.m-month-cell.is-today.is-sel .mmc-n { box-shadow: none; outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.mmc-dots i { width: 4.5px; height: 4.5px; }
.m-cal-views { margin: 4px 0 14px; }

/* 周条微调：选中日数字用领域蓝胶囊 */
.m-week-day.is-sel .mwd-n { border-radius: 50%; }

/* 我的页 */
.m-skin { padding: 14px 16px 12px; border-radius: 18px; }
.m-skin-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px; }
.m-skin-head b { font-size: 14.5px; }
.m-skin-more { font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
.m-skin-strip { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.m-skin-strip::-webkit-scrollbar { display: none; }
.m-skin-dot { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; font: inherit; cursor: pointer; padding: 2px; }
.m-skin-dot i { width: 36px; height: 36px; border-radius: 13px; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .3s var(--spring, ease), box-shadow .2s; }
.m-skin-dot:active i { transform: scale(.9); }
.m-skin-dot span { font-size: 12.5px; color: var(--ink-3); }
.m-skin-dot.is-on i { box-shadow: 0 0 0 2.5px var(--card), 0 0 0 5px var(--accent); transform: scale(1.04); }
.m-skin-dot.is-on span { color: var(--ink); font-weight: 600; }

.m-fn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 14px 0 4px; }
.m-fn-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--m-surface, #fff); border-radius: 16px; padding: 13px 6px 11px; text-decoration: none;
  color: var(--ink-2); transition: transform .3s var(--spring, ease), box-shadow .3s var(--spring, ease);
}
.m-fn-item:active { transform: scale(.94); }
.m-fn-item span { font-size: 12.5px; font-weight: 500; }
.m-fn-badge {
  position: absolute; top: 7px; right: 9px; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 999px; background: var(--rose, #DE9CBA); color: #fff; font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
}

/* =========================================================
   「我的」页美化 v2 —— 渐变身份卡 / 对勾色片 / 彩色功能格
   ========================================================= */

/* 身份卡：页面唯一的大色块，第一落点 */
.m-me-hero {
  position: relative; display: flex; align-items: center; gap: 15px;
  margin-top: 4px; padding: 19px 17px;
  background:
    radial-gradient(140px 90px at 88% -20%, color-mix(in srgb, #F4D0A8 55%, transparent), transparent 72%),
    radial-gradient(180px 120px at -8% 120%, color-mix(in srgb, #9BE0CC 40%, transparent), transparent 74%),
    linear-gradient(128deg, #CFD6FA 0%, #E4DBF8 55%, #F6E3D2 100%);
  border-radius: 24px; text-decoration: none; color: var(--ink);
  box-shadow: 0 2px 6px rgba(96,102,150,.08), 0 14px 30px -14px rgba(96,102,150,.35);
  transition: transform .35s var(--spring, ease), box-shadow .35s var(--spring, ease);
}
.m-me-hero:active { transform: scale(.98); }
.m-me-hero-avatar {
  width: 62px; height: 62px; flex: none; font-size: 22px;
  border: 3px solid rgba(255,255,255,.92); box-shadow: 0 6px 16px -6px rgba(51,64,92,.4);
}
.m-me-hero-text { min-width: 0; }
.m-me-hero-text b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.m-me-hero-text span { display: block; font-size: 13px; color: color-mix(in srgb, var(--ink) 62%, transparent); margin-top: 3px; font-family: var(--font-mono); }
.m-me-hero-arrow {
  margin-left: auto; flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.66); color: var(--ink-2);
}

/* 换肤行 v2：无字色片 + 选中对勾徽标 + 当前主题说明行 */
.m-skin { padding: 15px 16px 13px; }
.m-skin-strip { gap: 10px; padding: 2px 0 4px; }
.m-skin-dot { padding: 0; }
.m-skin-dot i { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.09), inset 0 -3px 6px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.06); }
.m-skin-dot i::after { content: none; }
.m-skin-dot.is-on i { box-shadow: inset 0 0 0 1px rgba(0,0,0,.09), 0 0 0 2px var(--card), 0 0 0 4.5px var(--accent); animation: skin-pop .45s var(--spring, ease); }
.m-skin-dot.is-on::after {
  content: "✓"; position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--card);
}
.m-skin-dot { position: relative; }
@keyframes skin-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1.04); } }
.m-skin-cap { display: flex; align-items: baseline; gap: 9px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
.m-skin-cap b { font-size: 14.5px; }
.m-skin-cap span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 功能格 v2：彩色图标底 + slab 内衬 */
.m-fn-wrap {
  margin-top: 18px; padding: 14px 12px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  border-radius: 22px;
}
.m-fn-grid { gap: 10px; margin: 0; }
.m-fn-item { padding: 12px 6px 11px; }
.m-fn-ic {
  width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center;
  transition: transform .35s var(--spring, ease);
}
.m-fn-item:active .m-fn-ic { transform: scale(.88); }
.m-fn-item[data-tone="lav"]  .m-fn-ic { background: var(--lavender-soft, #EFF1FC); color: #4E59B8; }
.m-fn-item[data-tone="mint"] .m-fn-ic { background: var(--mint-soft, #E3F5EE); color: #1F6B56; }
.m-fn-item[data-tone="peach"] .m-fn-ic { background: var(--orange-soft, #FBF1E2); color: #8F5C1E; }
.m-fn-item[data-tone="rose"] .m-fn-ic { background: var(--rose-soft, #FAEBEF); color: #A4496B; }
.m-fn-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
[data-mode="dark"] .m-fn-item[data-tone="lav"] .m-fn-ic { color: #9AA7EF; }
[data-mode="dark"] .m-fn-item[data-tone="mint"] .m-fn-ic { color: #6FC9AA; }
[data-mode="dark"] .m-fn-item[data-tone="peach"] .m-fn-ic { color: #E0A468; }
[data-mode="dark"] .m-fn-item[data-tone="rose"] .m-fn-ic { color: #E094AC; }

/* 设置列表：厚行 */
.m-more-row { padding: 15px 14px; }
.m-more-icon { width: 38px; height: 38px; border-radius: 13px; }
.m-more-group { margin-top: 20px; }

/* =========================================================
   「我的」页 v3 —— 贴纸手账风（参照用户提供的参考稿）
   结构移植：白卡＋深色细描边（贴纸感）、账户大头像＋徽章＋
   卡角叶子贴纸、双卡并排、一张大贴纸卡装宫格、底部山坡收尾。
   颜色仍是 Gentle 色系，不照抄参考稿的奶黄。
   ========================================================= */

.m-sticker-page .m-me-hero,
.m-sticker-page .m-duo-card,
.m-sticker-page .m-sticker-card,
.m-sticker-page .m-more-list {
  border: 1.5px solid color-mix(in srgb, var(--ink) 72%, transparent);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 22px;
  background: var(--card);
}
.m-sticker-page .m-me-hero {
  background:
    radial-gradient(140px 90px at 88% -20%, color-mix(in srgb, var(--orange) 26%, transparent), transparent 72%),
    radial-gradient(180px 120px at -8% 120%, color-mix(in srgb, var(--progress) 24%, transparent), transparent 74%),
    linear-gradient(128deg, color-mix(in srgb, var(--accent) 16%, var(--card)) 0%, var(--lavender-soft, var(--primary-soft)) 52%, color-mix(in srgb, var(--orange) 12%, var(--card)) 100%);
}
.m-me-hero-text b { display: flex; align-items: center; gap: 8px; }
.m-hero-badge {
  font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--ink-2); border-radius: 999px; padding: 2.5px 9px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}
.m-hero-leaf {
  position: absolute; right: 14px; bottom: -12px; width: 44px; height: 44px;
  transform: rotate(10deg); filter: drop-shadow(0 3px 5px rgba(51,64,92,.25));
  transition: transform .4s var(--spring, ease);
}
.m-me-hero:hover .m-hero-leaf { transform: rotate(-6deg) translateY(-3px) scale(1.1); }

/* 双卡并排 */
.m-duo { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; margin-top: 16px; }
.m-duo-card { padding: 13px 14px 11px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.m-duo-card.m-skin { padding: 13px 14px 11px; }
.m-duo-card .m-skin-strip { gap: 7px; }
.m-duo-card .m-skin-dot i { width: 30px; height: 30px; }
.m-duo-card .m-skin-cap { margin-top: 2px; padding-top: 8px; }
.m-duo-card .m-skin-cap b { font-size: 13.5px; }
.m-duo-card .m-skin-cap span { font-size: 12px; }
.m-duo-data { position: relative; justify-content: center; }
.m-duo-data b { font-size: 14.5px; }
.m-duo-sub { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.m-duo-arrow { position: absolute; top: 12px; right: 12px; color: var(--ink-4); }
.m-duo-ic {
  width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  background: var(--mint-soft, #E3F5EE); color: #1F6B56;
}

/* 大贴纸卡 + 宫格（格子并入一张卡，不再单独白底） */
.m-sticker-card { margin-top: 16px; padding: 16px 10px 12px; }
.m-sticker-card .m-fn-grid { margin: 0; }
.m-sticker-card .m-fn-item { background: transparent; border-radius: 14px; padding: 9px 4px 8px; }
.m-sticker-card .m-fn-item:active { background: color-mix(in srgb, var(--ink) 5%, transparent); transform: scale(.93); }
.m-sticker-card .m-fn-item svg { transition: transform .35s var(--spring, ease); }
.m-sticker-card .m-fn-item:active svg { transform: scale(.82); }
.m-sticker-card .m-fn-item[data-tone="lav"]  svg { color: #4E59B8; }
.m-sticker-card .m-fn-item[data-tone="mint"] svg { color: #1F6B56; }
.m-sticker-card .m-fn-item[data-tone="peach"] svg { color: #8F5C1E; }
.m-sticker-card .m-fn-item[data-tone="rose"] svg { color: #A4496B; }
[data-mode="dark"] .m-sticker-card .m-fn-item[data-tone="lav"] svg { color: #9AA7EF; }
[data-mode="dark"] .m-sticker-card .m-fn-item[data-tone="mint"] svg { color: #6FC9AA; }
[data-mode="dark"] .m-sticker-card .m-fn-item[data-tone="peach"] svg { color: #E0A468; }
[data-mode="dark"] .m-sticker-card .m-fn-item[data-tone="rose"] svg { color: #E094AC; }
.m-sticker-card .m-fn-badge { top: 4px; right: 10px; }
.m-sticker-card .m-fn-label { font-size: 12.5px; }

/* 底部山坡 */
.m-hill {
  position: relative; margin: 26px -18px -20px; height: 110px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--orange) 22%, var(--card)), color-mix(in srgb, var(--accent) 16%, var(--card)));
  border-radius: 100% 100% 0 0 / 62px 62px 0 0;
  border-top: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 16px; overflow: hidden;
}
.m-hill img { width: 30px; height: 30px; opacity: .8; margin-bottom: 4px; }
.m-hill p { font-size: 12px; color: color-mix(in srgb, var(--ink) 55%, transparent); display: flex; align-items: center; gap: 5px; }

/* =========================================================
   「我的」v3.1 —— 主题入口卡 + 弹出式主题选择面板
   ========================================================= */
.m-duo-entry { text-align: left; cursor: pointer; font: inherit; }
.m-duo-entry b { font-size: 14.5px; }
.m-duo-entry .m-duo-ic { background: var(--lavender-soft, var(--primary-soft)); color: var(--accent-strong, var(--primary-ink)); }
.m-duo-entry[data-tone="mint"] .m-duo-ic, .m-duo-entry .m-duo-ic[data-tone="mint"] { background: var(--mint-soft, var(--primary-soft)); color: var(--done); }
.m-duo-entry:active { transform: scale(.97); }


/* =========================================================
   手机日历 · 参考稿语言（v5）：数字左上、今天整格胶囊底、
   领域色小胶囊条（无文字）≤3 + 超出 +N；周条同语言。
   ========================================================= */
.m-month-grid { row-gap: 5px; }
.m-month-cell {
  position: relative; min-height: 58px;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  padding: 5px 6px 5px; border-radius: 13px;
  color: var(--ink-2);
  transition: transform .3s var(--spring, ease), background .18s;
}
.m-month-cell:active { transform: scale(.92); }
.mmc-n {
  font-family: var(--font-mono); font-size: 13px; line-height: 1;
  align-self: flex-start; padding: 2px 4px; margin: 0 0 0 -2px; border-radius: 8px;
}
.m-month-cell.is-today { background: var(--accent); color: #fff; box-shadow: 0 5px 14px -5px color-mix(in srgb, var(--accent) 65%, transparent); }
.m-month-cell.is-today .mmc-n { color: #fff; font-weight: 700; }
.m-month-cell.is-sel:not(.is-today) { box-shadow: inset 0 0 0 2px var(--accent); }
.m-month-cell.is-today.is-sel { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.mmc-pills { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 3px; }
.mmc-pills i { height: 5px; border-radius: 999px; background: var(--area, var(--ink-4)); opacity: .92; }
.mmc-pills i.is-done { opacity: .4; }
.m-month-cell.is-today .mmc-pills i { background: #fff; opacity: .85; }
.mmc-more { font-family: var(--font-mono); font-size: 12.5px; line-height: 1; color: var(--ink-4); text-align: right; margin-top: 1px; }
.m-month-cell.is-today .mmc-more { color: rgba(255,255,255,.85); }
.m-month-cell.is-out .mmc-pills i { opacity: .22; }
.m-month-cell.is-out .mmc-more { opacity: .5; }

/* 周条：数字胶囊 + ≤3 迷你胶囊 + +N */
.m-week-day .mwd-pills { display: flex; flex-direction: column; gap: 2.5px; width: 100%; padding: 0 7px; }
.m-week-day .mwd-pills i { height: 4px; border-radius: 999px; background: var(--area, var(--ink-4)); }
.m-week-day .mwd-pills i.is-done { opacity: .4; }
.m-week-day.is-today .mwd-pills i { background: var(--accent); }
.mwd-more { font-family: var(--font-mono); font-size: 12.5px; line-height: 1; color: var(--ink-4); }

/* =========================================================
   手机日历 v6 · 参考稿还原：月格任务条带文字 + 周视图 3 日时间网格
   任务条 = 浅领域底圆角条 + 左彩点 + 单行省略文字（定时带时间前缀）
   ========================================================= */
.m-month-cell { min-height: 72px; padding: 4px 3px 4px; }
.mmc-n { font-size: 12.5px; padding: 1.5px 4px; }
.mmc-chips { margin-top: 2px; display: flex; flex-direction: column; gap: 2.5px; min-width: 0; }
.mmc-chip {
  display: flex; align-items: center; gap: 3px; min-width: 0;
  max-width: 100%; padding: 2px 4px 2px 3px; border-radius: 5px;
  background: color-mix(in srgb, var(--area, var(--ink-4)) 16%, var(--card));
}
.mmc-chip i { flex: none; width: 4.5px; height: 4.5px; border-radius: 50%; background: var(--area, var(--ink-4)); }
.mmc-chip em {
  font-style: normal; font-size: 12.5px; line-height: 1.25; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1;
}
.m-month-cell.is-today .mmc-chip { background: color-mix(in srgb, #FFFFFF 30%, transparent); }
.m-month-cell.is-today .mmc-chip em { color: #fff; }
.m-month-cell.is-out .mmc-chip { opacity: .4; }
.mmc-more { font-size: 12.5px; line-height: 1.2; color: var(--ink-3); padding-left: 3px; text-align: left; font-weight: 400; }
.m-month-cell.is-today .mmc-more { color: rgba(255,255,255,.9); }
.m-month-cell .mmc-chip.is-done { opacity: .45; }

/* 周视图：7 日窄条 + 3 日时间网格 */
.m-weekgrid { display: flex; flex-direction: column; gap: 10px; }
.mw-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mw-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0 5px; border-radius: 12px; border: 1.5px solid transparent;
  background: none; font: inherit; color: var(--ink-2); cursor: pointer;
  transition: transform .3s var(--spring, ease), background .18s, border-color .18s;
}
.mw-day span { font-size: 12.5px; }
.mw-day b { font-size: 14.5px; font-weight: 600; }
.mw-day.is-today b { color: var(--accent); }
.mw-day.is-sel { background: var(--card); border-color: var(--line); box-shadow: 0 1px 4px rgba(40,40,60,.08); }
.mw-day:active { transform: scale(.92); }
.m-weekgrid-body { display: flex; padding: 10px 6px 10px 0; overflow-x: auto; }
.m-weekgrid-body .time-gutter { width: 36px; }
.m-weekgrid-body .time-gutter span { font-size: 10.5px; right: 6px; }
.mw-col { flex: 1 0 30%; min-width: 96px; display: flex; border-left: 1px solid var(--line); }
.mw-col + .mw-col { margin-left: 3px; }
.mw-col .time-col { flex: 1; border-bottom: 0; }
.mw-col.is-today { background: color-mix(in srgb, var(--accent-soft, var(--primary-soft)) 34%, transparent); border-radius: 10px; }
.mw-col .tl-block { border-radius: 8px; padding: 2px 3px; }
.mw-col .tl-title { font-size: 11.5px; line-height: 1.2; }
/* 手机上整页滚动，别让「+N」粘在屏幕顶上；留在列首即可 */
.mw-col .tl-more { position: absolute; top: 4px; right: 4px; }
.mw-col .tl-block:not(.is-xs):not(.is-short) .tl-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mw-col .tl-time { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-col .tl-grip {
  top: 3px; bottom: 3px; right: 0; width: 22px;
  height: auto !important; margin-top: 0 !important;
  background: radial-gradient(circle, var(--ink-4) 1.2px, transparent 1.3px) right 5px center / 4px 7px repeat-y;
  opacity: .5;
}
.mw-col .tl-meta { display: none; }
.mw-col .tl-block.is-xs .tl-time { display: none; }
.mw-hint { text-align: center; font-size: 12.5px; }

/* =========================================================
   手机日历 v10 · 参考稿第二轮（Todo 清单顶栏/月/周）：
   顶栏 = 左视图切换按钮 + 居中「日历视图」+ 右「今天」，第二行箭头 + 范围；
   月视图 = 宽屏发丝网格（一行一周），跨天任务在周行上画跨列色条；
   周视图 = 星期表头 + 全天行 + 7 列小时时间轴；日视图卡片样式见 porcelain §11f。
   ========================================================= */

/* ---------- 顶栏 ---------- */
.m-cal-top { display: flex; align-items: center; gap: 6px; padding: 10px 0 0; }
.m-cal-cycle {
  position: relative; flex: none; width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px; color: var(--ink-2);
}
.m-cal-cycle span {
  position: absolute; right: 2px; bottom: 3px;
  padding: 1px 3.5px 2px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); font-size: 9px; font-weight: 750; line-height: 1.2;
}
.m-cal-name { flex: 1; min-width: 0; text-align: center; font-size: 17px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.m-cal-top .m-chip-btn { flex: none; }
.m-cal-sub { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 0 10px; }
.m-cal-sub .m-icon-btn { width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink-2); }
.m-cal-range { min-width: 170px; text-align: center; font-size: 15px; font-weight: 650; color: var(--ink); }

/* ---------- 月视图：宽屏发丝网格 + 跨天色条 ---------- */
.m-month {
  margin: 4px calc(4px - var(--m-gutter)) 0; padding: 2px 0 6px;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.m-month-week { padding: 0 2px; }
.m-month-week span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding-bottom: 7px; }
.m-month-rows { display: flex; flex-direction: column; }
.mg-weekrow {
  --span-top: 24px;
  position: relative;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.mg-weekrow:first-child { border-top: 0; }
.mg-cell {
  position: relative; min-width: 0; min-height: 82px;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  padding: calc(var(--span-top) + var(--lanes, 0) * 16px) 3px 6px;
  border-radius: 0; background: none;
  border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  text-align: center;
}
.mg-cell:first-child { border-left: 0; }
.mg-n { position: absolute; top: 4px; left: 3px; right: 3px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
/* 领域色条：饱和底 + 白字，单行省略；完成=半透明+删除线 */
.mg-chip {
  display: block; padding: 1px 4px 2px; border-radius: 4px;
  background: var(--area, var(--accent)); color: #fff;
  font-size: 9.5px; line-height: 1.45; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mg-chip.is-done { opacity: .5; text-decoration: line-through; }
.mg-more { margin-top: 1px; padding-left: 4px; font-size: 9.5px; line-height: 1.4; color: var(--ink-3); text-align: left; }
.mg-cell.is-out { opacity: .35; }
.mg-cell.is-today { border-radius: 9px; box-shadow: inset 0 0 0 1.5px var(--accent); }
.mg-cell.is-today .mg-n { color: var(--accent); font-weight: 750; }
/* 跨天色条：压在周行顶部、跨列铺开，点开看任务详情 */
.mg-span {
  position: absolute; z-index: 2; height: 14px;
  display: flex; align-items: center;
  padding: 0 5px; border-radius: 4px;
  background: var(--area, var(--accent)); color: #fff;
  font-size: 9.5px; line-height: 1; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mg-span.is-done { opacity: .5; text-decoration: line-through; }

/* ---------- 周视图：7 列小时时间轴（不含全天带） ---------- */
.mwt { margin: 2px calc(4px - var(--m-gutter)) 0; }
.mwt-head { display: flex; align-items: stretch; }
.mwt-gut { flex: 0 0 42px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 6px 6px 0; font-size: 10.5px; color: var(--ink-3); }
.mwt-day {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 0 8px; border-radius: 10px;
}
.mwt-day span { font-size: 11px; color: var(--ink-3); }
.mwt-day b { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.mwt-day.is-today b { color: var(--accent); }
.mwt-scroll { overflow-y: auto; max-height: 56vh; padding-bottom: 10px; }
.mwt-grid { display: flex; }
.mwt-grid .time-gutter { width: 42px; }
.mwt-grid .time-gutter span { right: 5px; font-size: 10.5px; }
.mwt-cols { flex: 1; min-width: 0; position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mwt-col {
  position: relative; min-width: 0;
  border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--pxw, 44px) - 1px), color-mix(in srgb, var(--line) 45%, transparent) calc(var(--pxw, 44px) - 1px), transparent var(--pxw, 44px));
}
.mwt-col:first-child { border-left: 0; }
.mwt-col.is-today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.mwt-blk {
  position: absolute; z-index: 2; overflow: hidden; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 1px 3px; border-radius: 5px;
  background: var(--area, var(--accent)); color: #fff; text-align: left;
}
.mwt-blk em { font-style: normal; font-size: 9.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 块够高时露出开始时刻与「第几段」，拖动改完后一眼能对上 */
.mwt-blk .mwt-t { font-size: 8.5px; line-height: 1.25; font-weight: 500; opacity: .72; }
.mwt-blk .mwt-tag { font-size: 8px; line-height: 1.2; opacity: .62; }
.mwt-blk.is-done { opacity: .5; }
.mwt-blk.is-done em { text-decoration: line-through; }
.mwt-more {
  position: absolute; z-index: 3; top: 2px; right: 2px;
  padding: 1px 3px; border-radius: 5px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 9px; line-height: 1.3; color: var(--ink-3);
}
.mwt-now { position: absolute; z-index: 4; left: 0; right: 0; height: 1.5px; background: #E5484D; pointer-events: none; }
.mwt-now i { position: absolute; left: -3px; top: -2.5px; width: 6px; height: 6px; border-radius: 50%; background: #E5484D; }
/* ---------- v11：长按快建（幽灵块 + 底部创建面板） ---------- */
.m-cal-ghost { position: absolute; left: 2px; right: 2px; z-index: 6; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1.5px dashed var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--ink-2); font-size: 10px; pointer-events: none; }
.m-cal .mwt-col.is-pressing, .m-cal .time-col.is-pressing { touch-action: none; }
.m-cal .mwt-col, .m-cal .m-tl-card .time-col { -webkit-touch-callout: none; }

/* ---------- 长按拖动任务块（周/日改时间，月格改日期） ---------- */
html.cal-dragging, html.cal-dragging * { user-select: none !important; -webkit-user-select: none !important; }
html.cal-dragging .mwt-scroll { overflow: hidden; }
.cal-drag-ghost {
  position: fixed; z-index: 400; pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  padding: 5px 9px; border-radius: 8px;
  background: var(--ink, #101319); color: var(--card, #FFF);
  font-size: 11px; line-height: 1.35; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(10, 14, 30, .22);
}
.mwt-blk.is-drag-src, .tl-block.is-drag-src, .mg-chip.is-drag-src { opacity: .35; }
.mwt-col.is-drop { background-color: color-mix(in srgb, var(--accent) 12%, transparent); }
.mg-cell.is-drop { box-shadow: inset 0 0 0 2px var(--accent); }
.mg-chip { -webkit-touch-callout: none; }
.mg-segi { font-style: normal; margin-right: 3px; font-size: 8.5px; opacity: .55; }
.m-qa { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; }
.m-qa-mask { position: absolute; inset: 0; background: rgba(10, 12, 20, .42); animation: mqa-in .22s ease both; }
.m-qa-sheet { position: relative; width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--card); box-shadow: 0 -12px 40px rgba(10, 14, 30, .18); animation: mqa-up .32s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes mqa-in { from { opacity: 0; } }
@keyframes mqa-up { from { transform: translateY(105%); } }
@media (prefers-reduced-motion: reduce) { .m-qa-mask, .m-qa-sheet { animation: none; } }
.m-qa-grab { width: 38px; height: 4px; margin: 0 auto 2px; border-radius: 2px; background: var(--line); }
.m-qa-note { font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: var(--bg-sunk); color: var(--ink); }
.m-qa-note:focus { outline: none; border-color: var(--accent); }
.m-qa-note::placeholder { color: var(--ink-3); }
.m-qa-areas { display: flex; flex-wrap: wrap; gap: 8px; }
.m-qa-area { padding: 6px 13px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); }
.m-qa-area[aria-pressed="true"] { border-color: transparent; background: var(--accent); color: var(--on-primary, #fff); font-weight: 600; }
.m-qa-row { display: flex; align-items: center; gap: 10px; }
.m-qa-time { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-radius: 14px; background: var(--bg-sunk); font-size: 14px; color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.m-qa-time b { font-weight: 650; }
.m-qa-time .qa-tv { font-variant-numeric: tabular-nums; }
.m-qa-hint { margin-left: auto; font-style: normal; font-size: 12px; color: var(--ink-3); }
.m-qa-send { flex: 0 0 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-primary, #fff); border: 0; }
.m-qa-send:active { transform: scale(.94); }
/* 快建面板弹出时：浮动 Dock 让位（底部面板覆盖全屏，与 iOS sheet 惯例一致），也规避 backdrop-filter 合成层的层级歧义 */
#mobile-nav { transition: opacity .18s ease, transform .24s cubic-bezier(.22, 1, .36, 1); }
html.qa-open #mobile-nav { opacity: 0; pointer-events: none; transform: translateY(14px); }

/* ---------- 11. 任务详情极简编辑层 + 属性子弹层（js/mobile-editor.js） ---------- */
.modal.mte .modal-body { padding: 22px 20px calc(16px + env(safe-area-inset-bottom)); }
.mte-inner { position: relative; display: flex; flex-direction: column; gap: 10px; }
.mte-inner.has-del .mte-title { padding-right: 84px; }
.mte-del {
  position: absolute; top: -8px; right: -8px; z-index: 1;
  height: 44px; display: flex; align-items: center; gap: 5px;
  padding: 0 10px 0 12px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 13px; font-weight: 600; color: #D9434C; cursor: pointer;
}
.mte-del .ic { width: 15px; height: 15px; }
.mte-del:active { background: var(--bg-sunk); }
.mte-title {
  font: inherit; font-size: 20px; font-weight: 650; letter-spacing: -.02em; line-height: 1.35;
  border: 0; background: none; padding: 4px 2px; color: var(--ink); resize: none; height: auto; min-height: 30px;
}
.mte-title:focus { outline: none; }
.mte-title::placeholder { color: var(--ink-3); font-weight: 500; }
.mte-note { font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); border: 1px solid transparent; border-radius: 12px; background: var(--bg-sunk); padding: 12px 14px; min-height: 46px; resize: none; }
.mte-note:focus { outline: none; border-color: var(--accent); }
.mte-note::placeholder { color: var(--ink-3); }
.mte-attrs { display: flex; align-items: stretch; gap: 2px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.mte-attr {
  flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px 6px; border: 0; border-radius: 12px; background: none; color: var(--ink-2);
  font-size: 11px; font-family: inherit; cursor: pointer;
}
.mte-attr:active { background: var(--bg-sunk); }
.mte-attr span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mte-send {
  flex: 0 0 46px; align-self: center; width: 46px; height: 46px; margin-left: 6px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-primary, #fff); cursor: pointer;
}
.mte-send:active { transform: scale(.94); }

/* 时间弹层：清除/月份/完成 + 单天跨天 + 月历 + 时间·时长·提醒 */
.modal.mtt .modal-body { padding: 20px 14px calc(14px + env(safe-area-inset-bottom)); }
.mtt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mtt-link { border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--ink-2); padding: 8px 12px; cursor: pointer; }
.mtt-link.is-primary { color: var(--ink); font-weight: 650; }
.mtt-month { display: flex; align-items: center; gap: 6px; }
.mtt-month b { font-size: 15.5px; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.mtt-month button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.mtt-seg { display: flex; justify-content: center; gap: 10px; margin-bottom: 6px; }
.mtt-seg button { min-width: 96px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.mtt-seg button[aria-pressed="true"] { background: var(--ink); border-color: transparent; color: var(--card); font-weight: 650; }
.mtt-cal { display: grid; grid-template-columns: repeat(7, 1fr); padding: 2px 2px 6px; }
.mtt-cal > i { text-align: center; font-style: normal; font-size: 11.5px; color: var(--ink-3); padding: 6px 0 2px; }
.mtt-pad { height: 42px; }
.mtt-day { position: relative; width: 42px; height: 42px; margin: 0 auto; border: 0; border-radius: 50%; background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.mtt-day.is-today { font-weight: 700; }
.mtt-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.mtt-day.is-mid { border-radius: 0; background: var(--bg-sunk); }
.mtt-day.is-sel { background: var(--ink); color: var(--card); font-weight: 650; }
.mtt-day.is-sel.is-today::after { background: var(--card); }
.mtt-rows { margin-top: 4px; border-top: 1px solid var(--line); }
.mtt-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.mtt-rows .mtt-row:last-child { border-bottom: 0; }
.mtt-row > svg { color: var(--ink-2); flex: none; }
.mtt-row > span { flex: 1; }
.mtt-row b { font-weight: 500; font-size: 14px; color: var(--ink-2); margin-left: auto; }
.mtt-row > svg:last-child { color: var(--ink-3); }
.mtt-row input[type="time"], .mtt-row select { margin-left: auto; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.mtt-row input[type="time"]::-webkit-calendar-picker-indicator { opacity: .55; }

/* 多时间段：一行一段，点哪段改哪段，右侧 × 删除；日历上其它段落在日期上带小点 */
.mtt-segs { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 6px; max-height: 172px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mtt-segrow { display: flex; align-items: stretch; gap: 6px; }
.mtt-segmain {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 42px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 13px;
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.mtt-segmain:active { background: var(--bg-sunk); }
.mtt-segrow.is-on .mtt-segmain { border-color: var(--ink); background: var(--bg-sunk); box-shadow: inset 0 0 0 1px var(--ink); }
.mtt-segdate { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.mtt-segmain b { flex: none; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.mtt-segrow.is-on .mtt-segmain b { color: var(--ink-2); }
.mtt-segdel { flex: 0 0 38px; width: 38px; border: 0; border-radius: 12px; background: none; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.mtt-segdel:active { background: var(--bg-sunk); color: #D9434C; }
.mtt-add {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 42px; margin-bottom: 6px;
  border: 1px dashed var(--line); border-radius: 13px; background: none; color: var(--ink-2);
  font: inherit; font-size: 14px; cursor: pointer;
}
.mtt-add:active { background: var(--bg-sunk); }
.mtt-empty { margin: 2px 4px 10px; font-size: 13px; line-height: 1.5; color: var(--ink-3); text-align: center; }
.mtt-day.is-seg { color: var(--ink); font-weight: 650; }
.mtt-day.is-seg::after {
  content: ""; position: absolute; left: 50%; top: 3px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

/* 领域 / 项目选择弹层 */
.modal.mtp .modal-body { padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); }
.mtp-title { text-align: center; font-size: 16px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); margin: 2px 0 14px; }
.mtp-list { display: flex; flex-direction: column; gap: 4px; max-height: 48dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mtp-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid transparent; border-radius: 14px; background: none; color: var(--ink); font: inherit; font-size: 15.5px; text-align: left; cursor: pointer; }
.mtp-row:active { background: var(--bg-sunk); }
.mtp-row[aria-pressed="true"] { border-color: var(--line); background: var(--bg-sunk); }
.mtp-row > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtp-row > svg { color: var(--ink); flex: none; }
.mtp-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; }
.mtp-empty { padding: 26px 8px; text-align: center; font-size: 13.5px; color: var(--ink-3); }
.mtp-new { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; margin-top: 14px; border: 0; border-radius: 999px; background: var(--bg-sunk); color: var(--ink-2); font: inherit; font-size: 14.5px; cursor: pointer; }

/* 子任务弹层 */
.modal.mts .modal-body { padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); }
.mts-num { font-weight: 500; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mts-list { display: flex; flex-direction: column; max-height: 46dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mts-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.mts-row:last-child { border-bottom: 0; }
.mts-check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.6px solid var(--line); background: none; color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.mts-row.is-done .mts-check { background: var(--ink); border-color: var(--ink); color: var(--card); }
.mts-input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); padding: 12px 0; }
.mts-input:focus { outline: none; }
.mts-row.is-done .mts-input { color: var(--ink-3); text-decoration: line-through; }
.mts-del { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.mts-add { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mts-plus { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.6px dashed var(--line); color: var(--ink-3); display: grid; place-items: center; }
.mts-add .input { flex: 1; border: 0; background: none; box-shadow: none; padding: 6px 0; font-size: 15px; }

/* ---------- 12. 记录瞬间编辑层（js/mobile-moment.js，参考「写说说」版式） ---------- */
.modal.mqc { min-height: min(74dvh, 620px); }
.modal.mqc .modal-body { padding: 24px 18px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.mqc-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.mqc-head { display: flex; align-items: center; justify-content: center; position: relative; min-height: 34px; }
.mqc-title { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.mqc-del { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.mqc-linked { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.mqc-linked svg { flex: none; }
.mqc-card { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px; border-radius: 18px; border: 1px solid var(--line); background: none; }
.mqc-text { flex: 1; min-height: 120px; font: inherit; font-size: 17px; line-height: 1.6; color: var(--ink); border: 0; background: none; padding: 2px; resize: none; height: auto; }
.mqc-text:focus { outline: none; }
.mqc-text::placeholder { color: var(--ink-3); }
.mqc-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.mqc-photo { position: relative; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--card); }
.mqc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mqc-rm { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(10, 12, 20, .55); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.mqc-add { width: 96px; height: 96px; border-radius: 12px; border: 1px dashed var(--ink-3); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); font-size: 12px; cursor: pointer; }
.mqc-add:active { border-color: var(--accent); color: var(--ink-2); }
.mqc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.mqc-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; max-width: 100%; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.mqc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mqc-chip:active { background: var(--bg-sunk); }
.mqc-chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.mqc-post { flex: none; width: 100%; height: 50px; margin-top: 2px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-primary, #fff); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.mqc-post:active { transform: scale(.98); }
.mqc-post:disabled { opacity: .6; }
.mqc-loc { display: flex; align-items: center; gap: 10px; }
.mqc-loc .input { flex: 1; min-width: 0; }
.mqc-loc-go { flex: none; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: none; font: inherit; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mqc-loc-go:disabled { opacity: .6; }


