/* 面板 · 日历 的样式（pages/calendar.js）。归 M1 平台。样子照 docs/mockups/dashboard-v2.html 的「日历」（样式稿 477-680 行）。
   类名都以 cal- 开头（小日历 cal-dp-、日程 cal-ag-、选中那天的清单 cal-d*）；周视图本身的样式在 week.css，一行里的标题和小字借 shell.css 的 up-t、up-c。
   颜色和周视图一致：课表灰蓝、考试红、作业蓝、备注灰、你记的日程青、外来的日历绿（--t-ext）。 */
.cal-page {
  --ag-class: #8a96a5; --ag-class-bg: #f3f5f8; --ag-exam-bg: #fdefee; --ag-mine-bg: #ebf6f6; --ag-hw-bg: #edf3fd; --ag-ext-bg: #f1f7ea;
}
/* 这一页自己画的按钮去掉全站按钮的白底细边（:where 不加权重，下面各自的类照样盖得过它；.btn、.ibtn 和周视图里的不动） */
:where(.cal-head, .cal-legend, .cal-ag, .cal-grid, .cal-day, .cal-dp) button:where(:not(.btn, .ibtn)) {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; transform: none; }

/* ---------------------------------------------------------------- 顶上：标题（点了弹出小日历）、第几教学周、看法、翻页 */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cal-head h1 { margin: 0; font-variant-numeric: tabular-nums; }
.cal-head-l { min-width: 0; }
button.cal-title { display: inline-flex; align-items: center; gap: 4px; margin-left: -6px; padding: 0 6px; border-radius: 10px; letter-spacing: inherit; line-height: inherit;
  transition: background-color .15s, color .15s; }
button.cal-title:hover, button.cal-title[aria-expanded="true"] { background: var(--soft); }
.cal-down { width: 22px; height: 22px; color: var(--faint); transform: rotate(90deg); transition: transform .2s var(--ease-out); }
.cal-title[aria-expanded="true"] .cal-down { transform: rotate(-90deg); }
.page > .cal-head .cal-wk, .cal-wk { margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.cal-wk:empty { display: none; }
.cal-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 右上角：看法切换和翻页一行 */
.cal-head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav .btn { min-width: 36px; padding: 0 10px; }
.cal-seg { display: inline-flex; gap: 2px; max-width: 100%; padding: 3px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); }
.cal-seg button { display: inline-flex; align-items: center; padding: 4px 14px; border-radius: 7px; color: var(--muted); font-size: 13.5px; font-weight: 400;
  line-height: 20px; white-space: nowrap; text-align: center; }
.cal-seg button:hover { color: var(--ink); }
.cal-seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .08); }

/* ---------------------------------------------------------------- 图例：一类一个，点了不看这一类（划掉、变淡）；外来的日历读不到时后面一行红字 */
/* 图例和「＋ 新建日程」一行：图例在左、按钮靠右，上下居中；按钮和右上角的「今天」一样大小（2026-10-18 Cris） */
.page > .cal-bar { margin-top: 14px; }
.cal-bar { display: flex; align-items: center; gap: 8px 12px; }
.cal-bar > .cal-legend { flex: 1; min-width: 0; }
.cal-bar > .cal-add { flex: none; margin-left: auto; display: flex; gap: 8px; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 12.5px; }
button.cal-lg { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 26px; padding: 2px 8px; border-radius: 8px; color: var(--muted);
  font-size: 12.5px; font-weight: 400; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color .15s, color .15s; }
button.cal-lg:hover { background: var(--soft); color: var(--ink); }
.cal-lg i { flex: none; width: 9px; height: 9px; border-radius: 3px; transition: opacity .2s, transform .3s var(--ease-bounce); }
button.cal-lg.is-off { color: var(--faint); text-decoration: line-through; }
.cal-lg.is-off i { opacity: .3; transform: scale(.7); }
.cal-lg-err { display: inline-flex; padding: 0 4px; text-decoration: none; }
.cal-lg-err:hover { text-decoration: none; }
.cal-lg i.k-class, .cal-dots i.k-class, .cal-cdot.k-class i { background: var(--t-class); }
.cal-lg i.k-exam, .cal-dots i.k-exam, .cal-cdot.k-exam i { background: var(--t-exam); }
.cal-lg i.k-hw, .cal-dots i.k-hw { background: var(--t-hw); }
.cal-lg i.k-note, .cal-dots i.k-note { background: var(--t-note); }
.cal-lg i.k-mine, .cal-dots i.k-mine, .cal-cdot.k-mine i { background: var(--t-mine); }
.cal-lg i.k-ext, .cal-dots i.k-ext, .cal-cdot.k-ext i { background: var(--t-ext); }
.cal-dots i.done { background: var(--line-2); }
/* 点掉的一类在周视图里也不画（周视图的块、顶上那一行带着 b-<类>、t-<类>） */
.cal-no-class .wk-b.b-class, .cal-no-exam :is(.wk-b.b-exam, .wk-chip.t-exam), .cal-no-hw :is(.wk-b.b-hw, .wk-chip.t-hw), .cal-no-note :is(.wk-b.b-note, .wk-chip.t-note),
.cal-no-mine :is(.wk-b.b-mine, .wk-chip.t-mine), .cal-no-ext :is(.wk-b.b-ext, .wk-chip.t-ext) { display: none; }

