/* =========================================================
 * v1.5.0 日程移动端（方案 M + 手机端 P0 修复）
 * =========================================================
 * 加载顺序：必须排在 main.css 之后（index.html 顺序保证），同权重覆盖生效。
 * 分三块：
 *   ① 手机端 P0 修复（不动桌面，全部包在 max-width:768px 内）
 *   ② 方案 M 月格 / 选中日清单（.scm-*）
 *   ③ 浮层：底部抽屉（.scm-sh-*）+ 一句话录入（.scm-qk-*）+ FAB
 * 规范：触控区 ≥44px；输入框 font-size:16px（防 iOS 聚焦缩放）；数字等宽；
 *      浮层统一 safe-area-inset 内边距；不引入任何新颜色，全部走既有 CSS 变量。
 * ========================================================= */

/* =========================================================
 * ① 手机端 P0 修复
 * ========================================================= */
@media (max-width: 768px) {

  /* P0-1 页头：三页签独占一行（各 44px 高），操作按钮换行不挤压 */
  .sc-head { display: block; margin-bottom: 10px; }
  .sc-head-l { margin-bottom: 8px; }
  .sc-head-r {
    width: 100%; margin-left: 0;
    display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  }
  .sc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .sc-tabs .btn { height: 44px; padding: 0 8px; font-size: 13.5px; }
  .sc-head-r > .btn { height: 44px; padding: 0 12px; }

  /* P0-2 明细筛选：搜索框置顶独占一行（原来是最后一行的 order 兜底） */
  #scListWrap .toolbar { gap: 8px; }
  #scListWrap .toolbar #scQ { flex: 1 1 100%; order: -1; width: 100%; height: 44px; }
  #scListWrap .toolbar .input,
  #scListWrap .toolbar .select { height: 44px; min-width: 0; flex: 1 1 calc(50% - 4px); }
  #scListWrap .toolbar #scFrom,
  #scListWrap .toolbar #scTo { flex: 1 1 calc(50% - 26px); }
  #scListWrap .toolbar #scReset { height: 44px; flex: 1 1 100%; }

  /* P0-3 日历方案切换：44px 触控（原 3px 8px，点击区约 20px） */
  .sc-scheme-bar { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 3px; }
  .sc-scheme-btn { padding: 0 14px; height: 40px; font-size: 13px; flex: 0 0 auto; }
  .sc-lu-tgl, .sc-hol-mgr-btn { height: 40px; }

  /* P0-4 经典月/周视图不再退化成单列纵向：真 7 列紧凑格（每格 ≥44px 触控） */
  .sc-cal-grid { grid-template-columns: repeat(7, 1fr); }
  .sc-cal-inner { min-width: 0; }
  .sc-cal-cell { min-height: 46px; padding: 2px; gap: 1px; border-radius: 0; }
  .sc-cal-date { font-size: 12px; padding: 1px 2px; justify-content: flex-start; gap: 3px; }
  .sc-cal-cnt { min-width: 15px; height: 15px; line-height: 15px; font-size: 9.5px; }
  .sc-cal-cell .sc-chip, .sc-cal-cell .sc-band-t { display: none; }  /* 手机上格内只留日号+条数，明细看抽屉 */
  .sc-cal-cell .sc-lu { display: none; }
  .sc-cal-cell .sc-hol-tag { font-size: 8.5px; padding: 0 2px; margin-left: 0; }
  .sc-cal-weekhead { display: grid; border-radius: 8px 8px 0 0; }
  .sc-cal-wd { padding: 6px 2px; font-size: 11.5px; text-align: center; }
  .sc-cal-head { gap: 8px; }
  .sc-calmode { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sc-calmode .btn { height: 40px; padding: 0 14px; flex: 0 0 auto; }
  .sc-cal-nav .btn { height: 40px; min-width: 40px; }
  .sc-cal-title { min-width: 0; flex: 1; }

  /* P0-5 待办提醒条 / 状态胶囊不挤行 */
  .sc-hol-bar-item { align-items: flex-start; }
  .sc-hol-bar-btn { height: 36px; }

  /* 手机端隐藏 CSV 导出（留给桌面端；手机上导出文件落不到好去处） */
  #scExp { display: none !important; }
}

/* =========================================================
 * ② 方案 M：月格 + 选中日清单
 * ========================================================= */
.scm-wrap {
  max-width: 560px; margin: 0 auto;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));  /* 给 FAB 让位 */
  -webkit-tap-highlight-color: transparent;
}

