/* 事项附件 + 过期自动删除（extras.js） */
.afile { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 700; color: var(--accent, #5366e8); background: color-mix(in srgb, var(--accent, #5366e8) 10%, transparent); border-radius: 999px; padding: 0 7px; vertical-align: 1px; }
.adwarn { margin: 6px 0; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; color: #b45309; background: color-mix(in srgb, #f59e0b 14%, transparent); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adwarn .link { font-weight: 700; }
.adbar { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--sub); margin: 2px 0 10px; }
.adbar .ad-t { font-weight: 700; color: var(--text); }
.adbar label.ad-i { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.adbar label.ad-i input { accent-color: var(--accent, #5366e8); }
.adbar label.ad-i:has(input:disabled) { cursor: default; opacity: .75; }
.adbar .ad-h { color: var(--sub); opacity: .85; }
.adsoon { border-radius: 14px; padding: 10px 14px; margin: 0 0 12px; background: color-mix(in srgb, #f59e0b 10%, var(--card, #fff)); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); font-size: 13px; }
.adsoon .ads-h { font-weight: 700; margin-bottom: 6px; }
.adsoon .ads-h small { font-weight: 500; color: var(--sub); }
.adsoon .ads-r { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px dashed color-mix(in srgb, #f59e0b 30%, transparent); }
.adsoon .ads-r b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.adsoon .ads-d { flex: none; color: #b45309; font-weight: 700; min-width: 60px; }
.adsoon .ads-m { flex: none; color: var(--sub); font-size: 12px; }
.exfiles { width: min(560px, calc(100vw - 24px)); }
.xf-list { display: grid; gap: 6px; margin-bottom: 12px; }
.xf-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.xf-ic { font-size: 20px; flex: none; }
.xf-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xf-n b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xf-n small { color: var(--sub); font-size: 12px; }
.xf-pv { text-align: center; }
.xf-pv img { max-width: 100%; max-height: 60vh; border-radius: 10px; display: block; margin: 4px auto 6px; }
.xf-drop { display: block; text-align: center; padding: 14px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; color: var(--accent, #5366e8); font-weight: 600; font-size: 13.5px; }
.xf-drop.over { background: color-mix(in srgb, var(--accent, #5366e8) 8%, transparent); border-color: var(--accent, #5366e8); }
.extoast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 9999;
  background: #14213d; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; transition: opacity .2s, transform .2s; }
.extoast.show { opacity: 1; transform: translate(-50%, 0); }
.exfiles { padding: 18px 20px; }
#hwView .adsoon { margin: 14px 0 4px; }
.fatt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 10px; font-size: 13px; }
.fatt:empty { display: none; }
#modal .fatt .xf-pick, .modal2 .fatt .xf-pick { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--line, #ccd); cursor: pointer; font-weight: 600; margin: 0; }
.fatt .xf-pick:hover { border-color: var(--accent, #5366e8); color: var(--accent, #5366e8); }
.fatt .xf-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 6px 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent, #5366e8) 10%, transparent); }
.fatt .xf-chip small { color: var(--sub); }
.fatt .xf-chip button { border: 0; background: none; padding: 0 4px; cursor: pointer; color: var(--sub); min-height: 0; }
.fatt .meta { color: var(--sub); flex-basis: 100%; }

/* ===== 5.4.0：课程表存为图片、班级课表 ===== */
dialog.dlg.crs-x { width: min(640px, calc(100vw - 24px)); max-width: none; padding: 20px 22px; box-sizing: border-box; }
.crs-x h3 { margin-top: 0; }
.crs-x .sub { color: var(--sub); font-size: 13px; line-height: 1.6; margin: 0 0 12px; }
.crs-shot { display: block; width: 100%; height: auto; max-height: 56vh; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); margin: 4px 0 14px; background: #f6f5f1; }
.crs-seg { display: flex; gap: 6px; margin-bottom: 10px; }
.crs-seg .on { background: var(--accent, #5366e8); color: #fff; border-color: transparent; }
.crs-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crs-acts .spacer { flex: 1; }
.crs-x .row { display: flex; gap: 8px; align-items: center; }
.crs-x .row .spacer { flex: 1; }
.crs-x label.crs-ck { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; color: var(--text); }
.crs-x label.crs-ck input { width: auto; flex: none; margin: 0; }
.crs-ok { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #e6f7ee; color: #2e7d55; font-size: 13px; }
#crsPubBox { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.crs-x:focus, .crs-x:focus-visible { outline: none; }
/* 手机：和网站其它弹窗一样从底部升起，占满宽度，底部留出 iPhone 横条的位置 */
@media (max-width: 700px) {
  dialog.dlg.crs-x { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 88vh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .crs-x .crs-shot { max-height: 50vh; }
  .crs-acts .btn, .crs-acts .small { flex: 1 1 auto; justify-content: center; }
  .crs-acts .spacer { display: none; }
}

/* ===== 5.4.1 手机网页修复 ===== */
/* 1. 首页「接下来的安排」：手机上不再用框内小滚动条（手指一滑经常滑的是整页，框里滑不动），直接整页往下排 */
@media (max-width: 700px) {
  [data-skin] .studio-agenda-panel, .studio-agenda-panel { height: auto !important; max-height: none !important; overflow: visible !important; }
  [data-skin] #agenda, #agenda { overflow: visible !important; max-height: none !important; flex: none; padding-right: 0; }
}
/* 2. 日期 / 时间输入框：iPhone 上空的日期框高度会塌成一条细线，点不中就「没反应」；撑开高度、左对齐 */
input[type=date], input[type=time], input[type=datetime-local] { -webkit-appearance: none; appearance: none; min-height: 44px; box-sizing: border-box; text-align: left; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value, input[type=datetime-local]::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; margin: 0; }
/* 空着的时候给个提示，免得以为是坏的（只在 iPhone / iPad 上：那里空的日期框什么都不显示） */
@supports (-webkit-touch-callout: none) {
  input[type=date].is-empty::before, input[type=time].is-empty::before { content: attr(data-ph); color: var(--sub, #8a959a); }
  input[type=date].is-empty:focus::before, input[type=time].is-empty:focus::before { content: ""; }
}
/* 3. 手机上左下角的捞捞：不再显示旁边那块深色的「最急一项」卡片（首页问候卡里已经有了），只留小捞捞，不挡内容、不抢滑动 */
@media (max-width: 700px) {
  #lao .lao-scr { display: none !important; }
  #lao .lao-dock { transform: scale(.82); transform-origin: left bottom; }
  #lao[data-side=r] .lao-dock { transform-origin: right bottom; }
  #lao .lao-bub { bottom: 62px; font-size: 13px; }
}
/* 4. 成长页「最近 14 天」的数据表在手机上被截掉：改成可以左右滑 */
#gTrend details { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
/* 5. 打开弹窗（记一件事、班级课表…）时把捞捞藏起来，它的气泡不再盖住输入框和按钮 */
body:has(#modal.open) #lao, body:has(.modal2.open) #lao, body:has(dialog[open]) #lao { display: none !important; }

/* ===== 5.5.0：日历订阅设置 ===== */
.cal-prefs { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cal-prefs summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent, #5366e8); }
.cal-pgrp { margin-top: 12px; }
.cal-pgrp > b { display: block; font-size: 13px; margin-bottom: 6px; }
.cal-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cal-chips label, .cal-one { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); margin: 0; flex-direction: row; }
.cal-one { margin-top: 8px; }
.cal-prow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13px; flex-wrap: wrap; }
.cal-prow select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
.cal-ok { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: #e6f7ee; color: #2e7d55; font-size: 13px; }
#calPrefs input[type=checkbox] { width: 18px !important; height: 18px; min-height: 0 !important; margin: 0 !important; padding: 0 !important; flex: none !important; -webkit-appearance: auto; appearance: auto; }
#calPrefs label { display: inline-flex !important; flex-direction: row !important; align-items: center; justify-content: flex-start; gap: 6px; white-space: nowrap; width: auto !important; margin: 0 !important; font-weight: 500; }
#calPrefs .cal-one { display: flex !important; margin-top: 10px !important; }
#calPrefs select { width: auto !important; max-width: 60%; }

/* ===== 5.6.0：AI 整理在手机上从底部升起 ===== */
#ingestPanel .ip-x { display: none; margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--muted-bg, #eee); color: var(--sub); font-size: 15px; line-height: 32px; padding: 0; }
#ingestPanel.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; margin: 0 !important; max-height: 88vh; overflow-y: auto; border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 50px rgba(10, 20, 40, .25); animation: sheetUp .28s cubic-bezier(.2, .8, .25, 1); background: var(--surface, var(--card, #fff)); }
#ingestPanel.sheet .ip-x { display: block; }
#ingestPanel.sheet textarea { min-height: 150px; font-size: 16px; }
#ingestPanel.sheet .ingest-row { flex-wrap: wrap; gap: 8px; }
#ingestPanel.sheet .ingest-row .spacer { display: none; }
#ingestPanel.sheet #ingestStatus { flex-basis: 100%; order: 9; }
#ingestVeil { position: fixed; inset: 0; z-index: 79; background: rgba(8, 20, 40, .42); display: none; }
#ingestVeil.open { display: block; }
html.ingest-open #addBtn, html.ingest-open #lao { display: none !important; }
html.ingest-open body { overflow: hidden; }
@keyframes sheetUp { from { transform: translateY(40%); opacity: .5; } }

/* 5.7.0 拍照导入：对照原图 */
.crev-src { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 8px; }
.crev-no { flex: none; min-width: 22px; height: 22px; border-radius: 7px; background: var(--accent, #5366e8); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ccrop { background-image: var(--src); background-repeat: no-repeat; background-color: #fff; border-radius: 8px; border: 1px solid var(--line); max-height: 90px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.crev-unsure { grid-column: 1 / -1; font-size: 12px; color: #b8691a; }
.crev-r.flash { animation: crevFlash 1.4s ease; }
@keyframes crevFlash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent, #5366e8); } 100% { box-shadow: none; } }
.csrc { margin: 8px 0; max-height: 52vh; overflow: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.csrc-in { position: relative; line-height: 0; }
.csrc-in img { width: 100%; display: block; }
.csbox { position: absolute; border: 2px solid #2bb98a; border-radius: 4px; background: rgba(43,185,138,.08); padding: 0; cursor: pointer; box-sizing: border-box; }
.csbox.warn { border-color: #f2a20c; background: rgba(242,162,12,.12); }
.csbox.off { border-color: #9aa5a8; border-style: dashed; background: none; }
.csbox i { position: absolute; left: -2px; top: -2px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 4px; border-radius: 4px 0 4px 0; background: #2bb98a; color: #fff; font: 700 11px/18px system-ui, sans-serif; font-style: normal; text-align: center; }
.csbox.warn i { background: #f2a20c; } .csbox.off i { background: #9aa5a8; }
dialog.csrc-dlg { width: min(1000px, calc(100vw - 24px)); padding: 16px; }
.csrc-dlg .csrc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.csrc-dlg .csrc-head small { color: var(--sub); flex: 1; min-width: 200px; }
dialog.csrc-dlg { max-height: calc(100vh - 24px); overflow: auto; }
.csrc-dlg span.csbox { cursor: default; }

/* 5.8.0 导入手机备忘录 */
#form .form-h { display: flex; align-items: center; gap: 8px; }
#form .form-h h3 { margin: 0; flex: 1; }
#form .memo-open { white-space: nowrap; }
dialog.memo-dlg .memo-f { display: flex; flex-direction: column; gap: 10px; }
dialog.memo-dlg .memo-h { display: flex; align-items: center; gap: 8px; }
dialog.memo-dlg .memo-h h3 { margin: 0; flex: 1; font-size: 18px; }
dialog.memo-dlg .memo-tip { margin: 0; font-size: 13px; color: var(--sub); line-height: 1.7; }
dialog.memo-dlg .memo-how { font-size: 13px; color: var(--sub); }
dialog.memo-dlg .memo-how summary { cursor: pointer; color: var(--accent); font-weight: 600; }
dialog.memo-dlg .memo-how p { margin: 6px 0 0; line-height: 1.7; }
dialog.memo-dlg textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); resize: vertical; min-height: 120px; }
dialog.memo-dlg .memo-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
dialog.memo-dlg .memo-st { font-size: 13px; color: var(--sub); min-height: 1em; }
dialog.memo-dlg .memo-st.err { color: #d0452f; }
dialog.memo-dlg .memo-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
dialog.memo-dlg .memo-r { display: grid; grid-template-columns: 22px minmax(0, 1fr) 128px 92px auto auto; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--muted-bg); }
dialog.memo-dlg .memo-r.off { opacity: .45; }
dialog.memo-dlg .memo-r input[type=date], dialog.memo-dlg .memo-r input[type=time], dialog.memo-dlg .memo-s { font: inherit; font-size: 13px; padding: 5px 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); min-width: 0; width: 100%; box-sizing: border-box; }
dialog.memo-dlg .memo-k { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--sub); white-space: nowrap; }
dialog.memo-dlg .memo-done { font-size: 11px; color: #1f8a5b; white-space: nowrap; }
dialog.memo-dlg .memo-foot label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--sub); }
@media (max-width: 600px) {
  dialog.memo-dlg .memo-r { grid-template-columns: 22px minmax(0, 1fr) auto; }
  dialog.memo-dlg .memo-r input[type=date] { grid-column: 2; }
  dialog.memo-dlg .memo-r input[type=time] { grid-column: 3; width: 92px; }
  dialog.memo-dlg .memo-k { grid-column: 2; }
}

/* ---------- 5.8.0 作业页：小图 + 已读 ---------- */
.hw-plus{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:6px}
.hw-thumbs{display:flex;flex-wrap:wrap;gap:6px;width:100%}
.hw-th{width:72px;height:72px;padding:0;border:1px solid var(--line,#e5e7eb);border-radius:10px;overflow:hidden;background:var(--soft,#f5f6f8);cursor:zoom-in;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:22px}
.hw-th img{width:100%;height:100%;object-fit:cover;display:block}
.hw-th.ph small{font-size:10px;color:var(--muted,#6b7280);max-width:66px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.hw-fl{height:32px;padding:0 10px;border:1px solid var(--line,#e5e7eb);border-radius:8px;background:var(--soft,#f5f6f8);font-size:12px;cursor:pointer;align-self:center}
.hw-tload{font-size:12px;color:var(--muted,#6b7280)}
.hw-read{font-size:12px;color:var(--muted,#6b7280);white-space:nowrap}
button.hw-read{color:var(--accent,#2563eb);padding:0;background:none;border:0;cursor:pointer}
.hw-lb{border:0;padding:0;background:rgba(10,14,20,.94);width:100vw;height:100vh;max-width:none;max-height:none;margin:0;color:#fff}
.hw-lb::backdrop{background:rgba(0,0,0,.7)}
.hw-lb-bar{display:flex;align-items:center;gap:10px;padding:10px 16px;position:absolute;top:0;left:0;right:0;z-index:2;background:linear-gradient(rgba(0,0,0,.6),transparent)}
.hw-lb-bar b{font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:55vw}
.hw-lb-bar .spacer{flex:1}
.hw-lb-bar a,.hw-lb-bar button{color:#fff;background:rgba(255,255,255,.15);border:0;border-radius:8px;padding:6px 10px;text-decoration:none;cursor:pointer}
.hw-lb-img{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:52px 8px 8px}
.hw-lb-img img{max-width:100%;max-height:100%;object-fit:contain}
.hw-lb-img img.blur{filter:blur(2px);opacity:.7;position:absolute;max-width:calc(100% - 16px);max-height:calc(100% - 60px)}
.hw-lb-st{position:relative;font-size:13px;background:rgba(0,0,0,.5);padding:4px 10px;border-radius:8px}
.hw-lb-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:44px;height:64px;border:0;border-radius:10px;background:rgba(255,255,255,.15);color:#fff;font-size:30px;cursor:pointer}
.hw-lb-nav.l{left:8px}.hw-lb-nav.r{right:8px}
.hw-vd{width:min(520px,calc(100vw - 24px));padding:18px 20px;box-sizing:border-box}
.hw-vsum{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0 12px}
.hw-vsum div{background:var(--soft,#f5f6f8);border-radius:10px;padding:10px;text-align:center}
.hw-vsum b{display:block;font-size:22px}.hw-vsum span{font-size:12px;color:var(--muted,#6b7280)}
.hw-vtabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.hw-vtabs button{border:1px solid var(--line,#e5e7eb);background:none;border-radius:999px;padding:5px 12px;font-size:13px;cursor:pointer;color:inherit}
.hw-vtabs button.on{background:var(--ink,#111827);color:#fff;border-color:transparent}
.hw-vpane{display:flex;flex-wrap:wrap;gap:6px;max-height:46vh;overflow:auto}
.hw-vp{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line,#e5e7eb);border-radius:999px;padding:3px 10px 3px 3px;font-size:13px}
.hw-vp i{font-style:normal;font-size:10px;background:#fef3c7;color:#92400e;border-radius:4px;padding:0 4px}
.hw-vp small{color:var(--muted,#6b7280);font-size:11px}
.hw-vp b{color:var(--green,#16a34a)}
.hw-vp.ok{border-color:#bbf7d0}
.hw-vcopy{width:100%;margin-top:6px}
@media (max-width:560px){.hw-th{width:64px;height:64px}}

/* ---------- 5.8.0 老师：教学工作台 + 班级情况 ---------- */
.is-teacher #qFarm, .is-teacher #qIcs, .is-teacher #farmEntry, .is-work #qFarm, .is-work #farmEntry { display: none !important; }
.t-home { padding: 14px 16px; margin: 0 0 14px; }
.t-home-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.t-home-h .spacer { flex: 1; }
.t-home-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.t-hc { text-align: left; border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; color: inherit; font: inherit; }
.t-hc b { font-size: 15px; } .t-hc span { font-size: 13px; } .t-hc em { color: var(--red, #dc2626); font-style: normal; font-weight: 600; } .t-hc small { font-size: 12px; color: var(--sub, #6b7280); }
.t-home-tip { font-size: 12px; color: var(--sub, #6b7280); margin-top: 8px; }
#teachView { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.t-cls { display: flex; gap: 8px; flex-wrap: wrap; }
.t-chip { border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.t-chip.on { background: var(--ink, #172c36); color: #fff; border-color: transparent; }
.t-chip em { font-style: normal; background: var(--red, #dc2626); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }
.t-chip.add { color: var(--sub, #6b7280); }
.t-ov { padding: 14px 16px; }
.t-ov-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .t-ov-h b { font-size: 17px; } .t-ov-h .spacer { flex: 1; }
.t-ov-h select { border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 4px 8px; background: var(--card, #fff); color: inherit; }
.t-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.t-kpi > * { background: var(--soft, #f5f6f8); border-radius: 12px; padding: 10px 6px; text-align: center; text-decoration: none; color: inherit; }
.t-kpi b { display: block; font-size: 22px; } .t-kpi span { font-size: 12px; color: var(--sub, #6b7280); }
.t-kpi .warn b { color: var(--red, #dc2626); }
.t-tabs, .t-filter { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.t-tabs button, .t-filter button[data-tf] { border: 1px solid var(--line, #e5e7eb); background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: inherit; }
.t-tabs button.on, .t-filter button.on { background: var(--ink, #172c36); color: #fff; border-color: transparent; }
.t-filter .spacer { flex: 1; }
.t-stu, .t-items, .t-staff, .t-work { padding: 6px 14px; }
.t-staff, .t-work { padding: 14px; }
.t-s { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line, #eef0f2); }
.t-s:last-child { border-bottom: 0; }
.t-sn { flex: 1; min-width: 0; display: flex; flex-direction: column; } .t-sn b { font-size: 14px; } .t-sn small { font-size: 12px; color: var(--sub, #6b7280); }
.t-sn i { font-style: normal; font-size: 10px; background: #fef3c7; color: #92400e; border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.t-sp { width: 34%; min-width: 110px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; } .t-sp small { font-size: 12px; color: var(--sub, #6b7280); }
.bar { display: block; width: 100%; height: 7px; background: var(--soft, #eef0f3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent, #5366e8); border-radius: 99px; }
.bar i.ok { background: var(--green, #16a34a); } .bar i.low { background: #f59e0b; }
.t-it { padding: 11px 0; border-bottom: 1px solid var(--line, #eef0f2); } .t-it:last-child { border-bottom: 0; }
.t-it-h { display: flex; gap: 8px; align-items: baseline; } .t-it-h b { font-size: 14px; }
.t-it-m { display: flex; font-size: 12px; color: var(--sub, #6b7280); margin: 3px 0 6px; } .t-it-m .spacer { flex: 1; }
.t-it-b { display: grid; grid-template-columns: 34px 1fr 54px; gap: 8px; align-items: center; font-size: 12px; color: var(--sub, #6b7280); margin-top: 3px; } .t-it-b small { text-align: right; }
.t-g { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; color: inherit; font: inherit; }
.t-g b { font-size: 14px; } .t-g small { flex: 1; font-size: 12px; color: var(--sub, #6b7280); } .t-g span { color: var(--accent, #5366e8); font-size: 13px; }
.btnlike { border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 4px 10px; text-decoration: none; color: inherit; font-size: 13px; }
.t-work-b { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
@media (max-width: 560px) { .t-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .t-sp { width: 38%; min-width: 0; } }

/* ---------- 5.8.0 职场版：今天的会议和待办 ---------- */
.w-home { padding: 14px 16px; margin: 0 0 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 18px; }
.w-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; } .w-h span { background: var(--soft, #eef0f3); border-radius: 999px; font-size: 12px; padding: 0 8px; }
.w-r { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--line, #eef0f2); font-size: 14px; flex-wrap: wrap; }
.w-r .w-t { font-variant-numeric: tabular-nums; color: var(--accent, #5366e8); font-size: 12px; min-width: 38px; }
.w-r .w-n { flex: 1; min-width: 0; } .w-r small { color: var(--sub, #6b7280); font-size: 12px; }
.w-act { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 560px) { .w-home { grid-template-columns: minmax(0, 1fr); } }
/* 6.9 首页点课程：这门课在课表 / 原图里的位置 */
.csbox.on { border: 3px solid #ff7a45; background: rgba(255,122,69,.16); box-shadow: 0 0 0 9999px rgba(20,25,35,.28); cursor: default; }
#crsViewDlg .csrc-in { overflow: hidden; border-radius: 10px; }
#crsViewDlg .cv-note { display: block; color: var(--muted, #7d898e); margin: 8px 2px; font-size: 12.5px; }
.wcourse .crow[data-cview] { cursor: pointer; border-radius: 8px; }
.wcourse .crow[data-cview]:hover { background: rgba(83,102,232,.07); }
.hx[data-cview] { cursor: pointer; }
/* 6.9 账号等级 */
.lv-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 7px; border-radius: 999px; background: linear-gradient(90deg, #ffb547, #ff7a45); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.6; vertical-align: 1px; white-space: nowrap; }
.lv-chip i { font-style: normal; font-weight: 600; opacity: .92; }
.lv-chip.sm { font-size: 10px; padding: 0 6px; }
.lv-me { display: block; margin-top: 6px; }
.lv-wrap { margin: 12px 16px 0; }
.lv-card { padding: 14px 16px; display: block; }
.lv-card > b { display: block; margin-bottom: 4px; }
.lv-card > span { color: var(--sub); font-size: 13px; }
.lv-top { display: flex; align-items: center; gap: 12px; }
.lv-top > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.lv-top small { color: var(--sub); font-size: 12px; }
.lv-big { font-size: 26px; font-weight: 900; color: #ff7a45; letter-spacing: -.5px; }
.lv-bar { height: 8px; border-radius: 99px; background: var(--line); margin: 10px 0 4px; overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffb547, #ff7a45); transition: width .5s; }
.lv-next { color: var(--sub); font-size: 12px; }
.lv-rules { margin-top: 8px; font-size: 12.5px; color: var(--sub); }
.lv-rules ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.8; }
.lv-toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 9999;
  background: #1d2433; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: .25s; max-width: calc(100vw - 32px); text-align: center; }
.lv-toast.on { opacity: 1; transform: translate(-50%, 0); }
.lv-toast.bad { background: #b3402a; }
/* 6.9 位置签到 */
#ckBanner:empty { display: none; }
.ck-banner { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 12px 14px; border: 1.5px solid #ffb547; background: linear-gradient(90deg, rgba(255,181,71,.12), transparent); }
.ck-ic { font-size: 22px; }
.ck-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ck-t small { color: var(--sub); font-size: 12px; }
.ck-ok { color: #1f8a5b; font-weight: 800; font-size: 13px; white-space: nowrap; }
.ck-miss { color: var(--sub); font-size: 12.5px; }
.ck-dlg { width: min(560px, calc(100vw - 24px)); }
.ck-dlg h3 small { display: block; color: var(--sub); font-weight: 500; font-size: 12.5px; }
.ck-dlg .row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.ck-dlg .row input { flex: 1; }
.ck-opts label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); }
.ck-new { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.ck-new summary { font-weight: 800; cursor: pointer; }
.ck-st { font-size: 12.5px; color: var(--sub); } .ck-st.bad { color: #b3402a; }
.ck-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ck-row.open .ck-t b::before { content: "● "; color: #ff7a45; }
.ck-detail h4 { margin: 14px 0 6px; }
.ck-names { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; font-size: 13px; }
.ck-names > b { width: 100%; }
.ck-name { padding: 3px 10px; border-radius: 999px; background: var(--muted-bg, #f1f1ee); }
.ck-name.ok { background: rgba(31,138,91,.12); color: #1f8a5b; }
.ck-name small { margin-left: 4px; opacity: .7; }
.ck-foot { font-size: 12px; color: var(--sub); margin-top: 12px; }
.hplace { flex-shrink: 0; display: inline-flex; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 999px; border: 1.5px dashed var(--line); font-size: 14px; opacity: .65; background: transparent; }
.hplace.on { opacity: 1; border-style: solid; border-color: #ffb547; }
.hplace small { font-size: 11px; max-width: 5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rankBox .lv-card { margin: 0 16px 12px; }

/* 6.9.1 签到：方式、详情、投屏二维码 */
.ck-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.ck-mode { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1.5px solid var(--line, #e3e6ea); border-radius: 12px; cursor: pointer; font-size: 14px; }
.ck-mode input { position: absolute; opacity: 0; pointer-events: none; }
.ck-mode small { color: var(--muted, #7d898e); font-size: 12px; line-height: 1.4; }
.ck-mode:has(input:checked) { border-color: #ff7a45; background: rgba(255, 122, 69, .08); }
.ck-row[data-ckone] { cursor: pointer; } .ck-row[data-ckone]:hover { background: rgba(127, 127, 127, .06); }
.ck-go { color: var(--brand, #5366e8); font-weight: 600; font-size: 14px; white-space: nowrap; }
.ck-banner[data-ckone] { cursor: pointer; }
.ck-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 6px 0 10px; }
.ck-info div { display: flex; flex-direction: column; } .ck-info span { font-size: 12px; color: var(--muted, #7d898e); } .ck-info b { font-size: 14.5px; }
.ck-mapline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 122, 69, .08); font-size: 14px; }
.ck-mapline span { flex: 1; min-width: 0; }
.btn-like { text-decoration: none; }
.ck-proj { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 12px 0; padding: 16px; border-radius: 16px; background: #fff; color: #1d2433; border: 1px solid rgba(0, 0, 0, .08); }
.ck-qrbox { width: 220px; height: 220px; flex-shrink: 0; } .ck-qrbox svg { width: 100%; height: 100%; display: block; }
.ck-proj-r { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ck-proj-t { font-size: 18px; font-weight: 700; }
.ck-code { font: 900 56px/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 10px; color: #ff7a45; }
.ck-proj .meta { color: #6d7a80; }
.ck-proj:fullscreen, .ck-proj.max { position: fixed; inset: 0; z-index: 9999; margin: 0; border-radius: 0; justify-content: center; gap: 6vw; background: #fff; }
.ck-proj:fullscreen .ck-qrbox, .ck-proj.max .ck-qrbox { width: min(70vh, 48vw); height: min(70vh, 48vw); }
.ck-proj:fullscreen .ck-code, .ck-proj.max .ck-code { font-size: min(14vh, 9vw); }
.ck-proj:fullscreen .ck-proj-t, .ck-proj.max .ck-proj-t { font-size: 4vh; }
.ck-proj:fullscreen .meta, .ck-proj.max .meta { font-size: 2.4vh; }
.ck-me { margin: 10px 0; } .ck-ok.big { font-size: 17px; padding: 8px 0; }
.ck-quick { width: 170px; letter-spacing: 4px; font-weight: 700; }
.ck-quick.big { font-size: 22px; text-align: center; width: 150px; }
@media (max-width: 520px) { .ck-modes { grid-template-columns: 1fr; } .ck-qrbox { width: 100%; height: auto; aspect-ratio: 1; } }
dialog.ck-dlg { width: min(660px, calc(100vw - 24px)); padding: 20px 22px 16px; max-height: 92vh; overflow: auto; box-sizing: border-box; }
.ck-dlg h3 { margin: 0 0 10px; }
.ck-quick:placeholder-shown { letter-spacing: 0; font-weight: 400; }
.ck-qrbox img { width: 100%; height: 100%; object-fit: contain; display: block; }
.t-chip .t-ck { font-style: normal; font-size: 11px; color: #d4561e; background: rgba(255,122,69,.14); padding: 0 6px; border-radius: 99px; margin-left: 4px; }
.t-chip.on .t-ck { background: rgba(255,255,255,.9); color: #e8590c; }
/* 6.9.6 补签 */
button.ck-name.mk { border: 1px dashed rgba(255,122,69,.6); cursor: pointer; font: inherit; color: inherit; }
button.ck-name.mk:hover { background: rgba(255,122,69,.12); }
.ck-name .ck-x { border: 0; background: none; color: inherit; opacity: .7; cursor: pointer; padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.ck-name .ck-x:hover { opacity: 1; color: #c0392b; }

/* 7.2 全屏备忘录入口 */
#form .fhbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
button.mtag { border: 0; font: inherit; cursor: pointer; }
#fRichTip { margin: 4px 0 8px; color: var(--sub); }

/* 7.3 班级情况页：一次发几个班、发布记录、院系 */
.t-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.t-acts .btnlike { text-decoration: none; }
.ck-photo-opt { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 6px 0; }
.ck-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 65vh; overflow: auto; margin: 8px 0; }
.ck-photos figure { margin: 0; }
.ck-photos img { width: 100%; border-radius: 10px; display: block; }
.ck-photos figcaption { font-size: 12px; color: var(--sub); margin-top: 3px; }

/* 7.4 拍照签到照片墙：竖图网格，名字和时间压在照片底部；最新签的在最前 */
.cw-top { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; margin: 4px 0 10px; }
.cw-num { display: flex; flex-direction: column; line-height: 1.1; }
.cw-num b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cw-num span { font-size: 12px; color: var(--sub); }
.cw-num.ok b { color: #1f8a5b; }
.cw-num.warn b { color: #c4561e; }
.cw-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--muted-bg, #f1f1ee); }
.cw-seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--sub); cursor: pointer; }
.cw-seg button.on { background: var(--card, #fff); color: var(--ink, #1d2433); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.cw-miss { border-radius: 12px; background: rgba(255,122,69,.08); padding: 8px 12px; margin-bottom: 10px; }
.cw-miss-h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #b4501f; }
.cw-miss-l { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; max-height: 96px; overflow: auto; }
.cw-chip { font: inherit; font-size: 13px; padding: 3px 11px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px dashed rgba(212,86,30,.45); cursor: pointer; color: inherit; }
.cw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 12px 8px; }
.cw-tile { min-width: 0; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: center; display: flex; flex-direction: column; align-items: stretch; }
.cw-ph { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--muted-bg, #ececea); }
.cw-tile:focus-visible .cw-ph { outline: 3px solid var(--accent, #5366e8); outline-offset: 2px; }
.cw-ph.fresh { box-shadow: 0 0 0 2px #17c29a; }
.cw-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.cw-tile:hover .cw-ph img { transform: scale(1.05); }
.cw-none { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--sub); }
.cw-dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #17c29a; box-shadow: 0 0 0 2px #fff; }
.cw-tag { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 10.5px; line-height: 17px; color: #fff; background: rgba(0,0,0,.42); }
.cw-n { margin-top: 5px; font-size: 12.5px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cw-t { font-size: 11px; color: var(--sub); font-variant-numeric: tabular-nums; }
.cw-empty { text-align: center; padding: 28px 0; }
.cw-foot { margin-top: 10px; text-align: center; }
dialog.ck-lb { width: min(900px, calc(100vw - 16px)); max-height: 96vh; padding: 0; border: 0; border-radius: 14px; background: #111; color: #fff; overflow: hidden; }
dialog.ck-lb::backdrop { background: rgba(0,0,0,.7); }
.ck-lb figure { margin: 0; display: flex; flex-direction: column; }
.ck-lb-img { display: flex; align-items: center; justify-content: center; min-height: 240px; max-height: calc(96vh - 56px); }
.ck-lb-img img { max-width: 100%; max-height: calc(96vh - 56px); object-fit: contain; display: block; }
.ck-lb figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #1b1b1b; font-size: 14px; }
.ck-lb figcaption .meta { color: #aaa; }
.ck-lb-go { position: absolute; top: calc(50% - 50px); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; cursor: pointer; }
.ck-lb-go:disabled { opacity: .2; cursor: default; }
.ck-lb-go.l { left: 10px; } .ck-lb-go.r { right: 10px; }
[data-tone=dark] .cw-chip { background: rgba(255,255,255,.08); } [data-tone=dark] .cw-seg button.on { background: rgba(255,255,255,.14); color: #fff; }
.cw-top .spacer, .cw-miss-h .spacer, .ck-lb .spacer { flex: 1; }
.ck-lb figcaption button { color: #fff; background: rgba(255,255,255,.14); border: 0; }
.ck-lb figcaption button:hover { background: rgba(255,255,255,.24); }
dialog.ck-lb:focus { outline: none; }