.page > .cal-body { margin-top: 14px; }
.page > .cal-note { margin-top: 10px; }
.cal-note:empty { display: none; }
.page > .cal-day { margin-top: 20px; }
.cal-day:empty { display: none; }
.cal-day .sec-h { align-items: center; }

/* 记日程的小窗口（todo.js 的面板里）：一句说明、输入框、大的「记下」；认不出时一句红字 */
.cal-qa { display: grid; gap: 12px; }
.cal-qa-day input.cal-qa-date { justify-self: start; }
textarea.cal-qa-in { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel);
  color: var(--ink); font-size: 16px; line-height: 1.6; resize: vertical; }
textarea.cal-qa-in:focus { outline: none; border-color: var(--tint); box-shadow: 0 0 0 4px var(--tint-soft); }
.cal-qa-peek { margin: 0; color: var(--text); font-size: 14px; line-height: 1.5; }
.cal-qa-peek.wait { color: var(--muted); }
.cal-qa-peek[hidden] { display: none; }
.cal-qa-err { margin: 0; color: var(--red); font-size: 13.5px; }
.cal-qa-err[hidden] { display: none; }
.cal-qa button.btn.cal-qa-go { width: 100%; height: 46px; border-radius: 12px; font-size: 16px; font-weight: 600; }

/* ---------------------------------------------------------------- 月：一个月一张表，周一开头 */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; }
.cal-w { padding: 6px 8px; background: var(--soft); color: var(--muted); font-size: 12px; text-align: center; }
button.cal-c { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 96px; padding: 6px; background: var(--panel); color: var(--text); font-weight: 400;
  text-align: left; transition: background-color .2s; }
button.cal-c:hover { background: var(--soft); }
button.cal-c.out { background: var(--soft); }   /* 上下月的格子：浅灰底、淡数字，和本月的白格一眼分开（#526）；事项块照常显示、能点 */
button.cal-c.out:hover { background: var(--soft-2); }
.cal-c.out .cal-n { color: var(--faint); }
button.cal-c.pick { box-shadow: inset 0 0 0 1.5px var(--tint); }
.cal-n { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 12px; color: var(--ink); font-size: 13px; line-height: 24px; text-align: center;
  font-variant-numeric: tabular-nums; }
