/* ================================================================
   26级生物科学7班网络 · v11 暖色毛玻璃设计系统
   暖杏渐变底 + 悬浮玻璃外壳 + 三栏仪表盘布局
   ================================================================ */

:root {
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --ink: #2C2C2C;
  --ink-2: #6B7280;
  --ink-3: #9CA3AF;
  --bg1: #FDF6EC;
  --bg2: #FBEBD3;
  --orange: #ED8936;
  --orange-d: #DD6B20;
  --orange-soft: #FDEBD3;
  --orange-softer: #FDF4E7;
  --yellow: #F6D55C;
  --green: #68D391;
  --blue: #63B3ED;
  --mint: #9AE6B4;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --green-soft: #D9F2E4;
  --glass: rgba(255, 255, 255, .62);
  --glass-2: rgba(255, 255, 255, .74);
  --glass-brd: rgba(255, 255, 255, .65);
  --border: #EFE4D3;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(120, 72, 20, .06);
  --shadow-lg: 0 16px 48px rgba(120, 72, 20, .12);
  --tr: .3s cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(150deg, var(--bg1) 0%, var(--bg2) 55%, #FBE6C8 100%);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.55;
}
/* 氛围光斑：让毛玻璃有东西可糊 */
body::before, body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(90px); z-index: 0; pointer-events: none;
}
body::before { width: 480px; height: 480px; background: rgba(246, 213, 92, .38); top: -120px; right: -80px; }
body::after { width: 420px; height: 420px; background: rgba(154, 230, 180, .30); bottom: -140px; left: -100px; }
/* 用户自定义背景图：--page-bg 由 JS（applyBackground）注入到 <html>；
   暖色薄纱罩在图片之上，保证毛玻璃卡片可读性 */
