/* Unitick · 面板里的「功能介绍与授权」页和各项的小窗口（wizard.js）；登录后的向导在 onboard.css。
   类名都以 su- 开头；只用 app.css 开头的配色和尺寸变量。
   纯白、细线、留白：卡片只用一像素的线分开，状态用小圆点，颜色只在「已开启」这类地方点一下。 */

/* ---------------------------------------------------------------- 整页 */
/* 换屏时淡入。整页只动透明度：动 transform 会让里面 fixed 的小窗口跟着它定位；里面的几块再依次上移进来 */
.su { max-width: 760px; margin: 0 auto; padding: 40px 24px 88px; animation: u-fade var(--dur-3) ease-out; }
.su > :is(.su-top, .su-head, .su-sec, .su-foot) { animation: u-rise var(--dur-5) var(--ease-out) backwards; }
.su > .su-sec { animation-delay: 140ms; }
.su-ic { display: block; flex: none; width: 20px; height: 20px; }
.su-lead { margin: 0; max-width: 34em; font-size: 15px; line-height: 1.65; color: var(--muted); }
.su-lead, .su-sec-lead, .su-help, .su-cap, .su-opt-d, .su-tile-d, .su-steps li { text-wrap: pretty; }

.su-sec { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }
.su-sec-head { margin-bottom: 22px; }
.su-sec-head h2 { display: flex; align-items: baseline; gap: 12px; margin: 0; font-size: 20px; font-weight: var(--fw-title); letter-spacing: var(--track-tight); color: var(--ink); }
.su-sec-lead { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* 面板里的「功能介绍与授权」页：不要整页的留白，第一块不要顶上的线 */
.su-embed .su-sec { margin-top: 28px; padding-top: 0; border-top: 0; }
.su-embed .su-sec:first-child { margin-top: 24px; }
/* 功能列表的组名：像手机设置的分组标题，小一号灰字，紧贴下面那组 */
.su-embed .su-sec-head { margin: 0 0 8px 4px; }
.su-embed .su-sec-head h2 { font-size: 13px; font-weight: var(--fw-head); letter-spacing: 0; color: var(--muted); }
.su-embed .su-sec-lead { margin-top: 2px; font-size: 12.5px; }

/* ---------------------------------------------------------------- 文字、按钮、输入框（只管这一页自己的） */
.su-help { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.su-label { font-size: 13px; font-weight: 500; color: var(--text); }

button.su-pri { padding: 9px 18px; border-radius: var(--radius-sm); font-weight: 500; letter-spacing: .01em; }
button.su-btn, a.su-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; padding: 9px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); font-size: 14px;
  text-decoration: none; transition: background-color var(--dur-2), border-color var(--dur-2), transform var(--dur-3) var(--ease-spring); }
a.su-btn:active { transform: scale(var(--press)); transition-duration: var(--dur-1); }
button.su-btn:hover:not(:disabled), a.su-btn:hover { border-color: var(--faint); background: var(--soft); }
button.su-link { min-height: 0; padding: 0; border: 0; background: none; color: var(--link); font-size: inherit; font-weight: 400; }
a.su-link { display: inline-flex; align-items: center; gap: 2px; color: var(--link); text-decoration: none; }
.su-link:hover { text-decoration: underline; }
a.su-link .su-ic { width: 14px; height: 14px; }
:is(.su, .su-embed, .su-sheet-wrap) :is(button, a):focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }

input.su-input { padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel); color: var(--text);
  font-size: 14px; transition: border-color var(--dur-2), box-shadow var(--dur-2); }
