/* ============ 智学伴 SmartCampus 设计系统 ============ */
:root {
  --bg: #eef1f8;
  --bg-soft: #e4e9f4;
  --card: #ffffff;
  --card-2: #f6f8fd;
  --text: #1a2233;
  --muted: #6b7588;
  --border: #e2e8f3;
  --primary: #4f6bf0;
  --primary-deep: #3d55d6;
  --primary-soft: #e9edfe;
  --violet: #8b5cf6;
  --ok: #0ea878;
  --ok-soft: #e2f7ef;
  --warn: #e9930c;
  --warn-soft: #fdf3e0;
  --danger: #e5484d;
  --danger-soft: #fdeaea;
  --info: #2a7fd4;
  --info-soft: #e4f0fc;
  --shadow: 0 6px 24px rgba(30, 42, 90, .08);
  --shadow-lg: 0 12px 40px rgba(30, 42, 90, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 64px;
  --header-h: 56px;
}
[data-theme="dark"] {
  --bg: #0d1220;
  --bg-soft: #121a2e;
  --card: #161e33;
  --card-2: #1c2740;
  --text: #e8ecf6;
  --muted: #8b94ab;
  --border: #263252;
  --primary: #6382ff;
  --primary-deep: #4f6bf0;
  --primary-soft: #232f56;
  --violet: #a78bfa;
  --ok: #34d399;
  --ok-soft: #123529;
  --warn: #fbbf24;
  --warn-soft: #3a2c10;
  --danger: #f87171;
  --danger-soft: #3b1a1e;
  --info: #60a5fa;
  --info-soft: #14294a;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
}
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }
img, svg, video { max-width: 100%; display: block; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.mt8 { margin-top: 8px; }

/* ============ 通用组件 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 10px; font-weight: 700; font-size: 1.02rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 12px; font-size: .95rem; font-weight: 600;
  border: 1px solid transparent; transition: transform .12s, filter .2s, background .2s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff; box-shadow: 0 4px 14px rgba(79, 107, 240, .35); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--card-2); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: linear-gradient(135deg, #ef5350, #d32f2f); color: #fff; }
.btn-danger-ghost { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: .85rem; border-radius: 10px; }
.link-btn { color: var(--primary); font-size: .85rem; font-weight: 600; }
.input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--card-2);
  outline: none; transition: border .2s;
}
.input:focus { border-color: var(--primary); background: var(--card); }
textarea.input { resize: vertical; line-height: 1.6; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field-label { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 10px 0 6px; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: .82rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: filter .2s;
}
.chip:hover { filter: brightness(1.05); }
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700;
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } }
.search-row { display: flex; gap: 8px; }
.search-row .input { flex: 1; }
.switch-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; }
.switch { position: relative; width: 44px; height: 25px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--border);
  transition: background .25s;
}
.switch i::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .25s;
}
.switch input:checked + i { background: linear-gradient(135deg, var(--primary), var(--violet)); }
.switch input:checked + i::after { transform: translateX(19px); }
.seg { display: flex; background: var(--card-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg-btn { flex: 1; padding: 8px; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.seg-btn.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }

/* ============ 登录页 ============ */
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(700px 400px at 15% 0%, rgba(99, 130, 255, .18), transparent 60%),
    radial-gradient(700px 420px at 90% 100%, rgba(139, 92, 246, .16), transparent 60%),
    var(--bg);
}
.login-box { width: 100%; max-width: 420px; }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo h1 { font-size: 1.7rem; margin-top: 10px; letter-spacing: 2px; }
.login-tag { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; border-radius: 14px; border: 2px solid var(--border);
  background: var(--card-2); transition: border .2s, transform .15s;
}
.role-card:active { transform: scale(.97); }
.role-card.sel { border-color: var(--primary); background: var(--primary-soft); }
.role-ic {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: #fff;
}
.role-ic-stu { background: linear-gradient(135deg, #4f6bf0, #38bdf8); }
.role-ic-tea { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.role-name { font-weight: 800; font-size: 1.02rem; }
.role-desc { font-size: .7rem; color: var(--muted); text-align: center; line-height: 1.4; }
.login-privacy { font-size: .74rem; color: var(--muted); line-height: 1.6; margin-top: 12px; text-align: center; }
.login-foot { text-align: center; color: var(--muted); font-size: .74rem; margin-top: 14px; letter-spacing: 1px; }

/* 登录/注册 Tab */
.auth-tabs {
  display: flex; gap: 8px; margin-bottom: 14px;
  background: var(--bg-soft); padding: 5px; border-radius: 12px;
}
.auth-tab {
  flex: 1; padding: 9px 0; border: none; border-radius: 9px;
  background: transparent; color: var(--muted);
  font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: all .2s;
}
.auth-tab.active {
  background: var(--card); color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* 复选行 */
.check-row {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0 12px; font-size: .82rem; color: var(--muted);
  cursor: pointer; user-select: none;
}
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.auth-tip {
  text-align: center; margin-top: 10px; padding: 6px 10px;
  background: var(--primary-soft); border-radius: 8px;
  color: var(--primary) !important; font-weight: 600;
}

/* ============ 应用外壳 ============ */
#app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; max-width: 680px; margin: 0 auto;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.hd-left { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.hd-logo {
  width: 32px; height: 32px; border-radius: 10px; color: #fff; font-size: .95rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--violet));
}
.hd-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--border);
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: var(--text); stroke-width: 1.9; stroke-linecap: round; }
.icon-btn { position: relative; }
.backend-indicator {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted); border: 1.5px solid var(--card);
  transition: all .2s;
}
.backend-indicator.active { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.backend-indicator.error { background: var(--danger); }
[data-theme="dark"] .ic-sun { display: block; } [data-theme="dark"] .ic-moon { display: none; }
:root:not([data-theme="dark"]) .ic-sun { display: none; } :root:not([data-theme="dark"]) .ic-moon { display: block; }
.ic-moon { fill: var(--text); stroke: none; }
.lang-select {
  padding: 7px 8px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card-2); font-weight: 700; font-size: .8rem; outline: none;
}
.user-chip {
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15;
  padding: 5px 11px; border-radius: 11px; background: var(--primary-soft);
}
.user-chip span { font-size: .82rem; font-weight: 700; color: var(--primary); }
.user-chip em { font-style: normal; font-size: .64rem; color: var(--muted); }

#app-main {
  max-width: 680px; margin: 0 auto; padding: calc(var(--header-h) + 14px) 14px calc(var(--tabbar-h) + 26px);
}
.view { display: none; animation: viewIn .3s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ 底部导航 ============ */
#tabbar {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  width: min(94%, 640px); height: var(--tabbar-h); z-index: 50;
  display: flex; align-items: stretch; justify-content: space-around;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 6px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: .68rem; font-weight: 600; border-radius: 14px;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--primary); background: var(--primary-soft); }
.tab-center-btn {
  width: 44px; height: 44px; border-radius: 50%; margin-top: -26px;
  background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800;
  box-shadow: 0 6px 18px rgba(79, 107, 240, .45); border: 3px solid var(--card);
}
.tab-center { color: var(--muted); }