html[data-custom-bg="1"] body {
  background:
    linear-gradient(rgba(253, 246, 236, .62), rgba(255, 245, 230, .70)),
    var(--page-bg, none) center / cover fixed no-repeat,
    linear-gradient(150deg, var(--bg1) 0%, var(--bg2) 55%, #FBE6C8 100%);
}

a { color: var(--orange-d); text-decoration: none; }
img { max-width: 100%; }
button { font-family: var(--font); cursor: pointer; }
input, textarea, select { font-family: var(--font); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(221, 107, 32, .22); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 工具类 ---------------- */
.hidden { display: none !important; }
.muted { color: var(--ink-3); font-size: 12px; }
.big { font-size: 34px; }
.ico { margin-right: 4px; }
.clickable { cursor: pointer; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--ink-2); cursor: pointer; transition: color var(--tr); }
.back-link:hover { color: var(--orange-d); }
.container { max-width: 1200px; margin: 0 auto; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--orange-soft); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.msg { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin: 10px 0; }
.msg.err, .err { background: var(--red-soft); color: var(--red); }
.msg.ok { background: var(--green-soft); color: #23794B; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 16px; font-size: 13px; }
.empty .big { display: block; margin-bottom: 8px; opacity: .7; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--orange); color: #fff; border: none;
  padding: 10px 20px; border-radius: 14px; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(237, 137, 54, .28);
  transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
}
.btn:hover { background: var(--orange-d); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(237, 137, 54, .34); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.small { padding: 6px 13px; font-size: 12.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.ghost {
  background: rgba(255, 255, 255, .55); color: var(--ink-2);
  border: 1px solid var(--border); box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: var(--shadow); }
.btn.danger, .btn.ghost.danger { background: var(--red-soft); color: var(--red); border: none; box-shadow: none; }
.btn.danger:hover { background: #FBCACA; color: #B91C1C; }

/* ---------------- 徽章 ---------------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--orange-soft); color: var(--orange-d);
  font-size: 11px; font-weight: 600; vertical-align: 1px;
}
.badge.role-staff { background: var(--green-soft); color: #23794B; }
.count-dot {
  display: inline-block; min-width: 17px; text-align: center; padding: 1px 5px;
  border-radius: 999px; background: var(--orange); color: #fff;
  font-size: 10.5px; font-weight: 700; margin-left: 5px;
}
.status-pill { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.st-active { background: var(--green-soft); color: #23794B; }
.st-pending { background: #FEF3C7; color: #B45309; }
.st-rejected { background: var(--red-soft); color: var(--red); }
.notice-badge, .anon-badge, .hw-excellent-badge, .hw-pending-badge, .hw-missing-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; margin-left: 6px;
}
.notice-badge { background: var(--red-soft); color: var(--red); }
.anon-badge { background: #E9E4F5; color: #6B5CA5; }
.hw-excellent-badge { background: #FEF3C7; color: #B45309; }
.hw-pending-badge { background: #FEF3C7; color: #B45309; }
.hw-missing-badge { background: var(--red-soft); color: var(--red); }

/* ---------------- 头像 ---------------- */
.avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: none;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
  border: 2px solid rgba(255, 255, 255, .8); box-shadow: 0 3px 10px rgba(221, 107, 32, .18);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.avatar-letter { color: #fff; }

/* ---------------- 卡片（玻璃） ---------------- */
.card {
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
/* 内容卡悬停上浮 */
.stat-card, .post-card, .study-card, .case-card, .notice-card, .contact-card,
.hw-card, .soul-card, .doc-card, .project-card, .rail-card, .chart-card, .rank-card {
  transition: transform var(--tr), box-shadow var(--tr);
}
.stat-card:hover, .post-card:hover, .study-card:hover, .case-card:hover, .notice-card:hover,
.contact-card:hover, .hw-card:hover, .soul-card:hover, .doc-card:hover, .project-card:hover,
.rail-card:hover, .chart-card:hover, .rank-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .req { color: var(--red); }
input[type="text"], input[type="password"], input[type="tel"], input[type="number"],
input:not([type]), textarea, select {
  width: 100%; padding: 10px 13px; font-size: 14px; color: var(--ink);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none; transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--orange); background: #fff;
  box-shadow: 0 0 0 3px rgba(237, 137, 54, .14);
}
textarea { resize: vertical; }
.dropzone {
  border: 1.5px dashed #E7CFA9; border-radius: var(--radius);
  background: rgba(255, 255, 255, .45);
  text-align: center; padding: 26px 12px; color: var(--ink-3);
  cursor: pointer; transition: border-color var(--tr), background var(--tr);
}
.dropzone:hover { border-color: var(--orange); background: rgba(255, 255, 255, .75); }
.dropzone .big { display: block; margin-bottom: 6px; }

/* ---------------- 登录 / 注册 ---------------- */
.auth-wrap {
  position: relative; z-index: 1; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 430px; max-width: 100%;
  background: var(--glass-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 34px 32px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand h1 { font-size: 19px; font-weight: 800; color: var(--ink); }
.logo {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(221, 107, 32, .3);
}
.tabs { display: flex; background: rgba(255, 255, 255, .5); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tabs button {
  flex: 1; padding: 8px; border: none; border-radius: 9px; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--ink-3); transition: background var(--tr), color var(--tr);
}
.tabs button.active { background: #fff; color: var(--orange-d); box-shadow: 0 2px 8px rgba(120, 72, 20, .1); }
.auth-note { margin-top: 12px; font-size: 12px; color: var(--ink-3); text-align: center; }
.auth-note.warn-note { background: #FEF3C7; color: #B45309; border-radius: 10px; padding: 8px 12px; text-align: left; }
.role-pick.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.role-pick button {
  border: 1px solid var(--border); background: rgba(255, 255, 255, .55);
  border-radius: var(--radius-sm); padding: 12px 6px; transition: all var(--tr);
}
.role-pick button.sel { border-color: var(--orange); background: var(--orange-softer); box-shadow: 0 0 0 3px rgba(237, 137, 54, .12); }
.role-pick .r-ico { font-size: 22px; }
.role-pick .r-title { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.committee-field { background: rgba(255, 255, 255, .5); border-radius: var(--radius-sm); padding: 10px 12px; }
.committee-field input[type="checkbox"] { width: auto; margin-right: 6px; }
.committee-field #regCommitteeTitle { margin-top: 8px; }

/* ================================================================
   主应用外壳：悬浮玻璃大容器 · 三栏
   ================================================================ */
#appView { position: relative; z-index: 1; }
.shell {
  max-width: 1480px; margin: 22px auto;
  min-height: calc(100vh - 44px);
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 292px;
  background: rgba(255, 255, 255, .45);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ---------------- 左侧导航 ---------------- */
.side {
  padding: 22px 14px; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .38);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.side-brand-name { font-weight: 800; font-size: 14.5px; line-height: 1.3; }
.side-brand-sub { font-size: 11px; color: var(--ink-3); }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  transition: background var(--tr), color var(--tr);
  position: relative;
}
.side-nav a svg { width: 18px; height: 18px; stroke: currentColor; flex: none; opacity: .85; }
.side-nav a:hover { background: rgba(253, 235, 211, .65); color: var(--orange-d); }
.side-nav a.active { background: var(--orange-soft); color: var(--orange-d); }
.side-nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 20%; bottom: 20%;
  width: 3.5px; border-radius: 4px; background: var(--orange);
}
.side-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.side-foot { font-size: 11.5px; color: var(--ink-3); padding: 12px 10px 2px; line-height: 1.5; }
.side-close { display: none; }
.side-mask { display: none; }

/* ---------------- 中间主区 ---------------- */
.main { padding: 26px 26px 30px; min-width: 0; }
.greet-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.greet h1 { font-size: 25px; font-weight: 800; letter-spacing: -.3px; }
.greet-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.greet-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--tr); box-shadow: var(--shadow); border-style: solid;
}
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ink-2); }
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bell-dot {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--orange); border: 1.5px solid #fff;
}
.hamburger { display: none; }

/* 概览数据卡 */
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.stat-card {
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--radius); padding: 18px;
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow);
}
.sc-yellow { background: linear-gradient(140deg, #FEF3C7, rgba(253, 230, 138, .35)); }
.sc-green { background: linear-gradient(140deg, #D9F2E4, rgba(154, 230, 180, .35)); }
.sc-blue { background: linear-gradient(140deg, #DBEAFE, rgba(144, 205, 244, .35)); }
.stat-ico {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: rgba(255, 255, 255, .75);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(120, 72, 20, .08);
}
.stat-ico svg { width: 22px; height: 22px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-yellow .stat-ico svg { stroke: #D69E2E; }
.sc-green .stat-ico svg { stroke: #2F9E6E; }
.sc-blue .stat-ico svg { stroke: #3182CE; }
.stat-num { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; transition: opacity .3s; }
.stat-lbl { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* 图表区 */
.chart-row { display: grid; grid-template-columns: 300px 1fr; gap: 14px; margin-bottom: 14px; }
.chart-card { padding: 18px; }
.chart-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.chart-sub { font-size: 12px; color: var(--ink-3); text-align: center; }
.ring-wrap { position: relative; width: 150px; height: 150px; margin: 10px auto 8px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-track { stroke: #F3E5CF; }
.ring-val { stroke: var(--orange); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.22, .61, .36, 1); }
.ring-num {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 27px; font-weight: 800;
}
.ring-num small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 12px 6px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--yellow), var(--orange));
  transition: height .8s cubic-bezier(.22, .61, .36, 1);
  min-height: 4px;
}
.bar-lbl { font-size: 10.5px; color: var(--ink-3); }
.bar-val { font-size: 10.5px; font-weight: 700; color: var(--ink-2); }

/* 排行 / 列表 */
.rank-card { padding: 6px 0; margin-bottom: 16px; }
.rank-card .chart-title { padding: 14px 18px 8px; }
.rank-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  transition: background var(--tr);
}
.rank-row:nth-child(even) { background: rgba(253, 246, 236, .55); }
.rank-row:hover { background: var(--orange-softer); }
.rank-no {
  width: 26px; height: 26px; border-radius: 9px; flex: none;
  background: rgba(255, 255, 255, .8); color: var(--ink-3);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.rank-row:nth-child(1) .rank-no { background: var(--yellow); color: #7C5A00; }
.rank-row:nth-child(2) .rank-no { background: #E5E7EB; color: #4B5563; }
.rank-row:nth-child(3) .rank-no { background: #F5C99B; color: #8A4B0F; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-weight: 700; font-size: 13.5px; }
.rank-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-val { font-weight: 800; font-size: 15px; color: var(--orange-d); flex: none; }

/* ---------------- 右侧辅助栏 ---------------- */
.rail {
  padding: 26px 16px; display: flex; flex-direction: column; gap: 14px;
  border-left: 1px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .32);
}
.rail-card { padding: 16px; }
.rail-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.rail-title svg { width: 16px; height: 16px; stroke: var(--orange); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px;
  border-radius: 12px; transition: background var(--tr); cursor: pointer;
}
.rail-item:hover { background: rgba(253, 235, 211, .6); }
.rail-ico {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.rail-ico svg { width: 16px; height: 16px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ri-yellow { background: #FEF3C7; } .ri-yellow svg { stroke: #D69E2E; }
.ri-green { background: #D9F2E4; } .ri-green svg { stroke: #2F9E6E; }
.ri-blue { background: #DBEAFE; } .ri-blue svg { stroke: #3182CE; }
.ri-orange { background: var(--orange-soft); } .ri-orange svg { stroke: var(--orange-d); }
.rail-main { flex: 1; min-width: 0; }
.rail-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-sub { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-arrow { color: var(--ink-3); font-size: 15px; flex: none; }
.rail-empty { font-size: 12px; color: var(--ink-3); text-align: center; padding: 12px 0; }

/* ---------------- 页面头 ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 20px 0 14px; flex-wrap: wrap; }
.page-title { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.page-title svg { width: 20px; height: 20px; stroke: var(--orange-d); }
.page-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.head-actions { display: flex; gap: 8px; }

/* ---------------- 动态卡片 ---------------- */
.post-feed { display: flex; flex-direction: column; gap: 14px; }
.post-card {
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-head-info { flex: 1; min-width: 0; }
.post-owner { font-weight: 700; font-size: 14px; }
.post-text { font-size: 14px; line-height: 1.7; margin: 6px 0 10px; word-break: break-word; cursor: pointer; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.post-foot .actions { display: flex; gap: 8px; }
.post-media-grid { display: grid; gap: 6px; border-radius: 14px; overflow: hidden; margin: 8px 0; }
/* r27 · 图片：保持原来的 cover 裁剪填满 */
.post-media-grid img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; border-radius: 10px; }
/* r27 · 视频：**不能沿用图片的 height:100%**
   ① 父容器 .post-media 高度是 auto，百分比高度无法解析 → 回落到 video 默认 150px，
      桌面端横屏视频被压成一条 1280x150 的扁条（就是"电脑端看不了"的直接原因）；
   ② 竖屏视频（720x960）在 662px 宽的栏里按比例撑到 883px，一屏放不下。
   现在改为：高度自适应 + max-height 封顶 + object-fit: contain（不裁剪画面）。
   ③ 尺寸未知时（moov 还没到）给个最小高度，避免塌成 0。 */
.post-media-grid video { width: 100%; height: auto; max-height: 460px; object-fit: contain; display: block; background: #111; border-radius: 10px; }
.post-media { border-radius: 10px; overflow: hidden; }
/* r27 · 视频卡片：黑底占位 + 播放按钮遮罩（preload=none 时不下载任何视频数据） */
.post-media.video { position: relative; background: #141414; min-height: 170px; }
.post-media.video video { min-height: 170px; }
.vid-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,.34); cursor: pointer; z-index: 2;
}
.vid-play svg { width: 58px; height: 58px; padding: 13px 11px 13px 15px; border-radius: 50%; background: rgba(255,255,255,.92); }
.vid-play:hover svg { background: #fff; }
.vid-tip {
  position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
  font-size: 12px; color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.7);
  pointer-events: none; z-index: 2;
}
/* 播放中：隐藏遮罩，露出原生 controls */
.post-media.video.playing .vid-play, .post-media.video.playing .vid-tip { display: none; }
/* r28 · 加载中/缓冲中：明确告诉用户「在加载」，而不是让人对着静止画面干等 */
.post-media.video.loading .vid-play { background: rgba(10,10,10,.46); }
.post-media.video.loading .vid-play svg { animation: vidSpin 1.05s linear infinite; }
.post-media.video.loading .vid-tip { font-size: 13px; color: #fff; bottom: 14px; }
@keyframes vidSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* r27 · 视频加载失败（非标准 mp4）：给出可见提示，不再是一块永远转圈的黑框 */
.post-media.video.vid-failed { background: #241f1f; }
.post-media.video.vid-failed video { opacity: .25; }
.vid-tip-err { color: #ffd9d0 !important; font-size: 12.5px !important; bottom: 50% !important; transform: translateY(50%); padding: 0 16px; line-height: 1.6; }
/* r25：图片加载失败时给出可见占位（原本是一块无声的黑白，用户以为"照片坏了"） */
.post-media img.img-fail { min-height: 96px; opacity: .5; filter: grayscale(1); background: repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 10px, rgba(0,0,0,.09) 10px 20px); }
.post-viewers { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 8px; }
.viewer-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.viewer-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; }
.viewer-row:hover { background: var(--orange-softer); }
.viewer-name { font-weight: 600; font-size: 13px; }
.post-album-badge {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 10px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--green-soft); color: #23794B; font-size: 12px;
  cursor: pointer; border: 1px solid #BFE6CE; transition: background var(--tr);
}
.post-album-badge:hover { background: #C9EBD6; }
.step-block-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* 发布弹窗已选文件 */
.post-media-picks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.post-pick {
  position: relative; width: 108px; border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--border);
}
.post-pick img { width: 100%; height: 66px; object-fit: cover; display: block; }
.post-pick-video { height: 66px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--orange-softer); }
.post-pick-name { font-size: 10.5px; padding: 5px 7px; word-break: break-all; line-height: 1.35; }
.mat-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border-radius: 50%; border: none; background: rgba(0, 0, 0, .45); color: #fff; font-size: 11px;
}
#draftHint { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
#draftHint a { color: var(--orange-d); text-decoration: underline; }
#postAlbum { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .7); font-size: 14px; color: var(--ink); outline: none; }
#postAlbum:focus { border-color: var(--orange); }
#postAlbumNew { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); font-size: 14px; outline: none; }
#postAlbumNew:focus { border-color: var(--orange); }

/* ---------------- 评论 ---------------- */
.comment-block { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.comment-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.comment-item { display: flex; gap: 9px; }
.comment-main { flex: 1; min-width: 0; background: rgba(255, 255, 255, .55); border-radius: 12px; padding: 8px 12px; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.comment-text { font-size: 13.5px; margin-top: 3px; word-break: break-word; }
.cmt-del { border: none; background: none; color: var(--red); font-size: 11.5px; margin-left: auto; }
.comment-form { display: flex; gap: 8px; }
.comment-form input { flex: 1; }
/* 评论回复 */
.cmt-reply { border: none; background: none; color: var(--ink-3); font-size: 12px; cursor: pointer; padding: 0 2px; transition: color var(--tr); }
.cmt-reply:hover { color: var(--orange-d); }
.comment-head .cmt-del { margin-left: 0; }
.comment-head .muted { margin-right: auto; }
.reply-tag {
  font-size: 12px; color: var(--ink-3); background: rgba(253, 235, 211, .55);
  border-radius: 8px; padding: 4px 9px; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reply-tag b { color: var(--orange-d); }
.reply-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(254, 243, 199, .75); border: 1px solid rgba(246, 213, 92, .55);
  border-radius: 10px; padding: 7px 12px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px;
}
.reply-bar b { color: var(--orange-d); }
.reply-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-cancel { border: none; background: none; color: var(--ink-3); cursor: pointer; font-size: 13px; flex: none; }
.reply-cancel:hover { color: var(--red); }
/* 动态点赞 */
.like-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--glass-brd); background: var(--glass);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  transition: transform var(--tr), box-shadow var(--tr), background var(--tr), border-color var(--tr);
}
.like-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.like-btn .like-ico { font-size: 13px; }
.like-btn.liked { border-color: rgba(239, 68, 68, .35); background: rgba(254, 226, 226, .85); color: var(--red); }
.like-btn.liked .like-ico { animation: likePop .35s ease; }
@keyframes likePop { 0% { transform: scale(.6); } 55% { transform: scale(1.3); } 100% { transform: scale(1); } }
.like-btn.lg { padding: 9px 22px; font-size: 14px; }
.like-btn.lg .like-ico { font-size: 15px; }
.post-like-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

/* ---------------- 学习角 / 案例 / 项目 ---------------- */
.subtabs { display: flex; gap: 6px; background: rgba(255, 255, 255, .5); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 14px; width: fit-content; }
.subtab {
  padding: 7px 16px; border: none; border-radius: 9px; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--ink-3); transition: all var(--tr);
}
.subtab.sel { background: #fff; color: var(--orange-d); box-shadow: 0 2px 8px rgba(120, 72, 20, .1); }
.study-card, .case-card, .doc-card, .project-card {
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px;
}
.study-title, .case-rec { font-weight: 700; font-size: 14.5px; margin: 6px 0; }
.study-files { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.study-file {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--border);
  border-radius: 12px; transition: all var(--tr);
}
.study-file:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow); }
.study-file-ico { font-size: 20px; }
.study-file-info { flex: 1; min-width: 0; font-size: 13px; }
.study-file-dl { color: var(--orange-d); font-size: 12px; font-weight: 600; flex: none; }
.doc-grid, .contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.doc-meta, .doc-owner-row, .doc-pick-row { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.case-att { margin-top: 8px; }
.case-desc, .case-content { font-size: 13.5px; margin-top: 6px; }
.case-filter, .req-filter { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .55); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: all var(--tr);
}
.filter-btn.sel { background: var(--orange-soft); color: var(--orange-d); border-color: var(--orange); }
.proj-steps { margin-top: 10px; }
.proj-progress { height: 8px; border-radius: 999px; background: #F3E5CF; overflow: hidden; margin-top: 8px; }
.proj-progress > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: width .6s; }
.mat-list { display: flex; flex-direction: column; gap: 8px; }
.mat-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255, 255, 255, .55); border-radius: 10px; font-size: 13px; }
.file-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255, 255, 255, .55); border-radius: 10px; font-size: 13px; margin-top: 6px; }

/* ---------------- 通知 ---------------- */
.notice-feed { display: flex; flex-direction: column; gap: 12px; }
.notice-card {
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.notice-head { display: flex; align-items: center; gap: 8px; }
.notice-title { font-weight: 700; font-size: 15px; flex: 1; }
.notice-content { font-size: 13.5px; line-height: 1.7; margin-top: 8px; white-space: pre-wrap; }
.notice-foot { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; }

/* ---------------- 心灵树洞 / 心理信箱 ---------------- */
.soul-card {
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px;
}
.soul-actions { display: flex; gap: 8px; margin-top: 10px; }
.soul-comment-area { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.soul-mood { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--orange-softer); color: var(--orange-d); font-size: 11.5px; font-weight: 600; }
.mood-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-btn { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .55); transition: all var(--tr); }
.mood-btn.sel { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-d); }
.mood-happy { color: #2F9E6E; } .mood-unhappy { color: #B45309; }

/* ---------------- 作业 / 签到 / 投票 / 问卷 ---------------- */
.hw-card {
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px;
}
.hw-card-head { display: flex; align-items: center; gap: 8px; }
.hw-card-title { font-weight: 700; font-size: 15px; flex: 1; }
.hw-due { font-size: 12px; color: #2F9E6E; font-weight: 600; }
.hw-due-over { color: var(--red); }
.hw-stats { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.hw-task-brief { font-size: 13.5px; margin-top: 8px; white-space: pre-wrap; }
.hw-sub-row, .hw-sub-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; }
.hw-sub-row:hover { background: var(--orange-softer); }
.hw-sub-body { margin-top: 8px; }
.hw-my-sub { background: rgba(255, 255, 255, .55); border-radius: 12px; padding: 12px; margin-top: 10px; }
.hw-teacher-feedback { background: var(--green-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.hw-feedback-form { margin-top: 10px; }
.hw-feedback-label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.hw-excellent-card { border: 1px solid #F6D55C; }
.checkline, .check-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .55); margin-bottom: 8px; }
.vote-options { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.vote-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid var(--border); cursor: pointer; transition: all var(--tr); }
.vote-opt:hover { border-color: var(--orange); }
.vote-opt-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #D8C6A8; flex: none; }
.vote-opt.sel .vote-opt-radio { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 3px #fff; }
.opt-result { margin-top: 6px; }
.opt-result-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.opt-bar { height: 8px; border-radius: 999px; background: #F3E5CF; overflow: hidden; }
.opt-bar > div { height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: 999px; transition: width .6s; }
.survey-q { background: rgba(255, 255, 255, .55); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.survey-q-head { display: flex; gap: 8px; align-items: baseline; }
.survey-q-title { font-weight: 700; font-size: 13.5px; }
.survey-q-text { margin-top: 8px; }
.survey-q-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.grant-box { background: rgba(255, 255, 255, .55); border-radius: 12px; padding: 12px; margin-top: 10px; }
.grant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.grant-item { padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--border); font-size: 12.5px; cursor: pointer; transition: all var(--tr); }
.grant-item.sel { border-color: var(--orange); background: var(--orange-softer); }
.fb-list { display: flex; flex-direction: column; gap: 8px; }
.fb-item { background: rgba(255, 255, 255, .55); border-radius: 10px; padding: 10px 12px; }
.fb-head { font-size: 12px; color: var(--ink-3); }
.fb-text { font-size: 13.5px; margin-top: 4px; }

/* ---------------- 通讯录 / 会话 ---------------- */
.contact-group-title { font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin: 14px 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.contact-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px; cursor: pointer;
}
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-weight: 700; font-size: 13.5px; }
.contact-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 11px; color: var(--ink-3); flex: none; align-self: flex-start; margin-top: 2px; }
/* 会话气泡：对方靠左白框，己方靠右绿色 */
.chat-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-row.mine { justify-content: flex-end; }
.bubble-col { max-width: 78%; display: flex; flex-direction: column; align-items: flex-start; }
.chat-row.mine .bubble-col { align-items: flex-end; }
.chat-empty { text-align: center; color: var(--ink-3); padding: 40px 0; }
.chat-mask { position: fixed; inset: 0; background: rgba(60, 40, 20, .3); backdrop-filter: blur(4px); z-index: 90; }
.chat-panel {
  position: fixed; right: 18px; bottom: 92px; width: 380px; max-width: calc(100vw - 36px);
  height: 520px; max-height: calc(100vh - 130px); z-index: 95;
  background: var(--glass-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-brd); border-radius: 22px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-peer { flex: 1; min-width: 0; }
.chat-peer-name { font-weight: 700; font-size: 14px; }
.chat-peer-sub { font-size: 11.5px; color: var(--ink-3); }
.chat-tools { display: flex; gap: 6px; }
.chat-tool { width: 32px; height: 32px; border-radius: 10px; border: none; background: rgba(255, 255, 255, .6); font-size: 15px; transition: all var(--tr); }
.chat-tool:hover { background: var(--orange-soft); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.msg-bubble { max-width: 78%; padding: 8px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; word-break: break-word; }
.msg-time { font-size: 10px; color: var(--ink-3); margin-top: 3px; }
.bubble-text {
  background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(60, 40, 20, .06);
  border-radius: 16px 16px 16px 4px; padding: 8px 13px; font-size: 13.5px; line-height: 1.55; word-break: break-word;
}
.chat-row.mine .bubble-text {
  background: linear-gradient(135deg, #3ECF6E, #1FB457); color: #fff; border: none;
  border-radius: 16px 16px 4px 16px;
}
.chat-row.mine .bubble-text .muted { color: rgba(255, 255, 255, .82); }
.bubble-doc, .bubble-call {
  background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(60, 40, 20, .06);
  border-radius: 14px; padding: 8px 13px; font-size: 13.5px; word-break: break-word;
}
.chat-row.mine .bubble-doc {
  background: linear-gradient(135deg, #3ECF6E, #1FB457); color: #fff; border: none;
}
.chat-row.mine .bubble-doc a { color: #fff; }
.chat-row.mine .bubble-doc .muted { color: rgba(255, 255, 255, .82); }
.sys-msg { text-align: center; font-size: 11.5px; color: var(--ink-3); background: rgba(255, 255, 255, .5); border-radius: 999px; padding: 4px 12px; align-self: center; max-width: 92%; }
.recall-msg { font-style: italic; color: var(--ink-3); }
.recall-btn { border: none; background: none; color: var(--ink-3); font-size: 10.5px; text-decoration: underline; }
.anon-mailbox { background: rgba(255, 255, 255, .5); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.anon-state, .anon-tip { font-size: 12px; color: var(--ink-3); }
.anon-thread-list { display: flex; flex-direction: column; gap: 10px; }
.anon-thread { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .55); }
.call-overlay { position: fixed; inset: 0; background: rgba(40, 26, 12, .55); backdrop-filter: blur(8px); z-index: 120; display: flex; align-items: center; justify-content: center; }
.call-card { background: var(--glass-2); backdrop-filter: blur(18px); border: 1px solid var(--glass-brd); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 30px; text-align: center; width: 340px; }
.call-title { font-size: 17px; font-weight: 800; margin: 12px 0 4px; }
.call-status { font-size: 13px; color: var(--ink-3); }
.call-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

/* ---------------- AI 助手 ---------------- */
.ai-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 96;
  padding: 12px 18px; border-radius: 999px; border: none;
  background: var(--orange); color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(237, 137, 54, .4); transition: all var(--tr);
}
.ai-fab:hover { transform: translateY(-3px); background: var(--orange-d); }
.ai-panel {
  position: fixed; right: 18px; bottom: 76px; width: 380px; max-width: calc(100vw - 36px);
  height: 520px; max-height: calc(100vh - 110px); z-index: 96;
  background: var(--glass-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-brd); border-radius: 22px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ai-avatar { width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(135deg, var(--yellow), var(--orange)); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ai-name { font-weight: 800; font-size: 14px; }
.ai-sub { font-size: 11px; color: var(--ink-3); }
.ai-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.6; background: rgba(255, 255, 255, .8); white-space: pre-wrap; }
.ai-typing { display: inline-flex; gap: 3px; }
.ai-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); animation: aib 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aib { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.ai-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 8px; }
.ai-action { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .6); font-size: 11.5px; color: var(--ink-2); transition: all var(--tr); }
.ai-action:hover { border-color: var(--orange); color: var(--orange-d); }
.ai-actions { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.ai-input { flex: 1; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(60, 40, 20, .32); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal {
  width: 520px; max-width: 100%; max-height: calc(100vh - 60px); overflow-y: auto;
  background: var(--glass-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-brd); border-radius: 24px;
  box-shadow: var(--shadow-lg); padding: 24px; position: relative;
}
.modal.lg { width: 720px; }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.modal-close {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px;
  border: none; border-radius: 10px; background: rgba(255, 255, 255, .6);
  font-size: 16px; color: var(--ink-2); transition: all var(--tr);
}
.modal-close:hover { background: var(--red-soft); color: var(--red); }

/* ---------------- 设置 / 背景预览 ---------------- */
.settings-section { margin-bottom: 20px; }
.settings-profile { display: flex; align-items: center; gap: 14px; }
.settings-profile-info { flex: 1; }
.bg-preview { position: relative; width: 100%; height: 120px; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.bg-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-preview-tag { position: absolute; left: 10px; bottom: 8px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px); padding: 3px 10px; border-radius: 9px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.nreq-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .55); margin-bottom: 8px; font-size: 13px; }

/* ---------------- 表格 ---------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 10px 14px; font-size: 11.5px; font-weight: 700;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--border);
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid rgba(239, 228, 211, .6); vertical-align: middle; }
.tbl tbody tr:nth-child(even) { background: rgba(253, 246, 236, .5); }
.tbl tbody tr:hover { background: var(--orange-softer); }

/* ---------------- toast ---------------- */
#toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 300; padding: 10px 22px; border-radius: 999px;
  background: rgba(44, 44, 44, .88); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(8px);
  animation: toastin .3s cubic-bezier(.22, .61, .36, 1);
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1240px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); }
  .rail { display: none; }
}
@media (max-width: 920px) {
  .shell { grid-template-columns: minmax(0, 1fr); margin: 0; border-radius: 0; min-height: 100vh; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 98;
    transform: translateX(-105%); transition: transform .32s cubic-bezier(.22, .61, .36, 1);
    background: rgba(255, 251, 244, .95); backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
  }
  .side.open { transform: translateX(0); }
  .side-mask { display: block; position: fixed; inset: 0; z-index: 97; background: rgba(60, 40, 20, .3); backdrop-filter: blur(3px); }
  .side-close {
    display: flex; position: absolute; top: 14px; right: 12px;
    width: 30px; height: 30px; border: none; border-radius: 10px;
    background: rgba(255, 255, 255, .7); font-size: 14px; color: var(--ink-2);
    align-items: center; justify-content: center;
  }
  .hamburger {
    display: flex; width: 38px; height: 38px; border-radius: 12px; flex: none;
    background: var(--glass); border: 1px solid var(--glass-brd);
    align-items: center; justify-content: center; font-size: 16px; box-shadow: var(--shadow);
  }
  .stat-cards { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
  .main { padding: 18px 14px 26px; }
  .greet h1 { font-size: 20px; }
}

/* ===== 第十三轮：系统消息入口 / 会话删除 / 聊天全屏 ===== */
.sysmsg-btn { position: relative; }
.sysmsg-btn .count-dot { position: absolute; top: -7px; right: -7px; margin-left: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.sysmsg-modal { width: 460px; max-width: calc(100vw - 32px); }
.sysmsg-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; transition: background var(--tr); }
.sysmsg-item[onclick] { cursor: pointer; }
.sysmsg-item:hover { background: rgba(255, 255, 255, .55); }
.sysmsg-item.unread { background: rgba(237, 137, 54, .09); }
.sysmsg-item .avatar.sm { flex: none; overflow: hidden; }
.sysmsg-item .avatar.sm img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sysmsg-main { flex: 1; min-width: 0; }
.sysmsg-text { font-size: 13.5px; line-height: 1.55; word-break: break-word; }
.sysmsg-new { flex: none; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 999px; padding: 1px 7px; margin-top: 2px; }

.conv-card { position: relative; transition: transform var(--tr); }
.conv-card.swiping { box-shadow: var(--shadow-lg); z-index: 2; }
.conv-del {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: none; border-radius: 50%;
  background: var(--red-soft); color: var(--red); font-size: 12px; line-height: 1;
  cursor: pointer; opacity: 0; transition: opacity var(--tr), background var(--tr);
  display: flex; align-items: center; justify-content: center;
}
.conv-card:hover .conv-del { opacity: 1; }
.conv-del:hover { background: var(--red); color: #fff; }
@media (hover: none) { .conv-del { opacity: .85; } }

#chatModal.chat-full { background: rgba(60, 40, 20, .45); }
#chatModal.chat-full .chat-panel {
  inset: 0; right: 0; bottom: 0; width: 100vw; max-width: 100vw;
  height: 100vh; max-height: 100vh; border-radius: 0; border: none;
}
.chat-full-btn { margin-right: 2px; font-size: 15px; }

/* ===== 第十四轮：意见信箱接收人选择器 ===== */
.recip-box {
  display: flex; flex-wrap: wrap; gap: 8px; max-height: 132px; overflow-y: auto;
  padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, .5);
}
.recip-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
  font-size: 12.5px; cursor: pointer; transition: all var(--tr); user-select: none;
}
.recip-chip:has(input:checked) { border-color: var(--orange); background: rgba(237, 137, 54, .1); }
.recip-chip input { accent-color: var(--orange); margin: 0; }
.recip-role { font-size: 11px; color: var(--ink-3); }

/* ==================== 随机点名 ==================== */
.rc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; padding-top: 4px;
}
.rc-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border-radius: 14px; background: linear-gradient(135deg, rgba(237,137,54,.1), rgba(255,224,128,.12));
  border: 1px solid var(--border); text-align: center; transition: transform var(--tr);
}
.rc-card:hover { transform: translateY(-2px); }
.rc-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.rc-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.rc-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
  font-size: 12.5px;
}
.rc-pill img, .rc-pill .rc-letter {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: inline-block;
}
.rc-pill .rc-letter {
  background: var(--orange); color: #fff; text-align: center; line-height: 22px; font-size: 12px; font-weight: 600;
}
.rc-cycle {
  display: inline-block; padding: 8px 24px; border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .05em;
  animation: rcPulse .6s ease-in-out infinite alternate;
}
@keyframes rcPulse { from { transform: scale(1); } to { transform: scale(1.06); } }

/* ==================== AI 助手元信息 ==================== */
.ai-src {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px;
  background: rgba(237, 137, 54, .15); color: var(--orange); border: 1px solid rgba(237, 137, 54, .35);
  margin-left: 6px; vertical-align: middle;
}
.ai-meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* ==================== 班级事务快捷入口（仪表盘） ==================== */
.launcher-card { padding: 16px 18px; }
.launcher-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-top: 4px;
}
.launcher-tile {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  background: linear-gradient(135deg, rgba(237, 137, 54, .08), rgba(255, 224, 128, .14));
  border: 1px solid var(--border); transition: all var(--tr);
  font-family: inherit; color: var(--ink);
}
.launcher-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(237, 137, 54, .18); border-color: var(--orange); }
.lt-ico { font-size: 24px; line-height: 1; }
.lt-name { font-size: 14px; font-weight: 600; }
.lt-sub { font-size: 12px; color: var(--ink-3); }

/* ================================================================
   r17 随机点名实时通知 — 顶部横幅 + 「你被点中了」高亮弹窗
   ================================================================ */
.rollcall-banner {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #FF8A3D 0%, #FFB454 60%, #FFD27A 100%);
  color: #fff;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 138, 61, .35);
  cursor: pointer; user-select: none;
  animation: rcBannerSlide .42s ease-out;
}
.rollcall-banner:hover { filter: brightness(1.04); }
.rollcall-banner .rcb-ico {
  display: inline-block; width: 26px; height: 26px; line-height: 26px; text-align: center;
  background: rgba(255, 255, 255, .25); border-radius: 50%; font-size: 16px;
  animation: rcBannerPulse 1.4s ease-in-out infinite;
}
.rollcall-banner .rcb-text { flex: 1; text-align: center; }
.rollcall-banner .rcb-hint {
  font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .22);
}
@keyframes rcBannerSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes rcBannerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.rollcall-picked-modal .rcp-body { padding: 8px 4px 6px; }
.rollcall-picked-modal .rcp-circle {
  width: 96px; height: 96px; margin: 6px auto 16px;
  background: linear-gradient(135deg, #FF8A3D, #FFD27A);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(255, 138, 61, .35);
  animation: rcPickBounce .65s cubic-bezier(.22, 1.4, .36, 1);
}
.rollcall-picked-modal .rcp-circle span { font-size: 48px; line-height: 1; }
.rollcall-picked-modal .rcp-text { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.rollcall-picked-modal .rcp-sub { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
@keyframes rcPickBounce {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
#rollcallBanner.hidden,
#rollcallPickedModal.hidden { display: none !important; }


/* ================================================================
   r20 · 实验室卡通登录页
   纸页 + 三只手绘小动物（鼠/兔/猴）+ 黑白液态玻璃登录卡
   设计来源：实验室卡通登录界面设计（黑白液态玻璃 / 纸页 / 鼠标跟随）
   ================================================================ */

/* ---------- 舞台：桌面左右分栏，移动端上下堆叠 ---------- */
.auth-lab {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
}
.auth-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 34px;
  align-items: center;
}

/* ---------- 黑白液态玻璃卡片 ---------- */
.auth-lab .auth-card {
  position: relative;
  width: 100%;
  background:
    linear-gradient(155deg, rgba(255,255,255,.82) 0%, rgba(250,250,252,.62) 46%, rgba(238,240,244,.60) 100%);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px;
  box-shadow:
    0 30px 70px rgba(24,26,32,.16),
    0 2px 0 rgba(255,255,255,.9) inset,
    0 -18px 40px rgba(255,255,255,.35) inset;
  padding: 32px 30px;
  overflow: hidden;
  transition: transform .55s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
/* 卡片高光：一道随鼠标移动的斜向液态反光 */
.auth-lab .auth-card::before {
  content: "";
  position: absolute;
  top: var(--mx, 50%);
  left: var(--my, 0%);
  width: 460px; height: 460px;
  margin: -230px 0 0 -230px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.55) 0%, rgba(255,255,255,.18) 42%, rgba(255,255,255,0) 70%);
  transition: opacity .4s ease;
  opacity: .9;
}
/* 卡片底部一道极浅的冷色边，模拟玻璃厚度 */
.auth-lab .auth-card::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120,140,180,.34), transparent);
  pointer-events: none;
}
.auth-lab .auth-card > * { position: relative; z-index: 1; }

.auth-lab .auth-brand h1 { color: #23262C; letter-spacing: .3px; }
.auth-lab .auth-note { color: #7C828E; }

/* ---------- 纸页 ---------- */
.paper-sheet {
  position: relative;
  padding: 30px 26px 22px;
  border-radius: 8px 10px 12px 6px;
  background:
    linear-gradient(178deg, #FEFEFD 0%, #FBFAF6 62%, #F6F4EE 100%);
  box-shadow:
    0 26px 54px rgba(30,28,24,.16),
    0 3px 0 rgba(0,0,0,.02);
  /* 纸张边缘不规则（手撕/裁切感） */
  clip-path: polygon(
    0.6% 1.4%, 99.2% 0.4%, 100% 98.4%,
    52% 100%, 2% 99.2%
  );
  transform: rotate(-.5deg);
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
/* 纸纹：细密斜纹 + 噪点，纯 CSS 无图片 */
.paper-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(160,150,130,.045) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(160,150,130,.03) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
}
/* 纸张左上角一道折痕阴影 */
.paper-sheet::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 46px;
  background: linear-gradient(180deg, rgba(120,110,90,.07), transparent);
  pointer-events: none;
}

/* ---------- 三只动物 ---------- */
.mascot-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(4px, 1.4vw, 18px);
  padding: 6px 0 2px;
}
.mascot {
  margin: 0;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 整只动物朝光标方向偏移 + 轻微侧倾，由 JS 写入 --tx/--ty/--rot */
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) rotate(var(--rot, 0deg));
  transform-origin: 50% 100%;
  will-change: transform;
}
.mascot-svg {
  width: clamp(74px, 9vw, 108px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(40,36,28,.10));
}
.mascot-name {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #3A3D44;
  letter-spacing: .4px;
  text-align: center;
  line-height: 1.25;
}
.mascot-name small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  font-style: italic;
  color: #9AA0AA;
  letter-spacing: .2px;
  margin-top: 1px;
}

/* SVG 部件配色：平涂灰 + 奶油白 + 粗墨线 */
.mascot-svg .m-body  { fill: #D9D6CF; stroke: #2E2B26; stroke-width: 3; }
.mascot-svg .m-cream { fill: #FBF7EF; }
.mascot-svg .m-fur   { fill: #C7B098; stroke: #2E2B26; stroke-width: 3; }
.mascot-svg .m-face  { fill: #EBDFCC; stroke: #2E2B26; stroke-width: 3; }
.mascot-svg .m-belly { fill: #F7F3EA; stroke: none; }
.mascot-svg .m-inner { fill: #F0BFC6; stroke: #2E2B26; stroke-width: 2.6; }
.mascot-svg .m-eye   { fill: none; stroke: #2E2B26; stroke-width: 3.4; stroke-linecap: round; }
.mascot-svg .m-blush { fill: #F4A9B4; opacity: .5; stroke: none; }
.mascot-svg .m-nose  { fill: #E79FAE; stroke: #2E2B26; stroke-width: 2.6; }
.mascot-svg .m-tooth { fill: #FFFDF7; stroke: #2E2B26; stroke-width: 2.4; }
.mascot-svg .m-shadow{ fill: rgba(60,54,42,.16); stroke: none; }
.mascot-svg .m-line  { stroke-linecap: round; }
.mascot-svg .m-line-thin { stroke: #2E2B26; stroke-width: 2.2; stroke-linecap: round; }
.mascot-svg .m-carrot { fill: #EDA14A; stroke: #2E2B26; stroke-width: 2.6; stroke-linejoin: round; }
.mascot-svg .m-carrot-line { fill: none; stroke: #C0792C; stroke-width: 2; stroke-linecap: round; }
.mascot-svg .m-leaf { fill: #8FC49A; stroke: #2E2B26; stroke-width: 2.4; stroke-linejoin: round; }

/* ---------- 纸页落款 ---------- */
.paper-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 12px;
  color: #6E7279;
  letter-spacing: .4px;
}
.pc-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(237,137,54,.16);
}

/* ---------- 玻璃卡内的黑白化处理（沿用原暖色控件，但弱化） ---------- */
.auth-lab .tabs { background: rgba(255,255,255,.42); border-color: rgba(120,130,150,.16); }
.auth-lab .tabs button.active { background: #fff; color: var(--orange-d); }
.auth-lab input:not([type]) , .auth-lab input[type="text"], .auth-lab input[type="password"] {
  background: rgba(255,255,255,.72);
  border-color: rgba(120,130,150,.18);
}
.auth-lab .committee-field { background: rgba(255,255,255,.5); border: 1px solid rgba(120,130,150,.14); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .auth-stage { grid-template-columns: 1fr; gap: 22px; max-width: 480px; }
  .paper-sheet { padding: 22px 18px 16px; }
  .mascot-svg { width: clamp(66px, 16vw, 92px); }
  .auth-lab { padding: 20px 16px; align-items: flex-start; }
  .auth-lab .auth-card { padding: 26px 22px; }
}
@media (max-width: 420px) {
  .paper-sheet { padding: 16px 12px 12px; }
  .mascot-row { gap: 2px; }
  .mascot-svg { width: clamp(58px, 17vw, 80px); }
  .mascot-name { font-size: 10.5px; }
  .mascot-name small { font-size: 8px; }
  .paper-caption { font-size: 11px; }
}

/* ---------- 减少动态效果：完全静止 ---------- */
@media (prefers-reduced-motion: reduce) {
  .auth-lab .auth-card, .paper-sheet, .mascot { transition: none !important; transform: none !important; }
  .mascot { transform: none !important; }
}

/* ---------- r20 修正：登录页专用中性底（盖住全局暖杏背景） ----------
   设计要求「黑白液态玻璃」必须配中性浅底，暖橙底会让纸页发脏、玻璃失真 */
.auth-lab::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 620px at 22% 18%, rgba(255,255,255,.96), rgba(255,255,255,0) 62%),
    radial-gradient(900px 520px at 82% 78%, rgba(226,232,242,.72), rgba(226,232,242,0) 60%),
    linear-gradient(168deg, #FBFCFD 0%, #F2F4F7 52%, #E9ECF1 100%);
}
.auth-lab > * { position: relative; z-index: 1; }

/* 纸页再放大一点，给三只动物更多呼吸感 */
.auth-stage { grid-template-columns: 1fr 424px; gap: 40px; max-width: 1080px; }
.paper-sheet { padding: 34px 30px 24px; }
.mascot-svg { width: clamp(88px, 10.5vw, 126px); }
.mascot-row { gap: clamp(8px, 2vw, 26px); }

/* 墨线加粗一档，小尺寸下更清晰 */
.mascot-svg .m-body { stroke-width: 3.4; }
.mascot-svg .m-fur  { stroke-width: 3.4; }
.mascot-svg .m-face { stroke-width: 3.2; }
.mascot-svg .m-eye  { stroke-width: 4; }

@media (max-width: 900px) {
  .auth-stage { grid-template-columns: 1fr; gap: 22px; max-width: 480px; }
  .paper-sheet { padding: 24px 18px 16px; }
  .mascot-svg { width: clamp(72px, 17vw, 100px); }
}

/* 纸页与卡片视觉重心对齐 */
.auth-stage { align-items: center; }
.paper-sheet { transform: rotate(-.5deg) translateY(-6px); }
.mascot-row { padding-bottom: 6px; }
.paper-caption { margin-top: 16px; }

/* ---------- r20 修正 2：移动端横向溢出 ---------- */
@media (max-width: 900px) {
  .auth-lab { padding: 16px 12px; }
  .auth-stage { width: 100%; max-width: 100%; }
  .auth-lab .auth-card { max-width: 100%; }
  .paper-sheet { max-width: 100%; }
  .mascot-row { flex-wrap: nowrap; min-width: 0; }
}
@media (max-width: 560px) {
  .auth-lab { padding: 12px 10px; }
  .auth-lab .auth-card { padding: 22px 18px; border-radius: 22px; }
  .auth-stage { gap: 16px; }
  .paper-sheet { padding: 18px 10px 14px; border-radius: 6px; }
  .mascot-row { gap: 0; }
  .mascot-svg { width: min(29vw, 108px); }
  .mascot-name { font-size: 10px; letter-spacing: 0; }
  .mascot-name small { font-size: 7.5px; }
  .paper-caption { font-size: 10px; gap: 5px; letter-spacing: 0; margin-top: 12px; }
  .auth-lab .tabs button { font-size: 12px; padding: 7px 4px; }
}
/* 极窄屏（iPhone SE 等） */
@media (max-width: 380px) {
  .mascot-svg { width: min(28vw, 96px); }
  .auth-lab .auth-card { padding: 20px 15px; }
}

/* ---------- r20 修正 3：纸页不再比栅格列宽（clip-path 不裁 box-shadow 溢出） ---------- */
.paper-sheet { box-sizing: border-box; width: 100%; }
.auth-stage > * { min-width: 0; }
.mascot { min-width: 0; }

/* ---------- r20 修正 4：彻底消除移动端横向溢出 ----------
   根因：.mascot 是 flex 子项，默认 min-width:auto，内容（SVG）撑破容器导致整页横向滚动 */
.mascot { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: visible; }
.mascot-svg { flex: none; max-width: 100%; }
.mascot-row { width: 100%; min-width: 0; }
.paper-sheet, .auth-lab .auth-card { min-width: 0; }
.auth-stage { min-width: 0; }
/* 兜底：登录页不允许横向滚动（登录表单不需要横向空间） */
@media (max-width: 700px) {
  .auth-lab { overflow-x: hidden; }
  .mascot-svg { width: min(26vw, 96px); }
  .mascot-row { gap: 0; justify-content: center; }
}

/* ---------- r20 修正 5：.auth-card 的 width:430px 在 grid 中撑破列宽（grid item 默认 min-width:auto） ----------
   这是横向溢出的真正根因：430px 固定宽 + padding，grid 列被撑到 462px > 390px 视口 */
.auth-lab .auth-card { width: auto; max-width: 100%; min-width: 0; box-sizing: border-box; }
.auth-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 424px); }
@media (max-width: 900px) {
  .auth-stage { grid-template-columns: minmax(0, 1fr); }
  .auth-lab .auth-card { width: 100%; }
}

/* ================================================================
   r21 · 内部界面玻璃化
   ────────────────────────────────────────────────
   设计目标：把 r20「纸页+黑白液态玻璃+卡通动物」视觉语言下沉到主界面。
   保留全部 element ID（29 个 + 全量 nav 与 view）以免破坏 app.js。
   ──────────────────────────────────────────────── */

/* === r21.1 · 内部界面专用中性底：覆盖暖杏，去掉黄绿光斑，让玻璃卡出戏 === */
#appView {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 18px 14px 26px;
  background:
    radial-gradient(120% 80% at 100% 0%,  rgba(214, 222, 235, .55) 0%, rgba(214, 222, 235, 0) 60%),
    radial-gradient(110% 80% at 0% 100%, rgba(225, 220, 232, .55) 0%, rgba(225, 220, 232, 0) 55%),
    linear-gradient(168deg, #FBFCFD 0%, #F2F4F7 55%, #E9ECF1 100%);
}
/* 关掉 body 上那两个大黄绿光斑，避免在 .shell 之外也透出来 */
body:has(#appView:not(.hidden))::before,
body:has(#appView:not(.hidden))::after { display: none; }
/* 兼容旧浏览器：supports 不存在时仍能退化 */
@supports not (selector(:has(*))) {
  /* 退化方案：直接把 body 套个极弱中性滤镜。视觉差异可忽略。 */
  body.has-appView::before,
  body.has-appView::after { display: none; }
}

/* === r21.2 · .shell 升级为更透、更糊、更浮的三栏容器 === */
.r21-shell {
  max-width: 1480px; margin: 0 auto;
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 292px;
  gap: 0;
  background: rgba(255, 255, 255, .52);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 24px;
  box-shadow:
    0 30px 60px -28px rgba(31, 41, 55, .28),
    0 12px 24px -16px rgba(31, 41, 55, .12),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  overflow: hidden;
  position: relative;
}

/* === r21.3 · 侧栏（玻璃 + 顶部动物 + 底部动物） === */
.r21-side {
  padding: 18px 12px 18px;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .35) 100%);
  position: relative;
  overflow: hidden;
  /* 限制侧栏在视口内高度，让 flex 1 的 .side-nav 真的滚动而非撑破父 */
  max-height: calc(100vh - 56px);
}
/* 关键：flex item 收缩需要 min-height: 0；否则内容长时会撑爆父，导致
   底部 mascot 和 foot 被推到视口外（这次的截图发现的问题） */
.r21-side .side-nav { min-height: 0; }
.r21-side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px;
  position: relative;
}
.r21-side-mascots-top {
  display: flex; align-items: flex-end; gap: 4px;
  width: 100%;
  padding: 0 6px 12px 4px;
  position: relative;
  pointer-events: none;
}
.r21-side-mascots-top .mascot { pointer-events: auto; }
.r21-side-mascots-top .mascot-svg { width: 38px; height: auto; }
.r21-side-mascots-top .mascot { background: transparent !important; padding: 0; box-shadow: none !important; }
.r21-side-mascots-top .mascot-name { display: none; }
.r21-side-mascots-top .mascot[data-mascot="mouse"] .mascot-svg { width: 42px; transform: translateY(2px) rotate(-3deg); }
.r21-side-mascots-top .mascot[data-mascot="rabbit"] .mascot-svg { width: 44px; transform: translateY(-1px) rotate(2deg); }
.r21-side-mascots-top .mascot[data-mascot="monkey"] .mascot-svg { width: 38px; transform: translateY(4px) rotate(-1deg); }
/* 侧栏底部动物 — 略小，斜向排列，更像群像 */
.r21-side-mascots-bot {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 2px;
  padding: 10px 6px 4px;
  position: relative;
  border-top: 1px dashed rgba(31, 41, 55, .08);
  margin-top: 8px;
}
.r21-side-mascots-bot .mascot-svg { width: 28px; }
.r21-side-mascots-bot .mascot {
  background: transparent !important; padding: 0; box-shadow: none !important;
}
.r21-side-mascots-bot .mascot-name { display: none; }
.r21-side-mascots-bot .mascot[data-mascot="rabbit"] .mascot-svg { width: 32px; transform: rotate(4deg); }

/* nav 玻璃化：单色 hover/active，去掉橙底 */
.r21-side .side-nav a {
  border: 1px solid transparent;
  color: #3B4252;
}
.r21-side .side-nav a:hover {
  background: rgba(31, 41, 55, .05);
  color: #1F2937;
}
.r21-side .side-nav a.active {
  background: rgba(31, 41, 55, .08);
  color: #0F172A;
  border-color: rgba(31, 41, 55, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.r21-side .side-nav a.active::before {
  background: linear-gradient(180deg, #1F2937, #4B5563);
}
.r21-side .side-sep { background: rgba(31, 41, 55, .08); }
.r21-side .side-foot { color: #6B7280; }

/* brand 字色对齐中性调（弱化橙色 logo 改成字符 mark） */
.r21-side .logo {
  background: linear-gradient(140deg, #2A3140, #4B5563);
  box-shadow: 0 6px 16px rgba(31, 41, 55, .25);
}

/* === r21.4 · 中央主区 .main：保持节奏，换一组更克制的卡片配色 === */
.r21-main { padding: 22px 24px 28px; min-width: 0; }
.r21-main .greet h1 { color: #0F172A; }
.r21-main .greet-sub { color: #6B7280; }

/* 顶部 icon-btn 玻璃化 */
.r21-main .icon-btn {
  background: rgba(255, 255, 255, .65);
  border-color: rgba(31, 41, 55, .08);
  box-shadow: 0 4px 10px rgba(31, 41, 55, .06);
}
.r21-main .icon-btn:hover { box-shadow: 0 8px 18px rgba(31, 41, 55, .12); }

/* avatar 容器边框走中性 */
.r21-main .avatar.sm {
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px rgba(31, 41, 55, .12);
}

/* 3 张统计卡：去掉黄/绿/蓝渐变，统一为「中性玻璃 + 彩色小标识点」 */
.r21-main .stat-cards { gap: 14px; }
.r21-main .stat-card {
  background: rgba(255, 255, 255, .72) !important;
  border: 1px solid rgba(255, 255, 255, .85) !important;
  box-shadow: 0 6px 16px rgba(31, 41, 55, .06);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 20px !important;
}
.r21-main .stat-card .stat-ico {
  background: rgba(31, 41, 55, .06);
  box-shadow: none;
}
.r21-main .stat-card .stat-ico svg { stroke: #1F2937 !important; }
/* 用一个 ::before 小圆点保留三色提示（弱化） */
.r21-main .sc-yellow .stat-ico::before,
.r21-main .sc-green .stat-ico::before,
.r21-main .sc-blue .stat-ico::before {
  content: ""; position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid #fff;
}
.r21-main .stat-card .stat-ico { position: relative; }
.r21-main .sc-yellow .stat-ico::before { background: #F6B73C; }
.r21-main .sc-green .stat-ico::before { background: #3FA776; }
.r21-main .sc-blue .stat-ico::before { background: #4F8DD0; }
.r21-main .stat-card .stat-num { color: #0F172A; }
.r21-main .stat-card .stat-lbl { color: #6B7280; }

/* 图表区、排行、launcher 都改为玻璃卡 */
.r21-main .card.chart-card,
.r21-main .card.rank-card,
.r21-main .card.launcher-card {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(31, 41, 55, .06);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.r21-main .ring-track { stroke: rgba(31, 41, 55, .08); }
.r21-main .ring-val { stroke: #1F2937; }
.r21-main .bar { background: linear-gradient(180deg, #5B6471, #1F2937); }
/* 排行行交替 + 中性色 */
.r21-main .rank-row:nth-child(even) { background: rgba(31, 41, 55, .025); }
.r21-main .rank-row:hover { background: rgba(31, 41, 55, .05); }

/* === r21.5 · 右栏 === */
.r21-rail {
  padding: 18px 18px 24px;
  border-left: 1px solid rgba(255, 255, 255, .6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .3) 100%);
}
.r21-rail .rail-card {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(31, 41, 55, .06);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  margin-bottom: 14px;
}
.r21-rail .rail-title svg { stroke: #1F2937; }
.r21-rail .rail-item:hover { background: rgba(31, 41, 55, .04); }
.r21-rail .rail-ico { background: rgba(31, 41, 55, .06); }

/* === r21.6 · 右侧全局浮按钮（毛豆 AI）：保留原橙色作为唯一暖色焦点 === */
.r21-assistant-fab {
  /* app.js 中已有 id=aiFab 的按钮，r21 不改外观以保留品牌识别 */
}

/* === r21.7 · 响应式：窄屏 → 三栏竖向堆叠 + 侧栏抽屉 === */
/* === r21.11 修：移动端「左端功能键消失」故障 ===
   故障成因（三重）：
   1) r21 给 .r21-side 加了 max-height:60px + overflow:hidden，把抽屉压成一条，
      17 个导航项全被裁掉 → 只见品牌行和关闭按钮；
   2) .r21-side 的 position:relative 覆盖了旧版 .side 的 position:fixed，
      抽屉不再浮在屏幕上层；
   3) .r21-shell 的 backdrop-filter 会让内部 position:fixed 以 shell 为包含块，
      再被 shell 的 overflow:hidden 裁掉。
   修复：窄屏恢复「固定左侧 + 整屏高 + 遮罩 + 关闭按钮」的浮层抽屉，
        并在窄屏关掉 .r21-shell 的 backdrop-filter（避免再次产生包含块）。 */
@media (max-width: 1080px) {
  .r21-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    border-radius: 18px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, .72);
  }
  .r21-side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 98;
    max-height: none; overflow-y: auto; overflow-x: hidden;
    transform: translateX(-105%);
    transition: transform .32s cubic-bezier(.22, .61, .36, 1);
    border-right: 1px solid rgba(255, 255, 255, .6);
    border-bottom: none;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
    box-shadow: 0 24px 60px -24px rgba(31, 41, 55, .5);
    padding-bottom: 28px;
  }
  .r21-side.open { transform: translateX(0); }
  .r21-side .side-nav { min-height: 0; }
  .r21-side-mascots-top { display: flex; }
  .r21-side-mascots-bot { display: flex; }
  .r21-main { padding: 18px 14px 22px; }
  .r21-rail { border-left: none; border-top: 1px solid rgba(255, 255, 255, .6); }
  .r21-main .stat-cards { grid-template-columns: repeat(3, 1fr); }
  .r21-main .chart-row { grid-template-columns: 1fr; }
  .r21-main .hamburger { display: inline-flex; }
  .side-mask {
    display: block; position: fixed; inset: 0; z-index: 97;
    background: rgba(31, 41, 55, .3); backdrop-filter: blur(3px);
  }
  .r21-side .side-close {
    display: flex; position: absolute; top: 14px; right: 12px;
    width: 30px; height: 30px; border: none; border-radius: 10px;
    background: rgba(255, 255, 255, .75); color: #1F2937;
    align-items: center; justify-content: center; font-size: 14px;
  }
}
@media (max-width: 720px) {
  .r21-main .stat-cards { grid-template-columns: 1fr; }
  .r21-main .stat-card { padding: 14px; }
  #appView { padding: 10px 8px 20px; }
  .r21-shell { border-radius: 14px; }
}

/* === r21.8 · 三只 mascots 共用阴影微调，让侧栏里的他们不浮夸 === */
.r21-side .mascot-svg .m-shadow { fill: rgba(31, 41, 55, .08); }
.r21-side .mascot-svg .m-body { fill: #5B6471; }
.r21-side .mascot-svg .m-cream { fill: #F5EFE6; }
.r21-side .mascot-svg .m-belly { fill: #F5EFE6; }
.r21-side .mascot-svg .m-fur { fill: #6B7280; }
.r21-side .mascot-svg .m-inner { fill: #F5C2C2; }
.r21-side .mascot-svg .m-eye { fill: none; stroke: #1F2937; stroke-width: 2.5; stroke-linecap: round; }
.r21-side .mascot-svg .m-blush { fill: #F5C2C2; opacity: .7; }
.r21-side .mascot-svg .m-nose { fill: #1F2937; }
.r21-side .mascot-svg .m-tooth { fill: #F5EFE6; }
.r21-side .mascot-svg .m-face { fill: #F5EFE6; }
.r21-side .mascot-svg .m-line { stroke: #1F2937; }
.r21-side .mascot-svg .m-line-thin { stroke: #1F2937; }
.r21-side .mascot-svg .m-carrot { fill: #F6B73C; }
.r21-side .mascot-svg .m-carrot-line { stroke: #F5EFE6; }
.r21-side .mascot-svg .m-leaf { fill: #6FA86F; }

/* === r21.9 · 兜底：和 r20 一样，防止 grid/flex 子项撑破容器 === */
.r21-shell, .r21-side, .r21-main, .r21-rail { min-width: 0; }
.r21-side-mascots-top, .r21-side-mascots-bot { min-width: 0; }
.r21-side-mascots-top .mascot, .r21-side-mascots-bot .mascot { min-width: 0; flex: 0 1 auto; }

/* r21 · 鼠标跟随生效（继承 auth-mascot.js 的 --tx/--ty/--rot 写法）
   把变换写到 figure (.mascot) 上，SVG 子元素自身的 rotate/translate 不受影响 */
.r21-side-mascots-top .mascot,
.r21-side-mascots-bot .mascot {
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0) rotate(var(--rot, 0deg));
  will-change: transform;
}

/* === r21.10 · 简化盒阴影变量让卡片层更有质感 === */
:root { --r21-shadow-card: 0 8px 20px -10px rgba(31, 41, 55, .18), 0 2px 6px -2px rgba(31, 41, 55, .08); }


/* === r22 · 取消积分制 + 相册集共享（多人使用） === */

/* 取消积分后统计区只剩「动态总数」一张卡，避免孤零零占 1/3 宽 */
.r21-main .stat-cards:has(> .stat-card:only-child) { grid-template-columns: minmax(0, 320px); }
@media (max-width: 720px) {
  .r21-main .stat-cards:has(> .stat-card:only-child) { grid-template-columns: minmax(0, 1fr); }
}

/* 相册集成员多选（创建时选择共同使用人） */
.mem-picker {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 148px; overflow-y: auto;
  padding: 9px; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, .55);
}
.mem-picker:empty { display: none; }
.mem-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .85);
  font-size: 12.5px; line-height: 1.5; cursor: pointer; user-select: none;
  transition: background .16s var(--tr), color .16s var(--tr), border-color .16s var(--tr);
}
.mem-chip:hover { border-color: rgba(31, 41, 55, .3); }
.mem-chip .mem-avatar {
  width: 18px; height: 18px; border-radius: 50%; overflow: hidden; flex: none;
  background: rgba(31, 41, 55, .08); display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #4B5563;
}
.mem-chip.on { background: #1F2937; border-color: #1F2937; color: #F2F0EA; }
.mem-chip.on .mem-avatar { background: rgba(255, 255, 255, .18); color: #E5E7EB; }
.mem-picker-label {
  margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.mem-picker-label .muted { font-weight: 400; font-size: 11.5px; }

/* 相册集管理（个人设置内） */
.album-manage-item {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
  background: rgba(255, 255, 255, .55);
}
.album-manage-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.album-manage-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.album-manage-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.tag-shared {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 10px; letter-spacing: .04em;
  background: rgba(31, 41, 55, .07); color: #4B5563;
}
.album-shared-list { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* === r22.2 · 取消积分/排行后的桌面端布局回收 === */
/* .chart-row 原本是「300px 环形图 + 1fr 排行/柱状」两列；r22 移除排行与柱状后
   只剩环形图一个子元素，需撑满整行，否则右侧留大片空白。 */
.r21-main .chart-row:has(> .card:only-child) { grid-template-columns: minmax(0, 1fr); }
/* 撑满后环形图居中，不再挤在 300px 窄列里 */
.r21-main .chart-row:has(> .card:only-child) .chart-card { max-width: 560px; margin: 0 auto; }
/* 统计卡固定三列，不再被内容撑成 1fr 挤压 */
.r21-main .stat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .r21-main .stat-cards { grid-template-columns: minmax(0, 1fr); }
  .r21-main .chart-row:has(> .card:only-child) .chart-card { max-width: none; }
}

/* ============================================================
   r23 · 图片 / 视频灯箱（点图直接站内查看）
   背景用近黑（与玻璃界面不同：看图需要压暗背景）
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column;
  background: rgba(14, 16, 20, .93);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: lbIn .18s ease-out;
}
.lightbox.hidden { display: none; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 64px 12px;
  position: relative;
}
/* 舞台内的媒体元素必须能缩放（否则 min-height:auto 会顶破容器） */
.lb-stage img, .lb-stage video {
  max-width: 100%; max-height: 100%;
  min-width: 0; min-height: 0;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .8);
  background: #000;
  cursor: zoom-in;
  transition: transform .18s ease;
}
.lb-stage img.zoomed { transform: scale(2); cursor: zoom-out; transition: transform .12s ease; }
.lb-stage img.zoomed, .lb-stage video { object-fit: contain; }

.lb-close, .lb-nav {
  position: absolute; z-index: 3;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  color: #F2F0EA;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .26); }
.lb-close {
  top: 14px; right: 16px; width: 38px; height: 38px;
  font-size: 24px; line-height: 1;
}
.lb-nav {
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; font-size: 30px; line-height: 1;
}
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-nav[disabled] { opacity: .22; pointer-events: none; }

.lb-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px 16px;
  color: rgba(242, 240, 234, .82);
  font-size: 12.5px;
}
.lb-idx { min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; }
.lb-orig {
  color: rgba(242, 240, 234, .82); text-decoration: none;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); white-space: nowrap;
}
.lb-orig:hover { background: rgba(255, 255, 255, .2); }
.lb-thumbs {
  flex: 1; min-width: 0;
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  padding-bottom: 4px; scrollbar-width: thin;
}
.lb-thumb {
  flex: 0 0 auto; width: 54px; height: 54px;
  border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: #000;
  cursor: pointer; opacity: .55;
  transition: opacity .15s ease, border-color .15s ease;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb.vid { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.lb-thumb.on { opacity: 1; border-color: #F2F0EA; }
.lb-thumb:hover { opacity: .85; }

@media (max-width: 720px) {
  .lb-stage { padding: 50px 12px 8px; }
  .lb-nav { width: 38px; height: 38px; font-size: 24px; }
  .lb-bar { flex-wrap: wrap; gap: 8px; padding: 8px 12px 12px; }
  .lb-thumbs { order: 3; width: 100%; flex: 0 0 auto; }
  .lb-thumb { width: 44px; height: 44px; }
}
/* 图片在网格里也要能点：去掉 a 标签默认手型外的样式干扰 */
.post-media a { cursor: zoom-in; display: block; }
/* r27：视频是就地播放，不是放大查看 → 用 pointer */
.post-media video { cursor: pointer; display: block; }

/* ============================================================
   r23 · 学习角：问题反馈（回答区）+ 图片墙
   ============================================================ */
.study-imgwall {
  display: grid; gap: 6px; margin: 8px 0;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.study-imgwall .post-media { border-radius: 10px; overflow: hidden; background: rgba(31,41,55,.06); }
.study-imgwall img, .study-imgwall video { width: 100%; height: 120px; object-fit: cover; display: block; cursor: zoom-in; }

/* r33 · 学习角媒体项 + 站内下载按钮（不跳转，直接下载原文件） */
.study-media-item { position: relative; }
.media-dl-btn {
  position: absolute; top: 5px; right: 5px; z-index: 5;
  width: 26px; height: 26px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .6); background: rgba(24, 24, 24, .55);
  color: #fff; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--tr);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.media-dl-btn:hover { background: var(--orange); border-color: var(--orange); transform: scale(1.1); }
.media-dl-btn:active { transform: scale(0.95); }

.answer-block {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.answer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.answer-toggle {
  border: none; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 999px;
  transition: background .15s ease;
}
.answer-toggle:hover { background: rgba(31, 41, 55, .06); }
.answer-count {
  min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: rgba(31, 41, 55, .1); color: var(--ink-2);
  font-size: 11.5px; text-align: center; font-variant-numeric: tabular-nums;
}
.answer-caret { font-size: 10px; color: var(--ink-3); }
.answer-head > span, .answer-head > .btn { margin-left: auto; }
.answer-head > .answer-toggle { margin-left: 0; }

.answer-form {
  margin-top: 10px; padding: 10px;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, .6);
}
.answer-form textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; font-family: inherit; background: #fff; color: var(--ink);
}
.answer-form-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.answer-list { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.answer-list.hidden { display: none; }
.answer-item {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--border);
}
.answer-item-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.answer-item-head b { font-size: 13px; }
.answer-item-text { font-size: 13px; line-height: 1.65; color: var(--ink); word-break: break-word; }
.answer-item-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.answer-item-files .post-media { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; }
.answer-item-files .post-media img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.answer-item-files .study-file { width: auto; }

/* 小头像（回答用） */
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.avatar.xs img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ============================================================
   r23 · 相册集模式（动态广场子标签）
   ============================================================ */
.album-mode-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.album-card {
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .6); cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  display: flex; flex-direction: column;
}
.album-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -18px rgba(31, 41, 55, .55);
  border-color: rgba(31, 41, 55, .2);
}
.album-cover {
  position: relative; aspect-ratio: 16 / 10; background: rgba(31, 41, 55, .06);
  overflow: hidden;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-cover .album-cover-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: rgba(31, 41, 55, .28);
}
.album-cover-badge {
  position: absolute; left: 8px; top: 8px;
  padding: 2px 8px; border-radius: 999px; font-size: 10.5px;
  background: rgba(20, 24, 30, .62); color: #F2F0EA;
}
.album-cover-count {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 8px; border-radius: 999px; font-size: 10.5px;
  background: rgba(20, 24, 30, .62); color: #F2F0EA;
}
.album-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.album-card-title { font-weight: 700; font-size: 14px; line-height: 1.35; }
.album-card-meta { font-size: 11.5px; color: var(--ink-3); line-height: 1.55; }

/* 相册集详情：封面网格 */
.album-detail-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.album-detail-hero h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.album-detail-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.album-detail-stats b { color: var(--ink); font-size: 14px; }

@media (max-width: 720px) {
  .album-mode-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .answer-item-files .post-media { width: 72px; height: 72px; }
}

/* ============================================================
   r23 · 撤回按钮显著化 + 统一确认框
   痛点：原 .recall-btn 只是 10.5px 下划线文字，语音/文件气泡旁几乎点不到。
   ============================================================ */
.recall-btn {
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255, 255, 255, .72); color: var(--ink-2);
  font-size: 11.5px; line-height: 1;
  padding: 4px 9px; margin-top: 6px;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 3px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.recall-btn:hover { background: #1F2937; border-color: #1F2937; color: #F2F0EA; }
.recall-btn.on-audio {
  background: rgba(31, 41, 55, .1); border-color: rgba(31, 41, 55, .22);
  font-weight: 600;
}
.recall-btn.subtle {
  background: none; border-color: transparent;
  color: var(--ink-3); font-size: 11px; padding: 4px 7px;
}
.recall-btn.subtle:hover { background: rgba(255, 255, 255, .72); border-color: var(--border); color: var(--ink); }
.chat-row .recall-btn + .recall-btn { margin-left: 4px; }

/* 撤回后引导按钮的高亮脉冲 */
.chat-tool.pulse-hint {
  animation: toolPulse 1.5s ease;
  border-color: #1F2937 !important;
}
@keyframes toolPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 41, 55, 0); }
  25%      { box-shadow: 0 0 0 5px rgba(31, 41, 55, .18); }
  60%      { box-shadow: 0 0 0 5px rgba(31, 41, 55, .06); }
}

/* 统一确认框（r23） */
.r23-confirm {
  position: fixed; inset: 0; z-index: 320;
  display: flex; align-items: center; justify-content: center;
  background: rgba(31, 41, 55, .34);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: lbIn .14s ease-out;
}
.r23-confirm-card {
  width: min(400px, calc(100vw - 40px));
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 18px; padding: 20px;
  box-shadow: 0 26px 64px -22px rgba(31, 41, 55, .6);
}
.r23-confirm-text { font-size: 14px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; }
.r23-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ============================================================
   r23 · 动态广场子标签
   ============================================================ */
.square-tabs { display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.square-tabs .subtab {
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255, 255, 255, .6); color: var(--ink-2);
  font-size: 12.5px; padding: 6px 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.square-tabs .subtab:hover { background: rgba(255, 255, 255, .9); }
.square-tabs .subtab.sel {
  background: #1F2937; border-color: #1F2937; color: #F2F0EA; font-weight: 600;
}
.subtab-n { font-size: 11px; opacity: .8; }

/* ============================================================
   r24 · 相册集：无创建者 + 同名合并 + 已发布动态补选相册集
   ============================================================ */
/* 相册集卡片标题里的「同名已合并」小标签 */
.album-card-title .tag-shared,
.album-manage-title .tag-shared {
  font-size: 10.5px; font-weight: 500; color: #6B7280;
  background: rgba(0, 0, 0, .05); border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 999px; padding: 1px 7px; margin-left: 4px;
  vertical-align: middle; white-space: nowrap;
}
.album-detail-hero h3 .tag-shared { vertical-align: middle; }

/* r24：给已发布动态补选相册集的弹窗 */
#postAlbumPickerList { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.album-pick-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .7);
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
  min-width: 0; max-width: 100%; box-sizing: border-box;
}
.album-pick-row > div:first-child { min-width: 0; flex: 1 1 auto; }
.album-pick-row:hover { background: #fff; border-color: rgba(0, 0, 0, .22); transform: translateY(-1px); }
.album-pick-row.cur { background: rgba(31, 41, 55, .05); border-color: rgba(31, 41, 55, .28); }
.album-pick-go {
  font-size: 12px; color: var(--ink-2); white-space: nowrap; flex: 0 0 auto;
  padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .05);
}
.album-pick-row.cur .album-pick-go { background: #1F2937; color: #F2F0EA; }
.album-manage-title { line-height: 1.5; overflow-wrap: anywhere; }

/* 移动端：弹窗收窄，按钮换行到下一行（约定 #12：grid/flex 固定宽子项必须 min-width:0） */
@media (max-width: 720px) {
  /* 用 max-width 而不是 calc(100vw - N)：避免 headless/部分浏览器 vw 口径不一致 */
  #postAlbumPickerModal .modal { width: auto !important; max-width: 100%; padding: 16px 14px; }
  /* 窄屏：标题独占一行，「加入 ›」缩到下面左侧，不再 margin-left:auto（会被裁） */
  .album-pick-row { flex-wrap: wrap; row-gap: 8px; }
  .album-pick-row > div:first-child { flex: 1 1 100%; min-width: 0; }
  .album-pick-go { margin-left: 0; align-self: flex-start; }
  #postAlbumPickerModal .actions { flex-wrap: wrap; }
  #postAlbumPickerNew { min-width: 0; flex: 1 1 140px !important; }
}

/* ================================================================
   r35 · 随机点名轮次 / 班级账本 / 语音修复 / 问卷改造
   ================================================================ */

/* ---------- 随机点名：轮次状态条 ---------- */
.rc-round-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 13px; margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(237, 137, 54, .10), rgba(246, 213, 92, .10));
  border: 1px solid rgba(237, 137, 54, .26);
}
.rc-round-bar .badge { flex: 0 0 auto; }
.rc-done-badge {
  background: rgba(156, 163, 175, .16) !important;
  color: var(--ink-2) !important;
  border-color: rgba(156, 163, 175, .38) !important;
}

/* ---------- r36 · 随机点名：抽取范围选择（全班 / 指定学生） ---------- */
.rc-target-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.rc-target-tools .btn.small { padding: 4px 11px; font-size: 12px; border-radius: 9px; }
.rc-target-tools .muted { font-size: 12.5px; }
/* 勾选名单里的 chip 换行更紧凑，避免 50 人把页面撑太长 */
#rcTargetChips { gap: 6px; line-height: 1.5; }
#rcTargetChips .recip-chip { padding: 4px 10px; font-size: 12.5px; }
/* 历史记录里的范围徽标 */
.rc-scope-badge {
  background: rgba(56, 189, 248, .16) !important;
  color: #0b6f96 !important;
  border-color: rgba(56, 189, 248, .38) !important;
}
@media (max-width: 720px) {
  .rc-target-tools { gap: 6px; }
  #rcTargetChips { max-height: 150px !important; }
}

/* ---------- 班级账本 ---------- */
.ledger-stat-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.ledger-stat {
  min-width: 0;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--glass-2); border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(60, 40, 20, .05);
}
.ledger-stat-num {
  font-size: 19px; font-weight: 800; letter-spacing: -.2px; margin-top: 2px;
  color: var(--orange-d); overflow-wrap: anywhere;
}
.ledger-card { padding: 13px 15px; margin-bottom: 10px; }
.ledger-row-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.ledger-title {
  font-size: 14px; font-weight: 700; min-width: 0;
  overflow-wrap: anywhere; word-break: break-word;
}
.ledger-amount {
  flex: 0 0 auto; font-size: 15px; font-weight: 800; color: var(--orange-d);
  white-space: nowrap;
}
.ledger-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px;
}
.ledger-meta .badge { flex: 0 0 auto; }
.ledger-held { background: var(--orange-soft) !important; color: var(--orange-d) !important; }
.ledger-used { background: var(--green-soft) !important; color: #237A4B !important; }
@media (max-width: 720px) {
  .ledger-stat-row { grid-template-columns: 1fr; }
}

/* ---------- 语音消息（r35 修复：自己发的语音要能听见） ---------- */
/* 关键：给 <audio> 显式尺寸 —— 不写的话原生控件在气泡里可能被压成 0 宽 / 隐形 */
.chat-row .bubble-text audio,
.audio-msg {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  border-radius: 999px;
}
/* 自己发的气泡是绿底，播放器需要留出白底，否则控件与文字融成一片看不清 */
.chat-row.mine .bubble-text audio { background: rgba(255, 255, 255, .92); }
.chat-row .bubble-text audio::-webkit-media-controls-panel {
  background-color: rgba(255, 255, 255, .92);
}
.audio-fail {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  margin-top: 5px; font-size: 11.5px; color: var(--ink-3); line-height: 1.5;
}
.chat-row.mine .bubble-text .audio-fail { color: rgba(255, 255, 255, .9); }
.audio-fail .btn { padding: 2px 8px; font-size: 11px; }

/* 录音中提示条（此前 style.css 里没有任何定义，靠浏览器默认样式裸奔） */
.rec-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px; font-size: 12.5px; color: var(--ink-2);
  background: var(--red-soft); border-top: 1px solid rgba(220, 38, 38, .18);
}
.rec-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  flex: 0 0 auto; animation: recPulse 1s ease-in-out infinite;
}
@keyframes recPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- 问卷改造 ---------- */
.survey-q-type {
  font-size: 12px; padding: 3px 6px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--ink-2);
  max-width: 120px;
}
/* 统计里的选项：可点击查看「谁选了它」 */
.opt-result.opt-clickable { cursor: pointer; transition: background .14s ease; }
.opt-result.opt-clickable:hover { background: rgba(237, 137, 54, .07); }
.opt-eye {
  font-size: 11px; color: var(--orange-d); opacity: .78; margin-left: 4px;
  white-space: nowrap;
}
.opt-people {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.opt-people.hidden { display: none; }
.op-chip {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--orange-soft); color: var(--orange-d);
  border: 1px solid rgba(237, 137, 54, .3);
  white-space: nowrap;
}

/* ---------------- r38：相册集排序切换（时间顺序 / 最新在前） ---------------- */
.sort-chips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sort-chip {
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .6);
  color: var(--ink-2); cursor: pointer; transition: all var(--tr); white-space: nowrap;
  font-family: inherit;
}
.sort-chip:hover { background: #fff; border-color: var(--orange); color: var(--orange-d); }
.sort-chip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.sort-chip.on:hover { background: var(--orange-d); color: #fff; }

/* ==========================================================================
   r39 · 文件站内预览浮层（不下载、不跳转；手机 + 电脑通用）
   ========================================================================== */
.preview-modal {
  position: fixed; inset: 0; z-index: 320;
  display: flex; flex-direction: column;
  background: rgba(250, 246, 240, .96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: pvIn .18s ease-out;
}
.preview-modal.hidden { display: none; }
@keyframes pvIn { from { opacity: 0; } to { opacity: 1; } }

.pv-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .72);
}
.pv-ico { font-size: 22px; flex: none; }
.pv-title { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.pv-title b {
  font-size: 14.5px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.pv-title .muted { font-size: 11.5px; }
/* 动作按钮必须 flex:none —— 否则窄屏会被标题挤到屏幕外 */
.pv-act { flex: none; white-space: nowrap; }

.pv-body { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.pv-body > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* 图片 */
.pv-imgwrap { text-align: center; padding: 8px 0 24px; }
.pv-imgwrap img {
  max-width: 100%; height: auto; display: block; margin: 0 auto;
  border-radius: 12px; box-shadow: var(--shadow);
}
/* 音视频 */
.pv-mediawrap { display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.pv-mediawrap video { max-width: 100%; max-height: 76vh; border-radius: 12px; background: #000; }
.pv-audio { width: min(560px, 100%); }

/* PDF：iframe 内联渲染（服务端已强制 inline disposition） */
.pv-frame {
  width: 100%; height: calc(100vh - 128px); min-height: 60vh;
  border: 1px solid var(--border); border-radius: 14px; background: #fff;
  display: block;
}

/* 纯文本 */
.pv-text {
  margin: 0; padding: 16px 18px; font-size: 13.5px; line-height: 1.75;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--border);
  border-radius: 14px; color: var(--ink);
}

/* Office 解析出来的 HTML */
.pv-doc {
  padding: 20px 24px; background: rgba(255, 255, 255, .86);
  border: 1px solid var(--border); border-radius: 16px;
  font-size: 14px; line-height: 1.8; color: var(--ink);
  /* r39 真机实测：Word 文档里有大量全角空格(U+3000)与制表符，
     U+3000 不是 CSS 空格 → 浏览器不会在其前断行 → 手机上把版面撑破 330px。
     服务端已做空白压缩，这里再叠一层断行兜底。 */
  word-break: break-word; overflow-wrap: anywhere; tab-size: 4;
  max-width: 100%;
}
.pv-doc p, .pv-doc li { max-width: 100%; }
.pv-doc h1, .pv-doc h2, .pv-doc h3, .pv-doc h4 { margin: 16px 0 8px; line-height: 1.4; }
.pv-doc h1 { font-size: 19px; } .pv-doc h2 { font-size: 17px; }
.pv-doc h3 { font-size: 15.5px; } .pv-doc h4 { font-size: 14.5px; color: var(--ink-2); }
.pv-doc p { margin: 7px 0; }
.pv-doc p.pv-li { padding-left: 18px; position: relative; }
.pv-doc p.pv-li::before {
  content: ''; position: absolute; left: 5px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--orange);
}
.pv-doc table.pv-table {
  width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px;
  display: block; overflow-x: auto; white-space: nowrap;
}
.pv-doc table.pv-table th, .pv-doc table.pv-table td {
  border: 1px solid var(--border); padding: 7px 11px; text-align: left; vertical-align: top;
}
.pv-doc table.pv-table th { background: var(--orange-soft); font-weight: 700; white-space: nowrap; }
.pv-doc table.pv-table tbody tr:nth-child(even) { background: rgba(253, 246, 236, .55); }
.pv-sheetwrap { margin-bottom: 22px; }
.pv-sheetname, .pv-slidename {
  font-size: 13px; font-weight: 700; color: var(--orange-d);
  padding: 6px 12px; background: var(--orange-soft);
  border-radius: 10px; display: inline-block; margin-bottom: 8px;
}
.pv-slidename { background: var(--orange-softer); }
.pv-slide { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
.pv-note { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.pv-hint {
  font-size: 12px; color: var(--ink-3); text-align: center;
  padding: 10px 12px 24px; line-height: 1.6;
}

/* 文件卡片（学习角 / 作业附件 / 回答附件）—— r39 改为「点击预览」 */
button.study-file {
  width: 100%; text-align: left; font: inherit; color: inherit;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
button.study-file .study-file-dl { color: var(--orange-d); }
button.study-file:hover .study-file-dl { text-decoration: underline; }

/* ---------------- 手机端：预览浮层全屏化 ---------------- */
@media (max-width: 720px) {
  .preview-modal { background: rgba(250, 246, 240, .99); }
  .pv-head { padding: 10px 10px; gap: 8px; }
  /* 窄屏只留图标，避免按钮被挤到屏幕外（r39 实测：390px 下按钮被推出可视区） */
  .pv-btn-text { display: none; }
  .pv-act { padding: 7px 9px; font-size: 13px; }
  .pv-act .ico { margin: 0; }
  .pv-title b { font-size: 13.5px; }
  .pv-body { padding: 10px; }
  .pv-frame { height: calc(100vh - 108px); min-height: 56vh; border-radius: 10px; }
  .pv-text { font-size: 13px; padding: 12px 13px; }
  .pv-doc { padding: 14px 15px; font-size: 13.5px; border-radius: 12px; }
  .pv-doc table.pv-table { font-size: 12.5px; }
  .pv-doc table.pv-table th, .pv-doc table.pv-table td { padding: 6px 9px; }
}