input.su-input:hover:not(:focus):not(:disabled) { border-color: var(--line-hover); }
input.su-input::placeholder { color: var(--faint); }
input.su-input:focus { outline: none; border-color: var(--tint); box-shadow: var(--ring); }
input.su-input:disabled { background: var(--soft); color: var(--muted); }
.su-msg { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.su-msg:empty { display: none; }
.su-msg.ok { color: var(--green); }
.su-msg.bad { color: var(--red); white-space: pre-line; }   /* 登录被拒的排查清单一条一行 */

.su-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.su-chip { position: relative; cursor: pointer; }
.su-chip input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.su-chip span { display: inline-block; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
  font-size: 13px; color: var(--text); transition: background-color var(--dur-2), border-color var(--dur-2), color var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.su-chip:active span { transform: scale(var(--press)); transition-duration: var(--dur-1); }
.su-chip:hover span { border-color: var(--faint); }
.su-chip input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-dark); }
.su-chip input:focus-visible + span { outline: 2px solid var(--tint); outline-offset: 2px; }
.su-chip input:disabled + span { opacity: .5; cursor: default; }
.su-keyrow { display: flex; gap: 8px; }
.su-keyrow .su-input { flex: 1; min-width: 0; }

.su-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.su-pane .su-actions { margin-top: 14px; }

/* ---------------------------------------------------------------- 功能列表（功能介绍与授权那一页）：一项一行，和设置的圆角列表同一种样子
   2026-11-12 由大方块改成小条（#1273）：左边图标，中间名字和一句灰字，右边状态小标签和箭头。类名沿用 su-grid / su-tile，别处（reach.js、关窗口回焦点）按它找 */
.su-grid { display: block; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.su-tile { position: relative; display: flex; align-items: center; width: 100%; min-height: 62px; padding: 10px 16px; border: 0; border-radius: 0;
  background: none; color: var(--text); font: inherit; font-weight: 400; line-height: 1.45; text-align: left; box-shadow: none; }
.su-tile + .su-tile::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: var(--line); }
button.su-tile { cursor: pointer; transition: background-color var(--dur-2); }
button.su-tile:hover:not(:disabled) { background: var(--soft); transform: none; box-shadow: none; }
button.su-tile:active:not(:disabled) { background: var(--soft-2); transform: none; transition-duration: 0s; }
button.su-tile:focus-visible { outline-offset: -3px; border-radius: var(--radius); }
.su-tile-in { flex: 1; min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "ic t p" "ic d p";
  align-items: center; gap: 1px 14px; }
.su-tile-ic { grid-area: ic; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px;
  border-radius: 9px; background: var(--soft); color: var(--ink); }
.su-tile-ic .su-ic, .su-tile-ic svg { width: 18px; height: 18px; }
.su-tile-in > .tag { grid-area: p; justify-self: end; }
.su-tile-t { grid-area: t; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; font-weight: var(--fw-medium); color: var(--ink); }
.su-tile-d { grid-area: d; font-size: 12.5px; line-height: 1.5; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-tile-go { flex: none; margin-left: 8px; color: var(--faint); transition: color var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.su-tile-go .su-ic { width: 16px; height: 16px; }
button.su-tile:hover .su-tile-go { color: var(--muted); transform: translateX(2px); }
.su-tile.is-soon .su-tile-ic, .su-tile.is-soon .su-tile-t, .su-tile.is-soon .su-tile-d { color: var(--faint); }

/* ---------------------------------------------------------------- 点开一项的小窗口 */
/* 打开：背后变淡变模糊，窗口从略小弹到原大；关掉时反着快快地退（wizard.js 的 closeSheet） */
/* 叠放：要盖过手机底部标签（40）和事项详情（50），在「撤销」条（70）之下 */
.su-sheet-wrap { position: fixed; inset: 0; z-index: 58; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--setup-glass); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  animation: u-fade var(--dur-3) ease-out; }
.su-sheet { display: flex; flex-direction: column; width: min(600px, 100%); max-height: min(800px, calc(100vh - 48px)); overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-3); outline: none;
  animation: su-rise var(--dur-4) var(--ease-spring); }