.cal-c.today .cal-n { background: var(--tint); color: var(--on-dark); font-weight: 600; }
.cal-ev { display: block; padding: 1px 6px; border-radius: 5px; color: var(--ink); font-size: 12px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.t-exam { background: var(--t-exam-bg); } .cal-ev.t-hw { background: var(--t-hw-bg); } .cal-ev.t-note { background: var(--t-note-bg); }
.cal-ev.t-mine { background: var(--t-mine-bg); } .cal-ev.t-ext { background: var(--t-ext-bg); }
.cal-ev.t-class { background: #e9edf2; color: #39434f; }   /* 课：和周视图的课一个颜色（week.css 的 --wk-class），排在事后面 */
.cal-ev.q { box-shadow: inset 0 0 0 1px var(--yellow-line); }
.cal-ev.done { background: none; color: var(--faint); text-decoration: line-through; }
.cal-ev.late { color: var(--red); }
.cal-ev.chg { box-shadow: inset -3px 0 0 var(--yellow, #d9a400); }
.cal-ev.cancel { opacity: .55; text-decoration: line-through; box-shadow: inset -3px 0 0 var(--red); }
.cal-more { padding: 0 6px; color: var(--muted); font-size: 11px; }
.cal-dots { display: none; gap: 3px; justify-content: center; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; }

/* ---------------------------------------------------------------- 选中那天的清单：左边时间，类型小方块（课、日程是小色块），标题和小字 */
.cal-dr { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sec-h + .cal-dr { border-top: 0; }
.cal-dt { flex: none; width: 92px; white-space: nowrap; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cal-dt.late { color: var(--red); }
.cal-dr .up-b { display: block; color: inherit; text-decoration: none; cursor: default; }
.cal-dr :is(button, a).up-b { cursor: pointer; text-align: left; }
.cal-dr :is(button, a).up-b:hover .up-t { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--line-2); }
.cal-dr .up-t.cal-done { color: var(--muted); text-decoration: line-through; }
/* 你记的日程右边的圆圈叉：灰色、悬停变红；宽屏移到这一行上才露出来（键盘选中时也露），手机上一直在（和待办行的删除一样） */
/* 圆圈叉：每一项都有、一直显示（2026-10-18 Cris），灰色细线，悬停变红 */
button.ibtn.cal-del { flex: none; color: var(--faint); transition: background-color .15s, color .15s; }
.cal-dr button.ibtn.cal-del { margin-left: auto; }
/* 你记的日程能改（calendar.js 的 editEvent）：叉的左边一支笔；改的窗口里「每周重复」一行是勾选加到哪天 */
button.ibtn.cal-edit { flex: none; color: var(--faint); }
.cal-dr button.ibtn.cal-edit { margin-left: auto; }
.cal-dr button.ibtn.cal-edit + button.ibtn.cal-del { margin-left: 0; }
button.ibtn.cal-edit:hover, button.ibtn.cal-edit:focus-visible { color: var(--ink); }
.cal-rep-r { display: flex; align-items: center; gap: 10px; }
.cal-rep-r input[type=date] { flex: 1; }
button.ibtn.cal-del:hover, button.ibtn.cal-del:focus-visible { color: var(--red); }
.cal-del .ic { width: 18px; height: 18px; }
/* 日程看法：叉在卡片右上角（卡片本身是按钮、链接，叉不能套在里面） */
.cal-ag-cw { position: relative; min-width: 0; }
.cal-ag-cw > .cal-ag-card { padding-right: 40px; }
.cal-ag-cw.two > .cal-ag-card { padding-right: 76px; }
.cal-ag-cw > .cal-acts { position: absolute; top: 4px; right: 4px; }
.cal-ag-card.cancel > .cal-ag-title > span:first-child { text-decoration: line-through; color: var(--muted); }
/* 改（铅笔）和删（圆圈叉）挨着；铅笔悬停变深 */
.cal-acts { flex: none; display: inline-flex; align-items: center; gap: 2px; }
.cal-dr .cal-acts { margin-left: auto; }
.cal-dr .cal-acts button.ibtn.cal-del { margin-left: 0; }
button.ibtn.cal-edit { flex: none; color: var(--faint); transition: background-color .15s, color .15s; }
button.ibtn.cal-edit:hover, button.ibtn.cal-edit:focus-visible { color: var(--ink); }
.cal-edit .ic { width: 17px; height: 17px; }
/* 改课、改事项的小窗口 */
.cal-ed-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 15px; }
.cal-ed-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cal-ed-scope { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; font-size: 14px; }
.cal-ed-scope label { display: flex; align-items: center; gap: 6px; }
.cal-ed button.btn.cal-qa-go { width: 100%; height: 46px; border-radius: 12px; font-size: 16px; font-weight: 600; }
.cal-ed button.btn.cal-ed-reset { width: 100%; }
.cal-cdot { flex: none; display: grid; place-items: center; width: 20px; height: 20px; }
.cal-cdot i { width: 8px; height: 8px; border-radius: 3px; }

/* ---------------------------------------------------------------- 日程：一天一段 */
.cal-ag { --tcol: 52px; --dcol: 20px; --gap: 10px; display: grid; gap: 30px; }
.cal-ag-empty { padding: 40px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; }
.cal-ag-day { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 0 8px; border-radius: 10px; }
.cal-ag-date { display: flex; flex-wrap: wrap; align-items: baseline; align-content: start; gap: 0 6px; padding-top: 6px; color: var(--muted); font-size: 12.5px; }
.cal-ag-date b { color: var(--ink); font-size: 24px; font-weight: 650; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cal-ag-date small { flex-basis: 100%; margin-top: 2px; color: var(--faint); font-size: 12px; }
/* 日期是「在这天记日程」的按钮：底下一直露着蓝色的「＋ 记日程」（2026-10-18 Cris：只在悬停时露出看不见） */
.cal-ag button.cal-ag-date { align-self: start; margin: 0 0 0 -8px; padding: 6px 8px 8px; border-radius: 10px; cursor: pointer; transition: background-color .15s; }
.cal-ag button.cal-ag-date:hover { background: var(--soft); }
/* 没事那天的「没有安排」也是记日程的按钮：平时浅灰字，移上去变蓝、后面露出「＋ 记日程」 */
button.cal-ag-none { justify-self: start; margin: 0; padding: 10px 0 0 calc(var(--tcol) + var(--dcol) + 2 * var(--gap)); border: 0; background: none;
  color: var(--faint); font-size: 13px; font-weight: 400; text-align: left; cursor: pointer; }
button.cal-ag-none:hover, button.cal-ag-none:active { background: none; color: var(--tint); transform: none; }
button.cal-ag-none:hover::after { content: "　＋ 记日程"; }
.cal-ag-day.empty .cal-ag-rows::before { display: none; }   /* 没有安排的那天不画竖线 */
.cal-ag-day.today .cal-ag-date :is(b, span, small) { color: var(--tint); }
.cal-ag-rows { position: relative; display: grid; gap: 10px; }
.cal-ag-rows::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: calc(var(--tcol) + var(--gap) + var(--dcol) / 2); width: 1px; background: var(--line); }
.cal-ag-row { display: grid; grid-template-columns: var(--tcol) var(--dcol) minmax(0, 1fr); gap: 0 var(--gap); align-items: start; }
.cal-ag-t { padding-top: 12px; color: var(--muted); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-ag-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin: 15px auto 0; border: 1.6px solid var(--k); border-radius: 50%; background: var(--panel); }
.cal-ag-card { display: grid; gap: 1px; width: 100%; min-width: 0; padding: 9px 14px 10px; border-radius: 8px; border-left: 3px solid var(--k); background: var(--kbg);
  color: inherit; text-align: left; text-decoration: none; transition: box-shadow .15s, filter .15s, opacity .15s; }
:is(button, a).cal-ag-card { cursor: pointer; }
:is(button, a).cal-ag-card:hover { box-shadow: var(--shadow-1); filter: brightness(.985); text-decoration: none; }
button.cal-ag-card { border-left: 3px solid var(--k); border-radius: 8px; background: var(--kbg); }
.cal-ag-time { color: var(--tint); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.cal-ag-time.late { color: var(--red); }
.cal-ag-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.5; }
.cal-ag-title > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.cal-ag-title small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.cal-ag-title .tag { align-self: center; }
.cal-ag-card.done .cal-ag-title > span:first-child { color: var(--muted); text-decoration: line-through; }
.cal-ag-card.done { opacity: .6; }
.cal-ag-card.q { box-shadow: inset 0 0 0 1px var(--yellow-line); }
.cal-ag-row.past .cal-ag-card { opacity: .62; }
.cal-ag-row.past .cal-ag-dot { border-color: var(--line-2); }
.cal-ag-now { position: relative; display: flex; align-items: center; gap: 8px; margin: -2px 0; padding-left: calc(var(--tcol) + var(--gap) + var(--dcol) / 2 - 4px); }
.cal-ag-now span { position: absolute; left: 0; width: var(--tcol); color: var(--tint); font-size: 11px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cal-ag-now i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tint); }
.cal-ag-now::after { content: ""; flex: 1; height: 1.5px; background: var(--tint); opacity: .55; }
.cal-page .k-class { --k: var(--ag-class); --kbg: var(--ag-class-bg); }
.cal-page .k-exam { --k: var(--t-exam); --kbg: var(--ag-exam-bg); }
.cal-page .k-hw { --k: var(--t-hw); --kbg: var(--ag-hw-bg); }
.cal-page .k-note { --k: var(--t-note); --kbg: var(--soft); }
.cal-page .k-mine { --k: var(--t-mine); --kbg: var(--ag-mine-bg); }
.cal-page .k-ext { --k: var(--t-ext); --kbg: var(--ag-ext-bg); }

/* ---------------------------------------------------------------- 对话里刚记的那一天亮两下（月格子、日程那一段、周视图那一列、下面的清单） */
:is(.cal-c, .cal-ag-day, .cal-day > .sec-box).is-flash,
.wk.cal-fl-0 .wk-body > .wk-col:nth-child(2), .wk.cal-fl-1 .wk-body > .wk-col:nth-child(3), .wk.cal-fl-2 .wk-body > .wk-col:nth-child(4), .wk.cal-fl-3 .wk-body > .wk-col:nth-child(5), .wk.cal-fl-4 .wk-body > .wk-col:nth-child(6), .wk.cal-fl-5 .wk-body > .wk-col:nth-child(7), .wk.cal-fl-6 .wk-body > .wk-col:nth-child(8) { animation: cal-blink 1s ease-in-out 2; }
@keyframes cal-blink { 50% { background-color: rgba(15, 139, 141, .16); } }
@media (prefers-reduced-motion: reduce) {
  :is(.cal-c, .cal-ag-day, .cal-day > .sec-box).is-flash,
  .wk.cal-fl-0 .wk-body > .wk-col:nth-child(2), .wk.cal-fl-1 .wk-body > .wk-col:nth-child(3), .wk.cal-fl-2 .wk-body > .wk-col:nth-child(4), .wk.cal-fl-3 .wk-body > .wk-col:nth-child(5), .wk.cal-fl-4 .wk-body > .wk-col:nth-child(6), .wk.cal-fl-5 .wk-body > .wk-col:nth-child(7), .wk.cal-fl-6 .wk-body > .wk-col:nth-child(8) { animation: none; background-color: rgba(15, 139, 141, .12); }
}

/* ---------------------------------------------------------------- 小日历：挂在 body 上，标题下面弹出来 */
.cal-dp { position: fixed; z-index: 60; width: 304px; max-width: calc(100vw - 32px); padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  box-shadow: var(--shadow-3); animation: cal-dp-in .2s var(--ease-out); }
@keyframes cal-dp-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.cal-dp-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.cal-dp-t { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--ink); font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.cal-dp button.cal-dp-t { padding: 0 10px; border-radius: 8px; font-weight: 600; transition: background-color .15s; }
.cal-dp button.cal-dp-t:hover { background: var(--soft); }
.cal-dp-down { width: 15px; height: 15px; color: var(--faint); transform: rotate(90deg); }
.cal-dp-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-dp-w { padding: 4px 0; color: var(--faint); font-size: 11.5px; text-align: center; }
.cal-dp button.cal-dp-d { position: relative; display: grid; place-items: center; height: 36px; border-radius: 10px; color: var(--ink); font-size: 13.5px; font-weight: 400;
  text-align: center; font-variant-numeric: tabular-nums; transition: background-color .15s; }
.cal-dp button.cal-dp-d:hover { background: var(--soft); }
.cal-dp-d.out { color: var(--faint); }
.cal-dp .cal-dp-d.today { color: var(--tint); font-weight: 600; }
.cal-dp button.cal-dp-d.on, .cal-dp button.cal-dp-d.on:hover { background: var(--tint); color: var(--on-dark); font-weight: 600; }
.cal-dp-d i { position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--faint); }
.cal-dp-d.on i { background: var(--on-dark); }
.cal-dp-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cal-dp button.cal-dp-m { height: 44px; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 400; text-align: center; transition: background-color .15s; }
.cal-dp button.cal-dp-m:hover { background: var(--soft); }
.cal-dp .cal-dp-m.today { color: var(--tint); font-weight: 600; }
.cal-dp button.cal-dp-m.on, .cal-dp button.cal-dp-m.on:hover { background: var(--tint); color: var(--on-dark); }
.cal-dp-f { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }

/* ---------------------------------------------------------------- 手机（和 ui.js 的 PHONE 一致） */
@media (max-width: 759.98px) {
  .cal-ctl { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 6px; }
  .cal-seg button { padding: 4px 9px; }
  .cal-nav { gap: 4px; }
  .cal-nav .btn { min-width: 32px; padding: 0 8px; }
  button.cal-c { min-height: 54px; align-items: center; padding: 4px 2px; }
  .cal-c .cal-ev, .cal-c .cal-more { display: none; }
  .cal-dots { display: flex; }
  .cal-n { align-self: center; }
  .cal-w { padding: 4px 0; }
  .cal-dt { width: 82px; font-size: 12.5px; }
  .cal-body > .wk { margin-left: -6px; margin-right: -6px; }
  .cal-ag { --tcol: 38px; --dcol: 14px; --gap: 8px; gap: 22px; }
  .cal-ag-day { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cal-ag-date { padding-top: 0; }
  .cal-ag-date small { flex-basis: auto; margin: 0; }
  .cal-ag button.cal-ag-date { margin: 0 0 0 -8px; padding: 4px 8px; }
  button.cal-ag-none { padding: 0; }
  .cal-head-r { width: 100%; align-items: stretch; }
  .cal-bar { flex-wrap: wrap; }   /* 图例排不下就换行，按钮跟在图例后面、靠右 */
  .cal-ag-card { padding: 8px 11px 9px; }
}