/* ============ 首页 ============ */
.home-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.home-head h2 { font-size: 1.35rem; }
.next-class { position: relative; overflow: hidden; border: none; color: #fff;
  background: linear-gradient(135deg, #4f6bf0 0%, #7c5cf0 60%, #8b5cf6 100%);
}
.next-class::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,.12);
}
.nc-top { display: flex; justify-content: space-between; font-size: .8rem; opacity: .92; }
.nc-count { font-weight: 800; }
.nc-main { margin: 10px 0 14px; }
.nc-subject { font-size: 1.7rem; font-weight: 800; margin-right: 12px; }
.nc-meta { font-size: .88rem; opacity: .92; }
.nc-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.nc-actions .btn-primary { background: #fff; color: var(--primary-deep); box-shadow: none; }
.nc-actions .btn-ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; }
.empty-card { text-align: center; padding: 26px 16px; }
.empty-card p { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.today-list { display: flex; flex-direction: column; gap: 8px; }
.tl-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
}
.tl-item.now { border-color: var(--primary); background: var(--primary-soft); }
.tl-time { min-width: 86px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.tl-item.now .tl-time { color: var(--primary); }
.tl-body { flex: 1; }
.tl-subject { font-weight: 700; font-size: .95rem; }
.tl-room { font-size: .78rem; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-room .go-mini { color: var(--primary); font-size: .74rem; font-weight: 700; cursor: pointer; }
.tl-state { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-weight: 700; }
.tl-state.done { color: var(--ok); background: var(--ok-soft); }
.tl-state.now { color: var(--primary); background: var(--primary-soft); }
.tl-empty { text-align: center; color: var(--muted); padding: 18px; font-size: .88rem; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 4px; font-size: .74rem; font-weight: 700; color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s;
}
.quick-item:active { transform: scale(.95); }
.qi-ic {
  width: 40px; height: 40px; border-radius: 13px; color: #fff; font-weight: 800; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
}
.qi-nav { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.qi-snap { background: linear-gradient(135deg, #f472b6, #d946ef); }
.qi-mon { background: linear-gradient(135deg, #34d399, #0d9488); }
.qi-learn { background: linear-gradient(135deg, #fbbf24, #f97316); }
.qi-att { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.qi-sch { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.qi-task { background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: 0 4px 12px rgba(124,58,237,.35); }
.qi-qr { background: linear-gradient(135deg, #22d3ee, #0891b2); box-shadow: 0 4px 12px rgba(8,145,178,.35); }

/* ============ 导航 ============ */
.search-modes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; }
.hot-chip { background: var(--card-2); border-color: var(--border); color: var(--text); }
.search-results { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.sr-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 12px; background: var(--card-2); cursor: pointer; text-align: left;
}
.sr-item:hover { background: var(--primary-soft); }
.sr-name { font-weight: 700; font-size: .9rem; }
.sr-sub { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.map-box { position: relative; border-radius: 14px; overflow: hidden; background: var(--card-2); border: 1px solid var(--border); }
#campus-svg { width: 100%; height: auto; touch-action: none; cursor: grab; display: block; }
#campus-svg.dragging { cursor: grabbing; }
.map-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-zoom button {
  width: 34px; height: 34px; border-radius: 10px; background: var(--card); border: 1px solid var(--border);
  font-size: 1.05rem; font-weight: 800; color: var(--text); box-shadow: var(--shadow);
}
.map-legend {
  position: absolute; left: 10px; bottom: 10px; display: flex; gap: 12px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px);
  padding: 6px 10px; border-radius: 10px; font-size: .7rem; font-weight: 600;
}
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lg-me { background: #2dd4bf; }
.lg-dest { background: #f43f5e; }
.lg-privacy { background: repeating-linear-gradient(45deg, #f59e0b 0 3px, transparent 3px 6px); border: 1px solid #f59e0b; }
/* 地图 SVG 元素 */
.bld { fill: var(--card); stroke: var(--border); stroke-width: 2; }
.bld:hover { fill: var(--primary-soft); }
.bld-label { font-size: 15px; font-weight: 700; fill: var(--text); text-anchor: middle; pointer-events: none; }
.bld-sub { font-size: 10px; fill: var(--muted); text-anchor: middle; pointer-events: none; }
.road { stroke: var(--bg-soft); stroke-width: 14; fill: none; stroke-linecap: round; }
.road-line { stroke: var(--border); stroke-width: 1; fill: none; stroke-dasharray: 4 6; }
.privacy-zone { fill: rgba(245, 158, 11, .14); stroke: #f59e0b; stroke-dasharray: 6 4; stroke-width: 1.5; }
.privacy-tag { font-size: 10px; fill: var(--warn); font-weight: 700; text-anchor: middle; }
.route-line { stroke: #4f6bf0; stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 700; stroke-dashoffset: 700; animation: dash 1.2s ease forwards; filter: drop-shadow(0 0 4px rgba(79,107,240,.5)); }
@keyframes dash { to { stroke-dashoffset: 0; } }
.me-dot { fill: #2dd4bf; stroke: #fff; stroke-width: 3; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { r: 10; opacity: 1; } 70% { r: 14; opacity: .7; } 100% { r: 10; opacity: 1; } }
.me-halo { fill: none; stroke: #2dd4bf; stroke-width: 2; opacity: .6; animation: halo 1.8s infinite; }
@keyframes halo { from { r: 10; opacity: .7; } to { r: 26; opacity: 0; } }
.dest-dot { fill: #f43f5e; stroke: #fff; stroke-width: 3; }
.dest-pin { font-size: 13px; fill: #f43f5e; font-weight: 800; text-anchor: middle; }
.route-card { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 12px; }
.route-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.route-info b { font-size: 1.05rem; margin-right: 8px; }
.route-stats { display: flex; gap: 8px; }
.route-stats span { background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .82rem; padding: 4px 10px; border-radius: 999px; }
.route-steps { margin: 10px 0; display: flex; flex-direction: column; gap: 5px; }
.route-step { display: flex; gap: 8px; align-items: baseline; font-size: .85rem; color: var(--muted); }
.route-step b { color: var(--primary); font-size: .75rem; min-width: 18px; }
.route-step.cur { color: var(--text); font-weight: 700; }
.route-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.route-actions .btn { flex: 1; min-width: 140px; }

/* ============ AR 导航 ============ */
#ar-overlay { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; }
#ar-video { width: 100%; height: 100%; object-fit: cover; }
.ar-fallback, .ar-privacy {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; text-align: center; padding: 30px;
}
.ar-fallback { background: radial-gradient(600px 400px at 50% 30%, #1e293b, #020617); color: #94a3b8; }
.ar-nocam-inner svg { color: #60a5fa; margin: 0 auto 8px; }
.ar-privacy { background: rgba(15, 10, 2, .92); color: #fbbf24; }
.ar-hud {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.78)); display: flex; flex-direction: column; gap: 12px;
}
.ar-step { display: flex; align-items: center; gap: 14px; }
.ar-arrow { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.15); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; flex: none; }
.ar-arrow svg { width: 34px; height: 34px; color: #4ade80; transition: transform .4s; }
.ar-arrow.turn-left svg { transform: rotate(-90deg); }
.ar-arrow.turn-right svg { transform: rotate(90deg); }
.ar-arrow.arrived svg { transform: rotate(180deg); color: #facc15; }
.ar-text b { font-size: 1.25rem; display: block; }
.ar-text span { color: #a5b4fc; font-size: .9rem; }
.ar-progress { height: 5px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.ar-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4ade80, #22d3ee); border-radius: 999px; transition: width .5s; }
.ar-ctrl { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-ctrl .btn { flex: 1; }
.ar-ctrl .btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }

/* ============ 课堂监护 ============ */
.mon-privacy-note {
  margin-top: 12px; font-size: .74rem; line-height: 1.65; color: var(--muted);
  background: var(--warn-soft); border: 1px dashed var(--warn); padding: 9px 12px; border-radius: 10px;
}
.mon-live-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mon-live-btns { display: flex; gap: 8px; }
.mon-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ms-item { background: var(--card-2); border-radius: 12px; padding: 10px 4px; text-align: center; }
.ms-val { font-size: 1.3rem; font-weight: 800; }
.ms-lab { font-size: .66rem; color: var(--muted); margin-top: 2px; }
.ms-item.ok .ms-val { color: var(--ok); }
.ms-item.warn .ms-val { color: var(--warn); }
.ms-item.danger .ms-val { color: var(--danger); }
.ms-item.info .ms-val { color: var(--info); }
.mon-alert-bar { margin-top: 10px; font-size: .78rem; font-weight: 700; }
.mon-alert-bar.flash { animation: flashBar 1s infinite alternate; }
@keyframes flashBar { from { background: var(--danger-soft); } to { background: transparent; } }
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 10px; }
.mon-stu {
  background: var(--card); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 12px 8px; text-align: center; position: relative; transition: border .3s;
}
.mon-stu.st-focus { border-color: var(--ok); background: linear-gradient(180deg, var(--ok-soft), var(--card)); }
.mon-stu.st-tired { border-color: var(--warn); background: linear-gradient(180deg, var(--warn-soft), var(--card)); }
.mon-stu.st-away { border-color: var(--danger); background: linear-gradient(180deg, var(--danger-soft), var(--card)); }
.mon-stu.st-offline { opacity: .55; }
.mon-avatar {
  width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 50%; color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  background: linear-gradient(135deg, #64748b, #475569);
}
.mon-name { font-size: .82rem; font-weight: 700; }
.mon-state { margin-top: 5px; }
.mon-spark { display: flex; gap: 2px; justify-content: center; margin-top: 6px; height: 14px; align-items: flex-end; }
.mon-spark i { width: 5px; border-radius: 2px; background: var(--ok); }
.mon-spark i.t { background: var(--warn); }
.mon-spark i.a { background: var(--danger); }
.alert-feed { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.alert-item {
  display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 11px;
  background: var(--card-2); font-size: .8rem;
}
.alert-item .at { color: var(--muted); font-size: .7rem; min-width: 38px; padding-top: 2px; }
.alert-item.tired { background: var(--warn-soft); }
.alert-item.away { background: var(--danger-soft); }
.alert-item.info { background: var(--info-soft); }
.alert-item.remind { background: var(--ok-soft); }
.join-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.join-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border);
}
.join-item b { font-size: .92rem; display: block; }
.join-item small { color: var(--muted); }
.mine-cam-wrap {
  position: relative; border-radius: 14px; overflow: hidden; background: #0b1020; aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
}
#mine-video { width: 100%; height: 100%; object-fit: cover; }
.mine-cam-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8b95b0; font-size: .85rem; text-align: center; padding: 12px; background: #101830; }
.mine-state-badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 12px; border-radius: 999px;
  font-size: .74rem; font-weight: 800; color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
}
.mine-state-badge.b-focus { background: rgba(16,185,129,.85); }
.mine-state-badge.b-tired { background: rgba(245,158,11,.9); }
.mine-state-badge.b-away { background: rgba(239,68,68,.9); }

/* Face Debug Overlay */
.face-debug-overlay {
  position: absolute;
  top: 40px;
  right: 10px;
  width: 280px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 50;
  overflow: hidden;
  font-size: 0.72rem;
  color: #fff;
}
.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.debug-title {
  font-weight: 700;
  font-size: 0.78rem;
}
.debug-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.7;
}
.debug-close:hover { opacity: 1; }
.debug-body {
  padding: 10px;
}
.debug-video-wrap {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  margin-bottom: 10px;
}
.debug-video {
  width: 100%;
  height: auto;
  display: block;
}
.debug-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.debug-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}
.dm-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
  font-weight: 600;
}
.dm-value {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: "SF Mono", "Consolas", monospace;
}
.debug-foot {
  display: flex;
  justify-content: space-around;
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.debug-hint {
  font-size: 0.65rem;
  opacity: 0.7;
}
.cam-frame { position: absolute; inset: 12% 8%; border: 2px dashed rgba(255,255,255,.0); border-radius: 12px; transition: border-color .3s; }
.cam-frame.on { border-color: rgba(74, 222, 128,.8); animation: frameBreath 2s infinite; }
@keyframes frameBreath { 0%,100% { box-shadow: 0 0 0 rgba(74,222,128,0); } 50% { box-shadow: 0 0 18px rgba(74,222,128,.35); } }
.mine-ctrl { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.focus-meter { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; }
.fm-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.fm-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #f43f5e, #f59e0b, #22c55e); transition: width .8s; }

/* ============ 拍照学习 ============ */
.snap-cam-wrap {
  position: relative; border-radius: 14px; overflow: hidden; background: #0b1020; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center; margin: 12px 0;
}
#snap-video { width: 100%; height: 100%; object-fit: cover; }
.snap-guide {
  position: absolute; inset: 10% 8%; border: 2px dashed rgba(255,255,255,.55); border-radius: 12px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; color: rgba(255,255,255,.9); font-size: .82rem;
}
.snap-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.snap-actions .btn { flex: 1; min-width: 110px; }
.snap-preview-box { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.snap-preview-box img { width: 100%; max-height: 300px; object-fit: contain; }
.ocr-progress { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ai-card { border: 1.5px solid var(--primary); }
.ai-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.ai-avatar {
  width: 34px; height: 34px; border-radius: 11px; font-size: .78rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet)); display: flex; align-items: center; justify-content: center;
}
.ai-body { line-height: 1.75; font-size: .92rem; }
.ai-body .kw-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ai-point { display: flex; gap: 8px; margin: 7px 0; }
.ai-point i { color: var(--primary); font-style: normal; font-weight: 800; }
.quiz-box { margin-top: 14px; background: var(--card-2); border-radius: 12px; padding: 13px; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.quiz-opt {
  padding: 10px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card);
  font-size: .88rem; font-weight: 600; text-align: left; transition: border .2s;
}
.quiz-opt:hover { border-color: var(--primary); }
.quiz-opt.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.quiz-opt.wrong { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.quiz-feedback { margin-top: 10px; font-size: .84rem; font-weight: 700; }
.quiz-feedback.ok { color: var(--ok); }
.quiz-feedback.no { color: var(--danger); }
.chat-list { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 15px; font-size: .89rem; line-height: 1.65; white-space: pre-wrap; }
.msg-ai { align-self: flex-start; background: var(--card-2); border-bottom-left-radius: 5px; }
.msg-me { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff; border-bottom-right-radius: 5px; }
.chat-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ============ 课表 ============ */
.sch-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.sch-table-wrap { overflow-x: auto; }
.sch-table { width: 100%; border-collapse: collapse; font-size: .78rem; min-width: 560px; }
.sch-table th { background: var(--card-2); color: var(--muted); font-size: .72rem; padding: 8px 4px; border: 1px solid var(--border); }
.sch-table td { text-align: center; padding: 7px 4px; border: 1px solid var(--border); vertical-align: top; }
.sch-table td.today-col { background: var(--primary-soft); }
.sch-cell { display: flex; flex-direction: column; gap: 2px; }
.sch-cell b { font-size: .8rem; }
.sch-cell span { color: var(--muted); font-size: .68rem; }
.sch-cell a { color: var(--primary); font-size: .68rem; font-weight: 700; cursor: pointer; }

/* ============ 点名 ============ */
.att-toolbar { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.att-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.att-legend { display: flex; gap: 8px; margin: 12px 2px; flex-wrap: wrap; }
.att-roster { display: flex; flex-direction: column; gap: 8px; }
.att-row {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border);
  border-radius: 13px; padding: 9px 12px;
}
.att-num { width: 26px; height: 26px; border-radius: 9px; background: var(--card-2); color: var(--muted); font-size: .74rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.att-name { flex: 1; font-weight: 700; font-size: .92rem; }
.att-btns { display: flex; gap: 5px; }
.att-btn {
  width: 40px; height: 32px; border-radius: 9px; font-size: .74rem; font-weight: 800;
  background: var(--card-2); border: 1.5px solid var(--border); color: var(--muted);
}
.att-btn.selected.present { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.att-btn.selected.late { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.att-btn.selected.personal { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.att-btn.selected.sick { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.att-h-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 11px; background: var(--card-2); margin-bottom: 8px; cursor: pointer;
}
.att-h-item b { font-size: .86rem; }
.att-h-item .muted { font-size: .74rem; }

/* ============ 学习中心 ============ */
.subj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.subj-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 15px; padding: 13px 6px;
  font-weight: 700; font-size: .8rem; box-shadow: var(--shadow); transition: transform .15s, border .2s;
}
.subj-item:active { transform: scale(.95); }
.subj-item.sel { border-color: var(--primary); background: var(--primary-soft); }
.subj-ic {
  width: 42px; height: 42px; border-radius: 13px; color: #fff; font-size: 1.15rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.subj-bar { width: 80%; height: 5px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.subj-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--violet)); }
.subj-detail-head { display: flex; align-items: center; gap: 12px; }
.subj-detail-head > div { flex: 1; }
.subj-detail-head b { font-size: 1.1rem; display: block; }
.kp-list { margin-top: 13px; display: flex; flex-direction: column; gap: 8px; }
.kp-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px;
  background: var(--card-2); font-size: .88rem; font-weight: 600; cursor: pointer;
}
.kp-item:hover { background: var(--primary-soft); }
.kp-state { margin-left: auto; font-size: .68rem; padding: 2px 9px; border-radius: 999px; font-weight: 800; }
.suggest-head { display: flex; align-items: center; gap: 8px; }

/* ============ Toast / Modal ============ */
#toast-wrap { position: fixed; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: min(92%, 400px); }
.toast {
  padding: 12px 16px; border-radius: 13px; font-size: .88rem; font-weight: 600; color: #fff;
  background: #1e293b; box-shadow: var(--shadow-lg); animation: toastIn .3s ease;
  display: flex; gap: 8px; align-items: center;
}
.toast.ok { background: #067a5a; }
.toast.warn { background: #b45309; }
.toast.danger { background: #be123c; }
.toast.ai { background: linear-gradient(135deg, #4338ca, #7c3aed); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.modal-mask {
  position: fixed; inset: 0; z-index: 250; background: rgba(8, 12, 24, .6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 18px; animation: toastIn .25s ease;
}
.modal {
  width: min(100%, 430px); max-height: 86vh; overflow-y: auto; background: var(--card);
  border-radius: 18px; padding: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.modal h3 { margin-bottom: 12px; font-size: 1.08rem; }
.modal-body { font-size: .9rem; line-height: 1.7; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
.consent-check { display: flex; gap: 9px; align-items: flex-start; margin: 9px 0; font-size: .84rem; line-height: 1.6; }
.consent-check input { margin-top: 3px; }

/* ============ 报告（打印） ============ */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; padding: 24px; color: #111; font-size: 13px; }
  .rp-head { text-align: center; border-bottom: 2px solid #333; padding-bottom: 12px; margin-bottom: 16px; }
  .rp-head h1 { font-size: 20px; margin-bottom: 4px; }
  .rp-sec { margin-bottom: 14px; }
  .rp-sec h2 { font-size: 15px; border-left: 4px solid #4f6bf0; padding-left: 8px; margin-bottom: 8px; }
  .rp-table { width: 100%; border-collapse: collapse; }
  .rp-table th, .rp-table td { border: 1px solid #999; padding: 5px 8px; text-align: center; font-size: 12px; }
  .rp-table th { background: #eef1f8; }
  .rp-foot { margin-top: 18px; font-size: 11px; color: #555; text-align: center; }
}

/* ============ 响应式 ============ */
@media (min-width: 700px) {
  .mon-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .subj-grid { grid-template-columns: repeat(5, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  html { font-size: 15px; }
  .mon-stats { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .ms-val { font-size: 1.05rem; }
  .quiz-opts { grid-template-columns: 1fr; }
  .nc-subject { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ================================================================ */
/* ============ v2：弹幕 / 红描边 / 积分 / 授课 / 任务 / 扫码 ============ */
/* ================================================================ */

/* ---- 英文副标题 ---- */
.en-cap {
  display: block; font-style: normal; font-size: .58rem; letter-spacing: 1.6px;
  color: var(--muted); font-weight: 800; text-transform: uppercase; margin-top: 3px;
}
.section-title > span:not(.sync-badge) { display: flex; flex-direction: column; }
.en-sub { font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.nc-en { display: block; font-style: normal; font-size: .58rem; letter-spacing: 1.6px; opacity: .78; font-weight: 800; margin-top: 2px; }
.center { text-align: center; }

/* ---- 本节课刻度轴（每节课清零 N/W ←→ HP/CP） ---- */
.spec-wrap { position: absolute; left: 10px; right: 10px; bottom: 44px; z-index: 4; }
.spec-head { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); margin-bottom: 6px; }
.spec-head .muted { color: rgba(255,255,255,.75); }
.spec-head b:last-child { margin-left: auto; font-size: 1.05rem; color: #fff; }
.spec-bar {
  position: relative; height: 12px; border-radius: 999px; overflow: visible;
  background: rgba(10,14,26,.72); border: 1px solid rgba(255,255,255,.28);
  display: flex; box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.spec-zone { height: 100%; }
.spec-zone.z-bad { flex: 5; border-radius: 999px 0 0 999px; background: linear-gradient(90deg, #7f1d1d, #dc2626); }
.spec-zone.z-mid { flex: 2; background: linear-gradient(90deg, #b45309, #a16207); }
.spec-zone.z-good { flex: 5; border-radius: 0 999px 999px 0; background: linear-gradient(90deg, #4d7c0f, #16a34a); }
.spec-tick {
  position: absolute; top: -16px; transform: translateX(-50%);
  font-size: .56rem; font-weight: 800; letter-spacing: .4px; color: rgba(255,255,255,.85);
  text-shadow: 0 1px 3px rgba(0,0,0,.7); white-space: nowrap;
}
.spec-tick.mid { top: -4px; width: 2px; height: 20px; background: rgba(255,255,255,.85); border-radius: 2px; }
.spec-dot {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff, #cbd5e1 60%, #94a3b8);
  border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 3px 10px rgba(0,0,0,.5);
  transition: left .7s cubic-bezier(.34,1.4,.5,1);
}
.spec-bar.s-bad .spec-dot { box-shadow: 0 0 0 4px rgba(239,68,68,.55), 0 3px 10px rgba(0,0,0,.5); animation: specShake .5s; }
.spec-bar.s-good .spec-dot { box-shadow: 0 0 0 4px rgba(34,197,94,.55), 0 3px 10px rgba(0,0,0,.5); }
@keyframes specShake { 0%,100%{transform:translate(-50%,-50%)} 25%{transform:translate(-70%,-50%)} 75%{transform:translate(-30%,-50%)} }
.spec-foot { display: flex; justify-content: space-between; font-size: .62rem; font-weight: 700; color: rgba(255,255,255,.8); margin-top: 5px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }

/* ---- 名片分数角标 ---- */
.mon-stu { position: relative; }
.sc-chip {
  position: absolute; top: 6px; right: 6px;
  font-size: .66rem; font-weight: 900; min-width: 26px; text-align: center;
  padding: 2px 7px; border-radius: 999px;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--border);
}
.sc-chip.pos { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.sc-chip.neg { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); animation: blink 1s infinite; }

/* ---- 名片悬停操作卡 ---- */
.stu-pop {
  display: none; position: absolute; z-index: 60; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 208px; padding: 10px 11px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  cursor: default;
}
.mon-stu:hover .stu-pop { display: block; }
.stu-pop-head { display: flex; align-items: center; justify-content: space-between; font-size: .9rem; }
.stu-pop-head span { font-size: .72rem; font-weight: 800; }
.stu-pop-score { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; font-size: .74rem; color: var(--muted); }
.stu-pop-score b { font-size: 1.3rem; }
.stu-pop-score b.pos { color: var(--ok); }
.stu-pop-score b.neg { color: var(--danger); }
.stu-pop-cnt { font-size: .68rem; color: var(--muted); margin: 4px 0 8px; font-weight: 700; }
.stu-pop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pop-b {
  padding: 8px 6px; border-radius: 9px; font-size: .76rem; font-weight: 900; color: #fff;
  border: none; cursor: pointer; transition: transform .1s, filter .15s;
}
.pop-b:active { transform: scale(.94); }
.pop-b:hover { filter: brightness(1.12); }
.pop-b.b-hp { background: linear-gradient(135deg, #34d399, #059669); }
.pop-b.b-cp { background: linear-gradient(135deg, #38bdf8, #0369a1); }
.pop-b.b-w { background: linear-gradient(135deg, #fbbf24, #d97706); }
.pop-b.b-n { background: linear-gradient(135deg, #f87171, #b91c1c); }

/* 主页积分五列 */
.pts-grid.five { grid-template-columns: repeat(5, 1fr); }
.ct-line {
  display: flex; align-items: baseline; gap: 8px; margin-top: 10px; padding: 8px 12px;
  border-radius: 10px; background: var(--card-2); border: 1px dashed var(--border);
  font-size: .8rem; font-weight: 800;
}
.ct-line b { font-size: 1.2rem; }
.ct-line b.pos { color: var(--ok); }
.ct-line b.neg { color: var(--danger); }
.ct-line small { margin-left: auto; font-weight: 600; }
.sync-badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: .66rem; font-weight: 800; padding: 4px 11px; border-radius: 999px;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.sync-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex: none; }
.sync-badge[data-st="on"] { color: var(--ok); background: var(--ok-soft); border-color: var(--ok); }
.sync-badge[data-st="on"]::before { background: var(--ok); animation: blink 1.4s infinite; }
.sync-badge[data-st="wait"] { color: var(--warn); background: var(--warn-soft); border-color: var(--warn); }
.sync-badge[data-st="wait"]::before { background: var(--warn); animation: blink 1s infinite; }

/* ---- 弹幕层（锚定在授课共享舞台内，随舞台显隐） ---- */
#dm-float {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden;
}
.dm-item {
  position: absolute; left: 100%; white-space: nowrap; padding: 6px 16px; border-radius: 999px;
  font-weight: 800; font-size: .84rem; box-shadow: 0 6px 20px rgba(0,0,0,.28);
  animation: dmFly linear forwards;
}
@keyframes dmFly { from { left: 100%; } to { left: -100%; } }
.dm-item.lv0 { background: rgba(255,255,255,.94); color: #14203a; border: 1px solid rgba(20,32,58,.12); }
.dm-item.lv1 {
  background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; font-size: 1rem;
  box-shadow: 0 6px 26px rgba(239,68,68,.55); border: 1px solid rgba(255,255,255,.25);
}
.dm-item.lv2 { background: rgba(250,204,21,.95); color: #422006; }

/* ---- 违规红描边（学生端氛围警示） ---- */
#neg-overlay { position: fixed; inset: 0; z-index: 1180; pointer-events: none; opacity: 0; transition: opacity .35s; }
#neg-overlay.on { opacity: 1; }
.neg-edge { position: absolute; background: linear-gradient(90deg, rgba(239,68,68,.2), rgba(239,68,68,.95), rgba(239,68,68,.2)); }
#neg-overlay.on .neg-edge { animation: negPulse 1s infinite; }
.neg-edge.t { top: 0; left: 0; right: 0; height: 5px; box-shadow: 0 0 26px 6px rgba(239,68,68,.55); }
.neg-edge.b { bottom: 0; left: 0; right: 0; height: 5px; box-shadow: 0 0 26px 6px rgba(239,68,68,.55); }
.neg-edge.l { left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(239,68,68,.95), rgba(239,68,68,.2)); box-shadow: 0 0 26px 6px rgba(239,68,68,.5); }
.neg-edge.r { right: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(239,68,68,.95), rgba(239,68,68,.2)); box-shadow: 0 0 26px 6px rgba(239,68,68,.5); }
@keyframes negPulse { 0%,100% { opacity: .95; } 50% { opacity: .4; } }
.neg-text {
  position: absolute; top: 16%; left: 50%; transform: translateX(-50%);
  background: rgba(190,18,60,.94); color: #fff; padding: 10px 24px; border-radius: 999px;
  font-weight: 800; font-size: .9rem; box-shadow: 0 12px 34px rgba(190,18,60,.5);
  animation: outBounce 1s infinite;
}

/* ---- 离镜警示（红色感叹号 + 氛围灯） ---- */
.out-badge {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  display: flex; align-items: center; gap: 8px;
  background: rgba(190,18,60,.95); color: #fff; padding: 6px 13px; border-radius: 12px;
  font-weight: 800; font-size: .8rem; box-shadow: 0 8px 24px rgba(190,18,60,.55);
  animation: outBounce 1s infinite;
}
.out-badge b {
  width: 21px; height: 21px; border-radius: 50%; background: #fff; color: #be123c;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
@keyframes outBounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.cam-frame.out {
  border-style: solid; border-color: rgba(239,68,68,.95) !important;
  animation: outGlow 1.1s infinite !important;
}
@keyframes outGlow {
  0%,100% { box-shadow: inset 0 0 46px rgba(239,68,68,.28), 0 0 16px rgba(239,68,68,.35); }
  50% { box-shadow: inset 0 0 90px rgba(239,68,68,.55), 0 0 38px rgba(239,68,68,.6); }
}

/* ---- 学生端专注度条 + 积分进度条 ---- */
.focus-mini {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: rgba(9,13,26,.66); backdrop-filter: blur(6px);
  border-radius: 12px; padding: 8px 12px; color: #fff; font-size: .72rem; font-weight: 700;
}
.focus-mini .fm-bar { height: 8px; background: rgba(255,255,255,.22); }
.focus-mini b { font-size: .95rem; font-variant-numeric: tabular-nums; }
.pts-track {
  display: grid; grid-template-columns: 1fr 8px 1fr; gap: 10px;
  margin-top: 14px; background: var(--card-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px;
}
.pts-track-side { display: flex; flex-direction: column; gap: 8px; }
.pts-track-mid { background: linear-gradient(180deg, transparent, var(--border), transparent); border-radius: 2px; }
.pt-cell {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 12px; padding: 8px 11px;
}
.pt-ic { font-size: 1.05rem; position: relative; z-index: 1; }
.pt-body { position: relative; z-index: 1; display: flex; flex-direction: column; line-height: 1.25; }
.pt-label { font-size: .82rem; font-weight: 700; color: var(--text); }
.pt-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; opacity: .12; border-radius: 10px; transition: width .8s ease; }
.pt-fill.fw { background: var(--warn); }
.pt-fill.fn { background: var(--danger); }
.pt-fill.fh { background: linear-gradient(90deg, var(--ok), #22d3ee); }
.pt-fill.fr { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

/* ---- 首页积分卡 / 学院杯 ---- */
.pts-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.pts-head b { font-size: 1.02rem; }
.pts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pts-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 4px 9px;
}
.pts-ic { font-size: 1rem; }
.pts-lab { font-size: .78rem; color: var(--text); font-weight: 700; text-align: center; line-height: 1.3; }
.hc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.hc-row { display: flex; align-items: center; gap: 10px; font-size: .78rem; }
.hc-name { min-width: 92px; font-weight: 800; }
.hc-bar { flex: 1; height: 9px; background: var(--card-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.hc-bar i { display: block; height: 100%; border-radius: 999px; transition: width .9s ease; }
.hc-val { min-width: 28px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.pts-house-line { margin-top: 11px; text-align: center; font-weight: 700; }

/* ---- 课堂类型切换（大卡片段选） ---- */
#mon-mode-seg, #tk-type-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: transparent; padding: 0; }
#tk-type-seg { grid-template-columns: repeat(3, 1fr); }
#mon-mode-seg .seg-btn, #tk-type-seg .seg-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 12px 13px; border: 1.5px solid var(--border); background: var(--card-2);
}
#mon-mode-seg .seg-btn b, #tk-type-seg .seg-btn b { font-size: .92rem; }
#mon-mode-seg .seg-btn small, #tk-type-seg .seg-btn small { font-size: .64rem; color: var(--muted); font-weight: 600; line-height: 1.45; }
#mon-mode-seg .seg-btn.active, #tk-type-seg .seg-btn.active {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary);
}
#mon-mode-seg .seg-btn.active small, #tk-type-seg .seg-btn.active small { color: var(--primary); }

/* ---- 授课教室：屏幕共享 / 弹幕 / 摄像头画面墙 ---- */
.share-stage {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #070b16; aspect-ratio: 16/9; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.share-stage video, .share-stage img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.share-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 9px;
  align-items: center; justify-content: center; color: #7c89a8; font-size: .84rem; text-align: center; padding: 14px;
}
.share-badge {
  position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 7px;
  background: rgba(190,18,60,.94); color: #fff; font-size: .7rem; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; letter-spacing: 1px;
}
.share-badge i, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; display: inline-block; animation: blink 1s infinite; }
.live-dot { margin-right: 6px; }
@keyframes blink { 50% { opacity: .15; } }
.teach-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.share-mode-seg {
  display: flex; background: var(--bg-soft); padding: 3px; border-radius: 10px;
  border: 1px solid var(--border);
}
.share-mode-seg .seg-btn {
  padding: 5px 12px; border: none; background: transparent;
  color: var(--muted); font-size: .75rem; font-weight: 700;
  border-radius: 7px; cursor: pointer; transition: all .15s;
}
.share-mode-seg .seg-btn.active {
  background: var(--primary-soft); color: var(--primary-deep);
  box-shadow: var(--shadow-sm);
}
.share-upload-area {
  width: 100%; display: flex; flex-direction: column; gap: 8px;
  padding: 10px; background: var(--card-2); border-radius: 10px;
  border: 1px dashed var(--border);
}
.share-slide-thumbs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.share-slide-thumb {
  width: 60px; height: 45px; border-radius: 6px; overflow: hidden;
  border: 2px solid var(--border); cursor: pointer;
  transition: all .15s; position: relative;
}
.share-slide-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.share-slide-thumb img { width: 100%; height: 100%; object-fit: cover; }
.share-slide-thumb .slide-num {
  position: absolute; top: 1px; left: 2px;
  font-size: .55rem; font-weight: 800; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* 顶部大尺寸共享模式选择器 */
.share-mode-seg.big {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0;
  background: none;
  border: none;
  margin-bottom: 10px;
}
.share-mode-seg.big .seg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--card-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.share-mode-seg.big .seg-btn b {
  font-size: 1.6rem;
}
.share-mode-seg.big .seg-btn small {
  font-size: .65rem;
  font-weight: 500;
  opacity: .7;
}
.share-mode-seg.big .seg-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-deep);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}
.share-mode-seg.big .seg-btn.active small {
  opacity: 1;
}

/* iPad 提示条 */
.ipad-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid #f59e0b;
}
[data-theme="dark"] .ipad-hint {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
  border-color: #d97706;
}
.ipad-hint-icon { font-size: 1.3rem; flex-shrink: 0; }
.ipad-hint b {
  display: block;
  font-size: .8rem;
  color: #92400e;
  margin-bottom: 2px;
}
[data-theme="dark"] .ipad-hint b { color: #fbbf24; }
.ipad-hint p {
  font-size: .72rem;
  color: #78350f;
  margin: 0;
  line-height: 1.4;
}
[data-theme="dark"] .ipad-hint p { color: #fde68a; }

/* 上传区域 */
.upload-drop-zone {
  text-align: center;
  padding: 20px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .2s;
}
.upload-drop-zone:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.upload-icon { font-size: 2rem; margin-bottom: 6px; }
.upload-drop-zone p {
  font-size: .78rem;
  color: var(--muted);
  margin: 0 0 8px 0;
}
#share-upload-area-top {
  margin-bottom: 10px;
}
.quality-seg {
  display: flex; background: var(--bg-soft); padding: 3px; border-radius: 10px;
  border: 1px solid var(--border);
}
.quality-seg .seg-btn {
  padding: 5px 14px; border: none; background: transparent;
  color: var(--muted); font-size: .78rem; font-weight: 700;
  border-radius: 7px; cursor: pointer; transition: all .15s;
}
.quality-seg .seg-btn.active {
  background: var(--card); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.pub-row { flex: 1; display: flex; gap: 8px; min-width: 230px; }
.dm-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dm-demo { font-size: .68rem; font-weight: 800; padding: 5px 13px; border-radius: 999px; }
.dm-demo.lv0 { background: #fff; color: #14203a; border: 1px solid rgba(20,32,58,.18); }
[data-theme="dark"] .dm-demo.lv0 { background: #e2e8f0; }
.dm-demo.lv1 { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.dm-demo.lv2 { background: #facc15; color: #422006; }
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 10px; }
.cam-tile {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3;
  background: var(--card-2); border: 1.5px solid var(--border);
}
.cam-tile.live { border-color: var(--ok); }
.cam-tile img { width: 100%; height: 100%; object-fit: cover; }
.cam-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.7rem; font-weight: 800; }
.cam-tile-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px;
  font-size: .68rem; font-weight: 800; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78));
}
.cam-dot { position: absolute; top: 7px; right: 7px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); }
.cam-dot.ok { background: #22c55e; }
.cam-dot.warn { background: #f59e0b; }
.cam-dot.bad { background: #ef4444; animation: blink .8s infinite; }
.cam-dot.off { background: #64748b; }
.ms-item.violet .ms-val { color: var(--violet); }
.mon-stats { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }

/* ---- 二维码签到 ---- */
.qr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-scan-wrap {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #070b16; aspect-ratio: 4/3; margin-top: 12px; display: flex; align-items: center; justify-content: center;
}
.qr-scan-wrap video { width: 100%; height: 100%; object-fit: cover; }
.qr-scan-frame {
  position: absolute; inset: 15% 24%; border: 2.5px solid rgba(74,222,128,.95); border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.38); animation: frameBreath 2s infinite;
}
.qr-scan-tip {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 9px 12px; text-align: center;
  color: #cbd5f5; font-size: .72rem; background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.qr-big { display: flex; justify-content: center; background: #fff; padding: 16px; border-radius: 14px; }
.qr-big img { width: min(68vw, 250px); height: auto; }

/* ---- 学习任务 ---- */
.tk-task-card { cursor: pointer; transition: transform .15s, box-shadow .25s, border-color .25s; }
.tk-task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tk-task-card.reviewed { border-color: var(--ok); }
.tk-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-row-head b { font-size: .98rem; }
.tk-row-stats { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.tk-content { margin-top: 9px; font-size: .8rem; line-height: 1.6; }
.tk-presets { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.tk-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 11px; }
.tk-metric { background: var(--card-2); border-radius: 12px; padding: 10px 4px 8px; text-align: center; }
.tk-metric b { display: block; font-size: 1.12rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tk-metric span { font-size: .62rem; color: var(--muted); font-weight: 800; }
.tk-viol {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--danger-soft); color: var(--danger);
  border-radius: 11px; padding: 8px 11px; font-size: .8rem; font-weight: 700; margin-bottom: 6px;
}
.tk-viol.ok { background: var(--ok-soft); color: var(--ok); }
.tk-snap { width: 54px; height: 40px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.tk-video-wrap { border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 8px; }
.tk-video-wrap video { width: 100%; max-height: 300px; }
.tk-photo-wrap img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.tk-verdict { font-weight: 800; padding: 10px 14px; border-radius: 12px; font-size: .86rem; margin-top: 6px; }
.tk-verdict.pass { background: var(--ok-soft); color: var(--ok); }
.tk-verdict.redo { background: var(--warn-soft); color: var(--warn); }
.tk-overwarn { color: var(--danger); font-weight: 800; font-size: .85rem; margin-bottom: 8px; }
.tk-fb-box { margin-top: 10px; background: var(--ok-soft); border-radius: 12px; padding: 11px 13px; font-size: .85rem; line-height: 1.7; }
.tk-fb-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-word-list { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; }
.tk-word-row {
  display: flex; align-items: center; gap: 10px; background: var(--card-2);
  border-radius: 10px; padding: 7px 11px; font-size: .86rem; font-weight: 700;
}
.tk-bad-words { color: var(--danger); font-weight: 800; }
.tk-words-review p { font-size: .86rem; line-height: 1.8; }

/* ---- 背诵录像全屏层 ---- */
#tk-recite-ov {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(6,10,20,.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: toastIn .25s ease;
}
.tk-recite-box {
  width: min(100%, 560px); max-height: 92vh; overflow-y: auto;
  background: var(--card); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg);
}
.tk-recite-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tk-recite-head b { display: block; }
.tk-recite-head .muted { display: block; font-size: .72rem; margin-top: 2px; }
.tk-recite-timer {
  font-size: 1.45rem; font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums;
  background: var(--card-2); padding: 6px 15px; border-radius: 12px; border: 1px solid var(--border);
}
.tk-recite-timer.over { color: #fff; background: linear-gradient(135deg, #ef4444, #b91c1c); border-color: transparent; animation: outBounce 1s infinite; }
.tk-recite-stage {
  position: relative; border-radius: 14px; overflow: hidden; background: #070b16;
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
}
.tk-recite-stage video { width: 100%; height: 100%; object-fit: cover; }
.tk-recite-nocam {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #8b95b0; font-size: .85rem; padding: 16px; text-align: center;
}
.rec-dot {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(190,18,60,.94); color: #fff; font-size: .66rem; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; letter-spacing: 1.5px;
}
.rec-dot::before { content: "●"; margin-right: 7px; animation: blink 1s infinite; }
.tk-live-viols { display: flex; flex-direction: column; gap: 6px; margin: 11px 0 4px; }
.tk-live-viol {
  background: var(--danger-soft); color: var(--danger); font-weight: 800; font-size: .8rem;
  border-radius: 10px; padding: 8px 12px; animation: toastIn .3s ease;
}
.tk-recite-actions { margin-top: 12px; }
#toast-wrap { z-index: 500; }

/* ---- 桌面全屏 · 专业赛事级布局 ---- */
@media (min-width: 960px) {
  html { font-size: 17px; }
  body {
    background:
      radial-gradient(1000px 560px at 10% -6%, rgba(99,130,255,.12), transparent 60%),
      radial-gradient(1000px 560px at 96% 108%, rgba(139,92,246,.10), transparent 60%),
      var(--bg);
    min-height: 100vh;
  }
  #app-header { max-width: none; padding: 0 28px; height: calc(var(--header-h) + 4px); }
  #app-main { max-width: none; padding: calc(var(--header-h) + 16px) 28px calc(var(--tabbar-h) + 32px); min-height: 100vh; box-sizing: border-box; }
  #tabbar { width: min(42%, 560px); bottom: 16px; }
  .login-box { max-width: 470px; }
  .home-head h2 { font-size: 1.75rem; }
  .card { transition: box-shadow .25s, transform .2s; }
  .card:hover { box-shadow: var(--shadow-lg); }
  .quick-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
  .mon-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
  .cam-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .alert-feed { max-height: 420px; }
  .modal { width: min(100%, 520px); }
  .modal-lg { width: min(100%, 900px) !important; }
  #view-tasks #tk-teacher { display: grid; grid-template-columns: minmax(350px, 2fr) minmax(340px, 3fr); gap: 4px 24px; align-items: start; }
  #view-tasks #tk-teacher > .card { grid-row: 1 / 4; }
  #view-home .pts-card { background:
    linear-gradient(135deg, rgba(79,107,240,.05), rgba(139,92,246,.05)),
    var(--card); }
  .share-stage { aspect-ratio: 21/9; }
  /* 课堂监护页全屏双栏布局 */
  #view-monitor .mon-body {
    display: grid;
    grid-template-columns: minmax(340px, 1.3fr) minmax(300px, 0.7fr);
    gap: 18px;
    align-items: start;
  }
  #view-monitor .mon-body > :first-child { order: 1; }
  #view-monitor .mon-body > :nth-child(2) { order: 2; }
}

/* ---- 平板/大屏手机：更宽的布局 ---- */
@media (min-width: 640px) and (max-width: 959px) {
  #app-header { max-width: none; padding: 0 20px; }
  #app-main { max-width: none; padding: calc(var(--header-h) + 14px) 20px calc(var(--tabbar-h) + 28px); }
  #tabbar { width: min(70%, 520px); }
  .quick-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .mon-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .cam-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* ============ 地点识别与聊天 AI ============ */
.place-hover-card {
  position: fixed;
  z-index: 2000;
  width: 280px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  pointer-events: none;
  display: none;
  animation: phcFadeIn .18s ease;
}
@keyframes phcFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.phc-accent { height: 4px; width: 100%; }
.phc-body { padding: 12px 14px; }
.phc-name { font-size: .95rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.phc-desc { font-size: .78rem; color: var(--muted); line-height: 1.45; margin-bottom: 8px; }
.phc-feats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.phc-feat {
  font-size: .68rem; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-deep); font-weight: 600;
}
.phc-hint { font-size: .7rem; color: var(--muted); font-style: italic; }

/* 照片识别模态框 */
.photo-rec-wrap { display: flex; flex-direction: column; gap: 12px; }
.pr-preview-area {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 12px;
  background: var(--card-2);
  border: 2px dashed var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pr-preview-area img, .pr-preview-area video {
  width: 100%; height: 100%; object-fit: cover;
}
.pr-placeholder { text-align: center; color: var(--muted); }
.pr-ic { font-size: 3rem; margin-bottom: 8px; }
.pr-placeholder p { font-size: .85rem; margin: 0; }
.pr-actions { display: flex; gap: 10px; justify-content: center; }
.pr-capture-btn {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%; border: 4px solid rgba(255,255,255,.4);
  background: #fff; font-size: 1.4rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 2;
}
.pr-capture-btn:active { transform: translateX(-50%) scale(0.92); }
.pr-scan-line {
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: scanMove 1.2s linear infinite;
  z-index: 3;
}
@keyframes scanMove {
  0% { top: 0; }
  50% { top: calc(100% - 3px); }
  100% { top: 0; }
}
.pr-results { display: flex; flex-direction: column; gap: 8px; }
.pr-result-title { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pr-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border);
}
.pr-rank {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--muted); color: #fff; font-size: .75rem; font-weight: 800;
  flex-shrink: 0;
}
.pr-rank.top { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.pr-info { flex: 1; min-width: 0; }
.pr-name {
  font-size: .85rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.pr-confidence {
  display: inline-block; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--violet));
  min-width: 20px;
}
.pr-desc { font-size: .72rem; color: var(--muted); margin: 3px 0 5px; line-height: 1.35; }
.pr-features { display: flex; flex-wrap: wrap; gap: 3px; }
.pr-feat-chip {
  font-size: .62rem; padding: 1px 7px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-deep); font-weight: 600;
}
.pr-go-btn { flex-shrink: 0; }
.pr-no-result {
  padding: 20px; text-align: center; color: var(--muted); font-size: .85rem;
}

/* 地点聊天 */
.place-chat-wrap {
  display: flex; flex-direction: column;
  height: 520px; max-height: 70vh;
}
.pc-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--border);
  margin-bottom: 12px;
}
.pc-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
}
.pc-name { font-size: .95rem; font-weight: 800; color: var(--text); }
.pc-sub { font-size: .75rem; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.pc-chat-list {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 4px 4px 12px;
}
.pc-msg {
  display: flex; gap: 8px; max-width: 82%;
}
.pc-msg-ai { align-self: flex-start; }
.pc-msg-me { align-self: flex-end; flex-direction: row-reverse; }
.pc-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.pc-avatar.me { background: var(--violet); color: #fff; }
.pc-bubble {
  padding: 8px 12px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--border);
  font-size: .82rem; line-height: 1.5; color: var(--text);
}
.pc-msg-me .pc-bubble {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.pc-quick-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 0;
}
.chip {
  padding: 4px 12px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--border);
  font-size: .72rem; color: var(--text); cursor: pointer;
  font-weight: 600; transition: all .15s;
}
.chip:hover {
  background: var(--primary-soft); border-color: var(--primary);
  color: var(--primary-deep);
}
.pc-input-row {
  display: flex; gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.pc-input-row .input { flex: 1; }

/* ============ 行为记录 Behaviour Log（仿专业移动端表单，固定深色） ============ */
#bhv-page {
  position: fixed; inset: 0; z-index: 1420; display: flex; flex-direction: column;
  background: #141826; color: #eef1f8; animation: bhvIn .28s ease;
}
@keyframes bhvIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.bhv-head {
  flex: none; display: flex; align-items: center; gap: 6px;
  min-height: 58px; padding: 4px 10px 4px 4px;
  background: linear-gradient(135deg, #2f6fe4, #1d4ed8);
  box-shadow: 0 4px 18px rgba(29, 78, 216, .45);
}
.bhv-ic {
  width: 42px; height: 42px; border-radius: 50%; color: #fff; font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none; transition: background .15s;
}
.bhv-ic:hover { background: rgba(255, 255, 255, .16); }
.bhv-ic.menu { font-size: 1.05rem; border: 2px solid rgba(255, 255, 255, .85); }
.bhv-ic.menu.on { background: #fff; color: #1d4ed8; }
.bhv-title {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  color: #fff; font-size: 1.02rem; font-weight: 800; padding: 9px 14px; border-radius: 12px;
  transition: background .15s; min-width: 0;
}
.bhv-title:hover { background: rgba(255, 255, 255, .14); }
.bhv-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bhv-title i { font-size: .7rem; opacity: .85; font-style: normal; }

.bhv-scroll { flex: 1; overflow-y: auto; padding: 18px 16px 40px; max-width: 620px; width: 100%; margin: 0 auto; }
.bhv-date {
  display: inline-flex; align-items: center; gap: 8px;
  color: #aab3cc; font-size: .82rem; font-weight: 600; margin-bottom: 16px;
  background: #1d2436; border: 1px solid #2a3350; border-radius: 10px; padding: 7px 13px;
}
.bhv-lab { color: #dfe4f2; font-size: .88rem; font-weight: 700; margin: 4px 2px 8px; }
.bhv-lab i { color: #ff5a5f; font-style: normal; margin-left: 2px; }
.bhv-lab.hist { margin-top: 8px; font-size: .95rem; }

.bhv-field {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 48px; padding: 12px 15px; border-radius: 12px;
  background: #1a2133; border: 2px solid #2f6fe4;
  box-shadow: 0 0 0 3px rgba(47, 111, 228, .18);
  margin-bottom: 12px;
}
.bhv-field .ph { color: #6f7a99; font-size: .92rem; }
.bhv-field.has { border-color: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .14); }
.bhv-field .bi-main { font-weight: 700; font-size: .92rem; }

.bhv-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.bhv-grp {
  font-size: .68rem; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase;
  margin: 10px 2px 2px; color: #93a0c4;
}
.bhv-grp.g-pos { color: #4ade80; }
.bhv-grp.g-con { color: #fbbf24; }
.bhv-grp.g-ser { color: #f87171; }
.bhv-item {
  display: flex; flex-direction: column; gap: 2px; text-align: left; position: relative;
  background: #232a3d; border: 1.5px solid #2c3550; border-radius: 12px;
  padding: 11px 62px 11px 14px; transition: border .15s, background .15s, transform .1s;
}
.bhv-item:active { transform: scale(.985); }
.bhv-item:hover { background: #283049; border-color: #3c4870; }
.bhv-item.sel { border-color: #2f6fe4; background: #26325a; box-shadow: 0 0 0 3px rgba(47, 111, 228, .2); }
.bhv-item.sel::after {
  content: "✓"; position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  color: #2f6fe4; font-weight: 900; font-size: 1rem;
}
.bi-main { color: #f0f3fb; font-size: .92rem; font-weight: 700; }
.bi-sub { color: #7d88ab; font-size: .74rem; }
.bi-pt {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: .72rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; flex: none;
}
.bhv-item.g-pos .bi-pt, .bhv-rec.g-pos .bi-pt { background: rgba(74, 222, 128, .16); color: #4ade80; }
.bhv-item.g-con .bi-pt, .bhv-rec.g-con .bi-pt { background: rgba(251, 191, 36, .16); color: #fbbf24; }
.bhv-item.g-ser .bi-pt, .bhv-rec.g-ser .bi-pt { background: rgba(248, 113, 113, .18); color: #f87171; }
.bhv-item.g-ser .bi-main::before, .bhv-rec.g-ser .br-top b::before {
  content: "⚑ "; color: #f87171; font-weight: 900;
}

.bhv-note {
  width: 100%; background: #1a2133; border: 1.5px solid #2c3550; border-radius: 12px;
  color: #eef1f8; padding: 12px 14px; font-size: .92rem; line-height: 1.6;
  outline: none; resize: vertical; transition: border .15s;
}
.bhv-note:focus { border-color: #2f6fe4; }
.bhv-note::placeholder { color: #6f7a99; }

.bhv-submit {
  width: 100%; margin-top: 16px; padding: 14px; border-radius: 13px;
  background: linear-gradient(135deg, #2f6fe4, #1d4ed8); color: #fff;
  font-size: .98rem; font-weight: 800; box-shadow: 0 6px 20px rgba(29, 78, 216, .4);
  transition: filter .15s, transform .1s;
}
.bhv-submit:hover { filter: brightness(1.08); }
.bhv-submit:active { transform: scale(.98); }

/* 历史记录 */
.bhv-empty { color: #6f7a99; text-align: center; padding: 34px 0; font-size: .88rem; }
.bhv-rec {
  background: #1d2436; border: 1px solid #2a3350; border-left: 4px solid #64748b;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 9px;
}
.bhv-rec.g-pos { border-left-color: #4ade80; }
.bhv-rec.g-con { border-left-color: #fbbf24; }
.bhv-rec.g-ser { border-left-color: #f87171; }
.br-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.br-top b { font-size: .92rem; color: #f0f3fb; }
.br-sub { color: #7d88ab; font-size: .76rem; margin-top: 2px; }
.br-note { color: #b9c2dd; font-size: .84rem; margin-top: 7px; background: #171d2e; border-radius: 8px; padding: 7px 10px; }
.br-meta { color: #5c6785; font-size: .7rem; margin-top: 7px; }

/* 换学生弹层 */
.bhv-pick-list { max-height: 56vh; overflow-y: auto; }
.bhv-pick-cls { color: var(--muted); font-size: .74rem; font-weight: 800; margin: 10px 2px 6px; }
.bhv-pick-item {
  display: block; width: 100%; text-align: left; padding: 10px 13px; border-radius: 10px;
  background: var(--card-2); border: 1.5px solid var(--border); margin-bottom: 6px;
  font-weight: 700; transition: border .15s, background .15s;
}
.bhv-pick-item:hover { border-color: var(--primary); }
.bhv-pick-item.cur { border-color: var(--primary); background: var(--primary-soft); }

/* 名片悬停卡的行为按钮 */
.pop-b.b-beh { background: linear-gradient(135deg, #6366f1, #4338ca); grid-column: 1 / -1; }

/* 主页入口图标 */
.qi-ic.qi-beh { background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; }

/* 行为页在宽屏也保持移动表单宽度 */
@media (min-width: 960px) {
  .bhv-scroll { padding: 26px 16px 40px; }
}

/* ============ 情绪识别 & 人脸 AI ============ */
.detector-label {
  position: absolute; top: 12px; right: 12px;
  font-size: .7rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; z-index: 5;
  background: rgba(15, 23, 42, .82); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #9ca3af;
  transition: all .2s;
}
.detector-label.ok { color: #4ade80; border-color: rgba(74, 222, 128, .4); }
.detector-label.warn { color: #fbbf24; border-color: rgba(251, 191, 36, .4); }
.detector-label.muted { color: #6b7280; border-color: rgba(107, 114, 128, .3); }
.mood-badge {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(15, 23, 42, .82); backdrop-filter: blur(6px);
  color: #fff; font-size: .8rem; font-weight: 800;
  padding: 6px 14px; border-radius: 999px; z-index: 5;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
.mood-badge[data-mood="happy"] { border-color: rgba(74, 222, 128, .5); color: #bbf7d0; }
.mood-badge[data-mood="sad"] { border-color: rgba(96, 165, 250, .5); color: #bfdbfe; }
.mood-badge[data-mood="angry"] { border-color: rgba(248, 113, 113, .5); color: #fecaca; }
.mood-badge[data-mood="fearful"] { border-color: rgba(192, 132, 252, .5); color: #e9d5ff; }
.mood-badge[data-mood="disgusted"] { border-color: rgba(163, 230, 53, .5); color: #d9f99d; }
.mood-badge[data-mood="surprised"] { border-color: rgba(251, 191, 36, .5); color: #fde68a; }

/* 教师端学生名片上的情绪表情 */
.stu-mood {
  display: inline-block; margin-left: 6px; font-size: .9rem;
  filter: grayscale(.3); transition: transform .2s;
}
.stu-mood[data-mood="happy"],
.stu-mood[data-mood="angry"],
.stu-mood[data-mood="sad"] { filter: none; transform: scale(1.15); }

/* 把 old ai-v2 样式扩展到 v3 */
.ai-v2-tip { opacity: .65; }

/* 学生名片名字行布局调整 */
.mon-name { position: relative; }

/* ============ 摄像头预览弹窗 ============ */
.modal-lg { width: min(100%, 860px) !important; }
.cam-preview { display: flex; gap: 14px; flex-direction: column; }
.cp-stage {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #0a0f1c; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cp-stage img { width: 100%; height: 100%; object-fit: cover; }
.cp-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cp-ph span {
  font-size: 4rem; font-weight: 900; color: rgba(255, 255, 255, .85);
  text-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}
.cp-badge-state {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 13px; border-radius: 999px; font-size: .74rem; font-weight: 800; color: #fff;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
}
.cp-badge-state.ok { background: rgba(16, 185, 129, .85); }
.cp-badge-state.warn { background: rgba(245, 158, 11, .88); }
.cp-badge-state.bad { background: rgba(239, 68, 68, .88); }
.cp-badge-mood {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; border-radius: 999px; font-size: .76rem; font-weight: 700; color: #fff;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .18);
}
.cp-badge-score {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 14px; border-radius: 999px; font-size: .82rem; font-weight: 900; color: #fff;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .2);
}
.cp-badge-score.pos { color: #4ade80; border-color: rgba(74, 222, 128, .5); }
.cp-badge-score.neg { color: #f87171; border-color: rgba(248, 113, 113, .5); }

.cp-info {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
}
.cp-row { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.cp-row span { color: var(--muted); font-weight: 600; }
.cp-row b { font-size: .9rem; }

/* 摄像头缩略图上的情绪表情 */
.cam-mood {
  position: absolute; top: 8px; right: 8px;
  font-size: 1rem; background: rgba(0, 0, 0, .5); border-radius: 50%;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}
.cam-tile { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.cam-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* 名片悬停卡的摄像头按钮 */
.pop-b.b-cam { background: linear-gradient(135deg, #0ea5e9, #0369a1); grid-column: 1 / -1; }

/* ============ 账号管理 ============ */
.acc-mgr { display: flex; flex-direction: column; gap: 16px; max-height: 65vh; overflow-y: auto; padding-right: 4px; }
.acc-section h4 {
  font-size: .92rem; margin: 0 0 8px; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.acc-section h4::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--violet));
}
.acc-list { display: flex; flex-direction: column; gap: 6px; }
.acc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border);
  transition: border .15s;
}
.acc-row:hover { border-color: var(--primary-soft); }
.acc-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.acc-info b { font-size: .92rem; }
.acc-uname { color: var(--muted); font-size: .78rem; font-family: monospace; }
.acc-cls {
  font-size: .72rem; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 700;
}
.acc-ops { display: flex; gap: 6px; }
.btn-sm { padding: 5px 10px; font-size: .75rem; border-radius: 8px; }
.btn-danger-ghost {
  background: transparent; color: #ef4444; border: 1px solid rgba(239, 68, 68, .35);
  font-weight: 700;
}
.btn-danger-ghost:hover { background: rgba(239, 68, 68, .08); }

.acc-add {
  padding: 12px; border-radius: 12px;
  background: var(--bg-soft); border: 1px dashed var(--border);
}
.acc-add h4 {
  font-size: .88rem; margin: 0 0 10px; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.acc-add h4::before {
  content: "+"; font-weight: 900; color: var(--primary); font-size: 1rem;
}
.acc-add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }

/* 教师端快捷入口：账号图标 */
.qi-acc { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
