:root {
  --bg: #05060f;
  --ink: #eaf0ff;
  --muted: #9fb0d6;
  --card: rgba(20, 30, 58, 0.55);
  --card-solid: rgba(16, 24, 48, 0.96);
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --pA: #ff6b6b;
  --pB: #ffa94d;
  --pC: #ffd43b;
  --pD: #51cf66;
  --pF: #22b8cf;
  --pG: #4dabf7;
  --pW: #b197fc;
}

* { box-sizing: border-box; }

/* 背景色放在 html 上；body 透明，避免遮挡负层级的星空 #sky */
html { background: #04060f; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", system-ui, -apple-system,
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  /* 禁止双指捏合缩放（三道防线之第 2 道）：只放行单指上下/左右滚动，
     不启用 pinch-zoom，同时禁用双击缩放；不影响点击、长按、输入与页面滚动。 */
  touch-action: pan-x pan-y;
  /* 顺带锁住横竖屏切换 / 系统字体放大导致的文字自动缩放 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { background: transparent; }

/* ---------- 星空背景 ---------- */
#sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 74% 10%, #2c4685 0%, rgba(44,70,133,0) 44%),
    radial-gradient(ellipse at 16% 78%, #1f3364 0%, rgba(31,51,100,0) 50%),
    radial-gradient(ellipse at 50% 118%, #17224d 0%, rgba(23,34,77,0) 62%),
    linear-gradient(160deg, #0e1b40 0%, #070d24 55%, #03040c 100%);
}
#sky .star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: .9;
  will-change: opacity, transform;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
}
#sky .star.big {
  box-shadow: 0 0 7px 1.5px rgba(200, 222, 255, .9);
  animation-name: twinkleBig;
}
@keyframes twinkle {
  0%, 100% { opacity: .12; transform: scale(.65); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes twinkleBig {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
/* 流星 */
#sky .shoot {
  position: absolute;
  left: -12%;
  width: 140px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95));
  filter: drop-shadow(0 0 5px rgba(200, 225, 255, .9));
  opacity: 0;
  transform: rotate(22deg);
  animation: shoot 9s linear infinite;
}
@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(22deg); }
  4% { opacity: 1; }
  18% { opacity: 1; }
  22% { opacity: 0; transform: translate(58vw, 24vw) rotate(22deg); }
  100% { opacity: 0; transform: translate(58vw, 24vw) rotate(22deg); }
}
#sky .moon {
  position: absolute;
  top: 7%;
  right: 11%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fffdf0, #ffe9a8 58%, #f3cf78 100%);
  box-shadow: 0 0 46px 12px rgba(255, 233, 168, 0.32);
}
#sky .hills {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26%;
  background:
    radial-gradient(120% 100% at 15% 100%, #0a1226 0%, rgba(10,18,38,0) 60%),
    radial-gradient(120% 100% at 80% 100%, #0a1226 0%, rgba(10,18,38,0) 60%),
    linear-gradient(180deg, rgba(8,14,30,0) 0%, #060a18 70%, #04060f 100%);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 74px 14px 22px;   /* 右边预留 74px 给右上角悬浮刷新圆钮（桌面端） */
  background: rgba(10, 16, 38, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
/* margin-right:auto 把身份切换与徽章推到右侧，同时保持 DOM 顺序（brand → 身份 → 徽章），
   这样手机端 flex-wrap 时身份切换能优先与品牌名同行 */
.brand-group { display: flex; align-items: center; gap: 16px; min-width: 0; flex-wrap: wrap; margin-right: auto; }
.brand { display: flex; align-items: center; gap: 14px; }
/* 程序所有者标识：顶栏金色胶囊 */
.owner-badge {
  font-size: 12.5px; letter-spacing: .5px; color: #e9cf86; white-space: nowrap;
  padding: 5px 13px; border-radius: 999px;
  background: rgba(255, 212, 59, .10); border: 1px solid rgba(255, 212, 59, .30);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
  max-height: 40px; overflow: hidden;
  transition: opacity .2s ease, max-height .25s ease, padding .25s ease, margin .25s ease;
}
/* 向下翻阅时收起徽章（高度归零），把空间让给内容；回到顶部自动恢复 */
body.scrolled .owner-badge {
  opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0;
  border-top-width: 0; border-bottom-width: 0; pointer-events: none;
}
/* 徽章收起后，顺带清掉 flex 换行残留的行间距 */
body.scrolled .topbar { row-gap: 0; }
.logo {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(160deg, #2a3f72, #0e1630);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; align-items: flex-end; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); overflow: hidden;
}
.logo i {
  display: block; width: 20px; height: 26px; margin-bottom: 7px;
  background: #0b1330; border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px 2px 0 0; position: relative;
  background-image:
    linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 6px 6px;
  box-shadow: 0 0 10px 1px rgba(177, 151, 252, .5);
}
.logo i::after {
  content: ""; position: absolute; inset: 3px;
  background:
    radial-gradient(circle, var(--pW) 1.3px, transparent 1.5px) 0 0 / 6px 6px,
    radial-gradient(circle, var(--pG) 1.3px, transparent 1.5px) 3px 3px / 6px 6px;
  opacity: .9;
}
.brand-text { min-width: 0; }
.brand-text h1 { font-size: 19px; margin: 0; letter-spacing: 0.3px; font-weight: 800; white-space: nowrap; }
/* 金色闪光：星空背诵城 与 学校名 共用，带流动光泽 */
.brand-text h1 .gold {
  background: linear-gradient(100deg, #ffe08a 0%, #ffd43b 22%, #fff6cf 48%, #ffb347 72%, #ffe08a 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: goldShimmer 3.6s linear infinite;
  text-shadow: 0 1px 12px rgba(255, 201, 60, .22);
}
.brand-text h1 .dot { color: rgba(255, 212, 59, .55); margin: 0 2px; font-weight: 400; }
@keyframes goldShimmer { to { background-position: 220% center; } }
.brand-text .sub { font-size: 12.5px; margin: 2px 0 0; color: var(--muted); }

.role-switch {
  display: inline-flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px;
}
.role-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 8px 18px; border-radius: 999px; font-size: 14px; color: var(--muted);
  font-weight: 600; transition: all .2s;
}
.role-btn.active { background: #fff; color: #1a2238; box-shadow: var(--shadow-sm); }

/* 顶栏：新留言铃铛（仅程序所有者登录后可见，提醒老师有家长新留言）。马卡龙樱花粉配色 */
.msg-bell {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex: none;
  border: 1px solid rgba(255, 194, 214, .9);
  background: linear-gradient(135deg, #ffe3ec, #ffc2d6);
  color: #9b2c4d; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; transition: all .2s;
  box-shadow: 0 3px 12px rgba(255, 122, 162, .35), inset 0 1px 0 rgba(255,255,255,.5);
}
.msg-bell:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(255, 122, 162, .5), inset 0 1px 0 rgba(255,255,255,.6); }
.msg-bell .bell-ico { font-size: 15px; line-height: 1; }
.msg-bell.has-new {
  color: #fff; border-color: rgba(255, 99, 99, .55);
  background: rgba(255, 80, 80, .16); animation: bellPulse 1.8s ease-in-out infinite;
}
.msg-bell .bell-count {
  background: #ff4d4f; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
@keyframes bellPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 80, 80, .20); }
  50% { box-shadow: 0 0 0 4px rgba(255, 80, 80, .08); }
}
/* 登记动态 · 马卡龙抹茶绿（:not(.has-new) 护住「有新登记」时的红色 alert） */
.msg-bell.flower-bell:not(.has-new) {
  border-color: rgba(174, 233, 200, .9);
  background: linear-gradient(135deg, #d8f5e3, #aee9c8);
  color: #15543a;
  box-shadow: 0 3px 12px rgba(80, 200, 140, .35), inset 0 1px 0 rgba(255,255,255,.5);
}
.msg-bell.flower-bell:hover { filter: brightness(1.05); }

/* 顶栏：点读跟读入口（家长端 / 老师端均可见，常驻顶栏） */
.read-btn {
  color: #1a1303; font-weight: 700;
  border-color: rgba(255, 209, 102, .65);
  background: linear-gradient(135deg, #ffd86b, #ffb347);
  box-shadow: 0 2px 8px rgba(255, 178, 71, .35);
}
.read-btn:hover {
  color: #1a1303; background: linear-gradient(135deg, #ffe08a, #ffc15e);
  border-color: rgba(255, 209, 102, .9);
}

/* 顶栏四个核心功能按钮组：并排一组、各用独立高饱和配色（图标+文字都保留） */
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 老师端顶栏菜单：把「常用模块」(点读跟读…登记规则) 与「老师功能」(检查背诵…备份) 合并进
   一个「☰ 功能菜单」下拉，仅老师端显示；家长/组长/课代表端模块按钮照常平铺。 */
#topMenuBtn { display: none; }                       /* 默认隐藏，仅老师端显示 */
body.role-teacher #topMenuBtn { display: inline-flex; align-items: center; gap: 4px;
  color: #3d2a72; border: 1px solid rgba(205,188,245,.9);
  background: linear-gradient(135deg, #ece3fd, #cdbcf5);
  box-shadow: 0 3px 12px rgba(160, 120, 240, .35), inset 0 1px 0 rgba(255,255,255,.5); }
body.role-teacher #topMenuBtn:hover { filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(160, 120, 240, .5), inset 0 1px 0 rgba(255,255,255,.6); }
/* 老师端：模块入口从顶栏行收起（移入下拉，见 app.js syncTopMenu）；仅隐藏「顶栏行内」的直接子项，
   移入面板后不再是顶栏直接子项，故在面板里正常显示 */
body.role-teacher .topbar-actions > .topbar-mod { display: none; }
body.role-teacher .tf-arrow { display: inline-block; transition: transform .2s; }
body.role-teacher.topmenu-open .tf-arrow { transform: rotate(180deg); }

/* 顶栏下拉菜单面板：锚定在顶栏正下方、右对齐 */
.top-menu-panel {
  position: absolute; top: calc(100% + 6px); right: 12px; z-index: 120;
  width: min(360px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 12px;
  justify-content: flex-start;   /* 内容超高时从顶部排，别居中（居中会把顶部内容挤出滚动容器、滚不回来） */
  background: rgba(26, 22, 46, .98);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  padding: 14px;
  max-height: 74vh; overflow: auto;
  backdrop-filter: blur(10px);
}
.top-menu-panel[hidden] { display: none; }
.tmp-group { display: flex; flex-direction: column; gap: 8px; }
.tmp-title { font-size: 12px; font-weight: 800; color: #ffd86b; letter-spacing: .5px; padding: 0 2px; }
.tmp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tmp-grid .nav-pill { flex: none; width: 100%; justify-content: center; margin: 0; }
.tmp-grid .nav-rule { grid-column: 1 / -1; }   /* 登记规则占满整行，不与 6 个模块挤半格 */
.tmp-grid .btn { width: 100%; justify-content: center; margin: 0; }
/* 两组之间细分隔 */
.tmp-fn { border-top: 1px solid rgba(255,255,255,.10); padding-top: 12px; }
/* 两组标题统一：小圆点 + 标题（原来「常用模块」是纯金字，这里与分类标题对齐） */
.tmp-title { display: flex; align-items: center; gap: 7px; }
.tmp-title::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #ffd86b; box-shadow: 0 0 8px rgba(255,216,107,.8);
}

/* ---------- 老师功能：按用途分组 + 统一柔和配色 ----------
   原来 29 个按钮混用 .btn.primary(亮蓝紫渐变) / .btn.ghost(暗灰)，深色面板里一半亮一半暗很花。
   这里在「面板作用域」内用高特异性统一覆盖，不改按钮 class —— 因为 refreshAwardBadge 是异步的，
   回调会把「待发花」class 重设回 btn primary hot，改 class 会被它覆盖回去。 */
.tmp-cats { display: flex; flex-direction: column; gap: 14px; }
.tmp-cat { --cat: #d8d2e8; --catSoft: rgba(216,210,232,.11); }
.tmp-cat[data-cat="daily"] { --cat: #ffd86b; --catSoft: rgba(255,216,107,.13); }
.tmp-cat[data-cat="award"] { --cat: #ff9eb5; --catSoft: rgba(255,158,181,.13); }
.tmp-cat[data-cat="class"] { --cat: #7cc4ff; --catSoft: rgba(124,196,255,.13); }
.tmp-cat[data-cat="data"]  { --cat: #6ee7c8; --catSoft: rgba(110,231,200,.13); }
.tmp-cat[data-cat="show"]  { --cat: #c4a5ff; --catSoft: rgba(196,165,255,.13); }
.tmp-cat[data-cat="set"]   { --cat: #aab6d0; --catSoft: rgba(170,182,208,.13); }
.tmp-cat[data-cat="other"] { --cat: #d8d2e8; --catSoft: rgba(216,210,232,.11); }

/* 分组标题：滚动时吸顶，长菜单也好定位当前在哪一类 */
.tmp-cat-head {
  position: sticky; top: -14px; z-index: 3;
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .4px;
  color: var(--cat);
  background: rgba(26,22,46,.98);
  padding: 7px 2px; margin: -7px -2px 7px; border-radius: 6px;
}
.tmp-cat-head .tmp-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--cat); box-shadow: 0 0 8px var(--cat);
}
.tmp-cat-head .tmp-cnt {
  margin-left: auto; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.06); border-radius: 999px; padding: 1px 8px;
}
.tmp-cat .tmp-grid { gap: 7px; }
/* 统一按钮：淡主题色玻璃底 + 浅字 + 细边，取代 primary 渐变 / ghost 深灰 */
.tmp-cat .tmp-grid .btn {
  width: 100%; margin: 0; justify-content: center;
  background: var(--catSoft);
  border: 1px solid rgba(255,255,255,.10);
  color: #f0edf9;
  font-size: 12.5px; font-weight: 600; line-height: 1.3;
  white-space: normal; text-align: center;
  padding: 9px 6px; border-radius: 11px;
  min-height: 40px; box-shadow: none;
  transition: border-color .18s, background .18s, transform .16s;
}
.tmp-cat .tmp-grid .btn:hover {
  border-color: var(--cat); filter: brightness(1.15); transform: translateY(-1px);
}
.tmp-cat .tmp-grid .btn:active { transform: translateY(0); }
/* 待发花：保留橙色醒目提示（.hot 由 refreshAwardBadge 异步设置），融入新配色 */
.tmp-cat .tmp-grid .btn.hot {
  border-color: rgba(255,159,67,.6); color: #ffe0b8;
}
.nav-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  font-size: 13px; font-weight: 700; letter-spacing: .3px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .18s ease, filter .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-pill .pill-ico { font-size: 15px; line-height: 1; }
.nav-pill:hover { transform: translateY(-2px); }
.nav-pill:active { transform: translateY(0); }
/* 点读跟读 · 暖金 */
.nav-pill.nav-read {
  color: #241500;
  background: linear-gradient(135deg, #ffe585, #ffb020);
  border-color: rgba(255, 210, 90, .9);
  box-shadow: 0 3px 12px rgba(255, 176, 32, .50), inset 0 1px 0 rgba(255,255,255,.55);
}
.nav-pill.nav-read:hover { box-shadow: 0 6px 20px rgba(255, 176, 32, .72), inset 0 1px 0 rgba(255,255,255,.65); }
/* 课文预习 · 青绿 */
.nav-pill.nav-preview {
  color: #00252c;
  background: linear-gradient(135deg, #63f4e4, #0bb8d4);
  border-color: rgba(99, 244, 228, .9);
  box-shadow: 0 3px 12px rgba(11, 184, 212, .50), inset 0 1px 0 rgba(255,255,255,.5);
}
.nav-pill.nav-preview:hover { box-shadow: 0 6px 20px rgba(11, 184, 212, .72), inset 0 1px 0 rgba(255,255,255,.6); }
/* 小红花登记 · 玫红 */
.nav-pill.nav-flower {
  color: #2b0011;
  background: linear-gradient(135deg, #ff93b4, #ff2d6f);
  border-color: rgba(255, 147, 180, .9);
  box-shadow: 0 3px 12px rgba(255, 45, 111, .50), inset 0 1px 0 rgba(255,255,255,.45);
}
.nav-pill.nav-flower:hover { box-shadow: 0 6px 20px rgba(255, 45, 111, .72), inset 0 1px 0 rgba(255,255,255,.55); }
/* 小红花榜 · 紫罗兰 */
.nav-pill.nav-board {
  color: #17003a;
  background: linear-gradient(135deg, #bda4ff, #7c3aed);
  border-color: rgba(189, 164, 255, .9);
  box-shadow: 0 3px 12px rgba(124, 58, 237, .50), inset 0 1px 0 rgba(255,255,255,.4);
}
.nav-pill.nav-board:hover { box-shadow: 0 6px 20px rgba(124, 58, 237, .75), inset 0 1px 0 rgba(255,255,255,.5); }
/* 填写心愿单 · 天蓝（冷色系唯一未被占用的色，与金/青绿/玫红/紫罗兰全区分） */
.nav-pill.nav-wish {
  color: #042f3e;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  border-color: rgba(56, 189, 248, .9);
  box-shadow: 0 3px 12px rgba(56, 189, 248, .50), inset 0 1px 0 rgba(255,255,255,.55);
}
.nav-pill.nav-wish:hover { box-shadow: 0 6px 20px rgba(56, 189, 248, .72), inset 0 1px 0 rgba(255,255,255,.65); }
/* 背诵表扬 · 翠绿（成长/之星主题，与暖金/青绿/玫红/紫罗兰/天蓝全区分） */
.nav-pill.nav-praise {
  color: #06250f;
  background: linear-gradient(135deg, #86efac, #16a34a);
  border-color: rgba(110, 231, 168, .9);
  box-shadow: 0 3px 12px rgba(22, 163, 74, .50), inset 0 1px 0 rgba(255,255,255,.5);
}
.nav-pill.nav-praise:hover { box-shadow: 0 6px 20px rgba(22, 163, 74, .72), inset 0 1px 0 rgba(255,255,255,.6); }
/* 登记规则 · 马卡龙柠檬黄（收进常用模块，与五色模块 + 三顶栏马卡龙全区分） */
.nav-pill.nav-rule {
  color: #6b5210;
  background: linear-gradient(135deg, #fff3c4, #ffe487);
  border-color: rgba(255, 228, 135, .9);
  box-shadow: 0 3px 12px rgba(240, 200, 80, .45), inset 0 1px 0 rgba(255,255,255,.55);
}
.nav-pill.nav-rule:hover { box-shadow: 0 6px 20px rgba(240, 200, 80, .65), inset 0 1px 0 rgba(255,255,255,.65); }
/* 四个功能按钮与「刷新」之间的细分隔线 */
.actions-sep { width: 1px; height: 20px; align-self: center; background: rgba(255,255,255,.18); flex: none; }
/* 手机窄屏：功能按钮组独占整行，排成 6 列网格 → 前 3 个各占 2 列（一行 3 个），
   后 2 个各占 3 列（一行 2 个），5 个主按钮两行收完（原来是 2+2+通栏 = 3 行，太高）；
   老师端多出的刷新/铃铛统一占 3 列（半行），视觉整齐不再乱换行 */
@media (max-width: 620px) {
  .topbar-row-main { flex: 1 1 100%; min-width: 0; }
  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }
  /* 等宽后内容居中，观感更整；但下拉面板是 flex column + 可滚动，绝不能居中（顶部会溢出到容器外） */
  .topbar-actions > *:not(.top-menu-panel) { justify-content: center; }
  /* 常用模块胶囊：6 列网格下每颗占 2 列 → 3 颗一行（6 颗两行收完，整齐不剩孤颗） */
  .topbar-actions .nav-pill { grid-column: span 2; }
  .topbar-actions > .refresh-btn,
  .topbar-actions > .msg-bell { grid-column: span 3; }     /* 次要按钮：半行 */
  /* 老师端：留言 / 登记动态 / 功能菜单三颗一行收完（各占 2 列 → 共 6 列一排） */
  body.role-teacher .topbar-actions > .msg-bell { grid-column: span 2; }
  .topbar-actions .actions-sep { display: none; }          /* 网格里分隔线无意义，去掉省一格 */
}

/* 刷新：右上角悬浮圆形按钮（全局，家长端除外；app.js setRole 控制 hidden）。
   网页加到手机桌面后以 standalone 全屏运行没有浏览器刷新键，点它免退出重进、直接重拉数据重绘页面。 */
.refresh-btn {
  position: relative; z-index: 200;
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; cursor: pointer;
  border: 1px solid rgba(255,255,255,.30);
  background: linear-gradient(135deg, #7db4ff, #4b6bfb);
  color: #fff; font-size: 21px; line-height: 1;
  box-shadow: 0 8px 22px rgba(45, 90, 220, .45), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.refresh-btn:hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(45, 90, 220, .55), inset 0 1px 0 rgba(255,255,255,.55); }
.refresh-btn:active { transform: scale(.92); }
.refresh-btn:disabled { cursor: default; }
.refresh-btn .rf-ico { display: inline-block; }
.refresh-btn .rf-text { display: none; }   /* 悬浮圆钮只留图标 */
.refresh-btn.spinning { border-color: rgba(255,255,255,.6); }
.refresh-btn.spinning .rf-ico { animation: rfSpin .7s linear infinite; }
@keyframes rfSpin { to { transform: rotate(360deg); } }

/* ---------- 班级切换 ---------- */
.class-tabs {
  display: flex; gap: 10px; padding: 16px 22px 4px; flex-wrap: wrap;
}
.class-tab {
  border: 1px solid var(--line); background: rgba(255,255,255,.06); cursor: pointer;
  padding: 9px 20px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  color: var(--muted); transition: all .2s;
}
.class-tab:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.class-tab.active {
  background: linear-gradient(135deg, var(--pG), var(--pW));
  color: #06101f; border-color: transparent; box-shadow: 0 8px 20px rgba(77, 171, 247, 0.35);
}

/* ---------- 主体 ---------- */
main { padding: 14px 22px 40px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 8px 2px 14px; flex-wrap: wrap;
}
.section-head h2 { font-size: 17px; margin: 0; }
.section-head .hint { font-size: 13px; color: var(--muted); }
/* 家长端标题带标语的头部：标语紧跟标题，2026-10-31 起换成横幅 */
.section-head.with-slogan { justify-content: flex-start; align-items: baseline; gap: 6px; }
/* 标语横幅：order:-1 排到「×班 · 背诵进度」标题上方（班级条正下方，箭头所指位置，
   Miss Yang 2026-10-31 要求）；flex-basis:100% 独占一行 */
.section-head.with-slogan .slogan { flex-basis: 100%; order: -1; margin: 0 auto 6px; text-align: center; }

.search-bar {
  display: flex; gap: 10px; margin: 4px 2px 16px; flex-wrap: wrap; align-items: center;
}
.search-bar input {
  flex: 1 1 260px; min-width: 200px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); font-size: 15px; outline: none;
  background: rgba(255,255,255,.06); color: var(--ink);
}
.search-bar input::placeholder { color: rgba(159,176,214,.65); }

/* 🔍 家长端「找孩子」输入框：家长端最核心的动作入口，要醒目，但不能破坏星空夜的氛围。
   思路：沿用全站的「深色玻璃 + 金边」语言，靠三点抓眼——
   ① 玻璃底比普通输入框更透更亮（rgba .11→.07 微渐变，带一点网站蓝）；
   ② 1.5px 金色描边 + 一圈很淡的金色光晕（夜里的一盏小灯，而不是一块膏药）；
   ③ 左侧金色放大镜徽章 + 尺寸放大。
   placeholder 用浅金色（不用红——红配金在夜空里显脏，也和全站配色无关）。 */
/* 彩虹跑马灯边框（用户要求）：外层容器垫 2px，里面是一条不断横向流动的彩虹渐变，
   输入框铺不透明底盖住中间，只露出一圈会跑的彩虹边 */
.search-bar.find-stu {
  padding: 2px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(90deg, #ff4d4f, #ff9500, #ffd43b, #34c759, #0bb8d4,
                                      #38bdf8, #7c3aed, #ff2d6f, #ff4d4f);
  background-size: 260% 100%;
  animation: rainbowRun 3.4s linear infinite;
}
@keyframes rainbowRun {
  from { background-position: 0% 0; }
  to   { background-position: -260% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .search-bar.find-stu { animation: none; }
}
.search-bar.find-stu input {
  flex: 1 1 100%;
  min-width: 0;
  padding: 11px 14px 11px 42px;
  border-radius: 14px;
  font-size: 15px; font-weight: 600;
  color: #f2f5ff;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23e8c96a'%20stroke-width='2.4'%20stroke-linecap='round'%3E%3Ccircle%20cx='11'%20cy='11'%20r='7'/%3E%3Cpath%20d='M20%2020l-3.6-3.6'/%3E%3C/svg%3E"),
                    linear-gradient(180deg, rgba(255,255,255,.11), rgba(77,171,247,.07));
  background-repeat: no-repeat, no-repeat;
  background-position: 16px center, 0 0;
  background-size: 18px 18px, auto;
  border: none;                       /* 金边交给外层的彩虹跑马灯 */
  background-color: #141d3a;          /* 不透明底：挡住彩虹，只留一圈边 */
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(255,212,59,.16), inset 0 1px 0 rgba(255,255,255,.10);
}
/* placeholder 即行动指引：浅金字直接写在框里，一眼看到「要在这里输入孩子姓名」，
   不另起一行（更省空间）。字号小于输入文字，保证窄屏一行放得下不被截断。 */
.search-bar.find-stu input::placeholder {
  color: #e8c96a; font-weight: 600;
  font-size: 12px;      /* 原 13.5px：20 个字的提示在 390~414 宽手机上会顶到框外，最后一个「楼」字被裁 */
}
@media (max-width: 359px) {
  /* 彩虹跑马灯边框（用户要求）：外层容器垫 2px，里面是一条不断横向流动的彩虹渐变，
   输入框铺不透明底盖住中间，只露出一圈会跑的彩虹边 */
.search-bar.find-stu {
  padding: 2px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(90deg, #ff4d4f, #ff9500, #ffd43b, #34c759, #0bb8d4,
                                      #38bdf8, #7c3aed, #ff2d6f, #ff4d4f);
  background-size: 260% 100%;
  animation: rainbowRun 3.4s linear infinite;
}
@keyframes rainbowRun {
  from { background-position: 0% 0; }
  to   { background-position: -260% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .search-bar.find-stu { animation: none; }
}
.search-bar.find-stu input { padding-right: 8px; }   /* 极窄屏再省 8px 给文字 */
  .search-bar.find-stu input::placeholder { font-size: 11px; }
}
.search-bar.find-stu input:focus {
  outline: none;
  border-color: #ffd43b;
  box-shadow: 0 0 0 4px rgba(255,212,59,.20), 0 4px 20px rgba(255,212,59,.28),
              inset 0 1px 0 rgba(255,255,255,.12);
}
/* 慢闪金环：框还空着且没聚焦时，2.6 秒一次的呼吸光晕——远远就能看见这儿要输名字，
   但节奏放慢、幅度收小，"慢慢的闪"不刺眼也不廉价；
   一点聚焦或已输入内容就停闪，不干扰操作。 */
@keyframes findStuPulse {
  0%, 100% {
    border-color: rgba(255,212,59,.55);
    box-shadow: 0 4px 16px rgba(255,212,59,.16), 0 0 0 0 rgba(255,212,59,.30),
                inset 0 1px 0 rgba(255,255,255,.10);
  }
  50% {
    border-color: rgba(255,212,59,.9);
    box-shadow: 0 4px 20px rgba(255,212,59,.28), 0 0 0 6px rgba(255,212,59,.12),
                inset 0 1px 0 rgba(255,255,255,.10);
  }
}
/* 原「慢闪金环」已让位给彩虹跑马灯边框（同时闪两种光太闹），空框时的呼吸动画停用 */
.search-bar.find-stu input:placeholder-shown:not(:focus) {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .search-bar.find-stu input:placeholder-shown:not(:focus) { animation: none; }
}
@media (min-width: 700px) {
  /* 彩虹跑马灯边框（用户要求）：外层容器垫 2px，里面是一条不断横向流动的彩虹渐变，
   输入框铺不透明底盖住中间，只露出一圈会跑的彩虹边 */
.search-bar.find-stu {
  padding: 2px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(90deg, #ff4d4f, #ff9500, #ffd43b, #34c759, #0bb8d4,
                                      #38bdf8, #7c3aed, #ff2d6f, #ff4d4f);
  background-size: 260% 100%;
  animation: rainbowRun 3.4s linear infinite;
}
@keyframes rainbowRun {
  from { background-position: 0% 0; }
  to   { background-position: -260% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .search-bar.find-stu { animation: none; }
}
.search-bar.find-stu input { flex: 0 1 520px; }
}
.search-bar input:focus { border-color: var(--pG); box-shadow: 0 0 0 3px rgba(77,171,247,.2); }
.btn {
  border: none; cursor: pointer; border-radius: 12px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; transition: all .15s;
  font-family: inherit; line-height: 1.35; white-space: nowrap;
}
.btn.primary { background: linear-gradient(135deg, var(--pG), var(--pW)); color: #06101f; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: rgba(255,255,255,.1); color: var(--ink); }
.btn.ghost:hover { background: rgba(255,255,255,.18); }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 10px; }


/* 宽屏：把功能按钮压紧一档，给下面的学生名单多留可视高度 */
@media (min-width: 1024px) {
  .search-bar { gap: 8px; margin-bottom: 12px; }
  .search-bar > .btn { padding: 9px 13px; font-size: 13.5px; border-radius: 11px; }
}
@media (max-width: 620px) {
  .search-bar { gap: 8px; }

  /* 顶栏手机端紧凑化：品牌名与身份切换同行，徽章另起一行且翻阅时收起 */
  .topbar { padding: 5px 9px; gap: 3px 8px; }
  /* 顶栏主功能按钮瘦身（2026-10-29 深夜）：原来 13px 字 + 7px/13px 内边距，
     一颗近 33px 高、5 颗占 3 行 ≈ 115px，手机上顶掉半屏。现压到 12px 字 +
     5px/6px 内边距，单颗约 27px 高，5 颗两行 ≈ 60px，省出近一半竖向空间 */
  .nav-pill { font-size: 12px; padding: 5px 6px; gap: 4px; letter-spacing: 0; }
  /* 各色按钮自带的 12~20px 大光晕在手机上显得又厚又胀，压成一层极淡阴影 */
  .topbar-actions .nav-pill { box-shadow: 0 1px 3px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255,255,255,.35); }
  .nav-pill .pill-ico { font-size: 13px; }
  .nav-pill:hover { transform: none; }      /* 触屏没有 hover，位移反而显抖 */
  .brand-group { gap: 6px; margin-right: auto; }
  .brand { gap: 8px; }
  .logo { width: 26px; height: 26px; border-radius: 8px; }
  .logo i { width: 12px; height: 16px; margin-bottom: 4px; background-size: 4px 4px; }
  .logo i::after { inset: 2px; background-size: 4px 4px; }
  .brand-text h1 { font-size: 14px; letter-spacing: 0; white-space: normal; line-height: 1.25; }
  .brand-text .sub { display: none; }              /* 副标题在手机上纯装饰，隐藏省一行 */
  .owner-badge { font-size: 10px; padding: 2px 8px; letter-spacing: .2px; }
  .role-switch { padding: 3px; }
  .role-btn { padding: 4px 10px; font-size: 12px; }
  .msg-bell { padding: 4px 9px; font-size: 11.5px; gap: 4px; }
  .msg-bell .bell-ico { font-size: 13px; }
  /* 手机端：悬浮刷新圆钮落到底部右侧，方便拇指点击，且避开较高的顶栏 */
  .refresh-btn { position: fixed; top: auto; bottom: 18px; right: 14px; width: 50px; height: 50px; font-size: 23px; }
  .class-tabs { padding: 4px 12px 2px; gap: 8px; }
  .class-tab { padding: 7px 14px; font-size: 13.5px; }
}

/* ---------- 找学生（老师端搜索） ---------- */
.find-bar {
  display: flex; gap: 10px; align-items: center; margin: 2px 2px 12px; flex-wrap: wrap;
}
/* 老师端置顶（2026-10-31）：班级条 + 找学生框钉在 sticky 顶栏正下方，不随页面滚动。
   top 用 JS 实测的 --tb-h/--tabs-h（顶栏在手机上会换行、body.scrolled 会收起徽章，
   高度是变的，量出来最准）。半透明底 + 毛玻璃挡住滚过的内容；家长/组长/课代表端不受影响。 */
body.role-teacher .class-tabs {
  position: sticky;
  top: var(--tb-h, 56px);
  z-index: 15;
  background: rgba(8, 13, 30, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.role-teacher #main .find-bar {
  position: sticky;
  top: calc(var(--tb-h, 56px) + var(--tabs-h, 46px));
  z-index: 14;
  background: rgba(8, 13, 30, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 0;                       /* 原来的 2px 上边距会让底图漏缝，收进盒子改用 padding */
  padding: 8px 2px 12px;
}
/* 老师端「找学生」搜索框：常驻金色边框，聚焦时金色光晕更亮，呼应全站金边语言 */
.find-bar .find-input {
  flex: 1 1 260px; min-width: 180px;
  border: 1.5px solid #e8c96a;
  box-shadow: 0 0 0 3px rgba(232,201,106,.10);
  transition: border-color .15s, box-shadow .15s;
}
.find-bar .find-input::placeholder { color: #e8c96a; opacity: .85; }
.find-bar .find-input:focus {
  border-color: #ffd43b;
  box-shadow: 0 0 0 4px rgba(255,212,59,.22);
  outline: none;
}
.find-count { font-size: 13px; color: var(--pG); white-space: nowrap; }
.stu-card .name-row { gap: 7px; }
.stu-card .name { flex: 1 1 auto; }
.stu-card .mini-stat { margin-left: auto; font-size: 12px; color: var(--muted); }
.stu-no {
  flex: 0 0 auto; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 6px;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
  background: rgba(255, 212, 59, .16); color: #ffd43b;
}

/* ---------- 身份徽章（组长 / 组员 / 课代表） ---------- */
.role-tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; line-height: 1; padding: 3px 7px;
  border-radius: 999px; white-space: nowrap;
}
/* 组员：素色小标，不抢眼 */
.role-tag.member {
  background: rgba(159, 176, 214, .14); color: var(--muted);
  border: 1px solid rgba(159, 176, 214, .28);
}
/* 组长：金色描边 + 柔光 */
.role-tag.leader {
  color: #ffe08a; background: rgba(255, 200, 70, .14);
  border: 1px solid rgba(255, 200, 70, .55);
  text-shadow: 0 0 6px rgba(255, 200, 70, .9);
  box-shadow: 0 0 8px rgba(255, 200, 70, .45), inset 0 0 6px rgba(255, 200, 70, .25);
  animation: goldGlow 2.6s ease-in-out infinite;
}
/* 课代表：更亮的金 + 更强闪光，明显盖过组长 */
.role-tag.rep {
  color: #fff6d6; background: linear-gradient(180deg, rgba(255, 222, 120, .28), rgba(255, 184, 40, .18));
  border: 1px solid rgba(255, 224, 130, .85);
  text-shadow: 0 0 9px rgba(255, 224, 130, 1), 0 0 16px rgba(255, 200, 70, .9);
  box-shadow: 0 0 14px rgba(255, 210, 90, .8), 0 0 26px rgba(255, 190, 50, .5),
              inset 0 0 10px rgba(255, 224, 130, .4);
  animation: goldGlowStrong 1.9s ease-in-out infinite;
}
@keyframes goldGlow {
  0%, 100% { box-shadow: 0 0 7px rgba(255, 200, 70, .4), inset 0 0 5px rgba(255, 200, 70, .2); }
  50%      { box-shadow: 0 0 13px rgba(255, 200, 70, .7), inset 0 0 8px rgba(255, 200, 70, .35); }
}
@keyframes goldGlowStrong {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 210, 90, .7), 0 0 22px rgba(255, 190, 50, .4), inset 0 0 8px rgba(255, 224, 130, .35); }
  50%      { box-shadow: 0 0 20px rgba(255, 220, 110, 1), 0 0 36px rgba(255, 195, 55, .7), inset 0 0 14px rgba(255, 228, 140, .6); }
}
@media (prefers-reduced-motion: reduce) {
  .role-tag.leader, .role-tag.rep { animation: none; }
}

/* ---------- 快速点名 ---------- */
.modal.roll { max-width: 720px; max-height: 90vh; overflow-y: auto; }
.roll-body { margin-top: 14px; }
.roll-stat {
  font-size: 15px; margin: 12px 0 10px; line-height: 1.6;
}
.roll-stat b { color: #fff; }
.roll-stat .roll-hit { color: #ffd43b; font-size: 17px; }
.roll-bar {
  margin-top: 8px; height: 7px; border-radius: 99px; overflow: hidden;
  background: rgba(255, 255, 255, .1);
}
.roll-bar i {
  display: block; height: 100%; border-radius: 99px; transition: width .3s ease;
  background: linear-gradient(90deg, #4dabf7, #ffd43b);
}
.roll-tools { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.roll-search { flex: 1 1 200px; width: auto; }
.roll-check {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--muted); white-space: nowrap; cursor: pointer;
}
.roll-check input { accent-color: var(--pG); width: 15px; height: 15px; }
.roll-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.roll-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  transition: background .15s, border-color .15s;
}
.roll-row:hover { background: rgba(255, 255, 255, .08); }
.roll-row.done { background: rgba(77, 171, 247, .12); border-color: rgba(77, 171, 247, .3); }
.roll-idx {
  flex: 0 0 26px; text-align: center; font-size: 12px; font-weight: 700;
  color: #ffd43b; opacity: .85;
}
.roll-name { flex: 1 1 auto; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roll-prog { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.roll-btn {
  flex: 0 0 auto; min-width: 82px; border: none; cursor: pointer; font-size: 13px;
  font-weight: 700; padding: 7px 12px; border-radius: 9px; transition: all .15s;
  background: rgba(255, 255, 255, .1); color: var(--muted);
}
.roll-btn.on { background: linear-gradient(135deg, #4dabf7, #74c0fc); color: #06101f; }

@media (max-width: 520px) {
  .roll-list { max-height: 60vh; }
  .roll-row { padding: 10px 10px; gap: 8px; }
  .roll-btn { min-width: 72px; font-size: 12.5px; padding: 7px 9px; }
  .roll-prog { display: none; }
}

/* ---------- 学生卡片网格 ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
}
.stu-card {
  background: var(--card); border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: 10px; transition: all .2s;
}
.stu-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(255,255,255,.22); }
/* 搜索过滤：.stu-card 自带 display:flex，必须显式覆盖 hidden 才能真正隐藏 */
.stu-card[hidden] { display: none; }
.stu-card .name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stu-card .name { font-size: 15.5px; font-weight: 700; }
.stu-card .mini-stat { font-size: 12px; color: var(--muted); }
/* 🔒 进度不公开：家长端/教室大屏上的占位（替代大楼） */
.pillar-hidden { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 64px; gap: 4px; border-radius: 12px; margin: 6px 0;
  background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.18); }
.pillar-hidden .ph-ico { font-size: 24px; }
.pillar-hidden .ph-txt { font-size: 11.5px; color: var(--muted); }
.btn.ghost.small.on { background: rgba(255,212,59,.16); border-color: #ffd43b; color: #ffe08a; }

/* 📈 本周动态（老师端首页）：班级本周新增对比 + 掉队提醒 */
.week-pulse { margin: 8px 0 4px; padding: 9px 12px; border-radius: 12px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.10); }
/* 折叠态：只留标题条一行，把班级横条、掉队、待办、合种树全收起来，给点名/搜索/点亮腾屏幕 */
.week-pulse.collapsed { padding: 6px 12px; }
.week-pulse.collapsed .wp-cls,
.week-pulse.collapsed > :not(.wp-head) { display: none !important; }
.wp-toggle { margin-left: auto; flex: 0 0 auto; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4;
  padding: 2px 10px; border-radius: 99px; }
.wp-toggle:hover { background: rgba(255,255,255,.14); color: #fff; }
.wp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wp-title { font-size: 13px; font-weight: 700; color: #ffd98a; }
.wp-cls { font-size: 12.5px; color: var(--muted); }
.wp-cls.on { color: #b2f2bb; }
.wp-cls b { color: #8ce99a; font-size: 14px; margin-left: 1px; }
.wp-stale { margin-top: 6px; font-size: 12.5px; color: #ffc9c9; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-stale b { color: #ff8787; font-size: 14px; }
.wp-ok { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
/* 📋 今日待办行 */
.wp-todo { margin-top: 7px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-todo-t { font-size: 12.5px; font-weight: 700; color: #ffd98a; }
.wp-todo .btn.small { padding: 3px 9px; font-size: 12px; }
/* 🌳 三班合种一棵树 */
.wp-tree { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); }
.wp-tree-ico { font-size: 18px; }
.wp-tree b { color: #b2f2bb; font-size: 12.5px; }
.wp-tree-stage { color: #8ce99a; font-weight: 600; }
.wp-tree-bar { flex: 1 1 120px; min-width: 80px; height: 7px; border-radius: 99px;
  background: rgba(255,255,255,.12); overflow: hidden; }
.wp-tree-bar > i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #69db7c, #2f9e44); transition: width .6s ease; }
.wp-tree-pct { color: #8ce99a; font-weight: 700; font-size: 12px; }
/* 📈 进步可视化：名册卡片上的「本周 +N」与「🔥 坚持 N 周」 */
.wk-row { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.wk-add { font-size: 10.5px; font-weight: 700; color: #8ce99a; letter-spacing: .2px; }
.wk-streak { font-size: 10.5px; font-weight: 600; color: #ffd43b; }
/* 📈 我的进步（学生详情）：本周新增 + 连续周数 + 最近几周柱状图 */
.mp-box { margin: 10px 0; padding: 9px 12px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,212,59,.16); }
.mp-head { font-size: 13px; font-weight: 700; color: #ffd98a; margin-bottom: 5px; }
.mp-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.mp-add { color: #8ce99a; }
.mp-add b { font-size: 16px; color: #b2f2bb; margin: 0 1px; }
.mp-streak { color: #ffd43b; }
.mp-none { color: var(--muted); }
.mp-bars { display: flex; align-items: flex-end; gap: 5px; height: 36px; margin-top: 9px; }
.mp-bar { width: 15px; min-height: 3px; border-radius: 3px 3px 0 0; background: rgba(255,255,255,.12); }
.mp-bar.on { background: linear-gradient(180deg, #8ce99a, #2f9e44); }
.mp-cap { font-size: 11px; color: var(--muted); margin-top: 5px; }
/* 星光热度：老师端 / 家长端都放在卡片底部（避开顶部最终大皇冠） */
.watch-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffe9a8;
  background: linear-gradient(135deg, rgba(255,233,168,.18), rgba(243,207,120,.10));
  border: 1px solid rgba(255,233,168,.45);
  box-shadow: 0 0 8px rgba(255,233,168,.25);
  white-space: nowrap;
}
.modal-head .detail-watch { margin-left: 10px; font-size: 13px; }
/* 卡片底部的星光热度行（家长端 / 老师端通用） */
.stu-foot { display: flex; justify-content: center; margin-top: 8px; }

/* ---------- 大楼（共享房顶 + 单元标签） ---------- */
.city-mini { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 5px 0 4px; width: fit-content; margin: 0 auto; }
.city-big {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch;
  padding: 12px 6px 10px; border-bottom: 2px solid rgba(255,255,255,.14);
  /* 宽度跟随容器，避免在窄屏（手机）上房顶比楼体宽出一截 */
  width: 100%; max-width: 520px; margin: 0 auto;
}
.floors-row { display: flex; gap: 2px; justify-content: center; align-items: flex-end; }
/* 详情（大图）里楼层与单元皇冠行都按等分宽度排布，保证每列左右严格对齐 */
.city-big .floors-row { gap: 5px; width: 100%; }
.bcol { display: flex; flex-direction: column; align-items: center; }
.bcol.big { flex: 1 1 0; min-width: 0; align-items: stretch; }
.bcol.big .floors { gap: 3px; }

/* 所有单元共用的大房顶（三角形尖顶，屋檐与楼群等宽） */
.roof-bar {
  position: relative; width: 100%; height: 42px; margin-bottom: 6px;
  transition: transform .8s ease;
}
.city-mini .roof-bar { height: 26px; margin-bottom: 4px; --merge-shift: 0px; }
.city-big .roof-bar { height: 34px; margin-bottom: 5px; --merge-shift: 0px; }
/* 全部背完：房顶顺势下滑，与第六层楼顶相接 */
.city-big.merging .roof-bar, .city-mini.merging .roof-bar { transform: translateY(var(--merge-shift)); }
.roof-tri, .roof-glow {
  position: absolute; inset: 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.roof-tri { background: rgba(170,195,255,.14); transition: background .45s; }
.roof-glow {
  background: linear-gradient(180deg, #ffe8a3, #ffc93c 55%, #ffa94d);
  opacity: var(--lit, 0); transition: opacity .45s;
}
.roof-tri.full {
  background: linear-gradient(180deg, #ffe8a3, #ffc93c 55%, #ffb347);
  animation: roofPulse 1.6s ease-in-out infinite alternate;
}
@keyframes roofPulse {
  from { background: linear-gradient(180deg, #ffe8a3, #ffc93c 55%, #ffb347); }
  to   { background: linear-gradient(180deg, #fff1c4, #ffd966 55%, #ffc266); }
}

/* 皇冠：作为房顶子元素，居中于三角尖顶；合并时随房顶下滑、尖顶插入皇冠下缘豁口 */
.crown {
  position: absolute; left: 50%; top: -50px;
  transform: translateX(-50%) scale(.5);
  width: 92px; height: 60px; z-index: 6; pointer-events: none;
  background: url("/static/crown.webp") center/contain no-repeat;
  opacity: 0; transition: opacity .4s, transform .4s;
}
.city-big .crown { width: 104px; height: 68px; top: -56px; }
.city-mini .crown { width: 46px; height: 30px; top: -26px; }
.crown.show {
  opacity: 1; transform: translateX(-50%) scale(1);
  animation: crownBlink 1.4s ease-in-out infinite alternate;
}
@keyframes crownBlink {
  from { opacity: .72; }
  to   { opacity: 1; }
}
@media (max-width: 520px) {
  .crown { width: 40px; height: 26px; top: -18px; }
}
@keyframes crownGlow {
  from { box-shadow: 0 0 10px 2px rgba(255,201,60,.5); }
  to   { box-shadow: 0 0 24px 6px rgba(255,201,60,.95); }
}

/* 每单元小皇冠：放在单元号（U1…U10）下方那一排（「详情 / 全屏」按钮上方）。
   高度统一固定预留，亮不亮都占位，这样某一列点亮也不会把其它列顶出顶部空白行。
   未点亮时 👑 隐藏，但那一行位置仍留着。 */
.ucell {
  display: flex; align-items: center; justify-content: center;
  height: 14px; margin-top: 2px; overflow: hidden; flex: 0 0 auto;
}
.city-big .ucell { height: 22px; margin-top: 3px; }
.ucrown {
  font-size: 12px; line-height: 1;
  opacity: 0; transform: scale(.3) translateY(4px);
  transition: opacity .35s ease, transform .35s ease;
  filter: drop-shadow(0 0 3px rgba(255,201,60,.85));
}
.city-big .ucrown { font-size: 16px; }
.ucrown > span { display: inline-block; }
.ucrown.on > span { animation: ucrownBob 2.4s ease-in-out infinite; }
.ucrown.on { opacity: 1; transform: scale(1) translateY(0); }
/* 合并时小皇冠飞升合并成大皇冠 */
.city-mini.merging .ucrown, .city-big.merging .ucrown { animation: ucrownMerge .7s ease-in forwards; }

/* 全部单元背完：小皇冠飞升合并，大皇冠随房顶降到楼顶、三角尖顶插入皇冠 */
@keyframes ucrownMerge {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  55%  { opacity: 1; transform: translateY(-30px) scale(.7); }
  100% { opacity: 0; transform: translateY(-48px) scale(.16); }
}
.city-mini.merging .crown.show, .city-big.merging .crown.show {
  animation: crownLand .8s ease-out, crownBlink 1.4s ease-in-out .8s infinite alternate;
}
/* 大皇冠下降：起点更高，落点正好让三角尖顶插入皇冠下缘豁口 */
@keyframes crownLand {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-26px) scale(.5); }
  55%  { opacity: 1; transform: translateX(-50%) translateY(5px) scale(1.12); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes ucrownBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.07); }
}

.floors { display: flex; flex-direction: column-reverse; gap: 2px; }

.floor {
  width: 14px; height: 12px; border-radius: 2.5px;
  background-color: #121d3a;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 5px 6px;
  border: 1px solid rgba(255,255,255,.10);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: transform .08s;
}
.floor.big { width: 100%; height: 26px; border-radius: 4px; background-size: 11px 11px; }
.floor.A { --c: var(--pA); } .floor.B { --c: var(--pB); }
.floor.C { --c: var(--pC); } .floor.D { --c: var(--pD); }
.floor.G { --c: var(--pG); } .floor.W { --c: var(--pW); } .floor.F { --c: var(--pF); }
.floor.lit {
  background-color: var(--c);
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  box-shadow: 0 0 14px 1px var(--c), inset 0 0 7px rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.4);
}
.floor .flabel {
  font-size: 8px; font-weight: 700; color: rgba(255,255,255,.5);
  z-index: 1; white-space: nowrap; line-height: 1; padding: 0 1px;
  overflow: hidden; text-overflow: clip;
}
.floor.big .flabel { font-size: 11px; }
.floor.lit .flabel { color: #0d1430; }
.floor.clickable { cursor: pointer; }
.floor.clickable:hover { transform: scale(1.12); }
.unit-label { text-align: center; font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.city-mini .unit-label { font-size: 8px; margin-top: 3px; color: #8294bb; }

/* ---------- 弹窗（深色玻璃） ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(6, 10, 26, 0.62);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 18px; backdrop-filter: blur(3px);
}
/* 夜间关闭提示（0:00—6:00 家长端 / 学生端）：整屏遮罩 + 月亮卡片，不提供关闭按钮 */
.night-mask { background: rgba(4, 8, 20, .92); z-index: 9999; }
.night-card {
  width: 100%; max-width: 320px; text-align: center; padding: 30px 26px 26px;
  border-radius: 22px; border: 1px solid rgba(255, 212, 59, .35);
  background: linear-gradient(180deg, rgba(23, 32, 64, .96), rgba(12, 18, 38, .96));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.night-moon { font-size: 46px; line-height: 1; margin-bottom: 14px; animation: nightFloat 3.2s ease-in-out infinite; }
.night-card h2 { font-size: 17px; line-height: 1.6; margin: 0 0 8px; color: #f2f5ff; font-weight: 700; }
.night-card p { font-size: 13px; margin: 0; }
@keyframes nightFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .night-moon { animation: none; } }

.modal {
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px; width: 100%; max-width: 380px; color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: pop .2s ease;
  overscroll-behavior: contain;   /* 弹窗滚到尽头后不把滑动链式传给背后页面 */
  -webkit-overflow-scrolling: touch;   /* 老 iOS 上弹窗内 momentum 滚动 */
}
.modal.detail { max-width: 780px; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal.wide { max-width: 560px; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h2 { margin: 0 0 6px; font-size: 19px; }
.modal .muted { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.modal input[type=password], .modal input[type=text] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  font-size: 15px; outline: none; margin-bottom: 6px;
  background: rgba(255,255,255,.06); color: var(--ink);
}
.modal input:focus { border-color: var(--pG); }
.modal .err { color: var(--pA); font-size: 13px; margin: 4px 0 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.fl-logs-tip { margin: 4px 0 10px; font-size: 12px; }
.fl-edit-err { display: block; margin: 10px 0 0; color: #ff6b6b; font-size: 13px; }

/* ---------- 组长/课代表点亮被拦截：醒目常驻说明（取代一闪即逝的 toast） ---------- */
/* 童趣版「点不亮」说明卡片：大图标 + 柔和圆角 + 入场弹一下 */
.block-notice {
  max-width: 440px; text-align: center;
  border-color: rgba(255, 183, 94, .6); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 6px rgba(255,255,255,.04);
  animation: bnPop .28s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes bnPop { from { transform: scale(.86); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.block-notice .bn-ico {
  font-size: 56px; line-height: 1; margin-bottom: 6px;
  animation: bnFloat 2.4s ease-in-out infinite;
}
@keyframes bnFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.block-notice .bn-head { font-size: 19px; font-weight: 800; color: #ffd43b; margin: 0 0 12px; letter-spacing: .5px; }
.block-notice .bn-body { font-size: 14.5px; line-height: 1.75; color: #eef2ff; text-align: left; }
.block-notice .bn-reason { margin: 0 0 12px; }
.block-notice .bn-reason b { color: #ff9eb5; }
.block-notice .bn-ok { color: #8ce99a; font-weight: 700; }
.block-notice .bn-steps-title { margin: 0 0 6px; font-weight: 700; color: #ffd98a; }
.block-notice .bn-steps { margin: 0 0 4px; padding-left: 22px; }
.block-notice .bn-steps li { margin: 6px 0; }
.block-notice .bn-steps b { color: #8ce99a; }
.block-notice .bn-actions { display: flex; justify-content: center; margin-top: 18px; }
.block-notice .bn-actions #bnOk { min-width: 130px; font-size: 15px; padding: 10px 18px; border-radius: 999px; }

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.icon-btn {
  border: none; background: rgba(255,255,255,.1); width: 34px; height: 34px; border-radius: 10px;
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { background: rgba(255,255,255,.2); }
.detail-body { display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.pillar-wrap { flex: 1 1 380px; display: flex; justify-content: center; overflow: visible; }
.detail-side { flex: 1 1 240px; display: flex; flex-direction: column; gap: 16px; }

.stat-card {
  background: linear-gradient(135deg, rgba(77,171,247,.18), rgba(177,151,252,.18));
  border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center;
}
.stat-num { font-size: 26px; font-weight: 800; }
.stat-label { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.progress-track { height: 10px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--pD), var(--pG), var(--pW)); transition: width .4s; }
.stat-pct { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* ---------- 背诵明细（明文清单） ---------- */
.breakdown { flex: 1 1 100%; margin-top: 6px; }
.breakdown-head { font-size: 15px; font-weight: 600; color: #e8eefc; margin-bottom: 12px; }
.breakdown-head .muted { font-weight: 400; font-size: 13px; }
.unit-grid { display: flex; flex-direction: column; gap: 7px; }
.unit-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.04); }
/* 已整单元背完：折叠成一行「✓ U1 已背完」，把版面让给还没背的单元 */
.unit-row.unit-done { padding: 3px 8px; background: rgba(140,233,154,.07); }
.unit-row.unit-done .unit-tag { color: #8ce99a; }
.unit-row.unit-done .unit-done-txt { font-size: 12.5px; font-weight: 700; color: #8ce99a; }
.unit-tag { width: 38px; flex: 0 0 38px; font-weight: 700; color: #9fb3e6; font-size: 13px; }
.part-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; transition: background .15s; }
.part-chip.done { background: rgba(255,255,255,.08); color: #f2f5ff; }
.part-chip.todo { background: rgba(255,255,255,.05); color: #8a96b3; border-color: rgba(255,255,255,.12); }
.part-chip .mark { font-weight: 700; margin-right: 2px; }

/* 待背诵清单 */
.todo-summary { margin-bottom: 14px; line-height: 1.9; font-size: 13px; }
.todo-summary .ts-label { color: #ffa94d; font-weight: 600; }
.todo-summary .ts-item { display: inline-block; margin: 0 4px 0 0; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,138,76,.14); color: #ffc078; border: 1px solid rgba(255,138,76,.35); }
.todo-summary .all-done { color: #8ce99a; font-weight: 700; }

.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.legend .item { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.legend .dot { width: 16px; height: 16px; border-radius: 5px; flex: none; box-shadow: 0 0 8px 0 var(--c, transparent); }
.legend .dot.A { --c: var(--pA); background: var(--pA); }
.legend .dot.B { --c: var(--pB); background: var(--pB); }
.legend .dot.C { --c: var(--pC); background: var(--pC); }
.legend .dot.D { --c: var(--pD); background: var(--pD); }
.legend .dot.F { --c: var(--pF); background: var(--pF); }
.legend .dot.G { --c: var(--pG); background: var(--pG); }
.legend .dot.W { --c: var(--pW); background: var(--pW); }

/* ---------- 班级管理 / 检查背诵 弹窗 ---------- */
.modal.manage, .modal.check { max-width: 760px; max-height: 90vh; overflow-y: auto; }
.modal.check { max-width: 820px; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.manage-body { margin-top: 14px; }
.manage-list { display: flex; flex-direction: column; gap: 8px; }
.manage-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.04); }
.manage-name { font-weight: 600; flex: 1; }
.manage-count { color: var(--muted); font-size: 13px; margin-right: 4px; }
.manage-add { display: flex; gap: 8px; margin-top: 12px; }
.manage-add input { flex: 1; width: auto; margin-bottom: 0; }
.sep { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.import-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sel { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); font-size: 14px; margin-bottom: 8px; outline: none;
  color-scheme: light; }   /* 下拉弹窗走浅色外观，原生控件/未着色字也清晰 */
.sel:focus { border-color: var(--pG); }
/* 下拉弹窗里的待选项：原生列表多为浅底，若不显式给深色字，浅色 --ink 落在白底上几乎看不清 */
select option, select optgroup {
  color: #16223c;            /* 深藏青，浅底上清晰可读 */
  background: #ffffff;       /* 强制浅底，杜绝“浅字浅底” */
  font-weight: 600;
}
.si-role option { color: #16223c; background: #ffffff; }   /* 成绩面板的下拉同样处理 */
#rosterInput { width: 100%; min-height: 130px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); font-size: 14px; resize: vertical; font-family: inherit; outline: none; }
#rosterInput:focus { border-color: var(--pG); }
.import-row { display: flex; gap: 18px; margin: 10px 0; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.import-actions { display: flex; align-items: center; gap: 12px; }
.import-result { font-size: 13px; color: #8ce99a; }

/* ---------- 人员微调 ---------- */
.modal.fine-tune { max-width: 780px; max-height: 90vh; overflow-y: auto; }
.ft-body { margin-top: 14px; }
.ft-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; margin-top: 12px; }
.ft-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); }
.ft-name { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 150px; font-weight: 600; }
.ft-tx { font-size: 14px; }
.ft-role, .ft-group { width: auto; min-width: 112px; margin-bottom: 0; }
.ft-group:disabled { opacity: .45; }
@media (max-width: 560px) {
  .ft-item { flex-wrap: wrap; gap: 8px; }
  .ft-name { min-width: 100%; }
}

/* ---------- 背诵结构编辑（年级升高时改部分） ---------- */
.struct-box { margin-top: 2px; }
.struct-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.struct-row label { font-size: 14px; color: var(--muted); }
.struct-row .sel { width: 96px; margin-bottom: 0; }
.struct-row #structTotal { font-size: 13px; color: var(--pG); font-weight: 600; }
.struct-head, .struct-part { display: grid; grid-template-columns: 40px 1fr 78px 66px 100px; gap: 6px; align-items: center; }
.struct-head { font-size: 12px; color: var(--muted); padding: 0 4px 6px; }
.struct-parts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.struct-part { background: rgba(255,255,255,.04); border-radius: 10px; padding: 6px 4px; }
.struct-no { font-size: 12px; color: #9fb3e6; font-weight: 700; text-align: center; }
.struct-inp { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); font-size: 13px; outline: none; font-family: inherit; }
.struct-inp:focus { border-color: var(--pG); }
.struct-ops { display: flex; gap: 4px; justify-content: flex-end; }
.icon-btn.tiny { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.icon-btn.tiny:disabled { opacity: .3; cursor: not-allowed; }
.icon-btn.tiny.danger { color: #ff6b6b; }
.struct-tip { font-size: 12.5px; line-height: 1.7; margin-top: 10px; }
.struct-tip strong { color: var(--pG); }
@media (max-width: 560px) {
  .struct-head, .struct-part { grid-template-columns: 34px 1fr 58px 50px 84px; gap: 4px; }
  .struct-inp { padding: 5px 6px; font-size: 12px; }
}

/* ---------- 今日复习（遗忘曲线） ---------- */
.due-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px;
  padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 700;
  background: rgba(255,159,67,.18); color: #ffd8a8; border: 1px solid rgba(255,159,67,.4); }
.btn.ghost.hot { border-color: rgba(255,159,67,.55); color: #ffd8a8; background: rgba(255,159,67,.14); }
.btn.ghost.hot:hover { background: rgba(255,159,67,.22); }
.btn.primary.hot { box-shadow: 0 0 0 2px rgba(255,159,67,.8), 0 0 14px rgba(255,159,67,.45); }
.rv-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.rv-top .sel { width: auto; min-width: 140px; margin: 0; }
.rv-stat { font-size: 13px; color: var(--muted); }
.rv-stat b { color: #ffa94d; }
.rv-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rv-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.rv-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  background: rgba(255,255,255,.04); border-radius: 12px; }
.rv-who { min-width: 92px; font-weight: 600; font-size: 14px; }
.rv-who small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }
.rv-keys { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.rv-key { padding: 2px 9px; border-radius: 8px; font-size: 12px;
  background: rgba(255,159,67,.14); color: #ffd8a8; border: 1px solid rgba(255,159,67,.3); }
.rv-btn { flex-shrink: 0; }
/* 三段统计条 */
.rv-sum { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rv-s { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.rv-s b { font-size: 13px; margin-left: 2px; }
.rv-s.ov { color: #ffb3b3; background: rgba(255,95,109,.12); border-color: rgba(255,95,109,.32); }
.rv-s.td { color: #ffd8a8; background: rgba(255,159,67,.12); border-color: rgba(255,159,67,.32); }
.rv-s.nx { color: #b7f5d8; background: rgba(94,234,212,.12); border-color: rgba(94,234,212,.3); }
/* 三段任务标签 */
.rv-key.ov { background: rgba(255,95,109,.16); color: #ffc9c9; border-color: rgba(255,95,109,.38); }
.rv-key.td { background: rgba(255,159,67,.14); color: #ffd8a8; border-color: rgba(255,159,67,.3); }
.rv-key.nx { background: rgba(94,234,212,.12); color: #b7f5d8; border-color: rgba(94,234,212,.28); }
.rv-key b { font-weight: 800; margin-right: 5px; opacity: .85; }
.rv-key i { font-style: normal; margin-left: 5px; font-size: 11px; opacity: .8; }
.rv-hint { flex: 1 1 100%; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rv-acts { display: flex; gap: 6px; flex-shrink: 0; }
.rv-item.rv-idle { opacity: .72; }
.rv-idle-tip { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rv-check { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.rv-check input { width: 15px; height: 15px; accent-color: var(--gold, #ffcf6b); }
.rv-empty { padding: 24px 10px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.8; }

/* ---------- 组长纸条（A4 一页 8 张，裁剪后发给组长） ---------- */
.modal.slip { max-width: 760px; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.slip-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 62vh; overflow: auto; }
.slip {
  border: 1px dashed rgba(255,255,255,.22); border-radius: 10px;
  padding: 8px 10px; background: rgba(255,255,255,.03); page-break-inside: avoid;
}
.slip-head { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--line);
  padding-bottom: 5px; margin-bottom: 6px; }
.slip-head b { font-size: 14px; }
.slip-head span { font-size: 11.5px; color: var(--muted); flex: 1; }
.slip-head i { font-style: normal; font-size: 11px; color: var(--muted); }
.slip-tick { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.cls-slip-btn { margin-left: auto; }
.slip-list { display: flex; flex-direction: column; gap: 5px; }
.slip-row { display: flex; align-items: flex-start; gap: 6px; }
.slip-no {
  flex-shrink: 0; width: 17px; height: 17px; line-height: 17px; text-align: center;
  font-size: 10.5px; border-radius: 50%; background: rgba(255,255,255,.1);
}
.slip-name { flex-shrink: 0; min-width: 52px; font-size: 12.5px; font-weight: 700; }
.slip-keys { display: flex; flex-wrap: wrap; gap: 3px; flex: 1; }
.slip-chip { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.slip-chip.ov { color: #ffc9c9; background: rgba(255,95,109,.14); border-color: rgba(255,95,109,.34); }
.slip-chip.td { color: #ffd8a8; background: rgba(255,159,67,.12); border-color: rgba(255,159,67,.3); }
.slip-chip.nx { color: #b7f5d8; background: rgba(94,234,212,.1); border-color: rgba(94,234,212,.26); }
.slip-chip.more { color: var(--muted); }
.slip-check { flex-shrink: 0; font-size: 10.5px; color: var(--muted); letter-spacing: -.5px; }
.slip-foot { margin-top: 6px; padding-top: 5px; border-top: 1px dotted var(--line);
  font-size: 10px; color: var(--muted); line-height: 1.5; }
@media (max-width: 620px) { .slip-body { grid-template-columns: 1fr; } }

@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body.printing-slip > *:not(#slipMask) { display: none !important; }
  body.printing-slip #slipMask {
    position: static !important; display: block !important; background: #fff !important;
    padding: 0 !important; backdrop-filter: none !important;
  }
  body.printing-slip #slipMask .modal.slip {
    max-width: none !important; max-height: none !important;
    box-shadow: none !important; border: none !important;
    background: #fff !important; padding: 0 !important; color: #000 !important;
  }
  body.printing-slip #slipMask .detail-head { display: none !important; }
  body.printing-slip .slip-body {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 4mm !important; max-height: none !important; overflow: visible !important;
  }
  body.printing-slip .slip {
    border: 1px dashed #888 !important; background: #fff !important; color: #000 !important;
    break-inside: avoid; page-break-inside: avoid;
  }
  body.printing-slip .slip-head { border-bottom: 1px solid #999 !important; }
  body.printing-slip .slip-head b,
  body.printing-slip .slip-name { color: #000 !important; }
  body.printing-slip .slip-head span,
  body.printing-slip .slip-head i,
  body.printing-slip .slip-no,
  body.printing-slip .slip-check,
  body.printing-slip .slip-foot { color: #444 !important; }
  body.printing-slip .slip-chip {
    border: 1px solid #999 !important; color: #000 !important; background: none !important;
  }
  body.printing-slip .slip-foot { border-top: 1px dotted #999 !important; }
}
.rv-cfg { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.rv-cfg label { color: var(--muted); }
.rv-cfg input { width: 120px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); font-size: 13px; outline: none; font-family: inherit; }
.rv-cfg input:focus { border-color: var(--pG); }
.rv-tip { flex: 1 1 100%; font-size: 12px; line-height: 1.7; }
/* 详情弹窗里的今日复习条 */
.rev-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px;
  padding: 9px 12px; border-radius: 12px;
  background: rgba(255,159,67,.1); border: 1px solid rgba(255,159,67,.28); font-size: 13px; }
.rev-strip .rv-key { background: rgba(255,159,67,.2); }
.rev-strip .lbl { color: #ffd8a8; font-weight: 600; }

/* ---------- 📌 今日目标条：像早读黑板一样置顶，写清「今天背哪一格」 ---------- */
.goal-strip, .goal-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0 2px; padding: 11px 14px; border-radius: 12px; font-size: 14px;
  background: linear-gradient(90deg, rgba(94,234,212,.14), rgba(129,140,248,.14));
  border: 1px solid rgba(94,234,212,.4); }
.goal-strip .g-ico, .goal-banner .g-ico { font-size: 17px; }
.goal-strip .g-lbl, .goal-banner .g-lbl { color: var(--muted); font-weight: 600; }
.goal-strip .g-target, .goal-banner .g-target { color: #5eead4; font-weight: 800; font-size: 16px; }
.goal-strip .g-note, .goal-banner .g-note { color: #ffe066; font-size: 12.5px; font-weight: 700; }
.goal-strip .g-mine, .goal-banner .g-mine { margin-left: auto; font-weight: 700; }
.goal-strip .g-mine.yes, .goal-banner .g-mine.yes { color: #8ce99a; }
.goal-strip .g-mine.no, .goal-banner .g-mine.no { color: #ffd43b; }
.goal-strip .g-prog, .goal-banner .g-prog { margin-left: auto; color: var(--muted); font-size: 13px; }
.goal-banner { margin: 0 0 12px; }
@media (max-width: 560px) {
  .goal-strip, .goal-banner { font-size: 13px; }
  .goal-strip .g-target, .goal-banner .g-target { font-size: 15px; }
}
/* 教室大屏：目标条再大一号，最后一排也看得见 */
body.kiosk .goal-banner { font-size: 18px; padding: 14px 18px; }
body.kiosk .goal-banner .g-target { font-size: 22px; }

/* ---------- 📢 背诵方式说明（家长端 + 教室端都展示，第一百一十节应老师要求加回教室端） ----------
   两种背书途径讲清楚：① 在校走链条——组员找组长、组长找课代表、课代表找老师，一级一级过关；
   ② 回家后把录好的背诵视频发老师，时间要在晚上 9 点前，9 点后发的老师明天看。
   默认白字，重点短语（晚上9点前 / 明天会看）用黄色 rt-key 突出。 */
.recite-tips {
  margin: 12px 0 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 212, 59, .07); border: 1px solid rgba(255, 212, 59, .28);
  font-size: 13.5px; line-height: 1.7; color: var(--ink);
}
/* 教室大屏投屏：字放大一档，学生站在屏前也看得清 */
body.kiosk .recite-tips { font-size: 16px; }
body.kiosk .recite-tips .rt-head { font-size: 18px; }
.recite-tips .rt-head { font-weight: 800; font-size: 14.5px; color: #ffd98a; }
.recite-tips .rt-ico { margin-right: 6px; }
.recite-tips .rt-row { display: flex; gap: 8px; margin-top: 6px; }
.recite-tips .rt-no { flex: 0 0 auto; font-weight: 800; color: #ffd43b; }
.recite-tips .rt-txt { flex: 1 1 auto; min-width: 0; color: #fff; }
.recite-tips .rt-txt b { color: #fff; font-weight: 700; }
.recite-tips .rt-key { color: #ffe14d; font-weight: 700; }

/* 🌈 彩虹夸夸：完成今日目标后，在目标条下方独立一行蹦出一句 */
.goal-praise-row { display: flex; justify-content: center; margin: 6px 0 2px; }
.goal-praise-row[hidden] { display: none; }
.g-praise { display: inline-flex; }
.g-praise-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 15px; border-radius: 999px;
  font-size: 13.5px; font-weight: 800; line-height: 1.6; letter-spacing: .2px;
  border: 1.5px solid transparent;
  /* 双层背景：内层深色玻璃做底，外层彩虹渐变只透出 1.5px 边框 */
  background:
    linear-gradient(rgba(9,14,32,.9), rgba(9,14,32,.9)) padding-box,
    linear-gradient(90deg,#ff6b6b,#ffa94d,#ffd43b,#69db7c,#4dabf7,#b197fc,#ff6b6b) border-box;
  box-shadow: 0 6px 18px rgba(0,0,0,.26);
  animation: praiseIn .5s cubic-bezier(.16,1.3,.3,1) both;
}
.g-praise-pill b {
  background: linear-gradient(90deg,#ff9ec7,#ffc978,#ffef9a,#a8f0b0,#8fd3ff,#d2bcff,#ff9ec7);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #ffd43b;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.14));
  animation: rainbowFlow 5s linear infinite;
}
@keyframes rainbowFlow {
  from { background-position: 0 0; }
  to   { background-position: 300% 0; }
}
@keyframes praiseIn {
  0%   { opacity: 0; transform: scale(.65) translateY(6px); }
  60%  { opacity: 1; transform: scale(1.06) translateY(0); }
  100% { opacity: 1; transform: scale(1); }
}
@media (max-width: 560px) {
  .g-praise-pill { font-size: 12.5px; padding: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-praise-pill, .g-praise-pill b { animation: none; }
}
/* ---------- 🌸 小红花 + 心愿单 ---------- */
.flower-card { margin: 12px 0; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,107,107,.11), rgba(255,212,59,.09));
  border: 1px solid rgba(255,212,59,.3); }
.flower-card .fc-head { font-size: 13px; color: var(--muted); display: flex; align-items: baseline; gap: 6px; }
.flower-card .fc-num { font-size: 26px; font-weight: 800; color: #ffd43b; line-height: 1.1; }
.flower-card .fc-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); margin: 8px 0 6px; overflow: hidden; }
.flower-card .fc-fill { height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg,#ff6b6b,#ffd43b); transition: width .35s ease; }
.flower-card .fc-next { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.flower-card .fc-wish { font-size: 12.5px; margin: 2px 0; color: var(--ink); line-height: 1.5; }
.flower-card .fc-wish b { color: #ffd43b; }
.flower-card .fc-wish .none { color: var(--muted); font-weight: 400; }
.flower-card .fc-wish.reached .fc-wn { color: #8ce99a; }
/* 心愿没填时的引导条：显眼但不吓人，家长点一下就能去写 */
.flower-card .fc-guide { margin-top: 8px; padding: 7px 10px; border-radius: 10px; font-size: 12.5px;
  background: rgba(255,169,77,.14); border: 1px dashed rgba(255,169,77,.45); color: #ffd8a8; }
.flower-card .fc-guide:hover { background: rgba(255,169,77,.22); }
.flower-card .fc-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.flower-card .fc-btns .btn { flex: 1 1 auto; }
/* 🌸 小红花墙：把总数画成一朵朵小红花贴纸（干净版，不加角标） */
.fw-wall { margin: 10px 0 2px; }
.fw-h { font-size: 13px; color: #ff7a8a; font-weight: 700; margin-bottom: 6px; }
.fw-h .fw-n { color: #e0243c; font-size: 16px; margin: 0 1px; }
.fw-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 7px; }
.fw-li { font-size: 11px; color: #9aa0a6; display: inline-flex; align-items: center; line-height: 1.4; }
.fw-dot { width: 9px; height: 9px; border-radius: 50%; margin-right: 3px; display: inline-block; flex: none; }
.fw-grid { display: flex; flex-wrap: wrap; gap: 3px 4px; align-content: flex-start;
  max-height: 220px; overflow-y: auto; padding: 6px 5px 8px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,212,59,.18); }
.fw-f { position: relative; width: 24px; height: 24px;
  opacity: 0; transform: scale(.2); animation: fwBloom .45s cubic-bezier(.2,1.5,.45,1) forwards; }
.fw-svg { width: 24px; height: 24px; display: block; }
.fw-empty { color: #b0b6bd; font-size: 13px; padding: 8px 2px; }
.fw-more { width: 100%; text-align: center; color: #9aa0a6; font-size: 11px; padding: 5px 0 1px; }
/* 内容可下滑时：底部渐隐 + 右下角下滑箭头，提示「下面还有」 */
.fw-wall.fw-scroll .fw-grid {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
}
.fw-wall.fw-scroll .fw-h::after {
  content: " ↓ 下滑看更多"; font-size: 11px; font-weight: 400; color: #9aa0a6; }
@keyframes fwBloom { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); }
  65% { transform: scale(1.14) rotate(5deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) {
  .fw-f { animation: none; opacity: 1; transform: none; }
}
/* 登记弹窗 */
.modal.flower { max-width: 460px; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal.flower.rank { max-width: 560px; }
.fl-total { text-align: center; font-size: 34px; font-weight: 800; color: #ffd43b; line-height: 1.1; }
.fl-total small { font-size: 14px; color: var(--muted); font-weight: 600; }
.fl-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.1); margin: 8px 0 6px; overflow: hidden; }
.fl-bar > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg,#ff6b6b,#ffd43b); transition: width .35s; }
.fl-next { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.fl-sec-title { font-size: 13px; color: var(--muted); font-weight: 700; margin: 16px 0 8px; }
.fl-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.fl-chips .chip { padding: 6px 13px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--ink); }
.fl-chips .chip.on { background: rgba(255,212,59,.22); border-color: #ffd43b; color: #ffd43b; font-weight: 700; }
.fl-note-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fl-note-label { font-size: 13px; color: var(--muted); }
.fl-note-row .fl-chips { flex: 1 1 220px; }
.modal.flower .btn.primary { width: 100%; margin-top: 14px; font-size: 15px; }
.fl-wish-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fl-wish-row .fl-wish-n { flex: 0 0 58px; font-size: 13px; font-weight: 700; color: #ffd43b; }
.fl-wish-row input { flex: 1; }
.fl-rules { margin: 8px 0 10px; font-size: 12px; color: var(--muted); }
.fl-rules summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.fl-rules ol { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }
/* 心愿填写要求：写具体，别写「少写作业」这种 */
.fl-wish-tip { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px;
  line-height: 1.7; color: var(--muted); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); }
.fl-wish-tip b { color: var(--ink); }
.fl-wish-tip .fg-warn { color: #ffa94d; }
.fl-wish-row .fdone { flex: 0 0 auto; font-size: 11.5px; padding: 2px 9px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--muted); }
.fl-wish-row .fdone.on { border-color: rgba(140,233,154,.5); color: #8ce99a; background: rgba(140,233,154,.12); }
.fl-imp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.modal.flower.rank textarea { width: 100%; min-height: 96px; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink);
  font-size: 13px; font-family: inherit; resize: vertical; }
.fl-logs { max-height: 180px; overflow-y: auto; margin-top: 4px; }
/* 🌸 登记动态铃铛（与留言铃铛同款，未读时高亮） */
.msg-bell.flower-bell .bell-ico { font-size: 17px; }
.fl-logs .log-row.unread { background: rgba(255,212,59,.10); border-radius: 8px; }
.modal.flower.news .fl-logs { max-height: 210px; }
.fl-logs .log-row { display: flex; align-items: center; gap: 8px; padding: 6px 2px;
  border-bottom: 1px dashed rgba(255,255,255,.08); font-size: 13px; }
.fl-logs .log-row .lq { color: #ffd43b; font-weight: 700; flex: 0 0 auto; }
.fl-logs .log-row .ln { color: var(--muted); flex: 1; }
.fl-logs .log-row .lt { color: var(--muted); font-size: 11.5px; flex: 0 0 auto; }
.fl-logs .log-row .lundo { flex: 0 0 auto; font-size: 11.5px; padding: 2px 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--muted); cursor: pointer; }
.fl-logs .log-row .lundo:hover { color: #ff8787; border-color: rgba(255,135,135,.5); }
.rank-list .log-row { padding: 7px 2px; }
.rank-list .lq { min-width: 46px; text-align: right; }
.wish-card { border-color: rgba(255,143,171,.6); }
.wish-card h2 { color: #ffa8c0; }
/* ---------- 🎉 单元通关庆祝：提醒去 Miss Yang 那里过关领 6 朵小红花 ---------- */
.pass-card { width: min(90vw, 380px); padding: 26px 22px 22px; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, #23204a, #171a38 60%, #14162e);
  border: 2px solid rgba(255,209,102,.55); box-shadow: 0 18px 50px rgba(0,0,0,.55);
  animation: passPop .38s cubic-bezier(.2,1.4,.4,1) both; }
.pass-card .pass-emoji { font-size: 46px; line-height: 1; margin-bottom: 6px;
  animation: passBounce .9s ease-in-out 2; }
.pass-card h2 { margin: 6px 0 4px; font-size: 22px; color: #ffd43b; }
.pass-card .pass-sub { font-size: 15px; color: var(--ink); font-weight: 700; margin-bottom: 14px; }
.pass-card .pass-tip { padding: 12px 10px; border-radius: 12px; line-height: 1.75; font-size: 14px;
  background: rgba(255,255,255,.06); border: 1px dashed rgba(255,255,255,.18); color: var(--ink); }
.pass-card .pass-tip .hl { color: #ff8787; font-size: 17px; }
.pass-card .pass-slogan { margin: 14px 0 16px; font-size: 15px; font-weight: 800; color: #ffd43b; }
/* 渐变只作用在文字 span 上：直接给整块加 background-clip:text 会把后面的 emoji 变成方块 */
.pass-card .pass-slogan .ps-grad { background: linear-gradient(90deg,#ff6b6b,#ffd43b,#69db7c,#4dabf7,#b197fc);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.pass-card .btn { width: 100%; font-size: 15px; }
@keyframes passPop { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes passBounce { 0%,100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-9px) rotate(6deg); } }
/* 教室大屏：待过关领花横幅（正向催促，不点名批评） */
.pass-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px;
  background: linear-gradient(90deg, rgba(255,209,102,.16), rgba(255,107,107,.14));
  border: 1px solid rgba(255,209,102,.42); }
.pass-banner .pb-ico { font-size: 18px; }
.pass-banner .pb-txt { color: #ffe066; font-weight: 700; }
.pass-banner .pb-names { color: var(--ink); font-size: 13px; }
.pass-banner .pb-names b { color: #ffd43b; }
body.kiosk .pass-banner { font-size: 17px; padding: 14px 18px; }
body.kiosk .pass-banner .pb-names { font-size: 16px; }

/* ---------- 📌 今日目标设置弹窗 ---------- */
.modal.goal {
  max-width: 520px; max-height: 90vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;   /* 手机上弹窗超高时内部可滚，底部按钮够得着 */
}
.goal-cur { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(94,234,212,.08); border: 1px dashed rgba(94,234,212,.35); font-size: 14px; }
.goal-cur .gc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.goal-cur .gc-target { color: #5eead4; font-weight: 800; font-size: 17px; }
.goal-cur .gc-stat { color: var(--muted); font-size: 13px; }
.goal-cur .gc-empty { color: var(--muted); }
.goal-cur .gc-name { font-weight: 700; min-width: 64px; }
.goal-cur .gc-none { color: var(--muted); font-size: 13px; }
/* 班级多选 chips */
.goal-classes { margin-bottom: 4px; }
.goal-classes .gc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.goal-classes .gc-chip { padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--ink); }
.goal-classes .gc-chip:hover { border-color: rgba(94,234,212,.5); }
.goal-classes .gc-chip.on { background: rgba(94,234,212,.22);
  border-color: #5eead4; color: #5eead4; font-weight: 700; }
.goal-classes .gc-sel-ops { display: flex; gap: 6px; margin-top: 6px; }
.goal-pick-label { font-size: 13px; color: var(--muted); margin: 10px 0 6px; font-weight: 600; }
.goal-units, .goal-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.goal-units .gu, .goal-parts .gp { padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--ink); }
.goal-units .gu:hover, .goal-parts .gp:hover { border-color: rgba(94,234,212,.5); }
.goal-units .gu.on, .goal-parts .gp.on { background: rgba(94,234,212,.22);
  border-color: #5eead4; color: #5eead4; font-weight: 700; }
.goal-note-row { margin-top: 14px; }
.goal-note-row input { width: 100%; }
.goal-preview { margin-top: 12px; padding: 10px 12px; border-radius: 10px; text-align: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  font-size: 14px; color: var(--muted); }
.goal-preview.has { color: #5eead4; font-weight: 800; font-size: 17px; }
.goal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- 👀 家长关注统计弹窗 ---------- */
/* 弹窗限高 + 标题/工具栏固定、内容区滚动：小屏和手机上也看得全、划得动
   （以前没限高，flex 居中直接把顶部裁掉、还没法滑动） */
.modal.view-stats {
  max-width: 720px;
  max-height: calc(100vh - 36px);        /* modal-mask 上下 padding 各 18px */
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.view-stats .detail-head { flex: 0 0 auto; }
.modal.view-stats .review-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.vs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.vs-card {
  padding: 12px 14px; border-radius: 12px; text-align: center;
  background: rgba(94,234,212,.07); border: 1px solid rgba(94,234,212,.28);
}
.vs-card-name { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.vs-card-num { font-size: 30px; font-weight: 900; color: #5eead4; line-height: 1.1; }
.vs-card-num span { font-size: 13px; font-weight: 600; color: var(--muted); }
.vs-card-sub { font-size: 12.5px; color: var(--ink); margin-top: 3px; }
.vs-card-unseen { font-size: 12px; color: #f0a35e; margin-top: 2px; }
.vs-sec-title { font-size: 13px; color: var(--muted); font-weight: 600; margin: 4px 0 8px; }
.vs-trend { margin-bottom: 16px; }
.vs-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.vs-row.today .vs-row-lab { color: #5eead4; font-weight: 800; }
.vs-row-lab { flex: 0 0 64px; font-size: 12.5px; color: var(--muted); text-align: right; }
.vs-cell {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.05); border-radius: 6px; padding: 3px 6px;
}
.vs-bar {
  display: block; height: 8px; border-radius: 4px; min-width: 2px;
  background: linear-gradient(90deg, #2dd4bf, #5eead4);
}
.vs-cell-num { font-size: 12px; color: var(--ink); white-space: nowrap; }
.vs-row-sum { flex: 0 0 62px; font-size: 12px; color: var(--muted); text-align: right; }
.vs-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.vs-select {
  background: rgba(255,255,255,.06); color: var(--ink); font-size: 13px;
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
}
.vs-scope { display: inline-flex; gap: 6px; }
.vs-scope .btn.on { background: rgba(94,234,212,.2); border-color: #5eead4; color: #5eead4; font-weight: 700; }
.vs-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.vs-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 10px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06); font-size: 13.5px;
}
.vs-item.seen { border-color: rgba(94,234,212,.35); background: rgba(94,234,212,.07); }
.vs-item.warm { border-color: rgba(255,201,60,.25); }
.vs-item.unseen { opacity: .62; }
.vs-item-name { font-weight: 700; min-width: 64px; }
.vs-item-cls { color: var(--muted); font-size: 12px; min-width: 58px; }
.vs-item-stat { margin-left: auto; color: var(--ink); font-size: 12.5px; text-align: right; }
.vs-item.seen .vs-item-stat { color: #5eead4; }
@media (max-width: 560px) {
  .vs-cards { grid-template-columns: 1fr; }
  .vs-item { flex-wrap: wrap; }
  .vs-item-stat { margin-left: 0; width: 100%; }
}

/* ---------- 👤 家长身份绑定 ---------- */
.detail-bind {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 10px; font-size: 12.5px;
  background: rgba(94,234,212,.07); border: 1px dashed rgba(94,234,212,.35);
  color: var(--ink);
}
.detail-bind b { color: #5eead4; }
.modal.view-bind { max-width: 460px; max-height: calc(100vh - 36px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.vb-row { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.vb-row .vs-select { flex: 1 1 160px; }
/* 绑定弹窗：多选孩子 chips（一家多个孩子都选上） */
.vb-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; margin: 8px 0 4px; }
.vb-chip {
  border: 1px solid rgba(148,163,184,.35); background: rgba(148,163,184,.08);
  color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
}
.vb-chip:hover { border-color: #5eead4; }
.vb-chip.on { background: rgba(94,234,212,.18); border-color: #5eead4; color: #5eead4; font-weight: 600; }
.vb-picked { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.vb-picked b { color: #5eead4; }
/* ---------- 🐾 宠物积分 ---------- */
/* 家长端宠物卡（只读）：和红花卡并排的紫色系，一眼分得清 */
.pet-card {
  margin: 12px 0; padding: 12px 14px; border-radius: 14px;
  background: rgba(167,139,250,.07); border: 1px solid rgba(167,139,250,.22);
}
.pet-card .pet-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); }
.pet-card .pet-head b { font-size: 14.5px; }
.pet-emoji { font-size: 30px; line-height: 1; background: none; border: none; cursor: default; padding: 0; }
button.pet-emoji { cursor: pointer; }
/* 成长阶段光环：越高级越亮越艳（8 级同物种进化——尺寸在 JS 里按等级放大） */
.pet-emoji.s1 { filter: drop-shadow(0 0 6px rgba(94,234,212,.55)); }
.pet-emoji.s2 { filter: drop-shadow(0 0 8px rgba(255,207,107,.65)); }
.pet-emoji.s3 { filter: drop-shadow(0 0 12px rgba(255,143,171,.85)); }
.pet-emoji.s4 { filter: drop-shadow(0 0 8px rgba(167,139,250,.75)); }
.pet-emoji.s5 { filter: drop-shadow(0 0 9px rgba(77,171,247,.8)); }
.pet-emoji.s6 { filter: drop-shadow(0 0 10px rgba(255,146,76,.85)) drop-shadow(0 0 16px rgba(255,212,59,.35)); }
.pet-emoji.s7 { filter: drop-shadow(0 0 10px rgba(255,212,59,.95)) drop-shadow(0 0 18px rgba(255,107,203,.6)) drop-shadow(0 0 26px rgba(94,234,212,.4)); }
/* 「Lv.N」徽章：满级皇冠 + 金粉渐变 */
.pet-lv {
  display: inline-block; font-size: 10.5px; font-weight: 800; line-height: 1;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  background: rgba(167,139,250,.16); color: #c4b5fd;
  border: 1px solid rgba(167,139,250,.38); vertical-align: 2px;
}
.pet-lv.max {
  background: linear-gradient(90deg, rgba(255,212,59,.28), rgba(255,107,203,.28));
  color: #ffd43b; border-color: rgba(255,212,59,.55);
}
/* 升级横幅：挂在 chip 等定位容器上，1.7s 自动清 */
@keyframes pet-lv-rise {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); }
  18% { opacity: 1; transform: translate(-50%, -2px) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -10px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -22px) scale(1); }
}
.pet-levelup {
  position: absolute; left: 50%; top: -8px; z-index: 5;
  font-size: 12.5px; font-weight: 800; white-space: nowrap;
  padding: 3px 11px; border-radius: 999px; color: #fff; pointer-events: none;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
  box-shadow: 0 4px 14px rgba(236,72,153,.4);
  animation: pet-lv-rise 1.7s ease-out forwards;
}
.pet-levelup.max { background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6); }
/* 教室大卡：8 级进化链 */
.ppk-evo { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 10px 0 2px; }
.ppk-evo-i {
  font-size: 10.5px; color: var(--muted); line-height: 1.5;
  border: 1px solid rgba(148,163,184,.25); border-radius: 999px; padding: 2px 8px;
}
.ppk-evo-i.on { color: #c4b5fd; border-color: rgba(167,139,250,.45); }
.ppk-evo-i.cur {
  color: #fff; font-weight: 800; border-color: transparent;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}
/* 家长卡：起名提示行 */
.pet-rename-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.pet-card .pp-stage, .pp-stage {
  font-size: 11.5px; color: #c4b5fd; border: 1px solid rgba(167,139,250,.4);
  border-radius: 999px; padding: 1px 8px;
}
.pet-info { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pet-info b { color: #ffd43b; }
.pet-fill { background: linear-gradient(90deg, #a78bfa, #5eead4); }
.pet-logs-h { font-size: 12px; color: var(--muted); margin: 8px 0 4px; font-weight: 600; }
.pet-redeem { font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.pet-redeem.pending { color: #ffd43b; }
.pet-redeem.given { color: #8ce99a; }
.pet-redeem.canceled { color: var(--muted); text-decoration: line-through; }
/* 老师端发分面板：限高 + 头尾固定 + 中间滚（跟家长关注统计弹窗一个路子） */
.modal.pet-panel {
  max-width: 560px; max-height: calc(100vh - 36px);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.pet-panel .detail-head { flex: 0 0 auto; }
.pet-tabs { display: flex; gap: 8px; padding: 10px 22px 0; flex: 0 0 auto; }
.pet-tabs .pp-tab.on { background: rgba(167,139,250,.2); border-color: #a78bfa; color: #c4b5fd; }
.pet-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 12px 22px 22px; -webkit-overflow-scrolling: touch;
}
.pp-tpl { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pp-chips { max-height: 150px; }
/* 发分动效（飘字/爆发圈）要挂在 chip 上，得给定位上下文 */
.pp-chips .vb-chip { position: relative; }
.pp-chips .vb-chip .pet-emoji { vertical-align: -2px; margin-right: 2px; }
.pp-picked { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.pp-picked b { color: #5eead4; }
.pp-row { display: flex; gap: 8px; margin: 8px 0; }
.pp-delta { width: 84px; flex: 0 0 auto; }
.pp-logs-h { font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.pp-log { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.pp-log .btn { margin-left: auto; }
.pp-log-d { font-weight: 800; min-width: 30px; }
.pp-log-d.up { color: #8ce99a; }
.pp-log-d.down { color: #ff8787; }
.pp-rank-hint { font-size: 12px; margin-bottom: 10px; }
.pp-rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.pp-rank-row.top { background: rgba(255,207,107,.07); }
.pp-rank-row + .pp-rank-row { border-top: 1px solid var(--line); }
.pp-rank-no { width: 26px; text-align: center; font-size: 13px; color: var(--muted); flex: 0 0 auto; }
.pp-rank-mid { flex: 1; min-width: 0; font-size: 13px; }
.pp-rank-mid .muted { font-size: 11.5px; margin-top: 2px; }
.pp-rank-pend { font-size: 11.5px; color: #ffd43b; }
/* 待发花清单里的「宠物兑换」分区 + 汇总行 */
.aw-sec.pet { border-left: 3px solid #a78bfa; }
.aw-sum .aw-pet, .aw-sum .aw-pet b { color: #c4b5fd; }
@media (max-width: 620px) {
  .pet-tabs { padding-left: 14px; padding-right: 14px; }
  .pet-body { padding-left: 14px; padding-right: 14px; }
  .pp-row { flex-wrap: wrap; }
}

/* ---------- 🐾 宠物动态动画体系（摇摆/呼吸/光环/跳/飘字/爆发/撒花/流光） ---------- */
@keyframes pet-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@keyframes pet-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@keyframes pet-hop {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-14px) scale(1.12); }
  55% { transform: translateY(0) scale(.93); }
  75% { transform: translateY(-4px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pet-pop {
  0% { transform: scale(.3); opacity: 0; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes pet-egg-shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-9deg); }
  40% { transform: rotate(9deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(6deg); }
}
@keyframes pet-burst {
  0% { transform: scale(.6); opacity: .95; }
  100% { transform: scale(2.8); opacity: 0; }
}
@keyframes pet-float-up {
  0% { transform: translate(-50%, 4px); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate(-50%, -48px); opacity: 0; }
}
@keyframes pet-shine {
  0% { background-position: -160% 0; }
  100% { background-position: 260% 0; }
}
@keyframes pet-pend-pulse {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.18); opacity: 1; }
}
@keyframes pet-confetti-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(760deg); opacity: .85; }
}
/* emoji 动画组件：待机摇摆（蛋阶段是摇晃）、阶段光环沿用 s0-s3 */
.pet-emoji.anim { display: inline-block; transform-origin: 50% 82%; }
.pet-emoji.anim.s0 { animation: pet-egg-shake 2.6s ease-in-out infinite; }
.pet-emoji.anim:not(.s0) { animation: pet-sway 3.2s ease-in-out infinite; }
/* 临时动作类（JS 加上、动画结束后移除，避免覆盖待机动画） */
.pet-emoji.anim.hop { animation: pet-hop .55s cubic-bezier(.28,.84,.42,1); }
.pet-emoji.anim.pop { animation: pet-pop .5s cubic-bezier(.28,.84,.42,1); }
/* 进度条流光 */
.pet-bar { position: relative; overflow: hidden; }
.pet-bar .pet-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 18%, rgba(255,255,255,.55) 50%, transparent 82%);
  background-size: 240% 100%;
  animation: pet-shine 2.6s linear infinite;
}
/* 跨档光环爆发圈（在 emoji 中心扩散） */
.pet-burst-ring {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px;
  margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none;
  border: 3px solid rgba(255,212,59,.95);
  box-shadow: 0 0 20px 5px rgba(255,212,59,.55), inset 0 0 14px rgba(255,212,59,.4);
  animation: pet-burst .75s ease-out forwards;
}
.pet-burst-ring.b2 {
  border-color: rgba(94,234,212,.95);
  box-shadow: 0 0 20px 5px rgba(94,234,212,.5), inset 0 0 14px rgba(94,234,212,.4);
  animation-delay: .14s;
}
/* 发分 +N 飘字 */
.pet-float {
  position: absolute; left: 50%; top: -4px; z-index: 5;
  font-size: 15px; font-weight: 800; color: #ffd43b;
  text-shadow: 0 1px 6px rgba(0,0,0,.65); pointer-events: none; white-space: nowrap;
  animation: pet-float-up .95s ease-out forwards;
}
/* 盖章撒花（全屏粒子层，JS 生成后自动移除） */
.pet-confetti { position: fixed; inset: 0; z-index: 3000; pointer-events: none; overflow: hidden; }
.pet-confetti .pcf {
  position: absolute; top: 0; width: 9px; height: 14px; border-radius: 2px;
  animation: pet-confetti-fall linear forwards;
}
/* 待盖兑换的呼吸提醒小点 */
.pet-pend-dot {
  display: inline-block; margin-left: 4px; font-size: 12px; color: #ffd43b;
  animation: pet-pend-pulse 1.4s ease-in-out infinite;
}

/* ---------- 🐾 宠物乐园（教室大屏 ?mode=classroom） ---------- */
/* 教室端顶部 tab（小组比拼 / 宠物乐园 切换） */
.cls-tabs { display: flex; gap: 8px; padding: 12px 20px 0; }
.cls-tabs .cls-tab.on { background: rgba(167,139,250,.2); border-color: #a78bfa; color: #c4b5fd; }
.pet-park { padding: 18px 20px 30px; }
.ppk-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ppk-head h2 { font-size: 22px; margin: 0; }
.ppk-head .ppk-sub { font-size: 12.5px; color: var(--muted); }
.ppk-podium {
  display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 4px 0 22px;
}
.ppk-pod {
  width: 158px; text-align: center; padding: 14px 10px 12px; border-radius: 16px 16px 6px 6px;
  background: var(--card); border: 1px solid var(--line); position: relative;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(6px);
}
.ppk-pod .ppk-medal { font-size: 24px; line-height: 1; }
.ppk-pod .pet-emoji { font-size: 54px; line-height: 1.15; margin: 4px 0 2px; }
.ppk-pod .ppk-pname { font-weight: 800; font-size: 15.5px; }
.ppk-pod .ppk-pmeta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ppk-pod::after {
  content: ""; display: block; margin: 10px auto 0; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.05));
}
.ppk-pod.p1 { border-color: rgba(255,212,59,.55); box-shadow: 0 0 26px rgba(255,212,59,.2); padding-bottom: 22px; }
.ppk-pod.p1::after { width: 72%; height: 26px; }
.ppk-pod.p2 { border-color: rgba(203,213,225,.4); }
.ppk-pod.p2::after { width: 58%; height: 17px; }
.ppk-pod.p3 { border-color: rgba(217,119,6,.45); }
.ppk-pod.p3::after { width: 58%; height: 11px; }
.ppk-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 12px;
}
.ppk-cell {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 8px 10px; text-align: center; cursor: pointer; position: relative;
  transition: transform .15s ease, border-color .15s ease;
}
.ppk-cell:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.55); }
.ppk-cell .pet-emoji { font-size: 44px; line-height: 1.2; }
.ppk-cell .ppk-pname { font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.ppk-cell .ppk-pmeta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ppk-cell .ppk-badge { position: absolute; top: 6px; left: 8px; font-size: 14px; }
.ppk-cell .ppk-pend {
  position: absolute; top: 6px; right: 8px; font-size: 12px; color: #ffd43b; font-weight: 700;
}
.ppk-cell .pet-bar { height: 6px; margin-top: 8px; }
.ppk-empty { text-align: center; color: var(--muted); padding: 40px 0 24px; line-height: 1.9; }
.ppk-empty .e-egg { font-size: 46px; display: block; }
/* 点击宠物弹大卡 */
.ppk-big { text-align: center; padding: 6px 0 2px; }
.ppk-big .ppk-big-emoji { font-size: 78px; line-height: 1.25; }
.ppk-big .ppk-big-name { font-size: 18px; font-weight: 800; margin: 4px 0 2px; }
.ppk-big .ppk-big-stage { font-size: 13px; color: #c4b5fd; }
.ppk-big .pet-bar { height: 10px; margin: 14px 0 8px; }
.ppk-big .ppk-big-nums { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.ppk-big .ppk-big-tip { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
/* ---------- ✏️ 星光热度人工校正 ---------- */
.vs-item-heat { color: #fbbf24; font-size: 12.5px; font-weight: 600; min-width: 44px; text-align: right; }
.vs-item-adj {
  border: none; background: none; cursor: pointer; font-size: 12px; padding: 2px 4px;
  opacity: .55; border-radius: 6px;
}
.vs-item-adj:hover { opacity: 1; background: rgba(148,163,184,.15); }
.ha-fld { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.ha-fld .vs-select { width: 90px; flex: 0 0 auto; }
.ha-or { font-size: 12px; }
.ha-reason { width: 100%; margin: 10px 0 6px; box-sizing: border-box; }
.ha-hist { max-height: 132px; overflow-y: auto; font-size: 12px; margin: 4px 0 2px; }
.ha-hist-title { color: var(--muted); margin-bottom: 4px; }
.ha-hist-empty { padding: 4px 0; }
.ha-hist-row { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px dashed rgba(148,163,184,.18); }
.ha-hist-row span:first-child { color: #f87171; min-width: 34px; font-weight: 600; }
.ha-hist-row span:nth-child(2) { flex: 1; color: var(--ink); }
.ha-hist-row span:last-child { color: var(--muted); }
@media (max-width: 560px) {
  .rv-item { flex-wrap: wrap; }
  .rv-who { min-width: 70px; }
  .rv-list { max-height: 40vh; }
}

/* ---------- 通用确认弹窗（危险操作） ---------- */
.oplog-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.oplog-filter .sel { width: auto; min-width: 120px; margin: 0 0 0 6px; padding: 5px 8px; font-size: 12.5px; }
/* 「只看今天」复选框：与前面的下拉排成一行，方便筛出当晚记录截图发家长群 */
.oplog-filter .op-check { display: inline-flex; align-items: center; gap: 5px; margin-left: 2px; cursor: pointer; }
.oplog-filter .op-check input { margin: 0; width: 15px; height: 15px; cursor: pointer; }
.oplog-filter { flex-wrap: wrap; }
.oplog-filter .op-date { min-width: 132px; }
.oplog-filter label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.op-quick { display: inline-flex; gap: 6px; }
.op-quick .chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--muted);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; line-height: 1.4;
}
.op-quick .chip:hover { color: var(--ink); border-color: rgba(255,169,77,.5); }

/* ===== 🏆 背诵表扬：白底 · 红金 · 喜庆童趣风（截图发家长群专用） ===== */
/* ⚠️ 必须限制高度并允许滚动：否则今天点亮的人一多，面板会溢出屏幕且滚不动 */
.modal.praise {
  max-width: 580px; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #fffdf6 0%, #ffffff 55%, #fff7ef 100%);
  border: 3px solid #ffd43b; border-radius: 24px;
  box-shadow: 0 24px 60px rgba(120, 20, 20, .35);
  color: #5a4632;
  padding: 20px 22px 22px;
}
/* ===== 表扬面板全屏化 =====
   老师习惯直接截图发群，不是每次都下载图片；弹窗居中上下留黑边，
   截图要么带边、要么浪费上半屏。改成铺满全屏：标题/切换/班级条/按钮固定在头尾，
   中间名单区自己内部滚动，一屏截得下最多内容。手机上真正全屏，桌面端居中宽卡片。 */
#praiseMask { padding: 0; }
#praiseMask .modal.praise {
  max-width: 860px; width: 100%;
  height: 100vh; height: 100dvh; max-height: none;
  border-radius: 0; border: none; box-shadow: none;
  padding: max(16px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
#praiseMask .praise-list {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
/* 红绸横幅标题（金边 + 立体阴影，年画味儿） */
.modal.praise h2 {
  background: linear-gradient(180deg, #ff5f5f 0%, #e0243c 100%);
  color: #fff; border: 2.5px solid #ffd43b; border-radius: 14px;
  padding: 10px 12px; margin: 0 0 10px; font-size: 21px; text-align: center; letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(140, 0, 0, .35);
  box-shadow: 0 4px 0 #b3122a, 0 8px 18px rgba(224, 36, 60, .28);
}
.modal.praise .muted { color: #a08b72; font-size: 13.5px; margin: 0 0 8px; text-align: center; }
/* 彩旗小条（童趣） */
.praise-flag {
  height: 12px; margin: 2px 0 10px; border-radius: 6px;
  background: repeating-linear-gradient(90deg,
    #ff5f5f 0 22px, #ffd43b 22px 44px, #ff8fab 44px 66px, #7bd389 66px 88px, #74c0fc 88px 110px);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06);
}
/* 白底界面里的按钮统一浅色胶囊，选中 = 红底金边 */
.modal.praise .btn.ghost {
  background: #fff; border: 1.5px solid #ffd2d2; color: #c0392b; box-shadow: none;
}
.modal.praise .btn.ghost:hover { background: #fff1f1; color: #a5122a; }
.modal.praise .btn.ghost.on {
  background: linear-gradient(180deg, #ff5f5f, #e0243c);
  border-color: #ffd43b; color: #fff; font-weight: 800;
}
.praise-switch { margin: 4px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.praise-switch .vs-scope .btn.on { background: rgba(94,234,212,.2); border-color: #5eead4; color: #5eead4; font-weight: 700; }
.praise-list { margin: 12px 0 0; }
/* 人多了自动排两列：高度减半，一屏截得全（截图发家长群时很重要） */
.praise-list.two-col { display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px 12px; align-items: start; }
.praise-list.two-col .praise-row:nth-child(odd) { background: #fff6f2; }
.praise-list.two-col .praise-row:nth-child(even) { background: transparent; }
/* 窄屏（手机）一律单列：两列会把「姓名 + 点亮 N 项」挤到一行放不下 */
@media (max-width: 560px) {
  .praise-list.two-col { grid-template-columns: 1fr; }
}
.praise-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 12px; font-size: 15.5px; line-height: 1.45;
  background: #fff; border: 1.5px solid #ffe1e1; color: #5a4632; }
.praise-row + .praise-row { margin-top: 4px; }
.praise-row:nth-child(odd) { background: #fff6f2; }
.praise-row .p-name { flex: 1 1 0; min-width: 0; }
.praise-row .p-add { flex: 0 0 auto; color: #e0243c; font-weight: 800; }
.praise-sum { margin: 14px 0 0; font-size: 15px; color: #c0392b; text-align: center; }
.praise-sum b { font-size: 21px; color: #e0243c; }
.praise-foot { margin: 6px 0 0; font-size: 14px; color: #b8860b; text-align: center; font-weight: 800; letter-spacing: .5px; }
/* 空状态：温和鼓励，不扎心 */
.praise-empty { text-align: center; color: #a08b72; padding: 20px 0 8px; font-size: 14.5px; }
.praise-empty .eg { font-size: 30px; display: block; margin-bottom: 6px; }
/* 今日表扬：卡片内班级直选条（截图不用回顶部切班） */
.praise-cls { margin: 8px 0 2px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.praise-cls .cls-chip { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; }
.praise-close { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* 全部班级模式下的提示：引导老师选具体班以带上家长端二维码 */
.praise-qr-tip {
  margin: 8px 0 0; padding: 8px 12px; border-radius: 10px;
  background: #fff8e6; border: 1px dashed #ffd43b; color: #a0742b;
  font-size: 13px; text-align: center; line-height: 1.5;
}
/* 家长端二维码卡片：白底金边，横向排（码左文右），直接出现在全屏面板里，
   老师截图发群时二维码截得到——家长扫码即进本班家长端 */
.praise-qr {
  margin: 14px 0 0; padding: 12px; border-radius: 14px;
  background: #fff; border: 1.5px solid #ffd43b;
  box-shadow: 0 2px 10px rgba(224, 36, 60, .08);
  display: flex; align-items: center; gap: 14px;
}
.praise-qr-img {
  width: 112px; height: 112px; flex: 0 0 auto; display: block;
  border-radius: 8px; background: #f6f1e7;   /* 加载中的占位底色 */
}
.praise-qr-txt { min-width: 0; }
.praise-qr-txt b { display: block; font-size: 15px; color: #c0392b; margin-bottom: 4px; }
.praise-qr-txt span { display: block; font-size: 12.5px; color: #a08b72; line-height: 1.55; }
/* 📷 整图导出按钮（红金胶囊，与喜庆主题一致） */
.btn.praise-save {
  background: linear-gradient(180deg, #ff7a7a, #e0243c); color: #fff;
  border: 1.5px solid #ffd43b; font-weight: 800;
}
.btn.praise-save:hover { background: linear-gradient(180deg, #ff8c8c, #d3182f); color: #fff; }
/* 整图预览浮层：手机长按保存 / 电脑下载 */
.praise-img-mask {
  position: fixed; inset: 0; z-index: 99999; display: flex;
  align-items: flex-start; justify-content: center; padding: 16px;
  background: rgba(24, 8, 8, .88); overflow-y: auto;
}
.praise-img-box { width: 100%; max-width: 680px; margin: auto; text-align: center; }
.praise-img-tip { color: #ffe9a8; font-size: 13px; margin: 0 0 10px; }
.praise-img-box img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  background: #fff; box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
}
.praise-img-btns { margin: 14px 0 4px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.op-actor { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 20px;
  font-size: 11.5px; background: rgba(255,193,7,.14); color: #ffd43b; border: 1px solid rgba(255,193,7,.28); }
.confirm-box { max-width: 400px; }
.confirm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.confirm-head h2 { font-size: 18px; }
.confirm-icon { font-size: 22px; line-height: 1; }
.confirm-body p { font-size: 14.5px; line-height: 1.75; color: var(--ink); white-space: pre-line; }
.confirm-facts { margin: 10px 0 2px; padding: 10px 12px; list-style: none;
  background: rgba(255,255,255,.05); border-radius: 10px; font-size: 13px; color: var(--muted); }
.confirm-facts li { padding: 2px 0; }
.confirm-facts li b { color: var(--pG); font-weight: 700; }
.confirm-facts li.warn b { color: #ffd43b; }
.confirm-input-row { margin-top: 12px; }
.confirm-input-row input { width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink);
  font-size: 14px; outline: none; font-family: inherit; }
.confirm-input-row input:focus { border-color: var(--pG); }
.confirm-hint { font-size: 12.5px; margin-top: 8px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.confirm-box.danger .confirm-actions #confirmOk { background: #e03131; border-color: #e03131; color: #fff; }
.confirm-box.danger .confirm-actions #confirmOk:hover { background: #c92a2a; }

/* ---------- 分组分工总览（已并入「👥 组长与分组」弹窗的「🏆 分组总览」页签，仍可打印） ---------- */
.division-body { margin-top: 0; display: flex; flex-direction: column; gap: 18px; }
.div-rep-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.div-rep-name { font-size: 18px; font-weight: 800; color: #ffe08a;
  text-shadow: 0 0 10px rgba(255, 210, 90, .7); }
.div-rep-sub { font-size: 12.5px; color: var(--muted); }
.div-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.div-group { background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; page-break-inside: avoid; }
.div-group-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
  margin-bottom: 6px; }
.div-gname { font-weight: 800; font-size: 15px; color: var(--ink); }
.div-leader { font-size: 13px; color: #ffd98a; font-weight: 600; }
.div-pwd { font-size: 12px; color: var(--pG); font-family: ui-monospace, Menlo, Consolas, monospace;
  margin-left: auto; background: rgba(77,171,247,.12); padding: 1px 7px; border-radius: 6px; }
.div-members { font-size: 13px; line-height: 1.7; color: var(--muted); }
.div-no-group { padding: 6px 2px; }
/* 课代表端密码修改按钮（贴在课代表标题右侧） */
.div-rep-head { flex-wrap: wrap; }
.div-rep-pwd { margin-left: auto; }
.div-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.div-cls-label { font-size: 13px; color: var(--muted); }

/* ---------- 成绩单导入自动分组 ---------- */
.modal.score-import { max-width: 760px; max-height: 92vh; overflow-y: auto; }
.si-body { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.si-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.si-row label { font-size: 14px; color: var(--muted); min-width: 52px; }
.si-text { width: 100%; min-height: 130px; resize: vertical; border-radius: 10px;
  background: rgba(0,0,0,.25); color: var(--ink); border: 1px solid var(--line);
  padding: 10px 12px; font-size: 13px; line-height: 1.6; font-family: ui-monospace, Menlo, Consolas, monospace; }
.si-actions { display: flex; align-items: center; gap: 12px; }
.si-table-wrap { border: 1px solid var(--line); border-radius: 12px; padding: 10px; overflow-x: auto; }
.si-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.si-table th, .si-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.si-table th { color: var(--muted); font-weight: 600; }
.si-role { background: rgba(0,0,0,.3); color: var(--ink); border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 6px; font-size: 13px; color-scheme: light; }
.si-config { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.si-config b { color: var(--pC); }
.si-preview { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }

/* ---------- 打印：五个场景互不干扰 ----------
   ① 分组分工  → body.printing-division（黑白上墙；已并入「组长与分组」弹窗的「分组总览」页签）
   ② 组长纸条  → body.printing-slip（A4 一页 8 张，裁开发给组长）
   ③ 待发花名单 → body.printing-award（照着盖章）
   ④ 房子迷你卡 → body.printing-mini（名片大小，裁开贴备用本）
   靠 body 上的类区分，各套规则互不打架。 */
@media print {
  @page { size: A4; margin: 8mm; }
  /* ③ 待发花名单：黑白打印，照着盖章 */
  body.printing-award > *:not(#toast) { display: none !important; }
  body.printing-award {
    background: #fff !important; color: #000 !important;
  }
  body.printing-award #main {
    display: block !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
  }
  body.printing-award .role-switch, body.printing-award .class-tabs,
  body.printing-award #sky, body.printing-award .topbar .owner-badge,
  body.printing-award .award-bar, body.printing-award .slogan { display: none !important; }
  body.printing-award .topbar { display: block !important; padding: 0 !important; margin-bottom: 6px !important; }
  body.printing-award .award-wrap { max-height: none !important; overflow: visible !important; }
  body.printing-award .section-head h2 { color: #000 !important; font-size: 16px !important; }
  body.printing-award .section-head .hint { color: #444 !important; }
  body.printing-award .aw-sec { border: 1px solid #999 !important; background: none !important;
    break-inside: avoid; page-break-inside: avoid; margin-bottom: 4mm; }
  body.printing-award .aw-sec-h { border-bottom: 1px solid #999 !important; }
  body.printing-award .aw-sec-h b { color: #000 !important; }
  body.printing-award .aw-sec-h .muted,
  body.printing-award .aw-sec-h i,
  body.printing-award .aw-no,
  body.printing-award .aw-desc,
  body.printing-award .aw-given,
  body.printing-award .aw-sum { color: #333 !important; }
  body.printing-award .aw-name { color: #000 !important; }
  body.printing-award .aw-row { border-bottom: 1px dotted #ccc; }
  body.printing-award .aw-row .btn { display: none !important; }
  body.printing-award .aw-row:not(.done)::after {
    content: "□"; margin-left: auto; font-size: 14px; color: #333;
  }
  body.printing-award .empty { color: #333 !important; }

  /* ① 分组分工：黑白上墙（只打「分组总览」页签，组长设置的表单一律不上纸） */
  body.printing-division > *:not(#groupManageMask) { display: none !important; }
  body.printing-division #groupManageMask {
    position: static; display: block !important; background: #fff; padding: 0; backdrop-filter: none;
  }
  body.printing-division .modal.manage {
    box-shadow: none; border: none; background: #fff; color: #111;
    max-width: none; max-height: none; overflow: visible; padding: 0;
  }
  /* 页签栏、共用头部（班级选择 + 导出/打印）、组长设置页签 —— 统统不上纸 */
  body.printing-division .detail-head,
  body.printing-division #gmHeadTools,
  body.printing-division #gmTabs,
  body.printing-division #gmPaneLeader { display: none !important; }
  /* 只放「分组总览」页签出来（[hidden] 带 !important，这里用 id + !important 压回去） */
  body.printing-division #gmPaneDivision { display: block !important; margin: 0 !important; }
  /* 纸上的抬头：页签栏被隐藏了，用它补一个标题 */
  body.printing-division #divPrintTitle {
    display: block !important; font-size: 18px; font-weight: 800; color: #111;
    margin: 0 0 10px; letter-spacing: .5px;
  }
  body.printing-division .div-rep { break-inside: avoid; page-break-inside: avoid; }
  body.printing-division .div-rep-name,
  body.printing-division .div-gname,
  body.printing-division .div-leader { color: #111 !important; text-shadow: none !important; }
  body.printing-division .div-rep-sub,
  body.printing-division .div-members,
  body.printing-division .div-pwd { color: #333 !important; }
  body.printing-division .div-group { background: #fff; border: 1px solid #999; }
  body.printing-division .div-rep-head { border-color: #999; }
  body.printing-division .div-rep-pwd { display: none !important; }   /* 打印时不带「改密码」按钮 */

  /* ④ 房子迷你卡：名片大小，黑白、沿虚线裁开 */
  @page { size: A4; margin: 6mm; }          /* 后写的会覆盖上面的 margin，迷你卡专用紧凑边距 */
  body.printing-mini > *:not(#miniMask) { display: none !important; }
  body.printing-mini {
    background: #fff !important; color: #000 !important;
  }
  body.printing-mini #miniMask {
    position: static; display: block; background: #fff; padding: 0; backdrop-filter: none;
  }
  body.printing-mini .modal.mini-modal {
    box-shadow: none; border: none; background: #fff; color: #000;
    max-width: none; max-height: none; padding: 0; margin: 0;
  }
  body.printing-mini .detail-head,
  body.printing-mini .mini-foot { display: none !important; }
  body.printing-mini .mini-body { max-height: none !important; overflow: visible !important; padding: 0 !important; }
  body.printing-mini .mini-sheet {
    background: #fff !important; gap: 0 !important; padding: 0 !important;
  }
  body.printing-mini .mini-card {
    align-self: stretch !important;
    min-height: 62mm !important;      /* 名片的实际高度：8 张/页 ≈ 4 行 */
    background: #fff !important; border: 1px dashed #999 !important; border-radius: 0 !important;
    box-shadow: none !important;
  }
  body.printing-mini .mini-body.per-8 .mini-card { min-height: 66mm !important; }
  body.printing-mini .mini-body.per-12 .mini-card { min-height: 44mm !important; }
  body.printing-mini .mc-no { background: #000 !important; color: #fff !important; }
  body.printing-mini .mc-name,
  body.printing-mini .mc-role,
  body.printing-mini .mc-lit { color: #000 !important; }
  body.printing-mini .mc-role { border-color: #666 !important; }
  body.printing-mini .mc-track { background: #eee !important; border: 1px solid #bbb !important; }
  body.printing-mini .mc-track > i { background: #555 !important; }
  body.printing-mini .mc-badge { color: #000 !important; border-color: #666 !important; }
  body.printing-mini .mc-blank { border-color: #999 !important; color: #555 !important; }
  /* 迷你卡简化楼：打印时压成灰阶，亮/暗一眼分得清 */
  body.printing-mini .mc-roof { background: #555 !important; }
  body.printing-mini .mc-b.gold .mc-roof { background: #111 !important; }
  body.printing-mini .mc-fl > i { background: #fff !important; border: 1px solid #bbb !important; }
  body.printing-mini .mc-fl > i.on { background: #333 !important; border-color: #333 !important; }
}

/* ---------- 组长与分组（老师端，合并弹窗：⚙️ 组长设置 / 🏆 分组总览） ---------- */
/* 共用头部：班级选择常驻，导出/打印只在「分组总览」页签出现 */
.gm-head-tools { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.gm-head-tools .gm-row { margin-bottom: 0; }
.gm-head-tools .div-tools { display: none; }
.modal.manage.is-overview .gm-head-tools .div-tools { display: flex; }
/* 页签：选中态沿用「黄+高亮」，与教室端/宠物端页签一套视觉 */
.gm-tabs { display: flex; gap: 8px; margin-top: 14px; }
.gm-tab.on { background: rgba(255,212,59,.18); border-color: #ffd43b; color: #ffe08a; }
.gm-pane { margin-top: 14px; }
/* 「分组总览」卡片要宽一点，组长设置维持窄弹窗 */
.modal.manage.is-overview { max-width: 920px; }
.div-print-title { display: none; }   /* 只在打印时出现，作为纸上的抬头 */

/* ---------- 组长管理（老师端） ---------- */
.gm-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gm-row label { font-size: 14px; color: var(--muted); }
.gm-row .sel { width: auto; min-width: 150px; margin-bottom: 0; }
.gm-stats { font-size: 13px; color: var(--muted); margin-bottom: 10px; padding: 8px 12px;
  background: rgba(255,255,255,.04); border-radius: 10px; }
.gm-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.gm-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.04);
  border-radius: 10px; padding: 8px 10px; }
.gm-name { font-weight: 600; font-size: 14px; min-width: 88px; }
.gm-pwd { font-size: 12.5px; color: var(--pG); font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .5px; min-width: 96px; }
.gm-count { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.gm-members { flex: 1 1 100%; font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 2px; }
.gm-add { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.gm-add input { flex: 1 1 120px; min-width: 110px; padding: 7px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink);
  font-size: 13px; outline: none; font-family: inherit; }
.gm-add input:focus { border-color: var(--pG); }
.gm-add .gm-num { flex: 0 0 62px; min-width: 62px; text-align: center; }
.gm-add .muted { font-size: 13px; }
@media (max-width: 560px) {
  .gm-item { flex-wrap: wrap; gap: 8px; }
  .gm-name { min-width: 70px; }
  .gm-pwd { min-width: 80px; }
  .gm-count { margin-right: 0; }
  .gm-list { max-height: 240px; }
}

.check-body { margin-top: 14px; }
.check-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.check-filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.check-filters .sel { width: auto; margin: 0; }
.check-summary { font-size: 14px; margin-bottom: 10px; color: #e8eefc; }
.check-summary .all-done { color: #8ce99a; }
.check-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.check-item { display: flex; gap: 12px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.04); align-items: baseline; }
.check-name { font-weight: 700; color: #fff; flex: 0 0 84px; }
.check-missing { font-size: 13px; color: #ffc078; line-height: 1.6; }
.legend .dot.W { --c: var(--pW); background: var(--pW); }

.detail-tools { display: flex; flex-direction: column; gap: 8px; }
.detail-tools .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 杂项 ---------- */
/* ---------- 全站页脚 ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(10,16,38,.95); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; z-index: 80; box-shadow: 0 10px 30px rgba(0,0,0,.4); border: 1px solid var(--line);
}
.empty { text-align: center; color: var(--muted); padding: 40px; font-size: 14px; }
/* 非本班模糊展示（家长端看不到其它班真实进度） */
.blurred-class { max-width: 880px; margin: 0 auto; padding: 8px 14px 30px; }
.blur-note { text-align: center; color: var(--muted); background: rgba(255,212,59,.08); border: 1px dashed rgba(255,212,59,.35); border-radius: 12px; padding: 12px 14px; margin: 10px 0 18px; font-size: 13.5px; line-height: 1.7; }
.blur-note b { color: #ffd43b; }
.blur-tower { display: flex; justify-content: center; padding: 10px 0 4px; }
.blur-tower .tower { display: flex; flex-direction: column-reverse; gap: 6px; width: min(320px, 80%); filter: blur(6px); opacity: .55; pointer-events: none; }
.blur-tower .tfloor { height: 26px; border-radius: 7px; background: linear-gradient(90deg, rgba(255,207,107,.5), rgba(255,143,171,.4)); border: 1px solid rgba(255,255,255,.25); }

@media (max-width: 520px) {
  .topbar { padding: 12px 14px; }
  .brand-text h1 { font-size: 15px; letter-spacing: 0; }
  .brand-text .sub { font-size: 11px; }
  .owner-badge { font-size: 11.5px; padding: 4px 10px; }
  main { padding: 12px 14px 40px; }
  .class-tabs { padding: 12px 14px 4px; }
}
.hidden { display: none !important; }
/* 修复：hidden 属性需强制隐藏，否则会被 display:flex 覆盖导致弹窗常驻 */
[hidden] { display: none !important; }

/* ---------- 暖心寄语 / 查看记录 ---------- */
.msg-wall { flex: 1 1 100%; margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.wall-title { font-size: 14px; font-weight: 700; color: #ffd43b; margin: 10px 0 8px; }
/* 常驻「用途告示」：说清这块地方是给爸妈写鼓励的，并温和提示什么不该发 */
.msg-guide { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px;
  padding: 10px 12px; border-radius: 12px; line-height: 1.65;
  background: linear-gradient(135deg, rgba(255,212,59,.10), rgba(255,169,77,.06));
  border: 1px solid rgba(255,212,59,.32); font-size: 12.8px; color: #f2e6c8; }
.msg-guide .mg-ico { font-size: 20px; line-height: 1.2; flex: 0 0 auto; }
.msg-guide .mg-txt b { color: #ffe08a; font-weight: 700; }
.msg-guide .mg-warn { color: #ffb4a2; }
.view-logs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.log-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(77,171,247,.16); color: #a5d8ff; }
.log-empty { font-size: 12px; color: var(--muted); }
.msg-list { display: flex; flex-direction: column; gap: 8px; max-height: 210px; overflow-y: auto; }
.msg-item { position: relative; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-left: 3px solid #ffd43b; border-radius: 10px; padding: 8px 10px; }
.msg-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg-author { font-weight: 700; color: #ffe08a; }
.msg-body { font-size: 14px; color: #f2f5ff; line-height: 1.5; }
.msg-del { position: absolute; top: 6px; right: 8px; font-size: 11px; color: #ff8787; background: none; border: none; cursor: pointer; }
.msg-empty { font-size: 13.5px; color: var(--muted); padding: 14px 12px; line-height: 1.8; text-align: center;
  background: rgba(255,212,59,.06); border: 1px dashed rgba(255,212,59,.3); border-radius: 10px; }
.msg-empty-icon { display: block; font-size: 24px; margin-bottom: 4px; }
.msg-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.msg-form input, .msg-form textarea { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 14px; font-family: inherit; outline: none; }
.msg-form textarea { min-height: 56px; resize: vertical; }
.msg-form input:focus, .msg-form textarea:focus { border-color: var(--pG); }
.msg-form-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-form-btns .btn { flex: 1 1 auto; }
.msg-note { font-size: 12px; margin-top: 2px; }
.msg-pending { font-size: 11px; color: #ffd43b; background: rgba(255,212,59,.14); border: 1px solid rgba(255,212,59,.4); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.msg-item .msg-meta { font-size: 11.5px; color: var(--muted); margin-left: 8px; }
.msg-item .msg-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.msg-del.approve { color: #69db7c; background: none; border: 1px solid rgba(105,219,124,.5); border-radius: 8px; padding: 2px 10px; font-size: 12px; cursor: pointer; }

/* ---------- 老师端：留言管理（一览全部 + 删除） ---------- */
.modal.msg-manage { max-width: 720px; max-height: 88vh; display: flex; flex-direction: column; }
.msg-manage-body { overflow-y: auto; padding: 4px 2px 8px; margin-top: 4px;
  display: flex; flex-direction: column; gap: 10px; }
.mm-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-left: 3px solid #ffd43b;
  border-radius: 10px; padding: 10px 12px; }
.mm-info { flex: 1 1 auto; min-width: 0; }
.mm-line1 { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.mm-who { font-weight: 700; color: #ffe08a; font-size: 13.5px; }
.mm-status { font-size: 11px; border-radius: 999px; padding: 1px 8px; flex: 0 0 auto; }
.mm-status.pending { color: #ffa94d; background: rgba(255,169,77,.16); border: 1px solid rgba(255,169,77,.45); }
.mm-status.unread { color: #74c0fc; background: rgba(116,192,252,.16); border: 1px solid rgba(116,192,252,.45); }
.mm-status.on { color: #b8c4e0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); }
.mm-author { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.mm-content { font-size: 14px; color: #f2f5ff; line-height: 1.55; word-break: break-word; white-space: pre-wrap; }
.mm-del { flex: 0 0 auto; align-self: center; }
/* 待审核：橙色高亮 + 右侧操作按钮组（通过上墙 / 删除） */
.mm-row.mm-pending { border-left-color: #ffa94d; background: rgba(255,169,77,.08);
  border-color: rgba(255,169,77,.42); }
.mm-acts { display: flex; gap: 6px; flex: 0 0 auto; align-self: center; flex-wrap: wrap; justify-content: flex-end; }
/* 新留言弹窗：分区标题 + 待审条高亮 */
.mu-sec { font-size: 12.5px; font-weight: 700; padding: 6px 2px 2px; letter-spacing: .3px; }
.mu-sec:not(:first-child) { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.mu-sec-pend { color: #ffa94d; }
.mu-sec-new { color: #a5d8ff; }
.msg-item.mu-pending { border-left-color: #ffa94d; background: rgba(255,169,77,.07);
  border-color: rgba(255,169,77,.35); }
.msg-item.mu-pending .msg-acts { gap: 6px; }

/* ---------- 成绩录入（全屏，老师私有）---------- */
#gradeMask.grade-fullscreen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: 0; border-radius: 0; max-width: none; max-height: none;
  overflow: hidden;
}
/* 顶部固定工具条：班级/成绩册/搜索 始终可见，滚动列表不遮挡 */
.gf-top {
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, #161d33, #111728);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px 10px;
  display: flex; flex-direction: column; gap: 9px;
}
.gf-title { display: flex; align-items: center; gap: 10px; }
.gf-title h2 { margin: 0; font-size: 18px; }
.gf-progress {
  margin-left: auto; font-size: 13px; font-weight: 700; color: #ffd43b;
  background: rgba(255,212,59,.12); border: 1px solid rgba(255,212,59,.32);
  padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.gf-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.gf-ctrl label { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.gf-ctrl select { background: rgba(255,255,255,.06); color: #f2f5ff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; max-width: 230px; }
.gf-search input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; font-size: 15px; outline: none;
}
.gf-search input:focus { border-color: var(--pG); }
.gf-stats { padding: 8px 14px 4px; }
.grade-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.grade-stats .gs { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; text-align: center; min-width: 78px; }
.grade-stats .gs-val { font-size: 19px; font-weight: 800; color: #ffe08a; }
.grade-stats .gs-label { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.grade-stats .gs-sub { color: #9fb0d8; font-size: 10.5px; }
.gf-import { padding: 8px 14px 10px; border-bottom: 1px solid var(--line); }
.gf-import textarea {
  width: 100%; box-sizing: border-box; margin: 8px 0;
  background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical;
}
.grade-import-actions { display: flex; align-items: center; gap: 12px; }
.gf-empty { padding: 14px; }
/* 学生列表：响应式网格，手机单列、平板/电脑多列；名字横向、卡片不换行 */
.gf-list {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 12px 28px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 9px; align-content: start;
}
.grade-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 13px;
}
.grade-row.done { border-left: 4px solid #8ce99a; background: rgba(140,233,154,.09); }
.gr-name {
  flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 700; color: #f2f5ff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.grade-row.done .gr-name::after { content: " ✓"; color: #8ce99a; font-weight: 800; }
.gr-input {
  width: 86px; flex: 0 0 auto; background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 8px; font-size: 15px;
  text-align: center; outline: none;
}
.gr-input:focus { border-color: var(--pG); }
.gr-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.gr-actions .btn.small { padding: 7px 12px; font-size: 13px; }
.gc-del, .gr-del { color: #ff8787 !important; border-color: rgba(255,135,135,.5) !important; }
.grade-empty { padding: 10px 2px; }

/* ---------- 弹幕放映 ---------- */
#danmuMask { background: rgba(3,5,14,.96); flex-direction: column; }
.danmu-stage { position: relative; width: 100%; height: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.danmu-stage .city-big { transform: scale(1.12); opacity: .5; filter: blur(1px); margin-top: 120px; }
.danmu-title { position: absolute; top: 28px; left: 0; right: 0; text-align: center; font-size: 22px; font-weight: 800; color: #ffe08a; text-shadow: 0 0 12px rgba(255,201,60,.6); z-index: 5; }
.danmu-item { position: absolute; left: 100%; white-space: nowrap; font-size: 22px; font-weight: 700; color: #fff; padding: 6px 18px; border-radius: 999px; background: rgba(255,201,60,.16); border: 1px solid rgba(255,201,60,.4); text-shadow: 0 0 8px rgba(255,201,60,.5); animation: fly 9s linear infinite; z-index: 4; }
@keyframes fly { from { transform: translateX(0); } to { transform: translateX(-120vw); } }
.danmu-hint { position: absolute; bottom: 40px; left: 0; right: 0; text-align: center; color: var(--muted); }
.danmu-close { position: absolute; top: 18px; right: 18px; z-index: 10; }

/* ---------- 家长端标语横幅（2026-11-01 第十三版：鎏金流光——Miss Yang 选定方案A） ---------- */
.slogan {
  /* 单行放下两句：14 字 + 星星，390px 手机上约 16px 恰好一行（配合 nowrap 强制不折行） */
  font-size: clamp(16px, 4.6vw, 19px);
  font-weight: 900;
  letter-spacing: .5px;
  line-height: 1.5;
  white-space: nowrap;   /* Miss Yang 要求一行显示 */
  /* 艺术字体：毛笔楷书（Ma Shan Zheng）→ 系统行楷/楷体回退，全程带书法设计感 */
  font-family: "Ma Shan Zheng", "STXingkai", "华文行楷", "Xingkai SC", "STKaiti", "KaiTi", "Kaiti SC", "楷体", serif;
  color: #d8e6ff;        /* 不支持渐变裁切时的兜底色 */
  animation: sloganIn .35s ease both;
}
/* 标语容器：只负责排版与兜底颜色，渐变/跳跃都下放到每一个字 */
.slogan-main { line-height: 1.5; color: #d8e6ff; }
/* 逐字独立成 span：每个字自带鎏金渐变并流光扫过（延迟由 JS 逐字错开 → 左→右流光） */
.sl-char {
  display: inline-block;
  will-change: background-position;
  color: #ffe9a8;                     /* 兜底（无渐变裁切时）浅金字 */
}
/* 细亮光带 + 亮度脉冲：3.5s 从左扫到右（每个字独立裁切，避免"父级裁切+子 transform 整行消失"坑）；
   光带提供"高光扫过"的质感，亮度脉冲让"光走到哪个字"清晰可见（小字号下纯光带对比不够） */
@keyframes sloganSweep {
  0%   { background-position: 170% 0, 0 0; }   /* 光带在左侧外 → 纯金字 */
  100% { background-position: -170% 0, 0 0; }  /* 滑到右侧外 → 纯金字 */
}
@keyframes sloganGlintA {
  0%, 60%, 100% { filter: brightness(1.2); }             /* 没轮到的字也保持明亮，不再过暗 */
  16%, 42% { filter: brightness(1.7) saturate(1.12); }   /* 宽脉冲：一次连续点亮约 3 个字 */
}
@keyframes sloganGlintB {
  0%, 60%, 100% { filter: brightness(1.2) drop-shadow(0 0 6px rgba(240,164,32,.45)); }
  16%, 42% { filter: brightness(1.7) saturate(1.12) drop-shadow(0 0 11px rgba(255,200,80,.8)); }
}
/* 兜底实色（不支持渐变裁切的浏览器）：前半句浅金、后半句深金（字号统一，不再放大） */
.sl-a { color: #ffe9a8; }
.sl-b { color: #f0b73c; letter-spacing: 1px; }
/* 逐字渐变裁切（每个字自带渐变，transform 才不会把字弄没——父级 clip + 子元素 transform 会让整行消失） */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .sl-char.sl-a,
  .sl-char.sl-b {
    /* 底层鎏金竖渐变（白→深金）+ 上层一道宽亮光带（sloganSweep 从左扫到右，3.5s 一轮）；
       底色上白下金，光带扫过下半段时亮金→白，对比清晰才看得见"流" */
    background-image:
      linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 30%,
          rgba(255,251,235,.95) 46%, rgba(255,255,255,.98) 50%, rgba(255,251,235,.95) 54%,
          rgba(255,255,255,0) 70%, rgba(255,255,255,0) 100%),
      linear-gradient(180deg, #fff9ec 0%, #ffe6a3 40%, #f7c24e 78%, #e3a528 100%);
    background-size: 300% 100%, 100% 100%;
    background-repeat: no-repeat, no-repeat;
    background-position: 170% 0, 0 0;   /* 起始：光带在左侧外 */
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: sloganSweep 3.5s linear infinite, sloganGlintA 3.5s linear infinite;
  }
  .sl-char.sl-b {
    /* 后半句深金（字号与前半句统一，不再放大，仅以配色区分主次） */
    background-image:
      linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 30%,
          rgba(255,251,235,.95) 46%, rgba(255,255,255,.98) 50%, rgba(255,251,235,.95) 54%,
          rgba(255,255,255,0) 70%, rgba(255,255,255,0) 100%),
      linear-gradient(180deg, #ffeaa0 0%, #f4b53c 48%, #cf8a1c 100%);
    letter-spacing: 1px;
    animation: sloganSweep 3.5s linear infinite, sloganGlintB 3.5s linear infinite;
  }
}
.sl-star {
  display: inline-block; font-size: .72em; color: #f5d97a;
  -webkit-text-fill-color: #f5d97a;   /* 盖掉主标语继承来的 transparent，否则星星隐形 */
  margin: 0 .3em; vertical-align: .08em;
  animation: slTwinkle 2.4s ease-in-out infinite;
}
/* 开头的星随鎏金起点走浅金，结尾的星随深金终点走古铜（与标语渐变两端呼应） */
.sl-star:first-child { color: #f0b73c; -webkit-text-fill-color: #f0b73c; }
.sl-star:last-child { color: #c67b12; -webkit-text-fill-color: #c67b12; animation-delay: 1.2s; }
@keyframes sloganFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 180% 50%; }
}
@keyframes slTwinkle {
  0%, 100% { opacity: .45; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes sloganIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 系统开了「减少动态」：停止流光，静态停在鎏金渐变（信息一点不少） */
@media (prefers-reduced-motion: reduce) {
  .slogan { animation: none; }
  .sl-char { animation: none; }
  .sl-star { animation: none; opacity: .85; }
}

/* ---------- 数据导出 ---------- */
.modal.export { max-width: 520px; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.export-body { margin-top: 16px; }
.export-row { margin-bottom: 12px; }
.export-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.export-row .sel { margin-bottom: 0; }
.export-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.export-actions .btn { flex: 1 1 auto; }
.export-note {
  font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.75;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 212, 59, .07);
  border: 1px solid rgba(255, 212, 59, .18);
}

/* ---------- 操作记录 ---------- */
.oplog-body { max-height: 62vh; overflow-y: auto; padding: 4px 2px; }
.oplog-list { display: flex; flex-direction: column; gap: 9px; }
.op-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 11px; }
.op-row.undone { opacity: .45; }
.op-info { flex: 1 1 auto; min-width: 0; }
.op-title { font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.45; }
.op-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.op-act { flex: 0 0 auto; }
.op-undone-tag { font-size: 12.5px; color: #ff8787; font-weight: 700; }
.op-empty, .op-loading { padding: 26px 16px; text-align: center; color: var(--muted); line-height: 1.7; }

/* ---------- 教室版：小组比拼（小区） ---------- */
.contest-wrap { display: flex; flex-direction: column; gap: 14px; }
.cd-block {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px 14px; box-shadow: var(--shadow-sm); backdrop-filter: blur(6px);
}
.cd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cd-title { font-size: 15.5px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.cd-medal { font-size: 16px; }
.cd-size {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 999px;
}
.cd-sub { font-size: 12px; color: var(--muted); }
/* 彩虹条：填充宽度 = 该组人均完成率 */
.cd-rainbow {
  height: 13px; border-radius: 999px; background: rgba(255,255,255,.10);
  overflow: hidden; margin: 9px 0 7px;
}
.cd-fill {
  height: 100%; border-radius: 999px; transition: width .45s ease;
  background: linear-gradient(90deg,#ff5f6d,#ffa94d,#ffd43b,#51cf66,#22b8cf);
}
.cd-metrics { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 9px; }
.cd-metrics b { color: var(--ink); font-weight: 800; }
.cd-needy-tip { color: #ff8b8b; font-weight: 700; }
.cd-finish { color: #7ee0a3; }
/* 卡位最小值必须容得下里面那栋「10 单元」的楼（约 159px）＋卡片左右内边距，
   否则房子的楼体会撑出卡框（旧值 132px 太窄，房子比框大）。 */
.cd-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* 待帮扶：本组未完成且进度最低的房子，组长重点盯这几位 */
.stu-card.needy { border-color: rgba(255,95,109,.6); box-shadow: 0 0 0 2px rgba(255,95,109,.20); }
.need-badge {
  align-self: flex-start; font-size: 11px; font-weight: 800;
  color: #ffd9d9; background: rgba(255,95,109,.26);
  border: 1px solid rgba(255,95,109,.45); border-radius: 999px; padding: 2px 8px;
}

/* ---------- 每个「小区」一个不断变幻的彩虹框（仅教室端小区大区） ---------- */
@property --rc { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.cd-block.rainbow { position: relative; }
.cd-block.rainbow::after {
  content: ""; position: absolute; inset: -1px; border-radius: 17px; padding: 2px;
  background: conic-gradient(from var(--rc),
    #ff5f6d, #ffb74d, #ffe066, #51cf66, #22b8cf, #845ef7, #ff5f6d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rcSpin 6s linear infinite;
  pointer-events: none;
}
@keyframes rcSpin { to { --rc: 360deg; } }
/* 不支持 @property 的旧内核：退化成静态彩虹框（不影响布局） */
@media (prefers-reduced-motion: reduce) {
  .cd-block.rainbow::after { animation: none; }
}

/* 课代表大区：她本人金色描边，管的组长浅色描边，一眼分出层级 */
.cd-block.rep-clan { border-color: rgba(132,94,247,.45); }
.stu-card.clan-boss { box-shadow: 0 0 0 2px rgba(255,207,107,.55), 0 0 18px rgba(255,207,107,.30); }
.stu-card.clan-leader { box-shadow: 0 0 0 2px rgba(255,255,255,.20); }

/* ---------- 欠交作业（教室端通报 + 教师端登记） ---------- */
.cd-due { border-color: rgba(255,95,109,.35); }
.cd-due .cd-title { color: #ffdede; }
.due-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.due-chip {
  font-size: 12.5px; font-weight: 700; color: #ffd9d9;
  background: rgba(255,95,109,.18); border: 1px solid rgba(255,95,109,.4);
  border-radius: 999px; padding: 3px 10px;
}
.due-chip.warn { background: rgba(255,95,109,.34); border-color: rgba(255,95,109,.7); }
.due-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.due-wrap { display: flex; flex-direction: column; gap: 6px; }
.due-sum { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.due-sum b { color: var(--ink); font-weight: 800; }
.due-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 11px;
}
.due-row.on { border-color: rgba(255,95,109,.45); background: rgba(255,95,109,.07); }
.due-no { min-width: 24px; font-size: 12px; color: var(--muted); font-weight: 800; }
.due-name { font-size: 14.5px; font-weight: 700; min-width: 74px; color: var(--ink); }
.due-cnt { font-size: 12px; color: var(--muted); margin-right: auto; }
.due-cnt.warn { color: #ff8b8b; font-weight: 800; }
.due-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #ffd9d9; background: rgba(255,95,109,.16);
  border: 1px solid rgba(255,95,109,.32); border-radius: 999px; padding: 2px 4px 2px 9px;
}
.btn.tiny { padding: 2px 9px; font-size: 11.5px; border-radius: 8px; }

/* ---------- 班级码门禁 ---------- */
.modal.gate { max-width: 380px; text-align: center; }
.modal.gate input#gateCode {
  width: 100%; margin-top: 14px; text-align: center;
  font-size: 26px; letter-spacing: 10px; font-weight: 800;
  padding: 10px 12px 10px 22px;
}
.gate-remember {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px; font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.gate-remember input { width: 15px; height: 15px; accent-color: var(--gold, #ffcf6b); }
.gate-foot { margin-top: 10px; font-size: 11.5px; }

/* ---------- 随机抽背器（投屏用，字要大） ---------- */
.draw-mask { background: rgba(4, 8, 24, .92); }
.draw-stage {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 20px 14px; box-sizing: border-box; overflow: auto;
}
.draw-close { position: absolute; right: 14px; top: 10px; z-index: 3; }
.draw-bar {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  align-items: center; margin-bottom: 6px;
}
.draw-modes, .draw-filter { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dr-chip {
  padding: 6px 14px; border-radius: 999px; font-size: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: var(--muted);
  white-space: nowrap; transition: all .15s;
}
.dr-chip:hover { border-color: rgba(255,207,107,.4); color: #fff3d6; }
.dr-chip.on {
  color: #ffe9b8; border-color: rgba(255,207,107,.6); background: rgba(255,207,107,.16);
  font-weight: 700;
}
.draw-filter .sel { width: auto; min-width: 92px; margin: 0; padding: 4px 8px; font-size: 12.5px; }
.dr-hint { width: 100%; text-align: center; font-size: 12.5px; color: #ffd98a; opacity: .9; line-height: 1.4; }
.draw-center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.draw-no { font-size: 15px; color: var(--muted); letter-spacing: 2px; height: 22px; }
.draw-name {
  font-size: clamp(48px, 12vw, 132px); font-weight: 900; line-height: 1.15;
  letter-spacing: 6px; text-align: center;
  background: linear-gradient(180deg, #fff8e1, #ffcf6b 55%, #ff9f43);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(255,207,107,.25);
}
.draw-name.rolling { opacity: .82; filter: blur(.6px); }
.draw-name.land { animation: drawPop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes drawPop {
  0% { transform: scale(.72); opacity: .3; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.draw-sub { margin-top: 8px; font-size: clamp(14px, 2.2vw, 20px); color: #ffe9b8; min-height: 26px; }
.draw-panel {
  display: flex; gap: 16px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin: 6px 0 10px; min-height: 0;
}
.draw-info { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.draw-task {
  font-size: clamp(16px, 2.6vw, 24px); font-weight: 800; color: #fff; padding: 6px 18px;
  border-radius: 12px; background: rgba(255,159,67,.16); border: 1px solid rgba(255,159,67,.45);
}
.draw-house { transform: scale(.72); transform-origin: top center; }
.draw-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.draw-actions .btn { padding: 9px 20px; font-size: 15px; }
.draw-actions .btn.big-roll { padding: 10px 34px; font-size: 17px; font-weight: 800; }
.draw-history {
  margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  max-width: 900px;
}
.dh-item {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05);
}
.dh-item.ok { color: #9ff5c9; border-color: rgba(94,234,212,.45); background: rgba(94,234,212,.12); }
.dh-item.no { color: #ffb3b3; border-color: rgba(255,95,109,.45); background: rgba(255,95,109,.12); }

/* ---------- 全站页脚（第一百一十节重排：功能行 → 合规行 → 隐私展开 → 版权） ----------
   原来散成四段（操作提示 / 备案+隐私 / 自夸行 / 版权），间距口径不一、表述重复；
   现合成一个页脚：上半管操作与合规（备案号必须可点、隐私说明可展开），
   下半管版权（归属 / 禁止行为 / 使用范围各一句，不重复）。 */
.site-foot {
  margin-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 14, 32, .38);
  padding: 14px 16px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.foot-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 4px 14px; line-height: 1.7;
}
.foot-row + .foot-row { margin-top: 4px; }
.foot-gate {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; padding: 2px 8px; border-radius: 8px;
}
.foot-gate:hover { color: #fff; background: rgba(255,255,255,.08); }
/* 合规行：ICP 备案号（工信部合规悬挂，必须可点跳转）+ 隐私说明开关 */
.foot-legal { font-size: 12px; }
.foot-legal a { color: var(--muted); text-decoration: none; }
.foot-legal a:hover { color: #fff; text-decoration: underline; }
.foot-legal .beian-sep { margin: 0 2px; opacity: .5; }
.beian-link {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; text-decoration: none; padding: 0;
}
.beian-link:hover { color: #fff; text-decoration: underline; }
/* 隐私说明展开区（点「隐私说明」出现）：低调卡片，不抢版权区 */
.privacy-note {
  max-width: 620px; margin: 10px auto 0; padding: 10px 16px;
  font-size: 12px; line-height: 1.9; color: var(--muted); text-align: left;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
}
.privacy-note p { margin: 0 0 6px; }
.privacy-note p:last-child { margin-bottom: 0; }
.privacy-note b { color: #dfe6f5; font-weight: 700; }
/* 版权区：归属与范围一句 + 禁止行为金框一句；商用/外传只在禁止句里说，不重复 */
.site-copyright {
  max-width: 760px; margin: 12px auto 0;
  font-size: 11.5px; line-height: 1.8; opacity: .9;
}
.site-copyright .copyright-ban {
  display: inline-block; margin-top: 6px;
  color: #ffd43b; font-weight: 700; font-size: 12px;
  border: 1px solid rgba(255,212,59,.45); border-radius: 8px;
  padding: 5px 10px; background: rgba(255,212,59,.08);
}

/* ---------- 💌 卡片上的家长留言角标（条数 + 有新留言提示） ---------- */
.stu-card { position: relative; }
.stu-card .name-row.has-msg { padding-right: 72px; }   /* 给角标让位，进度不被遮 */
.msg-badge {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.7;
  background: rgba(255,255,255,.14); color: var(--muted);
  border: 1px solid rgba(255,255,255,.18);
  pointer-events: none;
}
.msg-badge .mb-icon { font-size: 12px; }
/* 未读：红色 + 轻微呼吸，孩子一眼能看见"楼上有新信" */
.msg-badge.unread {
  background: linear-gradient(180deg,#ff5a6e,#e0324a); color: #fff;
  border-color: rgba(255,255,255,.55);
  animation: msgPulse 1.6s ease-out infinite;
}
.msg-badge.unread .mb-new { margin-left: 2px; font-size: 10px; letter-spacing: .5px; }
@keyframes msgPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,90,110,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(255,90,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,90,110,0); }
}

/* ---------- 💌 详情页：大楼旁的家长留言便签 ---------- */
.msg-sticky {
  position: relative; margin: 12px auto 2px; max-width: 330px;
  padding: 10px 14px 8px; border-radius: 3px;
  background: linear-gradient(180deg,#fff8c9,#ffe680);
  color: #4a3b12; font-size: 13.5px; line-height: 1.6;
  box-shadow: 0 6px 14px rgba(0,0,0,.28);
  transform: rotate(-1.2deg);
}
.msg-sticky::before {   /* 便签顶端的"胶带" */
  content: ""; position: absolute; left: 50%; top: -8px;
  transform: translateX(-50%) rotate(-3deg);
  width: 64px; height: 16px; background: rgba(255,255,255,.45);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.msg-sticky-from { font-weight: 800; color: #8a6d16; font-size: 12.5px; margin-bottom: 2px; }
.msg-sticky-body { white-space: pre-wrap; word-break: break-word; }
.msg-sticky-foot { margin-top: 4px; font-size: 11px; color: #9c8340; text-align: right; }

/* ---------- 🌟 本周进步之星（比新增、不比总量） ---------- */
.star-block {
  margin: 0 0 14px; padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,212,59,.12), rgba(255,255,255,.05));
  border: 1px solid rgba(255,212,59,.28);
}
.star-title { margin: 0 0 9px; font-size: 15px; color: #ffd43b; font-weight: 800; }
.star-list { display: flex; flex-wrap: wrap; gap: 8px; }
.star-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); font-size: 13px;
}
.star-item.top1 {
  background: linear-gradient(180deg,#ffe08a,#ffb347); color: #3a2c06;
  border-color: #ffd43b; font-weight: 800;
}
.star-rank { font-weight: 800; opacity: .75; }
.star-name { font-weight: 700; }
.star-add { color: var(--muted); font-size: 12px; }
.star-item.top1 .star-add { color: #6b4d0a; }
/* ---------- 🌟 每周背诵荣誉卡片（家长端） ---------- */
.parent-honor-wrap { margin: 0 0 4px; }
.weekly-honor {
  background: linear-gradient(180deg, #fffdf6 0%, #ffffff 60%, #fff7ef 100%);
  border: 1px solid #f0d9a8; border-radius: 14px; padding: 12px 14px 14px;
  box-shadow: 0 2px 10px rgba(224,169,74,.12);
}
.wh-title { margin: 0 0 8px; font-size: 15px; color: #e8590c; font-weight: 800; }
.wh-self {
  margin: 0 0 10px; padding: 7px 12px; border-radius: 10px; text-align: center;
  background: #fff3bf; color: #8a5a00; font-weight: 700; font-size: 13.5px;
}
.wh-sub { margin: 10px 0 6px; font-size: 13px; color: #b8860b; font-weight: 700; }
.wh-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wh-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px;
  background: #fff; border: 1px solid #ffe2a8; font-size: 13px;
}
.wh-item.me { background: #fff3bf; border-color: #ffd43b; box-shadow: 0 0 0 2px rgba(255,212,59,.35); }
.wh-name { font-weight: 700; color: #5a4632; }
.wh-add { flex: 0 0 auto; color: #e0243c; font-weight: 800; }
.wh-empty { font-size: 12.5px; padding: 4px 2px; }
/* 老师端每周面板的小标题 */
.wk-h { margin: 14px 0 6px; font-size: 14px; color: #b8860b; font-weight: 800; }
.star-tip { margin-top: 9px; font-size: 11.5px; line-height: 1.6; }
.star-empty { font-size: 12.5px; }
/* 家长端单独挂的「本周背书最积极」榜单容器：与上下区块留白一致 */
.parent-star-wrap { margin: 0 0 4px; }
/* 滚动轨道：.star-list > .star-marquee > .star-track（手机放不下时克隆一份无缝横滚） */
.star-marquee { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; min-width: 0; }
.star-track { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.star-track.clone { display: none; }   /* 只有手机端跑马灯时才显示副本 */
/* 手机端：一行放不下就「自动滚动」，不用手指右滑；点一下可暂停看清名字 */
@media (max-width: 620px) {
  .star-block { padding: 10px 12px 11px; }
  .star-list { flex-wrap: nowrap; gap: 0; }
  .star-marquee { flex-wrap: nowrap; gap: 0; flex: 0 0 auto; width: max-content; }
  .star-track { flex-wrap: nowrap; flex: 0 0 auto; }
  .star-list.is-marquee {
    overflow: hidden; padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  }
  .star-list.is-marquee .star-track.clone { display: flex; }
  .star-list.is-marquee .star-marquee {
    animation: starMarquee var(--star-dur, 22s) linear infinite;
    will-change: transform;
  }
  .star-list.is-swipe { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .parent-star-wrap .star-tip { display: none; }   /* 手机省一行说明，榜单优先 */
}
@keyframes starMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 📄 期末成长档案（A4，一人一页，可打印） ---------- */
#archiveWrap {
  position: fixed; inset: 0; z-index: 9999;
  background: #eef1f7; overflow: auto; padding: 0 0 40px;
}
.archive-toolbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: #1a2238; color: #fff;
}
.archive-toolbar .archive-hint { font-size: 12px; color: #9fb0d6; margin-right: auto; }
.archive-pages { padding: 16px; }
.a4 {
  width: 210mm; min-height: 297mm; margin: 0 auto 16px; padding: 16mm 18mm;
  background: #fff; color: #23304a; box-sizing: border-box;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.a4-head { text-align: center; border-bottom: 2px solid #23304a; padding-bottom: 8px; }
.a4-school { font-size: 12px; letter-spacing: 2px; color: #6b7a99; }
.a4-title { font-size: 26px; font-weight: 800; letter-spacing: 6px; margin: 6px 0 2px; }
.a4-sub { font-size: 12px; color: #6b7a99; }
.a4-name-row { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 12px; }
.a4-label { font-size: 12px; color: #6b7a99; }
.a4-name { font-size: 30px; font-weight: 800; }
.a4-role { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #fff3c4; color: #8a6d16; }
.a4-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
.a4-stat { text-align: center; background: #f5f7fb; border-radius: 10px; padding: 10px 4px; }
.a4-stat b { display: block; font-size: 22px; color: #e0324a; }
.a4-stat span { font-size: 11px; color: #6b7a99; }
.a4-bar { height: 10px; background: #e6eaf2; border-radius: 999px; overflow: hidden; margin: 6px 0 18px; }
.a4-bar i { display: block; height: 100%; background: linear-gradient(90deg,#ffd43b,#ff9d3c); }
.a4-sec { margin: 16px 0; }
.a4-sec-t {
  font-size: 13px; font-weight: 800; color: #23304a; margin-bottom: 8px;
  border-left: 4px solid #ffd43b; padding-left: 8px;
}
.a4-msg { font-size: 13px; line-height: 1.8; margin-bottom: 6px; background: #fffbe6; padding: 8px 10px; border-radius: 8px; }
.a4-msg.empty { color: #9aa7bf; background: #f7f9fc; }
.a4-msg-a { color: #8a6d16; font-weight: 700; }
.a4-lines i { display: block; height: 22px; border-bottom: 1px dashed #c6cfe0; }
/* 自动生成的评语：可点击修改，打印时去掉编辑痕迹 */
.a4-comment {
  font-size: 13px; line-height: 1.9; padding: 9px 11px;
  background: #fffdf5; border-radius: 8px; border: 1px dashed #e6d9a8;
  outline: none; white-space: pre-wrap;
}
.a4-comment:focus { background: #fffbe6; border-style: solid; }
.a4-edit-tip { font-weight: 400; font-size: 11px; color: #9aa7bf; margin-left: 6px; }
/* 背诵大楼缩略格 */
.a4-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.a4-grid i { height: 15px; border-radius: 3px; background: #e9edf5; }
.a4-grid i.on { background: linear-gradient(180deg,#ffe08a,#ffb347); box-shadow: 0 0 4px rgba(255,180,60,.6); }
.a4-units { margin-top: 8px; font-size: 11px; color: #8a6d16; }
.a4-wish {
  margin: 18px 0 0; padding: 10px 12px; border-radius: 8px;
  background: #f7f9fc; font-size: 12px; color: #6b7a99; text-align: center;
}
.a4-foot {
  margin-top: 26px; padding-top: 8px; border-top: 1px solid #dde3ee;
  font-size: 10px; color: #9aa7bf; text-align: center;
}
@page { size: A4; margin: 0; }
@media print {
  body > *:not(#archiveWrap) { display: none !important; }
  /* 打印时评语变成正式文字：去掉虚线框和「可点击修改」提示 */
  .a4-comment { background: #fff; border: none; padding: 0; }
  .a4-edit-tip { display: none; }
  #archiveWrap { position: static; background: #fff; overflow: visible; padding: 0; }
  .archive-toolbar { display: none !important; }
  .archive-pages { padding: 0; }
  .a4 { box-shadow: none; margin: 0; page-break-after: always; }
  .a4:last-child { page-break-after: auto; }
}
/* 详情弹窗里的徽章墙（家长端也能看到） */
.badge-wall { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bw-label { font-size: 12px; color: var(--muted); }
.bw-item {
  font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,207,107,.3), rgba(255,143,171,.22));
  border: 1px solid rgba(255,207,107,.55); color: #ffe0a3;
  animation: badgeShine 2.6s ease-in-out infinite;
}
.bw-item.gold {
  background: linear-gradient(135deg, #ffcf6b, #ff8fab); color: #3b2600; border-color: #fff3c4;
}
.bw-tip { font-size: 11.5px; color: var(--muted); }
.btn-link {
  margin-top: 8px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; text-decoration: underline;
}
.btn-link:hover { color: #fff; }

/* ---------- 待发小红花清单 ---------- */
.award-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.aw-check { display: flex; align-items: center; gap: 5px; margin-left: auto;
  font-size: 12.5px; color: var(--muted); cursor: pointer; }
.aw-check input { width: 15px; height: 15px; accent-color: var(--gold, #ffcf6b); }
.award-wrap { display: flex; flex-direction: column; gap: 12px; max-height: 62vh; overflow: auto; }
.aw-sum { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.aw-sum b { color: #ffcf6b; font-size: 15px; }
.aw-sec { border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); }
.aw-sec.unit { border-left: 3px solid #ff8fab; }
.aw-sec.group { border-left: 3px solid #ffcf6b; }
.aw-sec.rep { border-left: 3px solid #7ee6d0; }
.aw-sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.aw-sec-h b { font-size: 13.5px; }
.aw-sec-h .muted { font-size: 11.5px; flex: 1; }
.aw-sec-h i { font-style: normal; font-size: 12px; color: var(--muted); }
.aw-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.aw-row.done { opacity: .5; }
.aw-no { flex-shrink: 0; width: 22px; text-align: center; font-size: 11.5px; color: var(--muted); }
.aw-name { flex-shrink: 0; min-width: 68px; font-weight: 700; }
.aw-desc { flex: 1; font-size: 12px; color: var(--muted); }
.aw-given { flex-shrink: 0; font-size: 11.5px; color: #7ee6d0; }
/* 🏅 单元通关徽章（卡片 / 家长端 / 教室端通用） */
.unit-badge {
  font-size: 11px; padding: 1px 7px; border-radius: 999px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255,207,107,.28), rgba(255,143,171,.2));
  border: 1px solid rgba(255,207,107,.5); color: #ffe0a3; font-weight: 800;
  animation: badgeShine 2.6s ease-in-out infinite;
}
@keyframes badgeShine {
  0%, 100% { box-shadow: 0 0 0 rgba(255,207,107,0); }
  50% { box-shadow: 0 0 8px rgba(255,207,107,.55); }
}
/* 小组全组通关标记 */
.cd-allclear {
  font-size: 11px; padding: 1px 8px; border-radius: 999px; margin-left: 6px;
  background: rgba(255,207,107,.18); border: 1px solid rgba(255,207,107,.45); color: #ffe0a3;
}

/* ---------- 房子迷你卡（打印裁开，贴备用本/家校本） ---------- */
.modal.mini-modal { max-width: 900px; }
.mini-body { max-height: 62vh; overflow: auto; padding: 4px 2px 10px; }
.mini-sheet {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 4px; align-items: start;
}
.mini-body.per-8 .mini-sheet { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mini-body.per-12 .mini-sheet { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-card {
  position: relative; border: 1px dashed var(--line); border-radius: 12px;
  padding: 8px 9px 7px; background: rgba(255,255,255,.04);
  display: flex; flex-direction: column; gap: 4px; break-inside: avoid;
  align-self: start;                 /* 别让网格把卡片拉得老高 */
}
.mini-body.per-8 .mini-card { padding: 11px 12px 9px; }
.mini-body.per-8 .mini-sheet { grid-auto-rows: min-content; }
.mc-head { display: flex; align-items: center; gap: 6px; }
.mc-no {
  flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  background: rgba(255,255,255,.14); color: var(--ink);
  font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center;
}
.mc-name { font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.mini-body.per-8 .mc-name { font-size: 17px; }
.mc-role {
  font-size: 10px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 5px; line-height: 15px;
}
.mc-house { display: flex; justify-content: center; padding: 3px 0 1px; min-height: 62px; }
.mini-body.per-8 .mc-house { min-height: 78px; }

/* 迷你卡专用简化楼：楼层一行一格，纯色块，黑白打印也清楚
   （不走 buildBuilding 那套尖顶/渐变，避免打印时糊成一团） */
.mc-b { display: flex; flex-direction: column; gap: 1.5px; width: 100%; max-width: 150px; }
.mc-roof {
  height: 10px; clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background: #4a5a78; margin: 0 5px;
}
.mc-b.gold .mc-roof { background: #b98b2e; }
.mc-fl { display: flex; gap: 1.5px; height: 7px; }
.mc-fl > i {
  flex: 1 1 0; border-radius: 1.5px; background: #dfe4ec; border: 1px solid #c3cad6;
}
.mc-fl > i.on { background: var(--c, #4dabf7); border-color: rgba(0,0,0,.18); }
.mc-fl.W > i.on { background: #8e7bef; }
.mc-fl.A > i.on { background: #ff6b81; }
.mc-fl.B > i.on { background: #ff9f43; }
.mc-fl.C > i.on { background: #ffd43b; }
.mc-fl.D > i.on { background: #51cf66; }
.mc-fl.F > i.on { background: #22b8cf; }
.mc-fl.G > i.on { background: #4dabf7; }
.mc-bar { display: flex; align-items: center; gap: 6px; }
.mc-lit { font-size: 11.5px; font-weight: 700; color: var(--pG); flex: 0 0 auto; }
.mc-track {
  flex: 1 1 auto; height: 6px; border-radius: 999px; background: rgba(255,255,255,.12);
  overflow: hidden; min-width: 24px;
}
.mc-track > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--pG), var(--pW)); }
.mc-badge { font-size: 11px; flex: 0 0 auto; }
.mc-blank {
  position: absolute; top: 7px; right: 8px; width: 34px; height: 34px;
  border: 1px dashed var(--line); border-radius: 8px;
  font-size: 9px; color: var(--muted); line-height: 34px; text-align: center;
}
.mini-foot { font-size: 12px; margin-top: 8px; }

/* ---------- 家长视角预览（老师端核对用） ---------- */
.preview-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 14px; margin: 6px 0 14px; border-radius: 14px;
  border: 1px dashed rgba(255,207,107,.55); background: rgba(255,207,107,.1);
}
.preview-bar .pb-text { flex: 1 1 260px; min-width: 0; line-height: 1.65; }
.preview-bar .pb-text b { display: block; font-size: 14px; color: #ffd98a; margin-bottom: 2px; }
.preview-bar .pb-text span { font-size: 12.5px; color: var(--muted); }
@media print {
  .preview-bar { display: none !important; }
}

/* ---------- 教师端控制器：功能开关 ---------- */
.modal.feature { max-width: 660px; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.feature-body { max-height: 70vh; overflow: auto; }
.feature-tip {
  font-size: 12.5px; line-height: 1.7; padding: 10px 12px; margin-bottom: 12px;
  border-radius: 10px; background: rgba(255,255,255,.05); border: 1px dashed var(--line);
}
.fl-sec-h {
  font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 1px;
  margin: 14px 2px 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line);
}
.fl-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 9px 10px;
  border-radius: 12px; cursor: pointer; transition: background .15s;
  border: 1px solid transparent;
}
.fl-row:hover { background: rgba(255,255,255,.05); }
.fl-row.on { background: rgba(122,200,120,.08); border-color: rgba(122,200,120,.22); }
.fl-row.soon { opacity: .55; cursor: not-allowed; }
.fl-sw {
  flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; border: none;
  background: rgba(255,255,255,.16); position: relative; cursor: pointer;
  transition: background .18s; margin-top: 2px;
}
.fl-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.fl-sw.on { background: linear-gradient(135deg, #7ad878, #4bbf6b); }
.fl-sw.on::after { transform: translateX(18px); }
.fl-sw:disabled { cursor: not-allowed; }
.fl-body { flex: 1; min-width: 0; }
.fl-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fl-tag {
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.1); color: var(--muted); letter-spacing: .3px;
}
.fl-tag.front { background: rgba(77,171,247,.16); color: #9fd6ff; }
.fl-tag.teacher { background: rgba(255,207,107,.16); color: #ffd98a; }
.fl-soon {
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--muted);
}
.fl-desc { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.feature-foot {
  display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
}
.feature-foot .btn:first-child { margin-right: auto; }
.feature-note { font-size: 12px; margin-top: 8px; text-align: right; }

/* ---------- 门禁管理 ---------- */
.modal.access { max-width: 640px; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.access-body { max-height: 66vh; overflow: auto; }
.ac-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ac-row > label { font-weight: 700; font-size: 13px; min-width: 72px; }
/* 网页有效期卡片 */
.ac-exp-card {
  display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(94,234,212,.10), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.10);
}
.ac-exp-card.warn {
  background: linear-gradient(135deg, rgba(255,207,107,.14), rgba(255,255,255,.04));
  border-color: rgba(255,207,107,.38);
}
.ac-exp-card.bad {
  background: linear-gradient(135deg, rgba(255,95,109,.16), rgba(255,255,255,.04));
  border-color: rgba(255,95,109,.45);
}
.aec-main {
  min-width: 168px; display: flex; flex-direction: column; justify-content: center;
  padding-right: 18px; border-right: 1px dashed rgba(255,255,255,.16);
}
.aec-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.aec-date {
  font-size: 27px; font-weight: 900; letter-spacing: 1px; margin: 2px 0 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.aec-left { font-size: 12.5px; color: #7ee6d0; font-weight: 700; }
.ac-exp-card.warn .aec-left { color: #ffcf6b; }
.ac-exp-card.bad .aec-left { color: #ff8b8b; }
.aec-side { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 9px; }
.aec-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.aec-row > input[type="date"] { padding: 4px 8px; }
.aec-quick .btn.tiny { padding: 3px 10px; }
.aec-note { font-size: 11.8px; line-height: 1.6; }
.aec-note b { color: #ffd9d9; }
.ac-row .muted { font-size: 12px; }
.ac-title { font-weight: 800; font-size: 13.5px; margin: 4px 0 10px; }
.ac-list { display: flex; flex-direction: column; gap: 8px; }
.ac-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
}
.ac-item b { font-size: 13.5px; min-width: 92px; }
.ac-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px; font-weight: 800; letter-spacing: 3px;
  color: var(--gold, #ffcf6b); background: rgba(255,207,107,.12);
  border: 1px dashed rgba(255,207,107,.45); border-radius: 8px; padding: 2px 10px;
}
.ac-item .btn.tiny { margin-left: 0; }
.ac-item .btn.tiny:first-of-type { margin-left: auto; }

/* ---------- 喊麦视频点播 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 24, .72); backdrop-filter: blur(3px);
  padding: 24px;
}
.mask[hidden] { display: none; }
.vpanel {
  width: min(720px, 94vw); max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #141d3a, #0f1730);
  border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  padding: 18px 20px 22px;
}
.vpanel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.vpanel-head h3 { margin: 0; font-size: 17px; color: #fff; }
.vclose {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #fff; border-radius: 10px; width: 34px; height: 34px; font-size: 16px; cursor: pointer;
}
.vclose:hover { background: rgba(255,255,255,.16); }
.vplayer {
  width: 100%; max-height: 46vh; background: #000; border-radius: 12px;
  display: block; margin-bottom: 14px;
}
.vlist { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.vunit-h { font-size: 13px; font-weight: 800; color: var(--gold, #ffcf6b); letter-spacing: 1px; margin-bottom: 7px; }
.vgroup-h { font-size: 15px; font-weight: 800; color: #fff; margin: 16px 0 4px;
  padding: 7px 11px; border-radius: 9px; letter-spacing: .5px;
  background: linear-gradient(90deg, rgba(255,207,107,.24), rgba(255,207,107,.03));
  border-left: 3px solid var(--gold, #ffcf6b); }
.vgroup-h:first-child { margin-top: 0; }
.vitems { display: flex; flex-wrap: wrap; gap: 8px; }
.vitem {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 13.5px;
  color: #eaf0ff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
}
.vitem:hover { background: rgba(255,207,107,.16); border-color: rgba(255,207,107,.5); }
.vdel { color: #ff9a9a; font-size: 13px; margin-left: 2px; }
.vdel:hover { color: #ff5a5a; }
.vupload { border-top: 1px dashed rgba(255,255,255,.14); padding-top: 14px; }
.vup-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vup-row .sel.small, .vup-row .inp.small { width: auto; margin-bottom: 0; }
.vup-row .inp.small {
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,.14));
  background: rgba(255,255,255,.06); color: var(--ink, #eaf0ff); font-size: 13px;
}
.vup-row input[type=file] { color: #cfe0ff; font-size: 13px; max-width: 220px; }
.vup-tip { font-size: 12px; color: var(--muted, #9fb0d0); line-height: 1.5; margin-bottom: 8px; }
.vup-tip b { color: var(--gold, #ffcf6b); }
.vup-unit-hint { font-size: 11px; color: var(--muted, #9fb0d0); }

/* ---------- 点读（课文跟读）· 薄荷绿玻璃风（模仿点读模板） ---------- */
.mask.reading-mask { background: rgba(9,52,48,.45); -webkit-backdrop-filter: blur(8px) saturate(140%); backdrop-filter: blur(8px) saturate(140%); }
.rpanel {
  width: min(820px, 96vw); max-height: 90vh; overflow: auto;
  padding: 0 0 86px;
  background:
    radial-gradient(60vw 60vw at 4% 0%, rgba(94,234,212,.5), transparent 60%),
    radial-gradient(50vw 50vw at 100% 4%, rgba(253,186,116,.32), transparent 60%),
    radial-gradient(66vw 66vw at 50% 110%, rgba(165,243,252,.45), transparent 64%),
    linear-gradient(160deg,#f2fdfb,#eefafb 46%,#f4fdfc);
  border: 1px solid rgba(255,255,255,.8); border-radius: 24px;
  box-shadow: 0 26px 70px rgba(13,88,80,.28), inset 0 1px 0 rgba(255,255,255,.9);
}
.rpanel-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.66));
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.7);
  border-radius: 24px 24px 0 0;
}
.rpanel-head h3 { margin: 0; font-size: 17px; font-weight: 900; color: #0f766e; letter-spacing: .2px; line-height: 1.2; }
.rpanel-head h3 .sub { display: block; font-size: 11.5px; font-weight: 800; color: #62847e; margin-top: 2px; }
.rpanel .vclose {
  margin-left: auto; color: #0f766e; background: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 3px 10px rgba(13,88,80,.1);
}
.rpanel .vclose:hover { background: #fff; }
.rdemo { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); color: #b45309;
  font-size: 12.5px; padding: 8px 10px; border-radius: 12px; margin: 12px 14px 0; line-height: 1.5; }
.rtabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 14px 4px; }
.rtab { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.9);
  background: rgba(255,255,255,.7); color: #0f766e; font-weight: 800; font-size: 13px; cursor: pointer;
  box-shadow: 0 3px 10px rgba(13,88,80,.08); transition: .16s; }
.rtab.active { background: linear-gradient(135deg,#14b8a6,#0f766e); color: #fff; border-color: transparent; }
/* 册次下拉（6 册：三上…六上）：家长知道自己后面还有哪些册；没开放的册在选项里标出来 */
.rd-book-sel {
  margin-left: auto; max-width: 46%;
  padding: 7px 26px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.9);
  background-color: rgba(255,255,255,.85);
  color: #0f766e; font-size: 13px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(13,88,80,.1);
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #0f766e 50%),
                    linear-gradient(135deg, #0f766e 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.rd-book-sel option.bk-off { color: #94a3b8; }
/* 未开放 / 内容准备中：整块提示卡片——只留一行小字会让人以为功能坏了 */
.rd-locked { padding: 52px 20px; font-size: 15px; font-weight: 800; color: #64748b; line-height: 1.7; }
.rd-locked .rl-sub { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #94a3b8; }
.rbody { padding: 4px 14px 0; }
.runit-title { font-size: 16px; font-weight: 900; color: #0d3b36; margin: 10px 2px 2px; }
/* 板块头（字母 tag） */
.rsec-h { display: flex; align-items: center; gap: 9px 11px; margin: 16px 2px 8px;
  padding: 10px 13px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(20,184,166,.16), rgba(15,118,110,.08));
  border: 1px solid rgba(255,255,255,.82); box-shadow: 0 5px 18px rgba(13,88,80,.08); }
.rsec-h .tag { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(140deg,#14b8a6,#0f766e); color: #fff; font-size: 19px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(15,118,110,.34); }
.rsec-h .nm { font-size: 18px; font-weight: 900; color: #0f766e; letter-spacing: .2px; }
.rsec-h .cn { color: #e11d48; font-weight: 800; font-size: 13px; }
.rsec-h .hr { flex: 1 1 auto; height: 1px; min-width: 10px; background: linear-gradient(90deg, rgba(20,184,166,.45), transparent); }
/* 单词网格 */
.rwords { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px,1fr)); gap: 10px; }
.ritem.word {
  text-align: left; border-radius: 16px; padding: 12px;
  background: linear-gradient(150deg, rgba(255,255,255,.86), rgba(255,255,255,.62));
  border: 1px solid rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  box-shadow: 0 4px 14px rgba(13,88,80,.09), inset 0 1px 0 rgba(255,255,255,.9);
  cursor: pointer; transition: transform .16s, box-shadow .2s, background .2s; min-height: 62px;
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.ritem.word .ren { font-size: clamp(16px,4.4vw,20px); font-weight: 800; color: #0b3b35; line-height: 1.3; word-break: break-word; }
.ritem.word .rzh { font-size: 12.5px; font-weight: 800; color: #e11d48; line-height: 1.35; }
/* 句子行 */
.rsentences { display: flex; flex-direction: column; gap: 9px; }
.ritem.sent {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: linear-gradient(150deg, rgba(255,255,255,.86), rgba(255,255,255,.62));
  border: 1px solid rgba(255,255,255,.85); border-radius: 16px; padding: 12px;
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  box-shadow: 0 4px 14px rgba(13,88,80,.09), inset 0 1px 0 rgba(255,255,255,.9);
  cursor: pointer; transition: transform .16s, box-shadow .2s, background .2s; min-height: 56px; position: relative;
}
.ritem.sent:active { transform: scale(.988); }
.ritem.sent .rn { flex: 0 0 auto; width: 27px; height: 27px; border-radius: 9px;
  background: linear-gradient(150deg,#e7fdf8,#ccfbf1); color: #0f766e; font-weight: 900; font-size: 13px;
  display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 2px 6px rgba(13,88,80,.1); }
.ritem.sent .rtxt { flex: 1 1 auto; min-width: 0; }
.ritem.sent .ren { display: block; font-size: clamp(16px,4.6vw,20px); font-weight: 800; color: #0b3b35; line-height: 1.36; word-break: break-word; }
.ritem.sent .rzh { display: block; font-size: 13px; font-weight: 800; color: #e11d48; margin-top: 3px; line-height: 1.4; }
.ritem .spk { flex: 0 0 auto; width: 22px; height: 22px; color: #14b8a6; opacity: .55; transition: .18s; }
/* 播放中高亮 */
.ritem.spk-active {
  background: linear-gradient(135deg, rgba(45,212,191,.95), rgba(13,148,136,.96))!important;
  border-color: rgba(255,255,255,.5)!important;
  box-shadow: 0 12px 30px rgba(13,148,136,.38), inset 0 1px 0 rgba(255,255,255,.5)!important;
}
.ritem.spk-active .ren, .ritem.spk-active .rzh { color: #fff!important; }
.ritem.spk-active .rn { background: rgba(255,255,255,.94)!important; color: #0f766e!important; }
.ritem.sent.spk-active .spk { color: #fff; opacity: 1; animation: rdpulse .9s ease-in-out infinite; }
@keyframes rdpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.28); } }
/* 中文显隐 */
.rpanel.hidecn .ritem .rzh { display: none; }
/* 整篇连读：给学生跟读的间隙标记 */
.ritem.wait::after {
  content: "该你读"; position: absolute; right: 9px; top: -9px; z-index: 2;
  font-size: 10.5px; font-weight: 900; letter-spacing: .5px; color: #fff;
  background: linear-gradient(135deg,#f59e0b,#e11d48);
  padding: 3px 9px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(225,29,72,.32);
  animation: rdwink 1.1s ease-in-out infinite;
}
@keyframes rdwink { 0%,100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1); } }
/* 底部固定工具条（药丸） */
.rd-tools {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; gap: 7px; padding: 8px 10px; border-radius: 999px; max-width: calc(100vw - 16px);
  background: linear-gradient(150deg, rgba(255,255,255,.92), rgba(255,255,255,.7));
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 12px 34px rgba(13,88,80,.22), inset 0 1px 0 rgba(255,255,255,.9);
}
.rd-pill { border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.74); color: #0f766e;
  font-weight: 800; font-size: 13px; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  font-family: inherit; transition: .16s; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
  box-shadow: 0 3px 12px rgba(13,88,80,.1); }
.rd-pill:active { transform: scale(.94); }
.rd-pill.on { background: linear-gradient(135deg,#2dd4bf,#0f766e); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(15,118,110,.35); }
.rd-pill.gold { background: linear-gradient(135deg,#fbbf24,#f59e0b); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(245,158,11,.35); }
.rd-pill.ghost { background: rgba(255,255,255,.6); }
  /* 板块插图（模仿点读模板的图片卡片） */
  .rcard.pic { margin: 0 0 12px; border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.6);
    border: 1px solid rgba(255,255,255,.8); box-shadow: 0 5px 18px rgba(13,88,80,.1); }
  .rcard.pic img { display: block; width: 100%; border-radius: 18px; }
  /* 短语缩略图 */
  .ritem.sent .rthumb { flex: 0 0 auto; width: 60px; height: 46px; object-fit: cover; border-radius: 10px;
    background: #fff; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(13,88,80,.1); }
  .ritem.sent.has-img { padding-left: 14px; }
  .ritem.sent.has-img .rn { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }
  /* 录音面板 */
  .recpanel { padding-bottom: 20px; }
  .rec-tip { margin: 10px 14px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
    color: #0f766e; background: rgba(20,184,166,.12); border: 1px solid rgba(20,184,166,.3); line-height: 1.5; }
  .rec-list { padding: 4px 14px 0; }
  .rec-rows { display: flex; flex-direction: column; gap: 9px; }
  .rec-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px;
    background: linear-gradient(150deg, rgba(255,255,255,.86), rgba(255,255,255,.62));
    border: 1px solid rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(13,88,80,.09); }
  .rec-row .rn { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px; font-size: 12px; font-weight: 900;
    color: #0f766e; background: linear-gradient(150deg,#e7fdf8,#ccfbf1); display: flex; align-items: center; justify-content: center; }
  .rec-row .rtxt { flex: 1 1 auto; min-width: 0; }
  .rec-row .ren { font-size: 15px; font-weight: 800; color: #0b3b35; line-height: 1.3; }
  .rec-row .rzh { font-size: 12px; font-weight: 800; color: #e11d48; margin-top: 2px; }
  .rec-mic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; font-size: 17px;
    color: #0f766e; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95);
    box-shadow: 0 3px 10px rgba(13,88,80,.14); transition: .16s; }
  .rec-mic:active { transform: scale(.94); }
  .rec-mic.rec { background: linear-gradient(135deg,#f43f5e,#e11d48); color: #fff; border-color: transparent;
    animation: rdpulse .9s ease-in-out infinite; }
  .rec-mic.done { background: linear-gradient(135deg,#2dd4bf,#0f766e); color: #fff; border-color: transparent; }
  .rec-play { flex: 0 0 auto; height: 34px; width: 190px; max-width: 34vw; display: none; }
  @media (max-width: 430px) { .rec-play { width: 140px; } }
  .rec-del { flex: 0 0 auto; min-width: 34px; height: 34px; padding: 0 7px; border-radius: 11px; cursor: pointer; font-size: 14px;
    color: #e11d48; background: #fff; border: 1px solid #f3c1cb; box-shadow: 0 3px 10px rgba(225,29,72,.10); transition: .16s; }
  .rec-del:active { transform: scale(.94); }
  .rec-del[hidden] { display: none !important; }
  /* 教师端 · 点读配图管理 */
  .imgpanel { padding-bottom: 20px; }
  .img-tip { margin: 10px 14px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
    color: #0f766e; background: rgba(20,184,166,.12); border: 1px solid rgba(20,184,166,.3); line-height: 1.5; }
  .img-list { padding: 4px 14px 0; display: flex; flex-direction: column; gap: 11px; }
  .img-row { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 16px;
    background: linear-gradient(150deg, rgba(255,255,255,.86), rgba(255,255,255,.62));
    border: 1px solid rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(13,88,80,.09); }
  .img-sec { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 900; color: #0f766e; }
  .img-prev { flex: 0 0 auto; width: 96px; height: 64px; border-radius: 12px; overflow: hidden;
    background: #fff; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(13,88,80,.1);
    display: flex; align-items: center; justify-content: center; }
  .img-prev img { width: 100%; height: 100%; object-fit: cover; }
  .img-none { font-size: 12px; color: #9fb0d0; font-weight: 700; }
  .img-pick { flex: 0 0 auto; cursor: pointer; font-size: 13px; font-weight: 800; color: #0f766e;
    background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95); padding: 8px 12px; border-radius: 10px;
    box-shadow: 0 3px 10px rgba(13,88,80,.12); }
  .img-pick input { display: none; }
  .img-up { flex: 0 0 auto; cursor: pointer; font-size: 13px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg,#2dd4bf,#0f766e); border: none; padding: 9px 14px; border-radius: 10px;
    box-shadow: 0 3px 12px rgba(15,118,110,.32); }
  .img-up:disabled { background: rgba(255,255,255,.6); color: #9fb0d0; box-shadow: none; cursor: not-allowed; }
  @media (max-width: 430px) { .img-prev { width: 72px; height: 52px; } .img-sec { font-size: 13px; } }
  /* 教师端 · 点读单元编辑器 */
  .editpanel { padding-bottom: 16px; }
  .edit-body { padding: 12px 14px 0; max-height: 60vh; overflow: auto; }
  .edit-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .edit-row label { flex: 0 0 auto; width: 52px; font-size: 13px; font-weight: 900; color: #0f766e; }
  .edit-row .inp { flex: 1 1 auto; }
  .inp { padding: 9px 11px; border-radius: 11px; border: 1px solid rgba(255,255,255,.9);
    background: rgba(255,255,255,.7); color: #0b3b35; font-size: 14px; font-family: inherit; min-width: 0; }
  .inp:focus { outline: none; border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20,184,166,.22); }
  .edit-sec-title { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px;
    font-size: 14px; font-weight: 900; color: #0f766e; }
  .edit-kv { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
  .edit-kv .en { flex: 2 1 auto; }
  .edit-kv .zh { flex: 1 1 auto; }
  .edit-sec { background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.8);
    border-radius: 14px; padding: 11px; margin-bottom: 11px; }
  .edit-sec-head { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
  .edit-sec-head .secname { flex: 1 1 auto; }
  .edit-items .edit-kv .en { flex: 2 1 auto; }
  .mini { cursor: pointer; font-size: 12.5px; font-weight: 800; color: #0f766e;
    background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.95); padding: 7px 11px; border-radius: 9px;
    box-shadow: 0 2px 8px rgba(13,88,80,.1); }
  .mini.del { color: #e11d48; }
  .edit-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 14px 0; }

/* ---------- 字帖生成器挂载容器（仅容器/关闭按钮，模块内部样式均用 vs- 前缀） ---------- */
#sheet { position: fixed; inset: 0; z-index: 9000; background: #fff; overflow: auto; }
#sheet[hidden] { display: none; }
.vs-close {
  position: fixed; top: 14px; right: 16px; z-index: 9100;
  width: 42px; height: 42px; border: none; border-radius: 50%;
  background: rgba(15,23,42,.10); color: #1f2937; font-size: 22px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.18); transition: background .15s;
}
.vs-close[hidden] { display: none; }
.vs-close:hover { background: rgba(15,23,42,.22); }
body.vs-modal-open { overflow: hidden; }
/* 任一弹窗（.modal-mask）打开时锁死背后页面滚动：否则手机上在详情弹窗里往上滑，
   滑到弹窗尽头后手势会「链式」传给背后的名册——弹窗里的楼不再动、页面在滚，
   体感就是「翻不太动」，关掉弹窗还停在莫名其妙的位置。由 app.js 的
   MutationObserver 监听所有弹窗 hidden 变化自动加/摘这个类。 */
body.modal-open { overflow: hidden; }

/* ---------- 教师端：紧凑名字名册（替代高楼卡片 / 宽卡片） ---------- */
.roster-list { display: flex; flex-direction: column; gap: 16px; }
.roster-list .sur-group { display: block; }
.roster-list .sur-group[hidden] { display: none; }
/* 手机：组名竖排在左、学生卡片在右。
   原来组名单独占一行（约 40px），20 个小组就白吃掉 800px 高度；
   改成横向后一组只占卡片那一行，页面短一大截，不用再缩小页面看全班。 */
@media (max-width: 719px) {
  .roster-list { gap: 9px; }
  .roster-list .sur-group {
    display: flex; align-items: flex-start; gap: 8px;
  }
  .roster-list .sur-group .head {
    flex: 0 0 auto; flex-direction: column; align-items: center; gap: 3px;
    width: 32px; margin: 0; padding: 0 7px 0 0;
    border-bottom: none; border-right: 1px dashed rgba(124,242,214,.28);
  }
  .sur-group .sur-char-big { width: 26px; height: 26px; line-height: 26px; font-size: 16px; border-radius: 7px; }
  .sur-group .sur-count { font-size: 10px; line-height: 1; white-space: nowrap; }
  .roster-list .sur-group .roster-row { flex: 1 1 auto; min-width: 0; gap: 6px; }
}
/* 宽屏：小组改多列网格。
   原来每组独占一整行（1920 屏下组内容只有 550px，右边 1300px 全空），
   一屏只能看到 5~6 个组，老师必须手动缩小页面才看得全全班。
   改成自适应多列后，同样一屏能看到 3~4 倍的组。 */
@media (min-width: 720px) {
  .roster-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px 20px;
    align-items: start;
  }
  .roster-list .sur-group { display: block; min-width: 0; }
  .roster-list .sur-group .head { margin-bottom: 7px; }
}
.roster-list .sur-group .head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 8px; padding: 4px 0 6px;
  border-bottom: 1px dashed rgba(124,242,214,.35);
}
.sur-group .sur-char-big {
  font-size: 18px; font-weight: 800; color: #06281f;
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  background: linear-gradient(135deg, #7cf2d6, #4fd6b0); border-radius: 8px;
}
.sur-group .sur-count { font-size: 12px; color: var(--muted); }

.roster-row { display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; }

.stu-card.roster-card {
  /* 宽度随内容自适应：88px 只作为下限。
     原来写死 88px，遇到「三字姓名 + 课代表/组长徽章」时（姓名 44 + 间距 3 + 徽章 49 + 内边距 8 > 88）
     徽章是 flex:0 0 auto 且 nowrap，压不下去就直接溢出到卡片外面（截图里那个「超出格子」的现象）。
     改成 auto 后卡片自己撑开，徽章永远在框内；min-width 保证短名字的卡片不会缩得比原来小。 */
  width: auto; min-width: 88px; max-width: 100%; box-sizing: border-box;
  min-height: 56px; padding: 7px 5px 6px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; cursor: pointer; gap: 3px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(124,242,214,.22); border-radius: 10px;
}
.stu-card.roster-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124,242,214,.7);
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
  background: rgba(124,242,214,.10);
}
.stu-card.roster-card .name-row { justify-content: center; gap: 3px; flex-wrap: nowrap; }
.stu-card.roster-card .name {
  font-size: 14.5px; font-weight: 700; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 78px;
}
.stu-card.roster-card .role-tag { transform: scale(.82); margin: 0; }
.stu-card.roster-card .roster-foot {
  font-size: 10.5px; color: var(--muted); line-height: 1;
  white-space: nowrap;
}
.stu-card.roster-card .roster-foot.due { color: #ffd166; }
.stu-card.roster-card[hidden] { display: none; }

/* 跨班搜索结果：输入查询词时显示全部班级的匹配学生（每张卡片带班级分组标题） */
.search-results { margin-top: 14px; }
.search-results .empty { margin: 8px 2px; }
.rs-class-head {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 8px; padding: 4px 0 6px;
  font-size: 14px; font-weight: 700; color: #ffd98a;
  border-bottom: 1px dashed rgba(255,217,138,.35);
}
.rs-class-head:first-child { margin-top: 2px; }


/* ==================== 教室大屏（?mode=classroom）：自适应占满整屏 ==================== */
/* 思路：大楼（city-mini）是多单元横排、楼层纵向堆叠的「天际线」，最适合大屏。
   把它从 fit-content 居中的小图，改成占满卡片宽度、楼层放大，既变大又填满整屏；
   网格列宽随分辨率用 vw 缩放，整行铺满，消除右侧空白。 */
body.kiosk { overflow-x: hidden; }
body.kiosk .topbar { padding: 6px 16px; }
body.kiosk .slogan { display: none; }   /* 大屏隐藏标语，省出竖向空间；保留班级切换以便同屏换班 */
body.kiosk #main { padding: 12px 18px 28px; }
/* 普通网格按屏宽自适应、整行铺满（小组区单独处理，见下） */
body.kiosk .grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(300px, 21vw, 480px)), 1fr));
  gap: 18px;
}
/* 🔑 希沃大屏：每个小组 = 一条「横向通栏」——左边放组名/完成率，右边同组成员排成
   同一行（不换行），一眼扫完组内背诵情况；比纵向堆叠更紧凑，一屏能看好几组。 */
body.kiosk .cd-block {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  gap: 16px;
}
body.kiosk .cd-block .cd-info { flex: 0 0 clamp(150px, 15vw, 240px); min-width: 0; }
body.kiosk .cd-grid {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  /* 组内人多时自动换行（如 6 人 → 3+3），保证每栋楼都看得清，
     而不是硬塞一行把 10 个单元挤成细条。人少时仍是一行铺满。 */
  flex-flow: row wrap;
  gap: 14px;
  overflow-x: auto;                  /* 兜底：极端窄屏才需要横向滚动 */
  padding-bottom: 8px;
  scrollbar-width: thin;
}
body.kiosk .cd-grid .stu-card {
  flex: 1 1 280px;        /* 基准宽度：空间够就等分铺满，不够就换行 */
  min-width: 260px;       /* 下限：每栋楼至少这么宽，再窄就挤成细条了 */
  max-width: 460px;       /* 上限：组里人少时也不至于大得离谱 */
}
/* 大屏上整张卡都可点开详情，隐藏多余的「详情/全屏」按钮，把纵向空间让给更多组 */
body.kiosk .stu-card .btn.ghost.small { display: none; }
/* ⚠️ 下面这些「撑满/拉伸」样式只作用于「小组比拼总览」里的卡片（.cd-grid）。
   希沃大屏需要同组一行、整行铺满才看得清；但组长/课代表的点亮界面、以及点开学生
   后的详情，都要保持原来的紧凑大小——之前写成全局，导致组长端的房子被放得又大又丑。 */
body.kiosk .cd-grid .city-mini { width: 100%; margin: 0; }
body.kiosk .cd-grid .city-mini .bcol { flex: 1 1 0; min-width: 0; align-items: stretch; }
body.kiosk .cd-grid .city-mini .floors { width: 100%; }
body.kiosk .cd-grid .floor { width: 100%; height: clamp(9px, 1.35vh, 18px); border-radius: 4px; }
body.kiosk .cd-grid .city-mini .floors-row { gap: 4px; }
body.kiosk .cd-grid .city-mini .roof-bar { width: 100%; height: clamp(20px, 3vh, 34px); margin-bottom: 6px; }
body.kiosk .cd-grid .stu-card { padding: 16px 16px 18px; }
body.kiosk .cd-block { padding: 16px 18px 18px; }
body.kiosk .cd-title { font-size: 19px; }
body.kiosk .unit-label { font-size: 11px; }
/* 卡片小楼：层高/房顶下限略提（9px→11px 起步），低分辨率屏也看得清，
   但不激进放大——组长端点亮界面保持紧凑是之前定过的（全局放大被说过丑）。 */
body.kiosk .cd-grid .floor { height: clamp(11px, 1.9vh, 26px); }
body.kiosk .cd-grid .city-mini .roof-bar { height: clamp(22px, 3.4vh, 42px); }

/* 🏢 教室大屏·详情/抽背里的大楼：原来是写死的 520px 宽 + 26px 层高，
   在高分辨率大屏（1080p/4K）上房子显得很小。改为按屏高 vh 自适应（带上下限防溢出），
   高分辨率屏楼更大、低分辨率屏也不变形。只作用于「全屏看楼」的两处
   （详情弹窗 + 随机抽背结果）；卡片总览的小楼不受影响（保持紧凑）。 */
body.kiosk :is(.modal.detail, .draw-house) .city-big {
  max-width: min(820px, 92vw);
  padding: 16px 8px 12px;
}
body.kiosk :is(.modal.detail, .draw-house) .city-big .floor.big {
  height: clamp(32px, 4.8vh, 62px);
  border-radius: 6px;
  background-size: clamp(11px, 1.6vh, 20px) clamp(11px, 1.6vh, 20px);
}
body.kiosk :is(.modal.detail, .draw-house) .city-big .floor.big .flabel {
  font-size: clamp(11px, 1.7vh, 20px);
}
body.kiosk :is(.modal.detail, .draw-house) .city-big .floors-row { gap: clamp(4px, .6vh, 8px); }
body.kiosk :is(.modal.detail, .draw-house) .city-big .floors { gap: clamp(3px, .5vh, 7px); }
body.kiosk :is(.modal.detail, .draw-house) .city-big .roof-bar {
  height: clamp(42px, 6.2vh, 82px);
  margin-bottom: clamp(5px, .8vh, 10px);
}
body.kiosk :is(.modal.detail, .draw-house) .city-big .ucell {
  height: clamp(24px, 3.4vh, 44px);
  margin-top: clamp(3px, .5vh, 6px);
}
body.kiosk :is(.modal.detail, .draw-house) .city-big .ucrown { font-size: clamp(18px, 2.8vh, 36px); }
body.kiosk :is(.modal.detail, .draw-house) .city-big .crown {
  width: clamp(112px, 17vh, 220px);
  height: clamp(73px, 11vh, 144px);
  top: calc(-1 * clamp(58px, 8.6vh, 116px));
}
body.kiosk :is(.modal.detail, .draw-house) .city-big .unit-label {
  font-size: clamp(12px, 1.8vh, 22px);
  margin-top: clamp(4px, .6vh, 8px);
}
/* 弹窗本体也跟着放宽，给大楼留够横向空间 */
body.kiosk .modal.detail { max-width: min(1100px, 96vw); }
body.kiosk .modal.detail .pillar-wrap { flex-basis: 560px; }

/* ---------- 🌸 据实登记提示（家长端卡片 + 登记弹窗） ---------- */
.flower-card .fc-real-tip {
  margin-top: 6px; padding: 7px 10px; border-radius: 10px; font-size: 12px; line-height: 1.5;
  background: rgba(255,169,77,.14); border: 1px dashed rgba(255,169,77,.45); color: #ffd8a8;
}
/* 登记提示入口：长说明改成弹窗后，这里只留一条短提醒，点一下可重看细则 */
.fl-real-tip {
  display: block; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
  margin: 4px 0 10px; padding: 9px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.5;
  background: rgba(255,169,77,.14); border: 1px dashed rgba(255,169,77,.45); color: #ffd8a8;
  transition: background .15s, border-color .15s;
}
.fl-real-tip:hover { background: rgba(255,169,77,.2); border-color: rgba(255,169,77,.65); }
.fl-real-tip:active { transform: scale(.995); }
.fl-real-tip b { color: #ffc078; }
.fl-real-tip .frt-t1 { display: block; font-weight: 800; font-size: 13px; color: #ffc078; margin-bottom: 1px; }
.fl-real-tip .frt-t2 { display: block; }

/* ---------- 登记朵数：自由输入（不再限定 +1/+2/+5/+6/+10） ---------- */
.fl-count { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 6px; }
.fl-count .fl-step {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  border: 1px solid rgba(255, 212, 59, .45); background: rgba(255, 212, 59, .12); color: #ffd43b;
  font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer;
}
.fl-count .fl-step:hover { background: rgba(255, 212, 59, .22); }
.fl-count .fl-step:active { transform: scale(.93); }
.fl-count-inp {
  width: 92px; text-align: center; font-size: 21px; font-weight: 800; color: #ffd43b;
  padding: 5px 8px; border-radius: 12px; background: rgba(255, 255, 255, .06);
  border: 1.5px solid rgba(255, 212, 59, .4); -moz-appearance: textfield;
  font-family: inherit;
}
/* 自带的上下小箭头藏掉：已经有 −/+ 两个大按钮了，两套控件放一起会打架 */
.fl-count-inp::-webkit-outer-spin-button,
.fl-count-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fl-count-unit { font-size: 13px; color: var(--muted); }

/* ---------- ✏️ 登记后「在实体小红花上打勾」提醒 ---------- */
/* 常驻提示：登记按钮下面，随时提醒家长登记完要去书上打勾，防止同一朵花重复登记 */
.fl-tick-hint {
  margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  background: rgba(124,242,214,.08); border: 1px dashed rgba(124,242,214,.42); color: #b9f2e4;
}
.fl-tick-hint b { color: #7cf2d6; }
.fl-tick-hint .tk-done {
  display: inline-block; padding: 0 5px; border-radius: 6px;
  background: rgba(64,192,87,.22); border: 1px solid rgba(140,233,154,.45); color: #8ce99a; font-weight: 800;
}
/* 登记成功后的确认提醒：绿色实心，比常驻提示更抢眼，明确“这次登了几朵、现在去打几个勾” */
.fl-tick-tip {
  margin-top: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.65;
  background: linear-gradient(180deg, rgba(64,192,87,.20), rgba(64,192,87,.10));
  border: 1px solid rgba(140,233,154,.55); color: #d3f9d8;
  box-shadow: 0 0 0 2px rgba(64,192,87,.10), 0 6px 18px rgba(0,0,0,.18);
}
.fl-tick-tip b { color: #b2f2bb; }
.fl-tick-tip .tk-do {
  display: inline-block; padding: 0 6px; border-radius: 6px;
  background: rgba(64, 192, 87, .28); border: 1px solid rgba(140, 233, 154, .6); color: #b2f2bb;
}
.fl-tick-tip .tk-big { font-size: 15px; font-weight: 800; color: #8ce99a; letter-spacing: .5px; }
/* 登记流水每行前面的“已登记”勾 */
.fl-logs .log-row .lok {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 900; line-height: 1;
  background: rgba(64,192,87,.22); border: 1px solid rgba(140,233,154,.45); color: #8ce99a;
}
.fl-open-hint {
  margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.55;
  background: rgba(255,212,59,.10); border: 1px solid rgba(255,212,59,.35); color: #ffe066;
}
/* ---------- 📅 登记规则弹窗（老师端） ---------- */
.fr-times { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 12px; }
.fr-times label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.fr-times input[type="time"] {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px; padding: 5px 8px; color: var(--ink); font-size: 13.5px;
}
.fr-holidays {
  width: 100%; box-sizing: border-box; resize: vertical;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; padding: 9px 10px; color: var(--ink);
  font-size: 13px; line-height: 1.7; font-family: inherit;
}
.fr-holidays:focus { outline: none; border-color: rgba(255,169,77,.55); }
.fr-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
/* ---------- 🏆 家长端：小红花榜 ---------- */
.modal.flower.board { max-width: 560px; }
.fb-summary {
  padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.6;
  background: rgba(255,212,59,.08); border: 1px solid rgba(255,212,59,.28); color: var(--ink);
}
.fb-summary b { color: #ffd43b; }
.fb-list { margin-top: 10px; max-height: 52vh; overflow-y: auto; }
.fb-row {
  display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto;
  gap: 2px 10px; align-items: center; padding: 9px 8px; border-radius: 10px;
}
.fb-row + .fb-row { border-top: 1px dashed var(--line); }
.fb-row.me { background: rgba(255,169,77,.12); box-shadow: inset 0 0 0 1px rgba(255,169,77,.35); }
.fb-rank {
  grid-row: 1 / span 2; text-align: center; font-size: 19px; font-weight: 800; color: var(--muted);
}
.fb-row:nth-child(1) .fb-rank { color: #ffd43b; }
.fb-row:nth-child(2) .fb-rank { color: #d0d8ea; }
.fb-row:nth-child(3) .fb-rank { color: #e8a05c; }
.fb-name { color: var(--ink); font-size: 15px; font-weight: 600; }
.fb-total { color: #ffd43b; font-size: 15px; font-weight: 800; white-space: nowrap; }
.fb-goal { grid-column: 2 / span 2; font-size: 12px; color: var(--muted); }
.fb-goal.done { color: #8ce99a; }
.fb-me-tag {
  font-size: 11px; font-weight: 700; color: #ffa94d;
  border: 1px solid rgba(255,169,77,.5); border-radius: 999px; padding: 1px 7px; margin-left: 4px;
}
.fb-tip { margin-top: 10px; font-size: 12px; line-height: 1.6; }


/* ===== 点读：原声兜底 / 讲解 / 整单元原声（新增） ===== */
.runit-native{margin:10px 2px 2px;display:flex;gap:8px;flex-wrap:wrap}
.rnote{margin-left:auto;flex:0 0 auto;order:5;display:inline-flex;align-items:center;gap:3px;border:1px solid #e6c059;background:#fdf3dc;color:#b8862a;border-radius:999px;padding:4px 10px 4px 6px;font-size:11.5px;font-weight:800;font-family:inherit;cursor:pointer;line-height:1.5}
.rnote:active{transform:scale(.94)}
.ritem.has-note .rnote{display:inline-flex}
.ritem:not(.has-note) .rnote{display:none}
.rec-mic[data-k="note"]{background:#fff7e6;color:#b8862a;border:1px solid #e6c059}
.rec-mic[data-k="note"].rec{background:#ffe8a3}
.rec-mic[data-k="note"].done{background:#fdf3dc;color:#b8862a}
.rd-native-tip{font-size:12px;color:var(--muted);margin:4px 2px 0}

/* ===== 点读：全屏化 + 固定版权条 + 每句「老师带读 / 读法指导」 ===== */
#readingMask.reading-mask {
  padding: 0;
  background: linear-gradient(160deg,#f2fdfb,#eefafb 46%,#f4fdfc);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  align-items: stretch; justify-content: stretch;
}
#readingMask .rpanel {
  width: 100%; max-width: none; max-height: none; height: 100%;
  border: 0; border-radius: 0; box-shadow: none; padding: 0;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
#readingMask .rpanel-head { border-radius: 0; flex: 0 0 auto; }
#readingMask .rtabs, #readingMask .rdemo { flex: 0 0 auto; }
#readingMask .rbody {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; padding-bottom: 10px;
}
/* 版权说明：常驻内容区下方（不弹窗、不遮挡课文与点读按钮） */
#readingMask .rd-copyright {
  flex: 0 0 auto; max-height: 21vh; overflow-y: auto;
  padding: 7px 14px 6px;
  border-top: 1px solid rgba(13,88,80,.10);
  background: rgba(255,255,255,.62);
  color: #9aaba6; font-size: 10.5px; line-height: 1.55; letter-spacing: .1px;
}
#readingMask .rd-copyright p { margin: 0 0 1px; }
#readingMask .rd-copyright .cp-t { font-weight: 800; color: #7f948f; }
/* 工具条：改为面板内固定底栏（不再悬浮遮挡） */
#readingMask .rd-tools {
  position: static; left: auto; right: auto; bottom: auto; transform: none;
  margin: 0; width: 100%; max-width: none; border-radius: 0;
  justify-content: center; flex-wrap: wrap;
  border-left: 0; border-right: 0; border-bottom: 0;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 18px rgba(13,88,80,.08);
  flex: 0 0 auto;
}
/* 每句动作区：整行=原声；下方「老师带读 / 读法指导」 */
.ritem.sent .racts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.ract {
  border: 1px solid rgba(20,184,166,.35); background: rgba(255,255,255,.78);
  color: #0f766e; font-weight: 800; font-size: 11.5px; padding: 4px 10px;
  border-radius: 999px; cursor: pointer; font-family: inherit; line-height: 1.45;
  display: inline-flex; align-items: center; gap: 3px; transition: .15s;
}
.ract:active { transform: scale(.94); }
.ract.rteach { border-color: rgba(245,158,11,.5); background: rgba(253,230,138,.4); color: #b45309; }
.ract.rguide { border-color: rgba(225,29,72,.4); background: rgba(254,226,232,.45); color: #be123c; }
.ract.no-rec { opacity: .5; }
.ritem.sent.spk-active .ract { background: rgba(255,255,255,.9); }

/* ===== 组长端 / 课代表端：组员大楼一行三个、放大，免进详情即可点亮 ===== */
.students {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; align-items: start;
}
.students .stu-card { width: auto; }
.students .city-mini { width: 100%; margin: 0; }
.students .city-mini .floors-row { width: 100%; gap: 3px; justify-content: stretch; }
.students .city-mini .bcol { flex: 1 1 0; min-width: 0; align-items: stretch; }
.students .city-mini .floors { width: 100%; gap: 3px; }
.students .city-mini .floor { width: 100%; height: 18px; border-radius: 3px; }
.students .city-mini .roof-bar { width: 100%; height: 28px; }
.students .city-mini .unit-label { font-size: 9px; }
@media (max-width: 900px) { .students { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .students { grid-template-columns: 1fr; } }

/* ===== 点读 v3：版权条极简一行（默认收起）+ 按钮按需出现 ===== */
/* 版权条：折叠态只有一行约 19px，点「展开」才显示全文 */
#readingMask .rd-copyright {
  flex: 0 0 auto; max-height: none; overflow: visible;
  padding: 0; margin: 0;
  border-top: 1px solid rgba(13,88,80,.09);
  background: rgba(255,255,255,.72);
  color: #a9b9b4; font-size: 10px; line-height: 1.35;
}
#readingMask .cp-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%; margin: 0;
  padding: 3px 12px calc(3px + env(safe-area-inset-bottom, 0px) * 0);
  border: 0; background: none; color: inherit;
  font-family: inherit; font-size: 10px; line-height: 1.35; text-align: left; cursor: pointer;
}
#readingMask .cp-t { flex: 0 0 auto; font-weight: 800; color: #8ea39d; letter-spacing: .2px; }
#readingMask .cp-one { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#readingMask .cp-more { flex: 0 0 auto; font-weight: 800; color: #0f766e; padding-left: 2px; }
#readingMask .cp-toggle.open .cp-more { color: #94a3a0; }
#readingMask .cp-body {
  margin: 0; padding: 0 12px 7px; max-height: 24vh; overflow-y: auto;
  font-size: 10px; line-height: 1.5; color: #a9b9b4;
  -webkit-overflow-scrolling: touch;
}
#readingMask .cp-body p { margin: 0 0 1px; }
#readingMask .cp-body[hidden] { display: none; }
/* 句子动作区收紧一点，未录时整块不存在 */
#readingMask .ritem.sent .racts { margin-top: 6px; gap: 5px; }
#readingMask .ritem.sent .ract { padding: 3px 9px; font-size: 11px; }
/* 编辑类工具（录音 / 换配图 / 编辑）隐藏保险，防 .rd-pill 的 display 覆盖 hidden */
#readingMask .rd-tools .rd-pill[hidden] { display: none !important; }

/* ===== 录音面板：文字按钮自适应（不再固定 40px 被挤出）+ 窄屏换行 ===== */
.rec-row { flex-wrap: wrap; row-gap: 8px; }
.rec-mic {
  width: auto; min-width: 46px; height: 34px; padding: 0 10px;
  font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap;
}
.rec-row .rec-play { flex: 1 1 100%; width: 100%; max-width: none; height: 32px; }
@media (max-width: 430px) {
  .rec-row { gap: 8px; padding: 9px 10px; }
  .rec-row .ren { font-size: 14px; }
}

/* 录音行：文字区可压缩，两个麦克风固定在同一行 */
.rec-row .rtxt { flex: 1 1 0%; min-width: 0; }
.rec-row .ren { overflow-wrap: anywhere; }
.rec-mic { min-width: 0; padding: 0 8px; font-size: 11.5px; }
@media (max-width: 380px) {
  .rec-mic { padding: 0 6px; font-size: 11px; }
  .rec-row .rec-mic[data-k="note"] { font-size: 10.5px; }
}

/* 录音行微调：让英文句子基本能一行放下的字号与按钮间距 */
.rec-row .ren { font-size: 13.5px; }
.rec-mic { padding: 0 7px; font-size: 11px; }

/* ===== 点读进入页：原创声明弹窗（自动弹出，可关闭，不遮挡点读） ===== */
.rd-notice-mask {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  background: rgba(8, 30, 27, .46);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.rd-notice-mask[hidden] { display: none; }
.rd-notice-card {
  width: 100%; max-width: 360px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(13, 88, 80, .28);
  padding: 22px 20px 18px; text-align: center;
  animation: rdNoticePop .22s ease;
}
@keyframes rdNoticePop { from { transform: translateY(10px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.rd-notice-t {
  font-size: 16px; font-weight: 800; color: #0d6855;
  margin-bottom: 12px; letter-spacing: .3px;
}
.rd-notice-b {
  font-size: 14px; line-height: 1.75; color: #3a4a47;
  text-align: left; margin-bottom: 16px;
}
.rd-notice-b b { color: #0f766e; font-weight: 800; }
.rd-notice-ok {
  width: 100%; height: 42px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff; font-size: 15px; font-weight: 800; cursor: pointer;
  font-family: inherit;
}
.rd-notice-ok:active { transform: scale(.97); }

/* ===== 句子三按钮：原声（常显）/ 带读（录了才显）/ 发音指导（录了才显） ===== */
.ract.rnative {
  border-color: rgba(20, 184, 166, .55);
  background: rgba(204, 251, 241, .62);
  color: #0f766e; font-weight: 900;
}
.ritem.sent .racts { align-items: center; }

/* ===== 整单元官方发音播放器（带可拖动进度条） ===== */
.runit-native.upa { display: block; margin: 10px 2px 6px; }
.upa-top {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px;
  background: linear-gradient(150deg, #f8f2e7, #efe5d5);
  border: 1px solid rgba(120, 90, 40, .10);
  box-shadow: 0 4px 14px rgba(13, 88, 80, .07);
}
.upa-btn {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 15px; line-height: 1; color: #fff; font-family: inherit;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 4px 12px rgba(15, 118, 110, .28);
  transition: transform .15s, background .2s;
}
.upa-btn:active { transform: scale(.94); }
.upa-btn.playing { background: linear-gradient(135deg, #e11d48, #f43f5e); box-shadow: 0 4px 12px rgba(225, 29, 72, .26); }
.upa-mid { flex: 1 1 auto; min-width: 0; }
.upa-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px;
  margin: 6px 0 0; border-radius: 999px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, #e0a34a var(--pg, 0%), #ded4c3 var(--pg, 0%));
}
.upa-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 2px solid #b9a98f; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.upa-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #b9a98f;
}
.upa-time {
  display: flex; justify-content: space-between; margin-top: 3px;
  font-size: 11px; font-weight: 800; color: #8a7b64;
  font-variant-numeric: tabular-nums;
}
.upa-back {
  flex: 0 0 auto; height: 34px; padding: 0 10px; border-radius: 12px; cursor: pointer;
  font-size: 12px; font-weight: 900; font-family: inherit;
  color: #0f766e; background: #fff; border: 1px solid rgba(15, 118, 110, .22);
}
.upa-back:active { transform: scale(.94); }
.upa-tip { margin: 7px 4px 0; font-size: 11.5px; font-weight: 700; color: #8a7b64; }

/* ===== 教师端 · 录音上传（卡片式，按住说话） ===== */
.recpanel { padding-bottom: 24px; }
.recpanel .rpanel-head h3 { color: #c2410c; }
.recpanel .rpanel-head h3 .sub { color: #a1673f; }
.rec-tip {
  margin: 10px 14px 0; padding: 10px 12px; border-radius: 12px;
  font-size: 12.5px; font-weight: 700; line-height: 1.65;
  color: #9a3412; background: #fdf1e3; border: 1px solid #f6d7b6;
}
.rec-tip b { font-weight: 900; color: #c2410c; }
.rec-tip.warn { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.rec-tip.warn b { color: #b91c1c; }
.rec-unit-row { padding: 12px 14px 0; }
.rec-unit {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 12px;
  font-size: 14px; font-weight: 800; font-family: inherit; color: #0b3b35;
  background: #fff; border: 1px solid #e3e8e6; appearance: none; -webkit-appearance: none;
}
.rec-prog-row { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; }
.rec-prog { flex: 1 1 auto; min-width: 0; }
.rec-prog-bar { height: 9px; border-radius: 999px; background: #e8dbc9; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(120, 90, 40, .12); }
.rec-prog-bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #f97316); transition: width .35s;
}
.rec-prog-txt { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: #9a3412; white-space: nowrap; }
.rec-exit {
  flex: 0 0 auto; height: 32px; padding: 0 12px; border-radius: 11px; cursor: pointer;
  font-size: 12px; font-weight: 900; font-family: inherit;
  color: #0f766e; background: #fff; border: 1px solid #cfd8d6;
}
.rec-exit:active { transform: scale(.95); }
.rec-cards { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 24px; }
.rcc {
  display: flex; gap: 10px; padding: 12px; border-radius: 16px;
  background: #fff; border: 1px solid #efe7dc;
  box-shadow: 0 4px 14px rgba(120, 90, 40, .07);
}
.rcc-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px;
  font-size: 12px; font-weight: 900; color: #c2410c; background: #fdeee0;
  display: flex; align-items: center; justify-content: center;
}
.rcc-main { flex: 1 1 auto; min-width: 0; }
.rcc-part { font-size: 10.5px; font-weight: 900; color: #e07a3a; letter-spacing: .3px; }
.rcc-en { margin-top: 1px; font-size: 16px; font-weight: 900; color: #0b3b35; line-height: 1.35; }
.rcc-zh { margin-top: 2px; font-size: 12px; font-weight: 800; color: #e11d48; }
.rcc-box { margin-top: 9px; padding: 8px 10px; border-radius: 13px; background: #fdfaf6; border: 1px solid #f0e6d9; }
.rcc-box[data-k="note"] { background: #fbf8ff; border-color: #ece2f7; }
.rcc-bh { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 900; color: #b45309; }
.rcc-bh .dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .14); }
.rcc-box[data-k="note"] .rcc-bh { color: #7c3aed; }
.rcc-box[data-k="note"] .rcc-bh .dot { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .14); }
.rcc-bh em { font-style: normal; font-weight: 800; font-size: 10.5px; color: #a3a3a3; }
.rcc-tools { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.rcc-tools .rbtn { height: 24px; padding: 0 7px; font-size: 11px; border-radius: 8px; }
.rcc-acts { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.rcc-ok { margin-left: auto; }
.rcc-box.has { background: #f6fdfa; border-color: #cdeae2; }
.rcc-box[data-k="note"].has { background: #faf7ff; border-color: #e2d6f5; }
.rbtn {
  height: 34px; padding: 0 11px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; font-weight: 900; font-family: inherit;
  color: #b91c1c; background: #fff; border: 1px solid #f1c9c9;
  transition: transform .15s, background .2s;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.rbtn:active { transform: scale(.96); }
.rbtn.rec.on {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  animation: rdpulse .9s ease-in-out infinite;
}
.rbtn.listen { color: #0f766e; border-color: #c9e6e1; }
.rbtn.redo { color: #92400e; border-color: #f0dcc0; }
.rbtn.del { padding: 0 9px; color: #9ca3af; border-color: #ededed; }
.rbtn.file { padding: 0 8px; color: #6b7280; border-color: #e5e7eb; }
.rbtn.rec { min-width: 84px; font-variant-numeric: tabular-nums; }
.rbtn.rec.on { min-width: 104px; }
.rbtn:disabled { opacity: .4; cursor: not-allowed; }
.rbtn[hidden] { display: none !important; }
.rcc-ok { font-size: 11.5px; font-weight: 900; color: #0f766e; }
.rcc-hint { margin-top: 6px; font-size: 10.5px; font-weight: 700; color: #b0a89c; }
@media (max-width: 430px) {
  .rec-cards { padding: 12px 12px 24px; }
  .rcc { padding: 11px; gap: 8px; }
  .rcc-en { font-size: 15px; }
  .rbtn { padding: 0 9px; font-size: 12px; }
}

/* ===== 绑定孩子（家长端身份门禁） ===== */
.claim-cta {
  width: 100%; border: none; background: transparent; color: #f2f5ff;
  font-size: 15px; font-weight: 700; padding: 12px 14px; cursor: pointer;
  text-align: center; line-height: 1.4;
}
.claim-cta:active { transform: scale(.99); }
.claim-bar { margin: 4px 2px 16px; }
.claim-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.claim-chip, .claim-add, .claim-manage {
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s; white-space: nowrap; font-family: inherit; line-height: 1.2;
}
.claim-chip.active {
  border-color: #ffd43b; color: #ffd43b;
  background: rgba(255,212,59,.12); box-shadow: 0 0 0 3px rgba(255,212,59,.14);
}
.claim-add { border-style: dashed; border-color: rgba(120,180,255,.5); color: #8ab4ff; }
.claim-manage { color: var(--muted); }
.claim-tip { width: 100%; margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* 绑定选人 / 管理弹窗 */
.claim-box, .claim-manage-box { max-width: 420px; }
.claim-head { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.claim-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.claim-search { margin-bottom: 12px; }
.claim-search input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  font-size: 15px; outline: none; background: rgba(255,255,255,.06); color: var(--ink); font-family: inherit;
}
.claim-list { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -4px; padding: 0 4px; }
.claim-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink);
  border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; font-family: inherit;
}
.claim-row:hover { border-color: rgba(120,180,255,.5); }
.cr-badge { font-size: 12px; font-weight: 600; color: #8ce99a; background: rgba(140,233,154,.12); padding: 3px 9px; border-radius: 999px; }
.cr-go { font-size: 13px; font-weight: 600; color: #ffd43b; }
.cm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.05); border-radius: 12px; padding: 11px 14px; }
.cm-row.active { border-color: #ffd43b; }
.cm-name { font-size: 15px; font-weight: 600; }
.cm-cur { font-size: 12px; color: #ffd43b; font-weight: 600; }
.btn.danger { background: linear-gradient(135deg, #ff6b6b, #e03131); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }
.btn.tiny { padding: 6px 12px; font-size: 13px; border-radius: 10px; }

/* ---------- 📋 成绩册：复制粘贴导入 ---------- */
.grade-import { margin: 10px 0 4px; }
.grade-import textarea {
  width: 100%; box-sizing: border-box; margin-top: 8px;
  background: rgba(255,255,255,.04); color: var(--ink, #e8edf7);
  border: 1px solid var(--line, #2a3350); border-radius: 10px; padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7;
  resize: vertical;
}
.grade-import-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
#gradeImportMsg { font-size: 13px; }