.su-sheet-head { display: flex; align-items: center; gap: 14px; padding: 22px 22px 18px 24px; border-bottom: 1px solid transparent; transition: border-color var(--dur-2); }
.su-sheet-head.su-scrolled { border-bottom-color: var(--line); }
.su-sheet-title { display: grid; flex: 1; gap: 6px; justify-items: start; min-width: 0; }
.su-sheet-title h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 21px; font-weight: var(--fw-title); letter-spacing: var(--track-tight); color: var(--ink); }
.su-sheet-head .su-tile-ic { margin: 0; }
button.su-x { display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: flex-start; width: 34px; height: 34px;
  min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
button.su-x:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
button.su-x:active:not(:disabled) { background: var(--soft-2); transform: scale(.92); }
.su-x .su-ic { width: 18px; height: 18px; }
.su-sheet-body { flex: 1; min-height: 0; padding: 0 24px 28px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* 小窗口里的三种卡片（2026-10-18 Cris 定，一眼分得出哪是演示、哪是操作指引、哪是真设置）：
   ① 示例卡片 .su-stage：浅灰底、左上角小标签「示例」，里面的气泡、通知缩小一号，明显是在演示
   ② 开启步骤卡片 .su-guide：白底细边框、左边一条蓝线、编号圆点；开起来以后不再显示（wizard.js 的 openSheet）
   ③ 设置区 .su-pane：白底；授权以后才有的设置放进分段切换的另一栏（wizard.js 的 panesView）
   2026-10-18 再改（Cris）：示例收进标题旁的「示例」按钮，打开先是授权；状态和按钮放进对齐的分组行 .su-group / .su-row（照手机「设置」的分组） */
.su-stage { display: grid; gap: 8px; padding: 14px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.su-stage::before { content: "示例"; justify-self: start; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border: 1px solid var(--line-2);
  border-radius: 999px; background: var(--panel); font-size: 11px; font-weight: 500; color: var(--muted); }
.su-stage > :not(.su-cap) { zoom: .9; }
.su-stage .su-bub.in, .su-stage .su-note { background: var(--panel); }
.su-cap { margin: 2px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.su-guide { display: grid; gap: 12px; margin-top: 16px; padding: 14px 16px 16px; border: 1px solid var(--line); border-left: 3px solid var(--tint);
  border-radius: var(--radius-sm); background: var(--panel); }
.su-guide > * { margin: 0; }
.su-guide-h { font-size: 13px; font-weight: 600; color: var(--tint); }
.su-guide .su-steps { gap: 10px; }
.su-guide .su-steps li { font-size: 13.5px; }
.su-guide .su-steps li::before { border-color: color-mix(in srgb, var(--tint) 45%, var(--panel)); color: var(--tint); background: var(--tint-soft); }
/* 真会出问题的那一句：红字加粗、前面一个警示图标，一个窗口最多一条 */
.su-warn { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 13px; font-weight: 600; line-height: 1.6; color: var(--red); text-wrap: pretty; }
.su-warn-i { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.cq > .su-warn { justify-self: center; text-align: left; }
.su-note { padding: 10px 14px 12px; border-radius: 12px; background: var(--soft); }
.su-note-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 3px; font-size: 11px; color: var(--muted); }
.su-note-top b { font-weight: 600; color: var(--text); }
.su-note-x { font-size: 13px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.su-note-h { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink); }   /* 系统通知样子的例子：标题一行 */
.su-chat { display: flex; flex-direction: column; gap: 8px; }
.su-chat-h { padding-bottom: 10px; border-bottom: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); }
.su-chat-t { margin: 2px 0; text-align: center; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.su-bub { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.su-bub.in { align-self: flex-start; border-top-left-radius: 6px; background: var(--soft); color: var(--text); }
.su-bub.out { align-self: flex-end; border-top-right-radius: 6px; background: var(--accent); color: var(--on-dark); }
/* 微信例子里学生发的两张照片（占位的缩略图） */
.su-pics { align-self: flex-end; display: flex; gap: 6px; }
.su-pic { display: block; width: 76px; height: 76px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.su-pic svg { display: block; width: 100%; height: 100%; }
.su-pic-bg { fill: var(--soft); }
.su-pic-hill { fill: var(--line-2); }
.su-pic-sun { fill: var(--faint); }
.su-pic + .su-pic .su-pic-hill { fill: var(--faint); }
.su-pic + .su-pic .su-pic-sun { fill: var(--line-2); }
.su-mail { display: grid; }
.su-mail-r { display: flex; gap: 12px; padding: 0 0 9px; margin-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 12px; }
.su-mail-r span { flex: none; width: 3em; color: var(--muted); }
.su-mail-r b { min-width: 0; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
/* 邮件那一项的例子：收件箱里新来的两封（发件人长一点），下面接微信里的总结 */
.su-mail-in .su-mail-r span { width: 6.5em; }
.su-mail-in + .su-chat { margin-top: 6px; }
.su-todo-h { padding-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.su-todo-r { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.su-todo-r:last-child { padding-bottom: 4px; }
.su-todo-c { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 50%; }
.su-todo-t { flex: 1; min-width: 0; color: var(--text); }
.su-todo-w { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.su-todo-w .su-ic { width: 13px; height: 13px; }

/* 「怎么开启」：编号的几步 */
.su-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: su-step; }
.su-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; counter-increment: su-step; font-size: 14px; line-height: 1.6; color: var(--text); }
.su-steps li::before { content: counter(su-step); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  margin-top: -1px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 授权：尽量自动，一两下就好 */
.su-pane { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.su-pane > * { margin: 0; }
.su-pane .su-guide { margin-top: 0; }
.su-pane > [data-sec]:empty { display: none; }   /* 收起了的步骤卡片之类：不占间距 */
.su-seg { display: flex; width: 100%; margin: 2px 0 16px; }
.su-seg button { flex: 1; min-height: 32px; font-size: 13px; }
/* 标题旁的「示例」按钮；点了窗口里换成示例，左上角「返回」 */
button.su-ex-btn { display: inline-flex; align-items: center; gap: 5px; flex: none; align-self: flex-start; min-height: 0; height: 32px; margin-top: 1px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 13px; color: var(--ink); }
button.su-ex-btn[aria-pressed="true"] { border-color: color-mix(in srgb, var(--tint) 45%, var(--panel)); background: var(--tint-soft); color: var(--tint); }
.su-ex-i { width: 15px; height: 15px; }
.su-exview { display: grid; gap: 12px; }
button.su-exback { display: inline-flex; align-items: center; gap: 2px; justify-self: start; min-height: 0; margin: 0; padding: 4px 8px 4px 2px; border: 0; background: none; color: var(--link); font-size: 14px; }
.su-exback-i { width: 18px; height: 18px; }
/* 对齐的分组行：浅灰底的圆角组，一行左边说明、右边按钮，上下居中；红字备注也是其中一行 */
.su-group { display: grid; border-radius: var(--radius); background: var(--soft); overflow: hidden; }
.su-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; font-size: 14px; color: var(--ink); }
.su-row + .su-row { border-top: 1px solid var(--line); }
.su-row[hidden] { display: none; }
.su-row-l { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.su-row-r { display: flex; align-items: center; gap: 8px; flex: none; }
.su-row .su-warn, .su-row .su-msg { margin: 0; }
.su-row-warn { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
label.su-row-check { justify-content: flex-start; cursor: pointer; }
label.su-row-check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--tint); }
.su-row .su-chips { gap: 6px; }
.su-auth-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.su-help.su-when-lead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
/* 教学网同步：本学期的课，一门一个小方块，只有课名 */
.su-cnames { display: flex; flex-wrap: wrap; gap: 8px; }
.su-cnames > .su-help, .su-cnames > .su-wait { margin: 0; }
.su-cname { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--soft); font-size: 13px; color: var(--ink); }   /* 小标题下面那一句 */
/* 什么时候提醒我：一词一个勾的小方块，排几列（窄屏两列） */
.su-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.su-pick { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink); cursor: pointer; transition: border-color var(--dur-2), background var(--dur-2); }
.su-pick input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--tint); }
.su-pick:has(input:checked) { border-color: color-mix(in srgb, var(--tint) 45%, var(--panel)); background: var(--tint-soft); }
.su-pick.is-off { color: var(--faint); cursor: default; background: var(--soft); }
.su-pick > span:not(.tag) { white-space: nowrap; }
.su-pick .tag { margin-left: auto; }
@media (max-width: 480px) {
  .su-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .su-pick { gap: 6px; padding: 0 10px; }
  .su-pick .tag { padding: 0 5px; }
}
/* 默认折叠的「了解更多」：原理、隐私这类细节 */
.su-more { margin: 12px 0 4px; font-size: 13px; }
.su-more > summary { cursor: pointer; width: max-content; color: var(--link); }
.su-more ul { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 18px; line-height: 1.6; color: var(--muted); }
.su-course { display: flex; align-items: flex-start; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.su-course:last-child { border-bottom: 1px solid var(--line); }
.su-course input { flex: none; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); }
.su-course-t { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.su-course-t b { font-weight: 500; color: var(--ink); }
.su-course-t span { font-size: 12px; color: var(--muted); }
.su-wait { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 0; font-size: 13px; color: var(--muted); }
.su-spin { flex: none; width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-top-color: var(--tint); border-radius: 50%;
  animation: u-spin .8s linear infinite; }
.su-set { display: grid; border-top: 1px solid var(--line); }
/* 教学网同步那一格的同步状态：教学网、课表各一行（左边名字，右边状态） */
.su-sync { display: grid; border-top: 1px solid var(--line); }
.su-sync-r { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.su-sync-k { flex: none; width: 4em; color: var(--ink); }
.su-sync-v { flex: 1; min-width: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.su-set-r { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text); }
.su-set + .su-help { margin-top: 10px; }
.su-sw { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.su-sw input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
/* 开关：像手机上的那样，圆钮带一点回弹滑过去；按住时圆钮拉长一点 */
.su-sw-ui { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); transition: background-color var(--dur-3) ease; }
.su-sw-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: var(--panel);
  box-shadow: 0 0 0 .5px var(--shadow-a4), 0 2px 4px var(--shadow-a18); transition: transform var(--dur-4) var(--ease-bounce), width var(--dur-3) var(--ease-out); }
.su-sw:active .su-sw-ui::after { width: 24px; }
.su-sw input:checked + .su-sw-ui { background: var(--accent); }
.su-sw input:checked + .su-sw-ui::after { transform: translateX(16px); }
.su-sw:active input:checked + .su-sw-ui::after { transform: translateX(12px); }
.su-sw input:focus-visible + .su-sw-ui { outline: 2px solid var(--tint); outline-offset: 2px; }
.su-saved { font-size: 12px; font-weight: 400; color: var(--green); opacity: 0; transition: opacity var(--dur-3) ease; }
.su-saved.show { opacity: 1; }
.su-saved.bad { color: var(--red); }
.su-okline { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--green); }
.su-okline .su-ic { width: 16px; height: 16px; }
/* 渠道页拿来的扫码、邮箱绑定：窗口顶上已经有标题了，去掉它们自己的框和标题 */
.su-ext .box { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.su-ext .box > h3:first-child { display: none; }

/* 待办清单里的手机日历（pages/channels.js 的 calendarBox，docs/specs/phone-calendar.md「扫码绑定」）：
   一句话、居中的大二维码、下面一行状态；连上的手机一台一行；「手动设置」折起来 */
.cq { display: grid; justify-items: center; gap: 10px; text-align: center; }
.cq > p { margin: 0; }
.cq-say { font-size: 15px; font-weight: 500; color: var(--ink); text-wrap: balance; }
.cq-qr { position: relative; display: grid; place-items: center; width: 216px; height: 216px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--media-white); }
.cq-qr img { display: block; width: 200px; height: 200px; image-rendering: pixelated; transition: opacity var(--dur-2); }
.cq-qr.is-dead img { opacity: .12; }
.cq-renew { position: absolute; }
.cq-line { font-size: 13px; color: var(--muted); }
.cq-line.cq-on { color: var(--tint); }
.cq-phone { display: flex; align-items: center; gap: 10px; justify-self: stretch; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); text-align: left; }
.cq-ok { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.cq-ok .ic { width: 16px; height: 16px; }
.cq-phone-t { display: grid; flex: 1; min-width: 0; gap: 1px; }
.cq-phone-t b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.cq-phone-t span { font-size: 12px; color: var(--muted); }
.cq-phone .link { flex: none; font-size: 13px; color: var(--red); text-align: right; max-width: 12em; }
.cq-more { font-size: 13px; }
/* 解除了却还在来连的设备（会一直弹密码框）：红字一句，下面每台一行「恢复这台」 */
.cq-stale { display: grid; gap: 6px; justify-self: stretch; text-align: left; }
.cq-stale p { margin: 0; }
.cq-stale .su-warn { margin: 0; }
.cq-al { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.cq-al h3 { font-size: 15px; }
.cq-man { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.cq-man[open] > summary { margin-bottom: 12px; }

/* 待办清单：先选滴答清单还是手机自带的日历；选滴答时顶上一块「推荐」带下载二维码。电脑上扫码，手机上直接点下载 */
.su-rec { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.su-guide.su-dida-guide { margin: 0 0 16px; }
.su-dida-guide .su-rec { margin: 0; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }   /* 在开启步骤卡片里，不再套一层框 */
.su-rec-h { font-size: 14px; font-weight: 600; color: var(--ink); }
.su-dl-qr { flex: none; width: 88px; height: 88px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--media-white); }
.su-wxf { display: grid; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.su-wxf .su-auth-h { margin: 0; }
.su-wxf-link { display: flex; align-items: center; gap: 16px; min-width: 0; }
.su-wxf-link img { flex: none; width: 128px; height: 128px; background: var(--media-white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.su-wxf-link a { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.su-wxf-tests { display: flex; flex-wrap: wrap; gap: 8px; }
.su-wxf-tests > p { flex-basis: 100%; }
.su-dl-x { display: grid; justify-items: start; gap: 6px; }
.su-dl-x > p { margin: 0; font-size: 13px; color: var(--muted); }
a.su-dl-go { display: none; }
.su-todo-ways { margin: 0 0 16px; }
.su-todo-way > .su-steps { margin-bottom: 16px; }
@media (max-width: 640px), (pointer: coarse) {
  .su-dl-qr, .su-dl-scan { display: none; }
  a.su-dl-go { display: inline-flex; }
}

/* 邮件：授权一个邮箱给助手（pages/channels.js 的 emailBox，渠道页和「邮件」窗口共用）。一步一步往下展开 */
.mb .mb-h { display: block; margin: 24px 0 10px; }
.mb > .mb-h:first-child { margin-top: 0; }
.mb-others { margin-top: 10px; }
.mb-how { display: grid; gap: 14px; margin-top: 12px; animation: u-rise var(--dur-4) var(--ease-out); }   /* 做法在里面的开启步骤卡片里，下面是表单 */
.mb-guide { margin-top: 0; }
.mb-how > * { margin: 0; }
.mb-note { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); font-size: 13px; line-height: 1.6; color: var(--text); }
.mb-steps { display: grid; gap: 6px; padding-left: 20px; font-size: 13px; line-height: 1.6; color: var(--text); }
.mb-how, .mb-steps { grid-template-columns: minmax(0, 1fr); }   /* 示例图的外框写了原宽度，不这样窄屏上会把整块撑宽 */
.mb-steps > li > .mb-links { margin-top: 8px; }
.mb-step-t { white-space: pre-line; }   /* 一步里的几个要点分行写 */
.mb-shot { display: block; box-sizing: content-box; max-width: calc(100% - 2px); margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mb-shot img { display: block; width: 100%; height: auto; }   /* 外框宽度是图的原尺寸（网页上写在外框上），窄了只缩不放 */
.mb-form { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 14px; align-items: center; margin-top: 4px; }
.mb-form label { font-size: 13px; color: var(--muted); }
.mb-form input.su-input { width: 100%; max-width: 360px; }
.mb-how .su-actions { margin-top: 0; }
a.su-btn.mb-go, a.su-btn.mb-go:hover { border-color: var(--accent); background: var(--accent); color: var(--on-dark); }
a.su-btn.mb-go:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.mb-ok { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.mb-slot { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); padding-bottom: 20px; }
.mb-slot + .mb-slot { padding-top: 20px; border-top: 1px solid var(--line); }
.mb-slot > * { margin: 0; }
.mb-slot.is-off { opacity: .65; }
.mb .mb-slot > .mb-h { margin: 0; display: flex; align-items: center; gap: 8px; }
.su-row.mb-read { flex-wrap: wrap; }
.su-row.mb-ct .su-row-l { display: block; }
.mb-ct-n { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.mb-go-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.mb-go-row > .mb-go { flex: none; }
.mb-more { margin: 0; }
.mb-more .mb-steps { margin-top: 8px; }
.mb-addr { font-weight: 600; overflow-wrap: anywhere; }
.mb-tip { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }

@keyframes su-rise { from { opacity: 0; transform: translateY(calc(var(--rise) * .75)) scale(var(--pop)); } }
@keyframes su-up { from { transform: translateY(100%); } }

/* ---------------------------------------------------------------- 手机 */
@media (max-width: 640px) {
  .su { padding: 24px 16px 56px; }
  .su-sec { margin-top: 40px; padding-top: 28px; }
  .su-sheet-wrap { align-items: flex-end; padding: 0; }
  .su-sheet { width: 100%; max-height: 92vh; max-height: 92dvh; border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: su-up var(--dur-4) var(--ease-sheet); }
  .su-sheet::before { content: ""; flex: none; align-self: center; width: 36px; height: 5px; margin-top: 6px; border-radius: 3px; background: var(--line-2); }
  .su-sheet-head { padding: 12px 12px 14px 16px; }
  .su-sheet-body { padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
  .su-stage { padding: 14px; }
  input.su-input { font-size: 16px; }   /* 不小于 16px，iPhone 一点输入框才不放大页面 */
  .mb-form { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mb-form label:not(:first-child) { margin-top: 6px; }
}
@media (max-width: 480px) {
  /* 窄屏：状态小标签挪到名字下面那一行，名字和说明不被挤 */
  .su-tile { padding: 10px 14px; }
  .su-tile-in { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "ic t" "ic d" "ic p"; }
  .su-tile-in > .tag { justify-self: start; margin-top: 4px; }
  .su-tile + .su-tile::before { left: 60px; }
}
@media (prefers-reduced-motion: reduce) {   /* 位移已经由变量归零；手机上从底下升起的窗口改成原地淡入 */
  .su-sheet { animation-name: u-fade; }
}

/* 待办清单窗口里「把你自己的日历显示在首页」（mycal.js，docs/specs/home-calendar-sources.md） */
.mc-how > summary, .cq-man > summary { cursor: pointer; color: var(--link); font-size: 13px; }
button.su-link.mc-del, button.su-btn.mc-del { color: var(--red); }
.mc-feeds:not(:empty) { margin-top: 24px; }
.mc-list { display: grid; }
.mc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); }
.mc-row:last-child { border-bottom: 1px solid var(--line); }
.mc-row-t { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.mc-row-t b { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.mc-row-t span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.mc-row-t span.mc-bad { color: var(--red); }
.mc-row-a { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; font-size: 13px; }
.mc-form { display: grid; gap: 10px; }
/* 订阅别的日历：名称、地址各占一行，标签在上；两个按钮靠左、同一种宽度 */
.mc-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.mc-form input.su-input { width: 100%; box-sizing: border-box; }
.mc-form button[type=submit], .mc-feeds > .mc-row-a > button { justify-self: start; min-width: 120px; }
.mc-feeds > .mc-row-a { justify-content: flex-start; margin: 10px 0 16px; }
.mc-feeds > .su-help.mc-note { margin-bottom: 14px; }
.mc-form + .su-msg { margin-top: 10px; }
.mc-file { display: none; }
button.su-pri.mc-up { border: 1px solid var(--line-2); background: var(--panel); color: var(--text); }
.su-help.mc-note { margin-top: 14px; }
label.mc-dida { margin-top: 16px; border-bottom: 1px solid var(--line); }
/* 把 Unitick 日历同步到滴答（mycal.js 的 didaSyncBox，docs/specs/dida-sync.md） */
.ds-box { display: grid; }
.ds-box > .su-course:last-child { border-bottom: 0; }
.ds-box + label.mc-dida { margin-top: 0; }
.ds-row .su-course-t span.ds-bad { color: var(--red); }
.ds-ask { display: grid; gap: 10px; padding: 4px 2px 12px; font-size: 13px; color: var(--text); }
.ds-ask p { margin: 0; overflow-wrap: anywhere; }
.ds-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 2px 12px; }
.ds-ask .ds-acts { padding: 0; }
button.su-btn.ds-del { color: var(--red); }

/* 电脑通知（pages/channels.js 的 deskBox）：安装命令一行，等宽字，长了横向滚 */
.desk-cmd { width: 100%; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* 同班互通（wizard.js 的 class）：例子里两位同学的消息、双向说明、就地确认 */
.su-cls { display: grid; gap: 8px; }
.su-cls-from { display: flex; flex-direction: column; gap: 6px; }
.su-cls-b { display: flex; flex-direction: column; gap: 2px; }
.su-cls-who { font-size: 11px; opacity: .7; }
.su-cls-arrow { text-align: center; color: var(--muted); font-size: 18px; line-height: 1; }

/* 「系统通知」窗口里第二块（电脑小程序）的小标题：和上面「这台设备」隔开 */
/* 面板里的「功能介绍与授权」（#setup）：顶上「‹ 账户」，标题下面的说明照常紧跟标题（app.css 的 .set-back + h1 + * 是给设置各项的页的） */
.page > .set-back + h1 + p { margin-top: 8px; }
.page > .set-back + .su-pagehead { margin-top: 10px; }
.su-pagehead { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.su-pagehead h1, .su-pagehead p { margin: 0; }
.su-pagehead p { margin-top: 8px; }
a.su-doclink { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-top: 4px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
a.su-doclink:hover { background: var(--soft); text-decoration: none; }
.su-doclink-i { width: 16px; height: 16px; }

/* 小组（sharegroup.js）：建组、邀请、收到的邀请 */
.su-sg { display: flex; flex-direction: column; gap: 12px; }
.su-sg-mem { margin: 0; color: var(--muted); font-size: 13px; }
.su-sg-row { display: flex; gap: 8px; align-items: center; }
.su-sg-row .su-input { flex: 1; min-width: 0; }
.su-sg-row > span { flex: 1; min-width: 0; }

/* 「更新课表」窗口里的门户扫码（wizard.js 的 portalQr）；功能格子窗口顶上的一句用处 */
.su-qr { display: grid; justify-items: center; gap: 4px; }
.su-qr-again:empty, .su-qr-again:has(> [style*="none"]) { display: none; }
.su-qr-again { margin-top: 8px; }
.su-sheet-lead { margin: 0 0 16px; color: var(--text); }
/* 教学网那一格的「授权」：学校连接的状态、断开和重新连接（wizard.js 的 schoolBox） */
.su-sync-k.su-school-k { width: auto; }
.su-help.su-school-t { margin-top: 10px; }