/* --- 头部（由 SchedViews def.head 渲染，drawScheme 写入 #scCalHead） --- */
.scm-head {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 2px 10px; margin: -2px 0 4px;
  background: linear-gradient(var(--card, #fff) 78%, rgba(255, 255, 255, 0));
}
.scm-nav {
  flex: none; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--border, #e5e7eb); background: var(--card, #fff);
  color: var(--text-2, #4b5563); font-size: 20px; line-height: 1; cursor: pointer;
}
.scm-nav:active { background: var(--bg, #f6f7f9); }
.scm-title { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.scm-title b { font-size: 17px; letter-spacing: .3px; color: var(--text, #111827); }
.scm-title span { font-size: 11.5px; color: var(--text-3, #6b7280); margin-top: 1px; }
.scm-today {
  flex: none; height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--primary, #2563eb); background: rgba(37, 99, 235, .07);
  color: var(--primary, #2563eb); font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.scm-scheme {
  flex: none; height: 44px; padding: 0 6px; border-radius: 10px;
  border: 1px solid var(--border, #e5e7eb); background: var(--card, #fff);
  color: var(--text-2, #4b5563); font-size: 13px;
}

/* --- 星期行 + 月格 --- */
.scm-cal {
  background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px; overflow: hidden;
}
.scm-wd { display: grid; grid-template-columns: repeat(7, 1fr); background: rgba(148, 163, 184, .07); }
.scm-wd span {
  text-align: center; padding: 7px 0; font-size: 11.5px; font-weight: 700;
  color: var(--text-3, #6b7280);
}
.scm-wd span.is-we { color: #b4534b; }

.scm-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.scm-cell {
  position: relative; min-height: 48px; padding: 4px 2px 5px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  border: 0; border-radius: 0; background: transparent; cursor: pointer;
  font-family: inherit; color: var(--text, #111827);
  box-shadow: inset -1px -1px 0 rgba(148, 163, 184, .18);
}
.scm-cell:active { background: rgba(37, 99, 235, .07); }
.scm-cell.is-out { opacity: .34; }
.scm-cell.is-we .scm-d { color: #b4534b; }
.scm-cell.is-off { background: #fff7f6; }
.scm-cell.is-work { background: #fffdf3; }

.scm-d {
  min-width: 22px; height: 22px; line-height: 22px; text-align: center;
  font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  border-radius: 999px; color: var(--text, #111827);
}
.scm-cell.is-today .scm-d { background: var(--primary, #2563eb); color: #fff; }
.scm-cell.is-sel { box-shadow: inset 0 0 0 2px var(--primary, #2563eb); border-radius: 8px; }
.scm-cell.is-today.is-sel { box-shadow: inset 0 0 0 2px var(--primary, #2563eb); }

.scm-fest {
  max-width: 100%; font-size: 8.5px; line-height: 1.2; color: #b91c1c;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -2px;
}
.scm-dots { display: flex; align-items: center; gap: 2px; height: 4px; margin-top: 1px; }
.scm-dot { width: 4px; height: 4px; border-radius: 999px; background: #6366f1; }
.scm-dot.is-other { background: #94a3b8; }
.scm-more { font-size: 8px; font-style: normal; color: var(--text-3, #6b7280); line-height: 1; }

/* --- 选中日清单 --- */
.scm-day {
  margin-top: 10px; background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb); border-radius: 14px; overflow: hidden;
}
.scm-day-hd {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 12px 9px; border-bottom: 1px solid var(--border, #e5e7eb);
  background: rgba(148, 163, 184, .05);
}
.scm-day-hd b { font-size: 15px; color: var(--text, #111827); }
.scm-day-wd { font-size: 11.5px; color: var(--text-3, #6b7280); }
.scm-day-cnt { font-size: 11.5px; color: var(--text-3, #6b7280); }
.scm-day-add {
  margin-left: auto; height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--primary, #2563eb); background: #fff;
  color: var(--primary, #2563eb); font-size: 12.5px; font-weight: 700; cursor: pointer;
}

.scm-items { padding: 6px; }
.scm-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 10px 8px; border: 0; border-bottom: 1px solid rgba(148, 163, 184, .16);
  background: transparent; text-align: left; cursor: pointer; font-family: inherit;
  border-radius: 8px;
}
.scm-item:last-child { border-bottom: 0; }
.scm-item:active { background: rgba(37, 99, 235, .06); }
.scm-item.is-other .scm-itm { color: var(--text-3, #6b7280); }
.scm-itm {
  flex: none; width: 44px; padding-top: 2px;
  font-size: 12.5px; font-variant-numeric: tabular-nums;
  color: var(--text-2, #4b5563); font-weight: 700;
}
.scm-ibd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.scm-itt {
  font-size: 14px; font-weight: 600; color: var(--text, #111827);
  line-height: 1.35; overflow-wrap: anywhere;
}
.scm-imeta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.scm-inote {
  font-size: 11.5px; color: var(--text-3, #6b7280); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.scm-igo { flex: none; color: #c3cad6; font-size: 18px; line-height: 1; padding-top: 1px; }

.scm-kind {
  font-style: normal; font-size: 10.5px; line-height: 1.6; padding: 0 6px;
  border-radius: 5px; white-space: nowrap;
  background: rgba(37, 99, 235, .10); color: #1d4ed8; border: 1px solid rgba(37, 99, 235, .18);
}
.scm-kind-lead { background: rgba(217, 119, 6, .12); color: #b45309; border-color: rgba(217, 119, 6, .26); }
.scm-kind-customer { background: rgba(18, 161, 80, .12); color: #15803d; border-color: rgba(18, 161, 80, .26); }
.scm-kind-sale { background: rgba(99, 102, 241, .12); color: #4338ca; border-color: rgba(99, 102, 241, .26); }
.scm-kind-purchase { background: rgba(139, 92, 246, .12); color: #6d28d9; border-color: rgba(139, 92, 246, .26); }
.scm-kind-supplier { background: rgba(100, 116, 139, .14); color: #475569; border-color: rgba(100, 116, 139, .26); }
.scm-kind-more, .scm-span { background: rgba(148, 163, 184, .16); color: var(--text-3, #6b7280); border-color: rgba(148, 163, 184, .26); }
.scm-st { font-style: normal; font-size: 10.5px; line-height: 1.6; padding: 0 6px; border-radius: 5px; }
.scm-st-pending { background: #fef3c7; color: #92400e; }
.scm-st-expired { background: #f1f2f4; color: #6b7280; text-decoration: line-through; }

.scm-empty { padding: 26px 12px; text-align: center; font-size: 13px; color: var(--text-2, #4b5563); line-height: 1.9; }
.scm-empty span { font-size: 11.5px; color: var(--text-3, #6b7280); }

/* --- FAB --- */
.scm-fabwrap { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; }
.scm-fab {
  width: 56px; height: 56px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(140deg, #2b8cff, #0d5fc4);
  box-shadow: 0 8px 20px rgba(13, 95, 196, .34), 0 2px 6px rgba(13, 95, 196, .24);
  display: flex; align-items: center; justify-content: center;
}
.scm-fab span { font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.scm-fab:active { transform: scale(.95); }
@media (min-width: 769px) { .scm-fabwrap { display: none; } }   /* 桌面端不挡内容，新建走页头按钮 */

/* =========================================================
 * ③ 浮层：底部抽屉 + 一句话录入
 * ========================================================= */
body.scm-sheet-open, body.scm-qk-open { overflow: hidden; }

.scm-sh-host, .scm-qk-host { position: fixed; inset: 0; z-index: 300; }
.scm-sh-mask, .scm-qk-mask {
  position: absolute; inset: 0; background: rgba(15, 23, 42, .44);
  animation: scm-fade .18s ease;
}
.scm-sh, .scm-qk-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--card, #fff); border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 28px rgba(15, 23, 42, .18);
  display: flex; flex-direction: column;
  max-height: 78vh; padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: scm-up .22s cubic-bezier(.22, .8, .32, 1);
}
.scm-sh-grip {
  width: 38px; height: 4px; border-radius: 999px; background: #d5dae3;
  margin: 8px auto 2px; flex: none;
}
.scm-sh-hd, .scm-qk-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 10px; flex: none;
}
.scm-sh-hd b, .scm-qk-hd b { font-size: 16px; color: var(--text, #111827); }
.scm-sh-wd, .scm-sh-cnt { font-size: 12px; color: var(--text-3, #6b7280); }
.scm-x {
  margin-left: auto; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb); background: #fff;
  color: var(--text-3, #6b7280); font-size: 14px; cursor: pointer;
}
.scm-sh-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 10px; flex: none; }
.scm-btn {
  height: 44px; border-radius: 11px; cursor: pointer; font-size: 14px; font-weight: 700;
  border: 1px solid var(--border, #e5e7eb); background: var(--card, #fff); color: var(--text-2, #4b5563);
  font-family: inherit;
}
.scm-btn-primary { background: var(--primary, #2563eb); border-color: var(--primary, #2563eb); color: #fff; }
.scm-btn:disabled { opacity: .45; cursor: not-allowed; }
.scm-btn-ghost { background: transparent; }

.scm-sh-bd { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 8px 12px; }
.scm-shitem {
  display: flex; gap: 10px; width: 100%; text-align: left; padding: 11px 8px;
  border: 0; border-bottom: 1px solid rgba(148, 163, 184, .16);
  background: transparent; cursor: pointer; font-family: inherit; border-radius: 8px;
}
.scm-shitem:active { background: rgba(37, 99, 235, .06); }
.scm-sh-empty { padding: 28px 12px; text-align: center; color: var(--text-3, #6b7280); font-size: 13px; }

/* 一句话录入 */
.scm-qk-bd { padding: 0 14px; overflow-y: auto; }
.scm-qk-ta {
  width: 100%; box-sizing: border-box; min-height: 78px; resize: none;
  padding: 12px; border-radius: 12px; border: 1px solid var(--border, #e5e7eb);
  background: #fff; color: var(--text, #111827); font-size: 16px;      /* 16px：防 iOS 聚焦放大 */
  font-family: inherit; line-height: 1.5;
}
.scm-qk-ta:focus { outline: 2px solid rgba(37, 99, 235, .35); outline-offset: 1px; border-color: var(--primary, #2563eb); }
.scm-qk-tips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; min-height: 20px; }
.scm-qk-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(37, 99, 235, .10); color: #1e40af; }
.scm-qk-tag-warn { background: #fff7ed; color: #b45309; }
.scm-qk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.scm-chip {
  height: 38px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border, #e5e7eb); background: #fff;
  color: var(--text, #111827); font-size: 13px; font-family: inherit;
}
.scm-chip.is-on { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); background: rgba(37, 99, 235, .07); }
.scm-chip-tt { display: inline-flex; align-items: center; max-width: 100%; color: var(--text-2, #4b5563); }
.scm-qk-hint { font-size: 11.5px; color: var(--text-3, #6b7280); line-height: 1.7; padding: 6px 0 10px; }
.scm-qk-hint i { font-style: normal; color: var(--text-2, #4b5563); background: rgba(148, 163, 184, .16); padding: 1px 5px; border-radius: 4px; margin-right: 4px; }
.scm-qk-ft {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px;
  padding: 10px 14px 14px; border-top: 1px solid var(--border, #e5e7eb); flex: none;
}

@keyframes scm-up { from { transform: translateY(14px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@keyframes scm-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .scm-sh, .scm-qk-sheet, .scm-sh-mask, .scm-qk-mask { animation: none; }
}

/* 桌面兜底：万一在桌面选了「月格」，窄版居中显示，不铺满整屏 */
@media (min-width: 769px) {
  .scm-wrap { padding-bottom: 16px; }
  .scm-head { position: static; background: transparent; }
  .scm-cell { min-height: 56px; }
  /* v1.6.0：一句话面板在桌面改为居中卡片（不再是底部抽屉），配合 Ctrl+K / Esc 键盘流 */
  .scm-qk-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, calc(100vw - 96px));
    max-height: 84vh;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
    animation: scm-pop .16s ease;
    padding-bottom: 0;
  }
  .scm-qk-grip { display: none; }
}
@keyframes scm-pop { from { opacity: 0; transform: translate(-50%, -48.5%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* v1.6.0：右栏「新建 + 一句话」动作行（方案 A 右栏底部） */
.sc-a-acts { display: flex; gap: 8px; margin-top: 8px; }
.sc-a-acts .btn { flex: 1; }

/* v1.6.5 手机月格完成态 */
.scm-dot.is-done{background:#cbd5e1;box-shadow:inset 0 0 0 1px #94a3b8}
.scm-item.is-done .scm-itt,.scm-shitem.is-done .scm-itt{color:#94a3b8;text-decoration:line-through;text-decoration-thickness:1px}
.scm-st-done{background:#e6f6ed;color:#0f7a3d}
.scm-item.is-done,.scm-shitem.is-done{opacity:.78}

/* =========================================================
 * v1.6.7 手机端「周 / 月 / 季度 / 年」视角切换 + 完成勾选框
 * ---------------------------------------------------------
 * 老板原话：「手机端：除了月格外，看不到周，季度，年视角的切换键。」
 * 约束：375px 宽度下不得横向溢出；正文字号 ≥11px；触控目标 ≥40px。
 * 全部使用既有 CSS 变量，不新增色板。
 * ========================================================= */

/* --- 头部两行：① 导航行（原有）② 视角分段控件 --- */
.scm-top {
  position: sticky; top: 0; z-index: 6;
  margin: -2px 0 6px; padding-bottom: 2px;
  background: var(--card, #fff);
}
.scm-top .scm-head {
  position: static; margin: 0; padding: 6px 2px 6px;
  background: transparent;
}
/* 小屏（375px）标题不换行，超长省略，避免把导航挤到第二行 */
.scm-title b {
  display: block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 周视图标题较长（10月19日 - 10月25日），略降字号 */
.scm-head.is-week .scm-title b { font-size: 14.5px; letter-spacing: 0; }
.scm-head.is-quarter .scm-title b,
.scm-head.is-year .scm-title b { font-size: 16px; }

.scm-modes {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 0 2px; border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; overflow: hidden; background: var(--card, #fff);
}
.scm-mbtn {
  height: 44px; min-width: 0; padding: 0 4px;
  border: 0; border-right: 1px solid var(--border, #e5e7eb);
  border-radius: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--text-2, #4b5563);
  -webkit-tap-highlight-color: transparent;
}
.scm-mbtn:last-child { border-right: 0; }
.scm-mbtn:active { background: rgba(37, 99, 235, .08); }
.scm-mbtn.is-on {
  background: var(--primary, #2563eb); border-right-color: var(--primary, #2563eb);
  color: #fff;
}

/* --- 勾选框行（选中日清单 + 抽屉共用） --- */
.scm-row { display: flex; align-items: center; gap: 6px; }
.scm-row .scm-item,
.scm-row .scm-shitem { flex: 1 1 auto; min-width: 0; }
.scm-ck {
  flex: none; width: 40px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.scm-ck input[type="checkbox"] {
  width: 20px; height: 20px; margin: 0;
  accent-color: var(--primary, #2563eb); cursor: pointer;
}
/* 列表里最后一行不再画分隔线（行包了一层 div，原 :last-child 失效） */
.scm-items .scm-row { border-bottom: 1px solid rgba(148, 163, 184, .16); }
.scm-items .scm-row:last-child { border-bottom: 0; }
.scm-items .scm-row .scm-item { border-bottom: 0; }

/* --- 周视图：7 个纵向日期分组 --- */
.scm-week { display: flex; flex-direction: column; gap: 8px; }
.scm-wg {
  background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px; overflow: hidden;
}
.scm-wg.is-today { border-color: rgba(37, 99, 235, .45); box-shadow: 0 0 0 1px rgba(37, 99, 235, .16); }
.scm-wghd {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 8px 4px 12px;
  background: rgba(148, 163, 184, .06); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scm-wgd {
  font-size: 14px; font-weight: 700; line-height: 1.2;
  color: var(--text, #111827); font-variant-numeric: tabular-nums;
}
.scm-wgw { font-size: 11.5px; color: var(--text-3, #6b7280); }
.scm-wgtoday {
  font-size: 11px; line-height: 1.6; padding: 0 6px; border-radius: 5px;
  background: var(--primary, #2563eb); color: #fff; font-weight: 700;
}
.scm-wgc { margin-left: auto; font-size: 11.5px; color: var(--text-3, #6b7280); }
.scm-wgadd {
  flex: none; width: 40px; height: 40px; border-radius: 9px;
  border: 1px solid var(--primary, #2563eb); background: #fff;
  color: var(--primary, #2563eb); font-size: 17px; line-height: 1;
  font-family: inherit; font-weight: 700; cursor: pointer;
}
.scm-wgadd:active { background: rgba(37, 99, 235, .08); }
.scm-wgbd { padding: 2px 6px 4px; }
.scm-we {
  padding: 12px 8px; text-align: center;
  font-size: 12px; color: var(--text-3, #6b7280); line-height: 1.6;
}
.scm-wsum {
  margin-top: 10px; padding: 8px 4px 0; text-align: center;
  font-size: 11.5px; color: var(--text-3, #6b7280);
}

/* --- 迷你月历（季度：3 个竖排 / 年：12 个 2 列） --- */
.scm-qwrap { display: flex; flex-direction: column; gap: 10px; }
.scm-mini {
  background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px; overflow: hidden;
}
.scm-mini-hd {
  padding: 10px 12px 4px; font-size: 13.5px; font-weight: 700;
  color: var(--text, #111827); line-height: 1.3;
}
.scm-mini-wd {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 2px 4px 3px;
  font-size: 11px; color: var(--text-3, #6b7280); text-align: center;
}
.scm-mini-g { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 4px 6px; }
.scm-mini-c {
  min-height: 34px; padding: 3px 0 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  border: 0; border-radius: 8px; background: transparent;
  font-family: inherit; font-size: 11.5px; color: var(--text, #111827);
  font-variant-numeric: tabular-nums; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scm-mini-c.is-blank { visibility: hidden; cursor: default; }
.scm-mini-c.has:active { background: rgba(37, 99, 235, .08); }
.scm-mini-d {
  min-width: 20px; height: 20px; line-height: 20px;
  border-radius: 999px; text-align: center; font-weight: 700;
}
.scm-mini-c.is-today .scm-mini-d { background: var(--primary, #2563eb); color: #fff; }
.scm-mini-dots {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  height: 6px; font-size: 9px;
}
.scm-mini-dot { width: 4px; height: 4px; border-radius: 999px; background: #6366f1; }
.scm-mini-dot.is-done { background: #cbd5e1; box-shadow: inset 0 0 0 1px #94a3b8; }
.scm-mini-more { font-style: normal; font-size: 9px; line-height: 1; color: var(--text-3, #6b7280); }

/* 年视图：2 列 × 6 行，375px 下每格约 180px（日号 11px 放得下） */
.scm-ywrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.scm-ywrap .scm-mini { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.scm-ywrap .scm-mini-hd { padding: 8px 8px 2px; font-size: 12.5px; }
.scm-ywrap .scm-mini-wd { padding: 0 2px 2px; font-size: 10px; }
.scm-ywrap .scm-mini-g { padding: 0 2px 5px; }
.scm-ywrap .scm-mini-c {
  min-height: 24px; padding: 1px 0; gap: 1px;
  font-size: 11px; cursor: inherit;
}
.scm-ywrap .scm-mini-d { min-width: 16px; height: 16px; line-height: 16px; font-size: 11px; }
.scm-mini-mdot { width: 3px; height: 3px; border-radius: 999px; background: #6366f1; }
.scm-mini-mdot.is-none { background: transparent; }

/* 375px 极窄兜底：头部分段控件按钮字号回落到 13px，仍 ≥11px */
@media (max-width: 380px) {
  .scm-mbtn { font-size: 13px; }
  .scm-ywrap { gap: 6px; }
  .scm-ywrap .scm-mini-g { padding: 0 1px 4px; }
}

/* ===== v1.8.3 日程类型新增 Heysen（手机端专属标识，2026-10-26）=====
   只追加规则；金色 #f59e0b 左边框 + 时间列着色 + 圆点/标签，与「其他」灰明确区分。 */
.scm-item.is-heysen,
.scm-shitem.is-heysen {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, .06);
}
.scm-item.is-heysen .scm-itm,
.scm-shitem.is-heysen .scm-itm { color: #8a5b00; }
.scm-item.is-heysen .scm-itt::after,
.scm-shitem.is-heysen .scm-itt::after {
  content: 'Heysen';
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  vertical-align: 1px;
  color: #8a5b00;
  background: rgba(245, 158, 11, .18);
  border: 1px solid rgba(245, 158, 11, .45);
}
.scm-dot.is-heysen { background: #f59e0b; }
.scm-mini-dot.is-heysen { background: #f59e0b; }
.scm-mini-mdot.is-heysen { background: #f59e0b; }
