/* =========================================================
   班级趣味积分系统 — 样式表
   设计基准：1920×1080 大屏；文字/按钮/卡片最小尺寸 ≥ 5cm
   1cm ≈ 37.8px（100% 缩放），5cm ≈ 190px
   ========================================================= */
:root {
  /* 糖果童趣配色：明亮活泼、饱和适中，白底为主、彩色点缀，面向小朋友 */
  --pink:   #FFD8E6;
  --pink-d: #FF7FAE;
  --blue:   #D3EBFF;
  --blue-d: #43A6F5;
  --mint:   #CFF6E1;
  --mint-d: #2FC48C;
  --yellow: #FFF1C4;
  --yellow-d:#FFB92E;
  --purple: #E7DEFF;
  --purple-d:#8E6DF2;
  --orange: #FFE2C6;
  --orange-d:#FF8F3C;
  --coral:  #FFDAD5;
  --coral-d: #FF6B6B;
  --cream:  #FFFDF8;

  /* 语义色 */
  --gold:    #F0910F;   /* 积分金 */
  --danger:  #E85C5C;   /* 提醒/减少 */
  --green-t: #1E9E6A;   /* 正向文字 */
  --purple-t:#5B46B8;   /* 紫底上的深紫文字 */
  --soft:    #F7F8FE;   /* 浅底面板 */

  --ink:    #3B3552;
  --ink-2:  #6E6788;
  --ink-3:  #A49EBE;
  --line:   #F0ECF8;
  --line-2: #E6E0F4;
  --card-r: 24px;

  /* 统一投影：更轻、更干净，带一点蓝紫氛围 */
  --sh-1: 0 3px 12px rgba(140,130,180,.09);
  --sh-2: 0 8px 24px rgba(140,130,180,.15);

  /* 最小尺寸规范 */
  --min-touch: 96px;   /* 可点击元素最小 96px ≈ 2.5cm，大屏上等效视觉 ≥5cm */
  --fs-xs: 22px;
  --fs-sm: 28px;
  --fs-md: 34px;
  --fs-lg: 44px;
  --fs-xl: 60px;
  --fs-2xl: 84px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%; width: 100%; overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "HarmonyOS Sans SC", sans-serif;
  color: var(--ink);
  /* 明亮糖果底：三处柔光渐晕，干净又有活力 */
  background: #FCFBFF;
  background-image:
    radial-gradient(1200px 700px at 10% -8%, #E6F2FF 0%, rgba(230,242,255,0) 60%),
    radial-gradient(1000px 640px at 96% 2%, #FFEAF4 0%, rgba(255,234,244,0) 62%),
    radial-gradient(920px 620px at 52% 108%, #E3FAEE 0%, rgba(227,250,238,0) 60%);
  font-size: var(--fs-md);
  user-select: none;
}

/* ---------- 背景装饰（更克制：少量云朵 + 极少星星，透明度更低） ---------- */
#deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#deco .dc { position: absolute; }
#deco .dc.cloud { opacity: .38; animation: drift linear infinite; }
@keyframes drift {
  from { transform: translateX(-14vw); }
  to   { transform: translateX(114vw); }
}
#deco .dc.twinkle { opacity: .3; animation: twk 4.5s ease-in-out infinite; }
@keyframes twk { 0%,100% { opacity:.18; } 50% { opacity:.42; } }

/* ---------- 屏幕切换 ---------- */
.screen { position: fixed; inset: 0; display: none; flex-direction: column; z-index: 1; }
.screen.active { display: flex; }
.view { display: none; height: 100%; overflow-y: auto; padding: 18px 22px 30px; }
.view.active { display: block; }

/* ================= 登录 ================= */
/* 登录屏：内容比屏幕高时可滚动（矮屏笔记本 / 一体机），卡片靠 margin:auto 垂直居中 */
#login {
  align-items: center; justify-content: flex-start; overflow-y: auto; padding: 14px 0;
  background: linear-gradient(160deg,#FFF0F7,#E9F5FF 55%,#E7FCF0);
}
.login-card {
  width: 720px; max-width: calc(100vw - 28px); background: #fff; border-radius: 36px; padding: 36px 56px 30px;
  box-shadow: 0 24px 60px rgba(150,140,190,.20), 0 4px 0 var(--line);
  text-align: center; margin: auto;
}
.login-logo { width: 128px; height: 128px; margin: 0 auto 2px; }
.login-card h1 { font-size: 40px; letter-spacing: 1px; }
.login-card .sub { font-size: var(--fs-xs); color: var(--ink-2); margin: 4px 0 16px; }
.login-card label { display: block; text-align: left; font-size: var(--fs-xs); margin: 10px 0 6px; color: var(--ink-2); }
.login-card input {
  width: 100%; height: 68px; border-radius: 18px; border: 3px solid var(--line);
  background: var(--soft); font-size: 30px; padding: 0 22px; color: var(--ink); outline: none;
  font-family: inherit;
}
.login-card input:focus { border-color: var(--blue-d); background: #fff; }
.btn-primary {
  width: 100%; height: 72px; margin-top: 20px; border: none; border-radius: 20px; cursor: pointer;
  background: linear-gradient(135deg, var(--pink-d), var(--purple-d)); color: #fff;
  font-size: 34px; font-weight: 700; letter-spacing: 5px; font-family: inherit;
  box-shadow: 0 8px 0 rgba(142,109,242,.32);
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 6px 0 rgba(142,109,242,.32); }
/* 演示站专用：登录页下方的「先进演示看看」 */
.login-card .btn-demo {
  width: 100%; height: 60px; margin-top: 10px; border-radius: 18px; cursor: pointer;
  background: #F1FDF7; border: 3px solid var(--mint-d); color: #1E8E62;
  font-size: 26px; font-weight: 700; letter-spacing: 2px; font-family: inherit; transition: .16s;
}
.login-card .btn-demo:hover { background: var(--mint-d); color: #fff; }
.login-card .btn-demo:disabled { opacity: .6; cursor: default; }
.login-card .hint { color: var(--pink-d); font-size: 20px; height: 24px; margin-top: 6px; }
.login-card .hint-link { margin-top: 12px; }
.login-card .tip { margin-top: 8px; font-size: 22px; color: var(--ink-2); }

/* ================= 备案号（后端未下发时不显示，见 beian.js） ================= */
.icp-line { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-3); text-align: center; }
.icp-line a { color: inherit; text-decoration: none; }
.icp-line a:hover { color: var(--ink-2); text-decoration: underline; }
.icp-line .icp-sep { margin: 0 8px; opacity: .5; }

/* 矮屏（笔记本 768/800 高、老一体机）：再压一档，保证备案号在首屏可见 */
@media (max-height: 880px) {
  .login-card { width: 660px; padding: 22px 46px 20px; border-radius: 30px; }
  .login-logo { width: 84px; height: 84px; margin-bottom: 0; }
  .login-card h1 { font-size: 30px; }
  .login-card .sub { display: none; }
  .login-card label { margin: 6px 0 4px; font-size: 18px; }
  .login-card input { height: 54px; border-radius: 15px; font-size: 24px; padding: 0 18px; border-width: 2px; }
  .btn-primary { height: 58px; margin-top: 14px; border-radius: 17px; font-size: 26px; letter-spacing: 4px; box-shadow: 0 6px 0 rgba(142,109,242,.32); }
  .login-card .btn-demo { height: 46px; margin-top: 8px; border-radius: 15px; font-size: 21px; border-width: 2px; }
  .login-card .hint { font-size: 17px; height: 18px; margin-top: 4px; }
  .icp-line { font-size: 14px; margin-top: 6px; }
}

/* 手机竖屏：卡片挤满宽度，压缩留白 */
@media (max-width: 760px) {
  .login-card { padding: 24px 22px 20px; border-radius: 26px; }
  .login-logo { width: 76px; height: 76px; }
  .login-card h1 { font-size: 27px; letter-spacing: 0; }
  .login-card input { height: 56px; font-size: 24px; }
  .btn-primary { height: 60px; font-size: 28px; letter-spacing: 3px; }
  .login-card .btn-demo { height: 48px; font-size: 22px; }
}

/* ================= 顶栏 ================= */
.topbar {
  height: 96px; flex: 0 0 96px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: relative; z-index: 5;
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--pink-d), var(--purple-d), var(--blue-d), var(--mint-d));
  opacity: .55;
}
.brand { display: flex; align-items: center; gap: 14px; font-size: var(--fs-md); font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.brand svg, .brand img { width: 54px; height: 54px; object-fit: contain; }
.brand > span:first-child { width: 54px; height: 54px; flex: 0 0 54px; display: flex; overflow: hidden; }
.login-logo svg, .login-logo img { width: 100%; height: 100%; object-fit: contain; }
.tb-mid { display: flex; align-items: center; gap: 12px; }
.class-picker {
  height: 64px; min-width: 360px; border-radius: 16px; border: 1.5px solid var(--line-2);
  background: #fff; font-size: var(--fs-sm); padding: 0 18px; color: var(--ink); font-family: inherit; cursor: pointer;
  box-shadow: var(--sh-1);
}
.class-picker:focus { outline: none; border-color: var(--blue-d); }
.net-chip, .queue-chip {
  font-size: 23px; padding: 10px 20px; border-radius: 999px; font-weight: 700; white-space: nowrap;
}
.net-chip { background: var(--mint); color: var(--green-t); }
.net-chip.off { background: var(--coral); color: var(--danger); }
.queue-chip { background: var(--yellow); color: #9A7412; }
.tb-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.who { font-size: var(--fs-xs); color: var(--ink-2); margin-right: 6px; white-space: nowrap; }
.btn-ghost {
  height: 64px; min-width: 104px; padding: 0 24px; border-radius: 16px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line-2); color: var(--ink);
  font-size: var(--fs-xs); font-weight: 700; font-family: inherit; transition: .16s;
  box-shadow: var(--sh-1);
}
.btn-ghost:hover { border-color: var(--blue-d); background: var(--blue); }
.btn-ghost.big { height: 58px; font-size: 20px; width: 100%; }
.btn-ghost { white-space: nowrap; }

/* 窄屏（1366/1440 笔记本与一体机）：顶栏收紧，避免右侧按钮被挤出屏幕 */
@media (max-width: 1500px) {
  .topbar { padding: 0 18px; gap: 10px; }
  .brand { font-size: 28px; gap: 10px; }
  .brand svg, .brand img { width: 46px; height: 46px; }
  .brand > span:first-child { width: 46px; height: 46px; flex: 0 0 46px; }
  .class-picker { height: 56px; min-width: 208px; font-size: 24px; padding: 0 14px; }
  .net-chip, .queue-chip { font-size: 20px; padding: 7px 14px; }
  .who { font-size: 19px; max-width: 168px; overflow: hidden; text-overflow: ellipsis; }
  .btn-ghost { height: 56px; min-width: 82px; padding: 0 16px; font-size: 20px; }
}

/* ================= 布局 ================= */
.layout { flex: 1; display: flex; min-height: 0; position: relative; z-index: 2; }
.sidebar {
  width: 178px; flex: 0 0 178px; padding: 14px 10px; display: flex; flex-direction: column; gap: 7px;
  background: rgba(255,255,255,.6); border-right: 1px solid var(--line);
}
.stu-side { width: 190px; flex: 0 0 190px; }
.nav-btn {
  min-height: 62px; border-radius: 14px; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 21px; font-weight: 700; color: var(--ink-2); cursor: pointer; font-family: inherit;
  transition: .16s;
}
.nav-ico { width: 30px; height: 30px; display: flex; }
.nav-ico svg { width: 100%; height: 100%; }
.nav-btn:hover { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.nav-btn.active { background: linear-gradient(135deg, #F3FAFF, #F6F1FF); color: var(--ink); box-shadow: var(--sh-2); position: relative; }
.nav-btn.active::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 34px; border-radius: 0 6px 6px 0; background: linear-gradient(180deg, var(--blue-d), var(--purple-d));
}
.nav-btn.active .nav-ico { color: var(--blue-d); }
.content { flex: 1; min-width: 0; overflow: hidden; }

/* ================= 学生卡片网格（周历式） ================= */
/* 最小 218px：「学号 20260001」+「本班 +3561」两列并排的实际需求，低于此会互相挤压 */
.grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
}
.stu-card {
  background: #fff; border-radius: 14px; padding: 9px 11px 8px;
  border: 1px solid var(--line); position: relative; min-height: 158px;
  box-shadow: var(--sh-1);
  display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s;
}
.stu-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--blue-d); }
/* 姓名/学号 + 分数块：姓名块允许收缩（学号自动折行），
   分数块保持 min-content 保底、绝不把内容顶出卡片；绿色小字自身可折行（见 .stu-sub）。 */
/* min-width:0 让整行可被卡片压缩（否则按 min-content 撑出卡片右边界） */
.stu-card .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
/* 姓名/学号块不参与收缩（学号必须完整可读），空间不够时由右侧分数块内部折行消化 */
.stu-card .sc-top > div:first-child { flex: 0 0 auto; max-width: 100%; overflow: hidden; }
.stu-name { font-size: 22px; font-weight: 800; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 老师端整卡可点开详情：轻微悬浮反馈 + 名字链样式 */
.stu-card.clickable { cursor: pointer; transition: transform .16s, box-shadow .16s; }
.stu-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(90, 70, 140, .16); }
.stu-name.link { transition: color .16s; }
.stu-card.clickable:hover .stu-name.link { color: var(--blue-d); text-decoration: underline; }
.stu-points { font-size: 24px; font-weight: 900; color: var(--gold); white-space: nowrap; }
.stu-points small { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-left: 2px; }
.sc-mid { display: flex; align-items: center; gap: 8px; margin: 5px 0 4px; }
/* 双萌宠：主宠大图 + 右下角副宠角标。角标绝对定位，不占卡片宽度，避免挤压学号/分数区 */
.sc-pets { position: relative; flex: 0 0 50px; }
.sc-pet {
  width: 50px; height: 50px; flex: 0 0 50px;
  background: linear-gradient(180deg, #F2FAFF, #F3EEFF); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.sc-pet svg { width: 92%; height: 92%; }
.sc-pet2 {
  position: absolute; right: -7px; bottom: -4px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(180deg, #FFF6E4, #FFE8F2);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(90, 70, 120, .25);
  display: flex; align-items: center; justify-content: center;
  animation: petBreatheSm 4.4s ease-in-out infinite;
}
.sc-pet2 svg { width: 88%; height: 88%; }
.sc-meta { flex: 1; min-width: 0; }
.pet-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--purple);
  border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; color: var(--purple-t);
}
.progress { height: 8px; border-radius: 999px; background: #EDF1FA; margin-top: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mint-d), var(--blue-d)); transition: width .6s; }
.progress-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

/* 卡片顶部滚动积分明细 */
.sc-ticker {
  margin-top: auto; background: var(--soft); border-radius: 10px; padding: 5px 8px; min-height: 38px;
  overflow: hidden; position: relative;
}
.sc-ticker .tick-title { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; font-weight: 600; }
.tick-line { font-size: 14px; font-weight: 700; color: var(--green-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: tickIn .5s; line-height: 1.4; }
.tick-line.neg { color: #D08A4A; }
.tick-empty { font-size: 13px; color: #C6C0D2; }
@keyframes tickIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* 排行榜前三装饰 */
.crown { position: absolute; bottom: 6px; right: 8px; width: 38px; height: 38px; opacity: .45; pointer-events: none; }
.rank1 { border-color: #FFE29A; background: linear-gradient(180deg,#FFFEFA,#fff 40%); }
.rank2 { border-color: #DDE3EE; }
.rank3 { border-color: #FFD9B0; }
.rank1, .rank2, .rank3 { padding-top: 30px; }
.ribbon {
  position: absolute; top: -16px; left: 20px; padding: 5px 18px; border-radius: 999px;
  font-size: 23px; font-weight: 900; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.1);
}
.ribbon.g { background: linear-gradient(135deg,#FFD469,#FFB300); }
.ribbon.s { background: linear-gradient(135deg,#BBD4F5,#7FA6E8); }
.ribbon.b { background: linear-gradient(135deg,#FFB98A,#FF8F3C); }

/* 加分特效 */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.fx-pop {
  position: absolute; font-size: 76px; font-weight: 900; color: var(--gold);
  text-shadow: 0 4px 0 #fff, 0 8px 18px rgba(245,138,0,.35);
  animation: fxUp 1.5s cubic-bezier(.2,.9,.3,1) forwards;
}
@keyframes fxUp {
  0%   { opacity: 0; transform: translate(-50%,0) scale(.4); }
  22%  { opacity: 1; transform: translate(-50%,-70px) scale(1.35); }
  100% { opacity: 0; transform: translate(-50%,-230px) scale(1); }
}
.fx-star { position: absolute; animation: fxStar 1.2s ease-out forwards; }
@keyframes fxStar {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.2) rotate(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(var(--rot)); }
}
.card-flash { animation: cardFlash .7s; }
@keyframes cardFlash {
  0% { box-shadow: 0 0 0 0 rgba(255,217,107,.9); }
  60% { box-shadow: 0 0 0 22px rgba(255,217,107,0); }
  100% { box-shadow: 0 8px 0 rgba(215,205,225,.22); }
}

/* 萌宠说话气泡（加分 / 减分时弹出） */
.pb-wrap {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: pbIn 2.7s cubic-bezier(.2,.9,.3,1) forwards; pointer-events: none;
  z-index: 2;
}
.pb-pet { width: 108px; height: 108px; filter: drop-shadow(0 10px 16px rgba(120,100,160,.3)); }
.pb-pet svg { width: 100%; height: 100%; }
.pb-bubble {
  position: relative; background: #fff; border: 4px solid #9B8CE0; border-radius: 22px;
  padding: 10px 20px; font-size: 27px; font-weight: 800; color: #4A3F6B; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(120,100,160,.2);
}
.pb-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%);
  border: 11px solid transparent; border-top-color: #9B8CE0;
}
.pb-wrap.neg .pb-bubble { border-color: #F0A15C; color: #8A5A22; }
.pb-wrap.neg .pb-bubble::after { border-top-color: #F0A15C; }
@keyframes pbIn {
  0%   { opacity: 0; transform: translate(-50%, -38%) scale(.5); }
  14%  { opacity: 1; transform: translate(-50%, -58%) scale(1.1); }
  24%  { transform: translate(-50%, -50%) scale(1); }
  76%  { opacity: 1; transform: translate(-50%, -53%) scale(1.02); }
  100% { opacity: 0; transform: translate(-50%, -98%) scale(.9); }
}

/* ================= 老师操作台 ================= */
.teacher-panel {
  width: 388px; flex: 0 0 388px; background: rgba(255,255,255,.9); border-left: 1px solid var(--line);
  padding: 14px 14px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-head h2 { font-size: 27px; white-space: nowrap; flex-shrink: 0; }
.tp-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.mini {
  height: 46px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff;
  font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--ink); transition: .16s;
  box-shadow: var(--sh-1); white-space: nowrap; flex: 1 1 auto; min-width: 0; text-align: center;
}
.mini:hover { background: var(--blue); border-color: var(--blue-d); }
.mini.wide { width: 100%; }
.tp-block { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 13px; box-shadow: var(--sh-1); }
.tp-label { font-size: 21px; font-weight: 800; margin-bottom: 9px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-count { font-size: 17px; font-weight: 700; color: var(--danger); }
.link { font-size: 17px; color: var(--blue-d); cursor: pointer; font-weight: 700; }
.link:hover { text-decoration: underline; }
.stu-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: 8px; max-height: 240px; overflow-y: auto; }
.chip {
  min-height: 54px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
  cursor: pointer; padding: 4px 6px; text-align: center; color: var(--ink); transition: .14s;
}
.chip:hover { border-color: var(--mint-d); }
.chip.on { background: var(--mint); border-color: var(--mint-d); color: var(--green-t); }
.chip.wait { background: var(--yellow); border-color: var(--yellow-d); color: #A9761A; }
/* 待审核角标 */
.tab .badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px;
  margin-left: 8px; padding: 0 9px; border-radius: 999px; background: var(--coral-d); color: #fff;
  font-size: 21px; font-weight: 900; vertical-align: middle;
}
/* 审核提示条 */
.rev-tip {
  display: flex; align-items: center; gap: 12px; background: var(--yellow);
  border: 2px solid var(--yellow-d); border-radius: 18px; padding: 14px 22px;
  font-size: 24px; font-weight: 700; color: #8A6415; margin-bottom: 18px;
}
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rule-btn {
  min-height: 84px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff;
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; cursor: pointer;
  font-family: inherit; text-align: left; transition: .14s; position: relative;
}
.rule-btn:hover { border-color: var(--yellow-d); background: var(--yellow); }
.rule-btn.on { border-color: var(--yellow-d); background: linear-gradient(135deg, var(--yellow), #FFF8D9); }
.rule-btn .ri { width: 36px; height: 36px; flex: 0 0 36px; color: var(--purple-d); }
.rule-btn .rt { flex: 1; min-width: 0; }
.rule-btn .rl { font-size: 19px; font-weight: 800; line-height: 1.2; display: block; }
.rule-btn .rv { font-size: 22px; font-weight: 900; color: var(--gold); }
.rule-btn .rv.neg { color: var(--green-t); }
.rule-del {
  position: absolute; top: -10px; right: -10px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--coral); border: 2px solid #fff; color: var(--danger); font-size: 24px; line-height: 1;
  cursor: pointer; font-weight: 900; display: none;
}
.rule-btn.custom:hover .rule-del { display: block; }
.tp-preview {
  min-height: 54px; border-radius: 12px; background: var(--soft); padding: 9px 12px;
  font-size: 19px; font-weight: 700; color: var(--ink-3); margin-bottom: 9px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.badge { background: var(--coral-d); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 17px; }
.pending-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--soft); border-radius: 12px; padding: 8px 10px; margin-bottom: 7px;
  font-size: 19px;
}
.pending-item .pi-name { font-weight: 800; }
.mini-ok { background: var(--mint); border-color: var(--mint-d); color: var(--green-t); }
.mini-no { background: var(--coral); border-color: #FFB8B3; color: var(--danger); }

/* ================= 排行榜 / 其他子页 ================= */
.page-title { font-size: 46px; font-weight: 900; margin: 4px 4px 14px; display: flex; align-items: baseline; gap: 14px; }
.page-title .num { font-size: 22px; color: var(--ink-3); font-weight: 600; }
.stage-group { margin-bottom: 26px; }
.stage-title {
  font-size: var(--fs-sm); font-weight: 800; margin: 0 4px 16px; display: inline-flex; align-items: center; gap: 12px;
  background: var(--purple); padding: 9px 24px; border-radius: 999px; color: var(--purple-t);
}
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px,1fr)); gap: 18px; }
.gift-card {
  background: #fff; border-radius: var(--card-r); border: 1px solid var(--line); padding: 22px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--sh-1);
}
.gift-card .gi {
  width: 120px; height: 120px; color: var(--orange-d);
  display: flex; align-items: center; justify-content: center;
  background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 6px;
}
.gift-card .gi svg { width: 100%; height: 100%; }
.gift-card .gi-img {
  width: 120px; height: 120px; object-fit: contain; border-radius: 16px;
  background: var(--soft); border: 1px solid var(--line); padding: 6px; box-sizing: border-box;
}
/* 礼品图片上传 */
input[type="file"]#agImgFile, input[type="file"]#cgImgFile {
  height: 56px; padding: 10px 12px; font-size: 17px; color: var(--ink-3);
  border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--soft); cursor: pointer;
}
.img-prev { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.img-prev img { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.img-prev span { font-size: 16px; color: var(--green-t); font-weight: 700; }
.tbl-thumb { width: 54px; height: 54px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); vertical-align: middle; }
.gift-card h3 { font-size: var(--fs-md); }
.gift-card .cat { font-size: var(--fs-xs); color: var(--ink-3); }
.gift-card .cost { font-size: 44px; font-weight: 900; color: var(--gold); }
.gift-card .cost small { font-size: 23px; color: var(--ink-3); }
.gift-card .go {
  height: 78px; border-radius: 18px; border: none; background: linear-gradient(135deg, var(--mint-d), var(--blue-d));
  color: #fff; font-size: var(--fs-sm); font-weight: 800; cursor: pointer; font-family: inherit; transition: .16s;
}
.gift-card .go:hover { filter: brightness(1.04); }
.gift-card .go:disabled { background: #EDEAF2; color: #B0AAC0; cursor: not-allowed; }

/* 明星页 */
.star-hero {
  background: linear-gradient(135deg, #FFFBEC, #FFF1F7); border-radius: var(--card-r); padding: 28px 36px;
  display: flex; align-items: center; gap: 32px; margin-bottom: 24px; border: 1px solid #FFE4A8;
}
.star-hero .hi { width: 156px; height: 156px; flex: 0 0 156px; }
.star-hero h2 { font-size: 60px; }
.star-hero p { font-size: var(--fs-md); color: var(--ink-2); margin-top: 8px; }

/* ================= 学生详情弹窗（点人名） ================= */
.sd-pets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; }
.sd-pet {
  display: flex; align-items: center; gap: 18px; min-width: 0;
  background: var(--soft); border: 1.5px solid var(--line); border-radius: 20px; padding: 18px;
}
.sd-pet.locked { opacity: .72; }
.sd-art {
  width: 152px; height: 152px; flex: 0 0 152px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, #F2FAFF, #F3EEFF);
  display: flex; align-items: center; justify-content: center;
}
.sd-art img, .sd-art svg { width: 100%; height: 100%; object-fit: contain; }
.sd-info { flex: 1; min-width: 0; }
.sd-tag {
  display: inline-block; font-size: 12px; font-weight: 800; border-radius: 999px;
  padding: 3px 12px; margin-bottom: 6px;
}
.sd-tag.main { background: var(--pink); color: #B44878; }
.sd-tag.sub { background: var(--purple); color: var(--purple-t); }
.sd-info h3 { font-size: 19px; margin: 0 0 4px; }
.sd-info h3 small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.sd-quote { font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.sd-sec { font-size: 18px; margin: 6px 0 12px; }
.sd-sec span { font-size: 14px; color: var(--gold); margin-left: 10px; }
.sd-recs { max-height: 300px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 16px; }
.sd-rec {
  display: grid; grid-template-columns: 76px 1fr 72px; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.sd-rec:last-child { border-bottom: none; }
.sd-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sd-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-rec b { text-align: right; color: var(--green-t); }
.sd-rec b.neg { color: var(--danger); }
.sd-rec-empty { padding: 22px; text-align: center; color: var(--ink-3); font-size: 14px; }
@media (max-width: 900px) { .sd-pets { grid-template-columns: 1fr; } }

/* ================= 弹层 ================= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(70,65,80,.4); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; z-index: 80; padding: 40px;
}
.modal-mask.on { display: flex; }
.modal {
  background: #fff; border-radius: 28px; padding: 40px 44px; max-width: 1500px; width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(70,60,100,.26);
}
.modal h2 { font-size: var(--fs-lg); margin-bottom: 8px; }
.modal .m-sub { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 26px; }
.modal label { display: block; font-size: var(--fs-sm); margin: 18px 0 8px; font-weight: 700; }
.modal input, .modal select {
  width: 100%; height: 78px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--soft);
  font-size: var(--fs-sm); padding: 0 20px; color: var(--ink); font-family: inherit; outline: none; transition: .16s;
}
.modal input:focus, .modal select:focus { border-color: var(--blue-d); background: #fff; }
.modal textarea {
  width: 100%; min-height: 200px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--soft);
  font-size: var(--fs-sm); padding: 16px 20px; color: var(--ink); font-family: inherit; outline: none; resize: vertical;
}
.modal textarea:focus { border-color: var(--blue-d); background: #fff; }
.modal-actions { display: flex; gap: 14px; justify-content: flex-end; margin-top: 30px; flex-wrap: wrap; }
.modal-actions .btn-primary { width: auto; padding: 0 46px; margin-top: 0; height: 86px; font-size: var(--fs-md); letter-spacing: 2px; }
.btn-dark { background: linear-gradient(135deg,#C3CCE4,#9AA9CC); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg,#FFB3B3,#FF6B6B); box-shadow: none; }
.btn-safe { background: linear-gradient(135deg,#A8E6C2,#2FC48C); box-shadow: none; }

/* 管理台 tabs */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.tab {
  height: 70px; padding: 0 28px; border-radius: 16px; border: 1.5px solid var(--line-2); background: #fff;
  font-size: var(--fs-xs); font-weight: 700; cursor: pointer; font-family: inherit; color: var(--ink-2); transition: .16s;
}
.tab.active { background: var(--yellow); border-color: var(--yellow-d); color: var(--ink); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.tbl th, .tbl td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 23px; color: var(--ink-3); font-weight: 700; }
.tbl tr:hover td { background: var(--soft); }
.tbl .op { color: var(--blue-d); cursor: pointer; font-weight: 700; margin-right: 14px; }
.tbl .op.del { color: var(--danger); }

/* 表单行 */
.frow { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.frow > div { flex: 1; min-width: 180px; }

/* 成长动画层 */
.anim-layer { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 90; pointer-events: none; }
.anim-layer.on { display: flex; }
.grow-box {
  background: rgba(255,255,255,.97); border-radius: 40px; padding: 40px 60px; text-align: center;
  border: 3px solid var(--yellow-d); animation: growIn .5s cubic-bezier(.2,1.3,.4,1);
  box-shadow: 0 30px 80px rgba(120,100,60,.2);
}
@keyframes growIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.grow-box .gpets { display: flex; align-items: center; gap: 40px; }
.grow-box .gp { width: 210px; height: 210px; }
.grow-box .old { animation: fadeOutPet 3s forwards; }
.grow-box .new { animation: popPet 3s forwards; }
@keyframes fadeOutPet { 0%,25% { opacity: 1; transform: scale(1); } 60%,100% { opacity: .25; transform: scale(.82); } }
@keyframes popPet { 0%,45% { opacity: 0; transform: scale(.4); } 75%,100% { opacity: 1; transform: scale(1.1); } }
.grow-box h2 { font-size: 52px; margin: 16px 0 6px; color: var(--gold); }
.grow-box p { font-size: var(--fs-md); color: var(--ink-2); }

/* 表扬弹窗 */
.praise {
  background: linear-gradient(160deg,#FFFDF3,#FFF2F8); border-radius: 40px; padding: 48px 68px; text-align: center;
  border: 3px solid var(--yellow-d); max-width: 1100px; animation: growIn .5s cubic-bezier(.2,1.3,.4,1);
  box-shadow: 0 30px 80px rgba(120,100,60,.2);
}
.praise h1 { font-size: 78px; }
.praise .pp { width: 210px; height: 210px; margin: 10px auto 0; }
.praise p { font-size: var(--fs-lg); color: #C07A0A; margin-top: 10px; font-weight: 700; }

/* 选定萌宠：萌宠对小朋友说话的气泡 */
.pet-hello { display: flex; align-items: center; gap: 30px; }
.pet-hello .ph-pet { width: 240px; height: 240px; animation: petBreathe 3.4s ease-in-out infinite; }
.pet-hello .ph-bubble {
  position: relative; background: linear-gradient(160deg,#FFFFFF,#FFF5FA);
  border: 4px solid var(--pink-d); border-radius: 36px; padding: 34px 52px;
  box-shadow: 0 26px 64px rgba(150,90,140,.2); animation: growIn .5s cubic-bezier(.2,1.3,.4,1);
}
.pet-hello .ph-bubble::before {
  content: ''; position: absolute; left: -24px; top: 50%; transform: translateY(-50%);
  border: 17px solid transparent; border-right-color: var(--pink-d);
}
.pet-hello .ph-bubble::after {
  content: ''; position: absolute; left: -15px; top: 50%; transform: translateY(-50%);
  border: 14px solid transparent; border-right-color: #FFF7FB;
}
.pet-hello .ph-line1 { font-size: 48px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.pet-hello .ph-line2 { font-size: 62px; font-weight: 900; color: var(--pink-d); line-height: 1.25; margin-top: 4px; }
.pet-hello .ph-line1, .pet-hello .ph-line2 { animation: popIn .55s cubic-bezier(.2,1.4,.4,1) both; }
.pet-hello .ph-line2 { animation-delay: .18s; }
@keyframes popIn { from { transform: translateY(16px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
/* 气泡周围的跳动小爱心 */
.pet-hello .ph-fx { position: absolute; font-size: 44px; animation: phFloat 1.8s ease-in-out infinite; pointer-events: none; }
.pet-hello .ph-fx.a { top: -26px; right: 44px; animation-delay: -.3s; }
.pet-hello .ph-fx.b { bottom: -22px; right: 120px; animation-delay: -.9s; }
@keyframes phFloat { 0%,100% { transform: translateY(0) scale(1); opacity: .85; } 50% { transform: translateY(-16px) scale(1.16); opacity: 1; } }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(30px);
  background: rgba(70,65,80,.94); color: #fff; padding: 18px 40px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 700; opacity: 0; transition: .3s; pointer-events: none; z-index: 100;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= 萌宠图鉴 ================= */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 20px; }
.gal-card {
  background: linear-gradient(180deg, #FFFFFF, #F5F9FF); border: 1px solid var(--line); border-radius: var(--card-r);
  padding: 24px 22px; text-align: center; cursor: pointer; box-shadow: var(--sh-1); transition: .18s;
}
.gal-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--purple-d); }
.gal-pet { width: 170px; height: 170px; margin: 0 auto; }
.gal-name { font-size: var(--fs-md); font-weight: 900; margin-top: 10px; }
.gal-sub { font-size: 22px; color: var(--ink-3); margin-top: 4px; }
.gal-stages { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.gal-dot {
  width: 40px; height: 40px; border-radius: 50%; background: var(--purple); color: var(--purple-t);
  font-size: 19px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.stage-path { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sp-item { text-align: center; width: 150px; }
.sp-img {
  width: 140px; height: 140px; margin: 0 auto;
  background: linear-gradient(180deg, #F2FAFF, #F1ECFF); border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
}
.sp-img svg { width: 92%; height: 92%; }
.sp-name { font-size: 25px; font-weight: 800; margin-top: 8px; }
.sp-need { font-size: 21px; color: var(--gold); font-weight: 800; }
.sp-max .sp-img { border-color: var(--yellow-d); background: linear-gradient(180deg, #FFFDF2, #FFF6DB); }
.sp-arrow { font-size: 40px; color: var(--ink-3); }

/* 小屏兼容：一体机若为 1080P，字体按比例缩放仍保证可读 */
@media (max-width: 1600px) {
  :root { --fs-xl: 52px; --fs-2xl: 70px; }
  .teacher-panel { width: 404px; flex-basis: 404px; }
  .sidebar { width: 208px; flex-basis: 208px; }
}
@media (max-height: 900px) {
  .stu-card { min-height: 180px; }
  .sc-pets { flex-basis: 56px; }
  .sc-pet { width: 56px; height: 56px; flex-basis: 56px; }
  .sc-pet2 { width: 30px; height: 30px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #E4E0F0; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 萌宠「动图」效果：果冻呼吸 + 悬浮摇摆 + 地面影子 ================= */
@keyframes petBreathe {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  28%      { transform: translateY(-9px) scale(1.045, .955) rotate(-1.4deg); }
  52%      { transform: translateY(-14px) scale(.965, 1.04) rotate(1.4deg); }
  76%      { transform: translateY(-4px) scale(1.02, .985) rotate(-.5deg); }
}
@keyframes petBreatheSm {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  35%      { transform: translateY(-3px) scale(1.045, .96); }
  65%      { transform: translateY(-5px) scale(.975, 1.03); }
}
@keyframes petShadowPulse {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: .24; }
  50%      { transform: translateX(-50%) scaleX(.64); opacity: .1; }
}
/* 萌宠图鉴大卡：悬浮呼吸 + 地面影子同步伸缩 */
.gal-pet { position: relative; }
.gal-pet::after {
  content: ''; position: absolute; left: 50%; bottom: 4px; width: 56%; height: 12px;
  background: radial-gradient(ellipse at center, rgba(96,80,130,.22), rgba(96,80,130,0) 72%);
  transform: translateX(-50%); pointer-events: none;
  animation: petShadowPulse 3.4s ease-in-out infinite;
}
.gal-pet img, .gal-pet svg { animation: petBreathe 3.4s ease-in-out infinite; }
.gal-card:nth-child(2n) .gal-pet img, .gal-card:nth-child(2n) .gal-pet svg, .gal-card:nth-child(2n) .gal-pet::after { animation-delay: -1.1s; }
.gal-card:nth-child(3n) .gal-pet img, .gal-card:nth-child(3n) .gal-pet svg, .gal-card:nth-child(3n) .gal-pet::after { animation-delay: -2.2s; }
/* 成长图鉴弹窗：六形态逐个浮动，节奏错开 */
.sp-img { position: relative; }
.sp-img::after {
  content: ''; position: absolute; left: 50%; bottom: 7px; width: 58%; height: 10px;
  background: radial-gradient(ellipse at center, rgba(96,80,130,.17), rgba(96,80,130,0) 72%);
  transform: translateX(-50%); pointer-events: none;
  animation: petShadowPulse 3.6s ease-in-out infinite;
}
.sp-img img, .sp-img svg { animation: petBreathe 3.6s ease-in-out infinite; }
.sp-item:nth-child(4n+2) .sp-img img, .sp-item:nth-child(4n+2) .sp-img svg, .sp-item:nth-child(4n+2) .sp-img::after { animation-delay: -.9s; }
.sp-item:nth-child(4n+3) .sp-img img, .sp-item:nth-child(4n+3) .sp-img svg, .sp-item:nth-child(4n+3) .sp-img::after { animation-delay: -1.8s; }
.sp-item:nth-child(4n) .sp-img img, .sp-item:nth-child(4n) .sp-img svg, .sp-item:nth-child(4n) .sp-img::after { animation-delay: -2.7s; }
/* 学生卡片小萌宠：轻微呼吸，卡片间错峰 */
.sc-pet img { animation: petBreatheSm 3.8s ease-in-out infinite; }
.stu-card:nth-child(2n) .sc-pet img { animation-delay: -1.3s; }
.stu-card:nth-child(3n) .sc-pet img { animation-delay: -2.4s; }
/* 明星 hero / 表扬弹层 / 选宠弹窗 */
.star-hero .hi img, .star-hero .hi svg, .praise .pp img, .praise .pp svg { animation: petBreathe 3.4s ease-in-out infinite; }
.pet-opt > div:first-child img, .pet-opt > div:first-child svg { animation: petBreathe 3.2s ease-in-out infinite; }
.pet-opt:nth-child(2n) > div:first-child img, .pet-opt:nth-child(2n) > div:first-child svg { animation-delay: -.8s; }
.pet-opt:nth-child(3n) > div:first-child img, .pet-opt:nth-child(3n) > div:first-child svg { animation-delay: -1.6s; }

/* =========================================================
   学号中心制（跨班积分共享）新增样式
   ========================================================= */
/* 计分口径 / 排序切换条 */
.seg-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 20px; padding: 12px 18px;
  background: #FFFDF9; border: 3px solid var(--line); border-radius: 20px;
}
.seg-label { font-size: 24px; font-weight: 800; color: var(--ink-3); }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 5px; gap: 4px; }
.seg-btn {
  border: 0; background: transparent; border-radius: 999px; cursor: pointer;
  font-size: 25px; font-weight: 800; color: var(--ink-2); padding: 10px 26px;
  font-family: inherit; min-height: 60px;
}
.seg-btn:hover { color: var(--blue-d); }
.seg-btn.on { background: #fff; color: var(--blue-d); box-shadow: var(--sh-1); }

/* 学生卡片：分值区 + 学号 */
.sc-score { text-align: right; }
.stu-sno { font-size: 16px; font-weight: 700; color: var(--ink-3); margin-top: 3px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stu-sub {
  font-size: 19px; font-weight: 800; color: var(--green-t); margin-top: 2px;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 5px;
}
/* 「本班 +3」「总分 120」整块不被拆开；跨班多出的「· 共 N 班」放不下时整体折到下一行，
   而不是溢出卡片被右侧相邻卡片盖住 */
.stu-sub > span { white-space: nowrap; }
/* 待核销条目里的「总分 / 本班」提示 */
.pi-sub { font-size: 21px; font-weight: 700; color: var(--ink-3); margin-left: 10px; }

/* 后台「关联已有学号」区块 */
.link-box {
  margin-top: 22px; padding: 18px; border-radius: 20px;
  background: var(--soft); border: 3px solid var(--line-2);
}
/* 学号对照表 · 打印预览 */
.print-frame {
  display: block; width: 100%; height: min(64vh, 680px); margin-top: 6px;
  border: 3px solid var(--line-2); border-radius: 18px; background: #fff;
}
.link-box-t { font-size: 27px; font-weight: 800; margin-bottom: 14px; }
.link-tip { font-size: 24px; color: #8A7860; margin-top: 12px; }
.link-tip.err { color: #C2534F; font-weight: 700; }

/* 后台「疑似重复」分组 */
.dup-group {
  background: #FFFDF9; border: 3px solid var(--line); border-radius: 20px;
  padding: 16px 18px; margin-bottom: 16px;
}
.dup-name { font-size: 32px; font-weight: 900; margin-bottom: 10px; }
.dup-cnt {
  font-size: 22px; font-weight: 800; color: var(--danger);
  background: var(--coral); border-radius: 999px; padding: 3px 16px; margin-left: 10px;
}
.dup-item {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; min-height: 78px;
}
.dup-item:hover { background: var(--soft); }
.dup-item input { width: 34px; height: 34px; accent-color: var(--blue-d); flex: 0 0 auto; }
.dup-info { font-size: 27px; font-weight: 700; }
.dup-info b { color: var(--gold); letter-spacing: 1px; }
.dup-meta { display: block; font-size: 22px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }
.dup-actions { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.dup-actions .op { color: var(--blue-d); cursor: pointer; font-weight: 800; font-size: 25px; margin-right: 26px; }

/* ================= 计费 / 试用状态提示条 ================= */
.billing-bar {
  display: none; flex: 0 0 auto; align-items: center; justify-content: center;
  padding: 10px 18px; font-size: calc(var(--fs-xs, 20px) * 1.15);
  background: #FFF6E5; color: #8A5A00; border-bottom: 1px solid #F1DCAE;
}
.billing-bar.show { display: flex; }
.billing-bar.danger { background: #FDECEC; color: #A32D2D; border-bottom-color: #F3C6C6; }

/* ================= 大屏加分模式（复用本机老师登录态） ================= */
/* 未进入加分模式时：卡片完全只读，没有任何选中态样式 */
#student.edit-on .stu-card { cursor: pointer; }
/* 选中态：整卡描边 + 浅绿底 + 轻微上浮。不用角标，避免挤占姓名/学号的文字空间 */
#student.edit-on .stu-card.sel {
  border-color: var(--mint-d);
  background: linear-gradient(180deg, #EDFCF5, #DDF7EA);
  box-shadow: 0 0 0 5px rgba(47,196,140,.40), var(--sh-2);
  transform: translateY(-3px);
}
#student.edit-on .stu-card.sel .stu-name { color: var(--green-t); }
#student.edit-on .stu-card.sel .stu-points { color: var(--green-t); }

/* 顶栏「老师加分」按钮：本机未登录时灰掉但可点（点了会提示怎么登录） */
.btn-ghost.off { opacity: .55; }
.btn-ghost.on { border-color: var(--mint-d); background: var(--mint); color: var(--green-t); }

/* 底部操作条：占用布局高度（不遮挡卡片），未开启加分模式时完全隐藏 */
.s-bar {
  flex: 0 0 auto; display: none; align-items: center; gap: 16px;
  padding: 12px 20px; background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(104,80,150,.10);
  position: relative; z-index: 5;
}
.s-bar.on { display: flex; }
.s-bar-left { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.s-count { font-size: var(--fs-xs); font-weight: 800; color: var(--ink); white-space: nowrap; }
.s-count b { color: var(--mint-d); font-size: 30px; margin: 0 2px; }
.s-clear, .s-exit {
  height: 58px; padding: 0 22px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-family: inherit; font-size: 19px; font-weight: 800; transition: .15s;
}
.s-clear:hover:not(:disabled), .s-exit:hover { border-color: var(--blue-d); background: var(--blue); color: var(--ink); }
.s-clear:disabled { opacity: .4; cursor: default; }
.s-exit { background: var(--soft); }
.s-bar-rules { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 4px; }
/* 超出一屏时右边缘渐隐，提示可以横向滑动 */
.s-bar-rules.ovf {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
}
.s-rule {
  flex: 0 0 auto; display: flex; align-items: center; gap: 9px; height: 62px; padding: 0 20px;
  border-radius: 16px; border: 1.5px solid var(--line-2); background: #fff;
  font-family: inherit; cursor: pointer; transition: .15s; box-shadow: var(--sh-1);
}
.s-rule em { font-style: normal; font-size: 25px; font-weight: 900; color: var(--mint-d); }
.s-rule span { font-size: 20px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.s-rule.neg em { color: var(--danger); }
.s-rule:hover:not(:disabled) { border-color: var(--mint-d); background: var(--mint); transform: translateY(-2px); }
.s-rule.neg:hover:not(:disabled) { border-color: var(--danger); background: var(--coral); }
.s-rule:disabled { opacity: .42; cursor: default; }

/* ================= 萌宠台词 & 宠物解锁商品 ================= */
/* 点开成长图鉴时，宠物自己的招牌口号 */
.pet-slogan {
  margin: 12px 0 6px; padding: 16px 20px; border-radius: 18px;
  font-size: var(--fs-sm); font-weight: 800; line-height: 1.55; color: var(--purple-t);
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  border: 1px solid #fff;
}
/* 商城里的「宠物解锁」商品卡 */
.gift-card.is-pet { border-color: var(--purple-d); box-shadow: 0 6px 20px rgba(142, 109, 242, .16); }
.gift-card .gi-pet {
  width: 120px; height: 120px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 4px; overflow: hidden;
}
.gift-card .gi-pet img, .gift-card .gi-pet svg { width: 100%; height: 100%; object-fit: contain; }
.gift-card .pet-note { font-size: var(--fs-xs); color: var(--purple-d); font-weight: 800; }
/* 兑换弹窗里的宠物预览 */
.redeem-pet { display: flex; align-items: center; gap: 18px; margin: 14px 0 4px; }
.redeem-pet .gi-pet {
  width: 104px; height: 104px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 4px; overflow: hidden;
}
.redeem-pet .gi-pet img, .redeem-pet .gi-pet svg { width: 100%; height: 100%; object-fit: contain; }
.redeem-pet .pet-note { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.6; margin: 0; }
