@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Comic+Neue:wght@300;400;700&display=swap');@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Comic+Neue:wght@300;400;700&display=swap');


/* ══════════════════════════════════════════════════════
   TeacherPage — Responsive Styles
   Design System: Data-Dense Dashboard (Purple/Orange)
   Fonts: Fira Sans (body) + Fira Code (headings/mono)
   Breakpoints: 1440 / 1024 / 768 / 480 / 375
   ══════════════════════════════════════════════════════ */
/* ── Design Tokens ──────────────────────────────────── */
:root {
  --tp-primary: #7c3aed;
  --tp-primary-light: #a78bfa;
  --tp-cta: #f97316;
  --tp-bg: #f0f7ff;
  --tp-surface: #ffffff;
  --tp-text: #1a1a2e;
  --tp-text-muted: #888888;
  --tp-border: #e8e8e8;
  --tp-radius-sm: 8px;
  --tp-radius-md: 12px;
  --tp-radius-lg: 16px;
  --tp-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --tp-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --tp-font-body: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tp-font-code: 'Fira Code', 'Cascadia Code', Consolas, monospace;
}
/* ── Page Wrapper ───────────────────────────────────── */
.tp-page {
  min-height: 100vh;
  background: var(--tp-bg);
  padding: 20px;
  font-family: var(--tp-font-body);
  box-sizing: border-box;
}
.tp-container {
  max-width: 1200px;
  margin: 0 auto;
}
/* ── Header Row ─────────────────────────────────────── */
.tp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.tp-header-title h2 {
  margin: 0;
  color: var(--tp-text);
  font-family: var(--tp-font-body);
  font-size: 1.5rem;
}
.tp-header-title span {
  color: var(--tp-text-muted);
  font-size: 14px;
}
.tp-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
/* ── Tab Bar ────────────────────────────────────────── */
.tp-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--tp-surface);
  border-radius: var(--tp-radius-md);
  padding: 6px;
  box-shadow: var(--tp-shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tp-tabs::-webkit-scrollbar {
  display: none;
}
.tp-tab-btn {
  flex: 1;
  min-width: 80px;
  padding: 10px 6px;
  border: none;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--tp-font-body);
  transition: all 0.2s ease;
  white-space: nowrap;
}
/* ── Two-Column Grids (Tasks & Scores) ──────────────── */
.tp-two-col-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
/* ── Students Tab Header ────────────────────────────── */
.tp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.tp-section-header h3 {
  margin: 0;
  font-family: var(--tp-font-body);
  flex-shrink: 0;
}
.tp-section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
/* ── Secondary Button (dark cosmic gradient) ───────── */
.tp-btn-secondary {
  padding: 8px 16px;
  background: linear-gradient(135deg, #0f0c29, #302b63);
  color: #fff;
  border: none;
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  font-weight: bold;
  font-family: var(--tp-font-body);
  font-size: 14px;
  transition: opacity 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.tp-btn-secondary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.tp-btn-secondary:active {
  transform: translateY(0);
  opacity: 1;
}
/* ── Invite Code Modal — monospace font ─────────────── */
.tp-invite-code {
  font-family: var(--tp-font-code);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--tp-text);
}
.tp-task-expand {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dbeafe;
}
.tp-task-class-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.tp-task-class-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tp-task-class-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--tp-primary);
  cursor: pointer;
}
.tp-task-class-option span {
  color: var(--tp-text);
  font-size: 13px;
  font-weight: 600;
}
.tp-task-class-option.is-checked {
  border-color: #91caff;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px #d6e4ff;
}
/* ══════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════ */
/* ── Tablet & Laptop (≤ 1024px) ─────────────────────── */
@media (max-width: 1024px) {
  .tp-two-col-grid {
    grid-template-columns: 1fr;
  }
}
/* ── Tablet Portrait (≤ 768px) ──────────────────────── */
@media (max-width: 768px) {
  .tp-page {
    padding: 12px;
  }

  .tp-header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .tp-header-actions {
    gap: 6px;
  }

  /* Shrink header buttons on tablet */
  .tp-header-actions button,
  .tp-header-actions a {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  .tp-tab-btn {
    flex: none;
    padding: 8px 10px;
    font-size: 12px;
    min-width: 64px;
  }

  .tp-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tp-section-actions {
    width: 100%;
    gap: 8px;
  }

  /* Score expand panel — reduce indent on mobile */
  .tp-score-expand-inner {
    padding-left: 16px !important;
  }

  .tp-task-class-picker {
    grid-template-columns: 1fr;
  }
}
/* ── Mobile (≤ 480px) ───────────────────────────────── */
@media (max-width: 480px) {
  .tp-page {
    padding: 8px;
  }

  .tp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tp-header-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .tp-header-actions button {
    flex: none;
    font-size: 11px !important;
    padding: 6px 8px !important;
  }

  .tp-tab-btn {
    padding: 8px 8px;
    font-size: 11px;
    min-width: 54px;
  }

  .tp-two-col-grid {
    gap: 16px;
  }

  .tp-section-actions {
    gap: 6px;
  }

  /* Parent cards: force single column on tiny screens */
  .tp-parents-grid {
    grid-template-columns: 1fr !important;
  }
}
/* ── Small Mobile (≤ 375px) ─────────────────────────── */
@media (max-width: 375px) {
  .tp-page {
    padding: 6px;
  }

  .tp-tab-btn {
    padding: 6px 6px;
    font-size: 10px;
    min-width: 48px;
  }
}
/* ── Student expand detail — reduce left indent on mobile ─── */
@media (max-width: 768px) {
  .tp-student-expand-detail {
    padding-left: 16px !important;
  }
}
/* ═══════════════════════════════════════════════════════
   PetMotionFrame — 宠物动态装饰框
   层级（从下到上）：
     shell (z0)  →  halo (z1)  →  content(z2) {
         fallback(z1) → inner(z2)[image] → breeze(z3)
     }  →  spark×4 (z3, ROOT ctx, above content z2)
   ═══════════════════════════════════════════════════════ */

/* ── 根容器 ── */
.pet-motion-frame {
  --pet-motion-size:   120px;
  --pet-motion-radius: 20px;
  /* 主题色（由 tone 类注入） */
  --pmf-bg:     linear-gradient(145deg, #fffaf3, #eef8ff);
  --pmf-border: rgba(255, 215, 100, 0.55);
  --pmf-glow:   rgba(255, 200, 80, 0.55);
  --pmf-spark:  #f59e0b;
  --pmf-breeze: rgba(56, 189, 248, 0.85);

  position: relative;
  width:  var(--pet-motion-size);
  height: var(--pet-motion-size);
  border-radius: var(--pet-motion-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  flex-shrink: 0;
}

/* ── 圆形变体 ── */
.pet-motion-frame--circle { --pet-motion-radius: 999px; }

/* ── 主题色 ── */
.pet-motion-frame--normal {
  --pmf-bg:     linear-gradient(145deg, #fffaf3, #eef8ff);
  --pmf-border: rgba(255, 215, 100, 0.55);
  --pmf-glow:   rgba(255, 200, 80, 0.55);
  --pmf-spark:  #f59e0b;
  --pmf-breeze: rgba(56, 189, 248, 0.85);
}
.pet-motion-frame--mythical {
  --pmf-bg:     linear-gradient(145deg, #fdf4ff, #ede9fe);
  --pmf-border: rgba(192, 132, 252, 0.65);
  --pmf-glow:   rgba(168,  85, 247, 0.6);
  --pmf-spark:  #a855f7;
  --pmf-breeze: rgba(192, 132, 252, 0.9);
}
.pet-motion-frame--hero {
  --pmf-bg:     linear-gradient(145deg, #eff6ff, #dbeafe);
  --pmf-border: rgba( 96, 165, 250, 0.65);
  --pmf-glow:   rgba( 59, 130, 246, 0.55);
  --pmf-spark:  #3b82f6;
  --pmf-breeze: rgba( 14, 165, 233, 0.9);
}
.pet-motion-frame--legendary {
  --pmf-bg:     linear-gradient(145deg, #fff7ed, #fef9c3);
  --pmf-border: rgba(251, 191,  36, 0.7);
  --pmf-glow:   rgba(249, 115,  22, 0.6);
  --pmf-spark:  #f97316;
  --pmf-breeze: rgba(245, 158,  11, 0.9);
}
.pet-motion-frame--soft {
  --pmf-bg:     linear-gradient(145deg, #f8fafc, #eef2f7);
  --pmf-border: rgba(203, 213, 225, 0.7);
  --pmf-glow:   rgba(148, 163, 184, 0.3);
  --pmf-spark:  #94a3b8;
  --pmf-breeze: rgba(148, 163, 184, 0.65);
}

/* ── Shell：背景 + 描边 + 阴影 ── */
.pet-motion-frame__shell {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--pmf-bg);
  border: 2px solid var(--pmf-border);
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  z-index: 0;
}

/* ── Halo：中心光晕脉冲 ── */
.pet-motion-frame__halo {
  position: absolute;
  inset: 8%;
  border-radius: 999px;
  background: radial-gradient(circle, var(--pmf-glow) 0%, transparent 70%);
  filter: blur(10px);
  z-index: 1;
  pointer-events: none;
  animation: pmf-halo 3.4s ease-in-out infinite;
  animation-delay: var(--pmf-phase, 0s);
}

/* ── Content：裁剪图片和风线至圆角边框内 ── */
.pet-motion-frame__content {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 2;
  /* 强制 GPU layer，确保 overflow:hidden 对内部 will-change 子元素生效 */
  transform: translateZ(0);
}

/* ── Fallback 占位（加载中 / 图片出错） ── */
.pet-motion-frame__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--pet-motion-size) * 0.46);
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}

/* ── Inner：呼吸缩放包裹层（z2 in content ctx） ── */
.pet-motion-frame__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  will-change: transform;
  transform-origin: center;
  animation: pmf-breathe 3.0s ease-in-out infinite;
  animation-delay: var(--pmf-phase, 0s);
}

/* ── 宠物图片：仅 Y 轴漂浮，无旋转 → 保持清晰锐利 ── */
.pet-motion-frame__image {
  width: 100%;
  height: 100%;
  display: block;
  will-change: transform;
  transform-origin: center;
  backface-visibility: hidden;
  animation: pmf-float 4.0s ease-in-out infinite;
  animation-delay: var(--pmf-phase, 0s);
}
.pet-motion-frame__image--loading { opacity: 0; }

/* ── 风线已移除 ── */

/* ── 星点（siblings of content，z3 > content z2 → 叠在图片上方） ── */
.pet-motion-frame__spark {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  color: var(--pmf-spark);
  text-shadow:
    0 0  5px currentColor,
    0 0 12px currentColor,
    0 0  2px #fff;
  line-height: 1;
  animation: pmf-twinkle 2.4s ease-in-out infinite;
}
.pet-motion-frame__spark--1 { top:  4%; right: 6%; font-size: calc(var(--pet-motion-size) * 0.22); animation-delay: var(--pmf-phase, 0s); }
.pet-motion-frame__spark--2 { top:  7%; left:  5%; font-size: calc(var(--pet-motion-size) * 0.15); animation-delay: calc(var(--pmf-phase, 0s) - 0.85s); }
.pet-motion-frame__spark--3 { bottom: 6%; right: 9%; font-size: calc(var(--pet-motion-size) * 0.13); animation-delay: calc(var(--pmf-phase, 0s) - 1.65s); }
.pet-motion-frame__spark--4 { bottom:12%; left:  7%; font-size: calc(var(--pet-motion-size) * 0.17); animation-delay: calc(var(--pmf-phase, 0s) - 0.35s); }

/* ═══════════════════════════════════════════════════
   Keyframes
   ═══════════════════════════════════════════════════ */

/* 光晕脉冲 */
@keyframes pmf-halo {
  0%, 100% { transform: scale(0.84); opacity: 0.55; }
  50%       { transform: scale(1.18); opacity: 1;   }
}

/* 呼吸缩放（内层 wrapper，overflow:hidden 确保不溢出） */
@keyframes pmf-breathe {
  0%, 100% { transform: translateZ(0) scale(1);    }
  50%       { transform: translateZ(0) scale(1.07); }
}

/* Y 轴漂浮——无旋转，无斜切，图片始终保持锐利 */
@keyframes pmf-float {
  0%, 100% { transform: translateZ(0) translateY(0);    }
  50%       { transform: translateZ(0) translateY(-6px); }
}

/* 星点闪烁：暗→亮→半亮→再亮→暗，模拟星光呼吸感 */
@keyframes pmf-twinkle {
  0%, 55%, 100% { opacity: 0;   transform: scale(0.3)  rotate( 0deg);  }
  12%            { opacity: 1;   transform: scale(1.55) rotate(30deg);  }
  28%            { opacity: 0.3; transform: scale(0.85) rotate(12deg);  }
  42%            { opacity: 0.95;transform: scale(1.35) rotate(-18deg); }
}

/* 风线扫过 keyframe 已随风线一同移除 */

/* ═══════════════════════════════════════════════════
   眨眼 Sprite 层
   ═══════════════════════════════════════════════════ */

/*
 * 层级：放在 .pet-motion-frame__inner 内部（position:absolute siblings of img）。
 * 随 __inner 的 breathe + float 动画整体运动，眼睛始终贴合宠物身体。
 *
 * Sprite 规范：
 *   - 路径：/pets/{speciesKey}/blink.png
 *   - 横向排列，N 帧等宽（RGBA PNG，非眼区全透明）
 *   - 推荐多放几帧"睁眼"帧使眨眼间隔自然，例如：
 *       [open, open, open, open, closing, closed]  → blinkFrames=6
 */
.pet-motion-frame__blink {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: 0% 0;
  /* backgroundSize、animationDuration、animationTimingFunction 由 React inline style 注入 */
  animation-name: pmf-blink;
  animation-iteration-count: infinite;
  animation-delay: var(--pmf-blink-phase, 0s);
  z-index: 3;
}

/* dead 状态：已由 React 条件渲染阻止显示，无需额外 CSS */

@keyframes pmf-blink {
  from { background-position-x: 0%; }
  to   { background-position-x: 100%; }
}

/* 无障碍：用户偏好减少动效 */
@media (prefers-reduced-motion: reduce) {
  .pet-motion-frame__halo,
  .pet-motion-frame__inner,
  .pet-motion-frame__image,
  .pet-motion-frame__spark,
  .pet-motion-frame--happy .pet-motion-frame__inner,
  .pet-motion-frame--hungry .pet-motion-frame__inner,
  .pet-motion-frame--sick .pet-motion-frame__image,
  .pet-motion-frame--sleeping .pet-motion-frame__inner,
  .pet-motion-frame--dead .pet-motion-frame__inner {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════
   宠物状态视觉差异化
   ═══════════════════════════════════════════════════════ */

/* 开心：弹弹跳跳 + 星光更亮，学生一眼能看出被鼓励 */
.pet-motion-frame--happy .pet-motion-frame__shell {
  border-color: rgba(34, 197, 94, 0.62);
  background: linear-gradient(145deg, #ecfdf5, #fff7cc);
}
.pet-motion-frame--happy .pet-motion-frame__halo {
  background: radial-gradient(circle, rgba(74, 222, 128, 0.72) 0%, rgba(255, 232, 121, 0.42) 45%, transparent 72%);
  animation: pmf-halo 2.1s ease-in-out infinite;
}
.pet-motion-frame--happy .pet-motion-frame__inner {
  animation: pet-happy-bop 1.35s cubic-bezier(.34,1.56,.64,1) infinite;
  animation-delay: var(--pmf-phase, 0s);
}
.pet-motion-frame--happy .pet-motion-frame__spark {
  color: #facc15;
  animation-duration: 1.45s;
}

@keyframes pet-happy-bop {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  28%      { transform: translateY(-8px) scale(1.08) rotate(-2deg); }
  55%      { transform: translateY(0) scale(0.99) rotate(2deg); }
  76%      { transform: translateY(-4px) scale(1.04) rotate(0deg); }
}

/* 饥饿：慢慢低头晃动 + 暖黄色弱光，不做“惩罚灰” */
.pet-motion-frame--hungry .pet-motion-frame__shell {
  border-color: rgba(245, 158, 11, 0.58);
  background: linear-gradient(145deg, #fff7ed, #fef3c7);
}
.pet-motion-frame--hungry .pet-motion-frame__halo {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.42) 0%, transparent 70%);
  opacity: 0.65;
}
.pet-motion-frame--hungry .pet-motion-frame__inner {
  animation: pet-hungry-sway 2.15s ease-in-out infinite;
  animation-delay: var(--pmf-phase, 0s);
}
.pet-motion-frame--hungry .pet-motion-frame__image {
  filter: brightness(0.93) saturate(0.88);
}
.pet-motion-frame--hungry .pet-motion-frame__spark {
  color: #f59e0b;
  opacity: .55;
}

@keyframes pet-hungry-sway {
  0%, 100% { transform: translateY(2px) scale(0.99) rotate(0deg); }
  35%      { transform: translateY(6px) scale(0.96) rotate(-2.2deg); }
  68%      { transform: translateY(3px) scale(0.985) rotate(2deg); }
}

/* 生病：轻微发绿 + 颤抖 + 光晕减弱，表达“需要照顾”而不是恐怖 */
.pet-motion-frame--sick .pet-motion-frame__shell {
  border-color: rgba(45, 212, 191, 0.66);
  background: linear-gradient(145deg, #ecfeff, #dcfce7);
}
.pet-motion-frame--sick .pet-motion-frame__halo {
  background: radial-gradient(circle, rgba(45, 212, 191, 0.38) 0%, transparent 70%);
  opacity: 0.48;
}
.pet-motion-frame--sick .pet-motion-frame__image {
  filter: hue-rotate(28deg) saturate(0.82) brightness(0.9);
  animation: pet-sick-shake 1.85s ease-in-out infinite;
}
.pet-motion-frame--sick .pet-motion-frame__spark { display: none; }

@keyframes pet-sick-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  18%      { transform: translateX(-1.5px) rotate(-1.2deg); }
  36%      { transform: translateX(1.5px) rotate(1.2deg); }
  54%      { transform: translateX(-1px) rotate(-0.8deg); }
  72%      { transform: translateX(1px) rotate(0.8deg); }
}

/* 沉睡：用于未唤醒/死亡/0分。不要倒下或死亡感，改成睡觉等待唤醒 */
.pet-motion-frame--sleeping .pet-motion-frame__shell,
.pet-motion-frame--dead .pet-motion-frame__shell {
  border-color: rgba(148, 163, 184, 0.44);
  background: linear-gradient(145deg, #f8fafc, #e0f2fe);
}
.pet-motion-frame--sleeping .pet-motion-frame__halo,
.pet-motion-frame--dead .pet-motion-frame__halo {
  background: radial-gradient(circle, rgba(147, 197, 253, 0.32) 0%, transparent 68%);
  animation: pet-sleep-halo 3.2s ease-in-out infinite;
}
.pet-motion-frame--sleeping .pet-motion-frame__inner,
.pet-motion-frame--dead .pet-motion-frame__inner {
  animation: pet-sleep-breathe 3.4s ease-in-out infinite !important;
  animation-delay: var(--pmf-phase, 0s);
}
.pet-motion-frame--sleeping .pet-motion-frame__image,
.pet-motion-frame--dead .pet-motion-frame__image {
  filter: grayscale(0.38) brightness(0.94) saturate(0.72);
}
.pet-motion-frame--sleeping .pet-motion-frame__spark,
.pet-motion-frame--dead .pet-motion-frame__spark {
  display: none;
}

@keyframes pet-sleep-breathe {
  0%, 100% { transform: translateY(3px) scale(0.96); }
  50%      { transform: translateY(6px) scale(0.985); }
}
@keyframes pet-sleep-halo {
  0%, 100% { transform: scale(.78); opacity: .28; }
  50%      { transform: scale(1.02); opacity: .52; }
}

/* 濒危（预留）：红色边框脉冲 */
.pet-motion-frame--critical .pet-motion-frame__shell {
  animation: critical-border-pulse 1.2s ease-in-out infinite;
}
@keyframes critical-border-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,79,0); border-color: rgba(255,77,79,0.3); }
  50%       { box-shadow: 0 0 0 6px rgba(255,77,79,0.35); border-color: rgba(255,77,79,0.9); }
}
.pet-motion-frame--critical .pet-motion-frame__image {
  filter: brightness(0.75) saturate(0.6);
}

/* 跳跃动画（加分时触发）*/
.pet-motion-frame--bounce .pet-motion-frame__inner {
  animation: pet-bounce 0.5s ease-out;
}
@keyframes pet-bounce {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-12px) scale(1.15); }
  60%  { transform: translateY(-6px) scale(1.05); }
  80%  { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}.notif-bell-wrap {
  position: relative;
  display: inline-block;
}

.notif-bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  position: relative;
  font-size: 1.3rem;
  line-height: 1;
  transition: background 0.15s;
}
.notif-bell-btn:hover { background: rgba(0,0,0,0.06); }

.notif-bell-icon { font-size: 1.4rem; }

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
}

.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 340px;
  max-width: 90vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 1000;
  overflow: hidden;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
}
.notif-panel-title { font-weight: 700; font-size: 1rem; color: #1f2937; }
.notif-mark-all {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.notif-mark-all:hover { background: #eef2ff; }

.notif-list {
  max-height: 400px;
  overflow-y: auto;
}

.notif-empty {
  text-align: center;
  padding: 32px 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f9fafb;
  cursor: pointer;
  transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f9fafb; }
.notif-item.unread { background: #fefce8; }
.notif-item.unread:hover { background: #fef9c3; }

.notif-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.notif-type-tag {
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.notif-time {
  color: #9ca3af;
  font-size: 0.72rem;
  margin-left: auto;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}
.notif-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 2px;
}
.notif-item-content {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 480px) {
  .notif-panel { width: 95vw; right: -8px; }
}
.mc-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  min-height: 480px;
  overflow: hidden;
}

.mc-tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.mc-tab {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: none;
  font-size: 0.92rem;
  cursor: pointer;
  color: #888;
  font-weight: 600;
  position: relative;
  transition: color 0.15s;
}
.mc-tab:hover { color: #6366f1; }
.mc-tab.active {
  color: #6366f1;
  border-bottom: 2px solid #6366f1;
}

.mc-unread-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
  display: inline-block;
}

.mc-error {
  background: #fff2f0;
  color: #ff4d4f;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-bottom: 1px solid #ffccc7;
}

/* 会话列表 */
.mc-body {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
}

.mc-empty {
  text-align: center;
  padding: 48px 0;
  color: #bbb;
  font-size: 0.9rem;
}

.mc-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.1s;
}
.mc-conv-item:hover { background: #f9f9ff; }

.mc-conv-avatar { font-size: 2rem; flex-shrink: 0; }

.mc-conv-info { flex: 1; min-width: 0; }
.mc-conv-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-conv-role-tag {
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.mc-conv-last {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-conv-meta { text-align: right; flex-shrink: 0; }
.mc-conv-time {
  font-size: 0.72rem;
  color: #bbb;
  white-space: nowrap;
}
.mc-unread-dot {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  margin-top: 4px;
}

/* 聊天窗口 */
.mc-chat-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: 560px;
}
.mc-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.mc-back {
  background: none;
  border: none;
  cursor: pointer;
  color: #6366f1;
  font-size: 0.88rem;
  padding: 4px 8px;
  border-radius: 6px;
}
.mc-back:hover { background: #eef2ff; }
.mc-chat-title { font-weight: 700; font-size: 0.95rem; color: #1f2937; }

.mc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-bubble-row {
  display: flex;
}
.mc-bubble-row.mine { justify-content: flex-end; }
.mc-bubble-row.theirs { justify-content: flex-start; }

.mc-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}
.mc-bubble.mine {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.mc-bubble.theirs {
  background: #f3f4f6;
  color: #1f2937;
  border-bottom-left-radius: 4px;
}
.mc-bubble-content { margin-bottom: 4px; }
.mc-bubble-time {
  font-size: 0.68rem;
  opacity: 0.65;
  text-align: right;
}

.mc-chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
}
.mc-input {
  flex: 1;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.15s;
}
.mc-input:focus { border-color: #6366f1; }
.mc-send-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.mc-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 公告 */
.mc-bcast-compose {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mc-bcast-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b7280;
  padding: 0 16px;
}
.mc-bcast-btn {
  padding: 9px 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  align-self: flex-end;
  transition: opacity 0.15s;
}
.mc-bcast-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mc-bcast-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
}
.mc-bcast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.mc-bcast-sender { font-weight: 700; font-size: 0.85rem; color: #374151; }
.mc-bcast-time { font-size: 0.75rem; color: #bbb; }
.mc-bcast-content { font-size: 0.88rem; color: #4b5563; line-height: 1.5; }

@media (max-width: 480px) {
  .mc-bubble { max-width: 88%; }
}
/* =====================================================
   PetLevelUpModal.css — Claymorphism Celebration
   Design: Playful · Orange · Fireworks · Responsive
   prefers-reduced-motion: respected throughout
   ===================================================== */

/* ===========================
   OVERLAY
   =========================== */
.lvup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  padding: 16px;
  box-sizing: border-box;
  animation: lvup-fade-in 0.3s ease-out both;
}

@keyframes lvup-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===========================
   FIREWORKS CANVAS
   =========================== */
.lvup-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ===========================
   CARD
   =========================== */
.lvup-card {
  position: relative;
  z-index: 1;
  background: #FFFFFF;
  border-radius: 28px;
  border: 3px solid rgba(249, 115, 22, 0.18);
  box-shadow:
    6px 6px 0 rgba(0, 0, 0, 0.10),
    0 20px 60px rgba(249, 115, 22, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 32px 28px 24px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  animation: lvup-card-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes lvup-card-in {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===========================
   HEADER
   =========================== */
.lvup-header {
  margin-bottom: 24px;
}

.lvup-stars {
  font-size: 22px;
  letter-spacing: 6px;
  margin-bottom: 6px;
  animation: lvup-pulse 1.4s ease-in-out infinite;
}

@keyframes lvup-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.06); }
}

.lvup-title {
  font-family: 'Baloo 2', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 700;
  color: #EA580C;
  margin: 0 0 6px;
  line-height: 1.2;
  text-shadow: 2px 2px 0 rgba(234, 88, 12, 0.12);
}

.lvup-pet-name {
  font-family: 'Baloo 2', 'PingFang SC', sans-serif;
  font-size: clamp(15px, 3.5vw, 18px);
  color: #78716C;
  margin: 0;
  font-weight: 500;
}

/* ===========================
   LEVEL TRANSITION
   =========================== */
.lvup-levels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lvup-level-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Old Level — muted / greyscale */
.lvup-img-old {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 20px;
  background: #F5F5F4;
  border: 3px solid rgba(0, 0, 0, 0.07);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(60%) brightness(0.85);
  opacity: 0.75;
  transition: none;
}

/* New Level — vibrant, glowing */
.lvup-img-new {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 24px;
  background: linear-gradient(135deg, #FFF7ED, #FED7AA);
  border: 3px solid #F97316;
  box-shadow:
    4px 4px 0 rgba(249, 115, 22, 0.25),
    0 0 24px rgba(249, 115, 22, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lvup-new-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

@keyframes lvup-new-bounce {
  from { transform: scale(0.5) rotate(-8deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.lvup-glow-ring {
  position: absolute;
  inset: -8px;
  border-radius: 32px;
  border: 2px solid rgba(249, 115, 22, 0.4);
  animation: lvup-ring-expand 1.6s ease-out infinite;
  pointer-events: none;
}

@keyframes lvup-ring-expand {
  0%   { transform: scale(1);    opacity: 0.8; }
  100% { transform: scale(1.22); opacity: 0;   }
}

.lvup-pet-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.lvup-pet-emoji {
  font-size: 36px;
  line-height: 1;
}

/* Badges */
.lvup-lv-badge {
  font-family: 'Baloo 2', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  border: 2px solid;
}

.lvup-lv-badge-old {
  background: #F5F5F4;
  color: #78716C;
  border-color: #D6D3D1;
}

.lvup-lv-badge-new {
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: #FFFFFF;
  border-color: #EA580C;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.4);
}

/* Level names */
.lvup-lv-name-old {
  font-family: 'Comic Neue', 'PingFang SC', sans-serif;
  font-size: 13px;
  color: #A8A29E;
  font-weight: 600;
}

.lvup-lv-name-new {
  font-family: 'Baloo 2', 'PingFang SC', sans-serif;
  font-size: 15px;
  color: #EA580C;
  font-weight: 700;
}

/* Arrow */
.lvup-arrow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lvup-arrow {
  font-size: 28px;
  color: #F97316;
  font-weight: 900;
  animation: lvup-arrow-move 0.8s ease-in-out infinite alternate;
  line-height: 1;
}

@keyframes lvup-arrow-move {
  from { transform: translateX(-4px); }
  to   { transform: translateX(4px);  }
}

.lvup-arrow-sparks {
  font-size: 16px;
  color: #FB923C;
  animation: lvup-sparks-spin 2s linear infinite;
}

@keyframes lvup-sparks-spin {
  from { transform: rotate(0deg); opacity: 1; }
  to   { transform: rotate(360deg); opacity: 0.5; }
}

/* ===========================
   AI COMMENT
   =========================== */
.lvup-comment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  border: 2px solid rgba(249, 115, 22, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lvup-comment-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lvup-comment-text {
  font-family: 'Comic Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #78350F;
  margin: 0;
  line-height: 1.6;
  font-weight: 700;
}

/* ===========================
   CLOSE BUTTON
   =========================== */
.lvup-close-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 16px;
  border: 3px solid #EA580C;
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: #FFFFFF;
  font-family: 'Baloo 2', 'PingFang SC', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(234, 88, 12, 0.35);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
  letter-spacing: 0.5px;
}

.lvup-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 0 rgba(234, 88, 12, 0.4);
}

.lvup-close-btn:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 rgba(234, 88, 12, 0.25);
}

.lvup-close-btn:focus-visible {
  outline: 3px solid #2563EB;
  outline-offset: 3px;
}

.lvup-auto-close {
  font-family: 'Comic Neue', 'PingFang SC', sans-serif;
  font-size: 11px;
  color: #A8A29E;
  margin: 8px 0 0;
}

/* ===========================
   REDUCED MOTION
   =========================== */
@media (prefers-reduced-motion: reduce) {
  .lvup-overlay,
  .lvup-card,
  .lvup-new-bounce,
  .lvup-arrow,
  .lvup-stars,
  .lvup-glow-ring,
  .lvup-arrow-sparks {
    animation: none !important;
    transition: none !important;
  }
  .lvup-canvas { display: none; }
  .lvup-img-old { filter: grayscale(60%) brightness(0.85); opacity: 0.75; }
  .lvup-img-new { box-shadow: 4px 4px 0 rgba(249, 115, 22, 0.25); }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 480px) {
  .lvup-card {
    padding: 24px 18px 18px;
    border-radius: 22px;
  }

  .lvup-img-old  { width: 72px; height: 72px;  border-radius: 16px; }
  .lvup-img-new  { width: 88px; height: 88px;  border-radius: 20px; }
  .lvup-glow-ring { inset: -6px; border-radius: 26px; }

  .lvup-levels { gap: 8px; }

  .lvup-arrow  { font-size: 22px; }
  .lvup-arrow-sparks { font-size: 13px; }
}



/* =====================================================
   StudentPage.module.css — Claymorphism Design System
   Design: Playful · Orange · Education · Responsive
   Breakpoints: 375 | 768 | 1024 | 1440
   ===================================================== */
/* ===========================
   DESIGN TOKENS
   =========================== */
._page_1jn6c_23 {
  --cp-primary: #F97316;
  --cp-primary-dark: #EA580C;
  --cp-secondary: #FB923C;
  --cp-cta: #2563EB;
  --cp-bg: #FFF7ED;
  --cp-bg-card: #FFFFFF;
  --cp-text: #1C1917;
  --cp-text-muted: #78716C;
  --cp-accent: #9A3412;
  --cp-success: #16A34A;
  --cp-danger: #DC2626;
  --cp-warning: #D97706;
  --cp-info: #2563EB;
  --cp-shadow-card: 4px 4px 0 rgba(0, 0, 0, 0.09), 0 6px 18px rgba(249, 115, 22, 0.08);
  --cp-shadow-btn: 3px 3px 0 rgba(0, 0, 0, 0.13);
  --cp-border: 3px solid rgba(0, 0, 0, 0.07);
  --cp-radius-card: 20px;
  --cp-radius-btn: 12px;
  --cp-font-heading: 'Baloo 2', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --cp-font-body: 'Comic Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  min-height: 100vh;
  background: var(--cp-bg);
  font-family: var(--cp-font-body);
  color: var(--cp-text);
  padding: 14px;
  box-sizing: border-box;
}
._container_1jn6c_83 {
  max-width: 1200px;
  margin: 0 auto;
}
/* ===========================
   HEADER
   =========================== */
._header_1jn6c_99 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 10px;
  flex-wrap: wrap;
}
._headerLeft_1jn6c_117 h2 {
  margin: 0;
  font-family: var(--cp-font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--cp-accent);
  line-height: 1.2;
}
._subtitle_1jn6c_135 {
  color: var(--cp-text-muted);
  font-size: 13px;
  margin-top: 3px;
  margin-bottom: 0;
}
._headerRight_1jn6c_149 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
._btnLogout_1jn6c_163 {
  padding: 8px 18px;
  background: var(--cp-bg-card);
  border: var(--cp-border);
  border-radius: var(--cp-radius-btn);
  cursor: pointer;
  color: var(--cp-text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--cp-font-body);
  box-shadow: var(--cp-shadow-btn);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
._btnLogout_1jn6c_163:hover {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.13);
}
/* ===========================
   STATS GRID
   =========================== */
._statsGrid_1jn6c_209 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
._statCard_1jn6c_223 {
  border-radius: var(--cp-radius-card);
  padding: 14px 16px;
  color: #fff;
  box-shadow: var(--cp-shadow-card);
  border: 3px solid rgba(255, 255, 255, 0.25);
}
._statCard_1jn6c_223._orange_1jn6c_239 { background: linear-gradient(135deg, #F97316, #EA580C); }
._statCard_1jn6c_223._green_1jn6c_241  { background: linear-gradient(135deg, #22C55E, #16A34A); }
._statCard_1jn6c_223._blue_1jn6c_243   { background: linear-gradient(135deg, #3B82F6, #2563EB); }
._statCard_1jn6c_223._purple_1jn6c_245 { background: linear-gradient(135deg, #A855F7, #7C3AED); }
._statLabel_1jn6c_249 {
  font-size: 12px;
  opacity: 0.88;
  font-weight: 600;
}
._statValue_1jn6c_261 {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--cp-font-heading);
  margin-top: 4px;
  line-height: 1;
}
/* ===========================
   MAIN GRID  (Pet + Tasks)
   =========================== */
._mainGrid_1jn6c_283 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
/* Remove bottom margin from sectionCards that live inside mainGrid */
._mainGrid_1jn6c_283 ._sectionCard_1jn6c_299 {
  margin-bottom: 0;
}
/* ===========================
   SECTION CARD
   =========================== */
._sectionCard_1jn6c_299 {
  background: var(--cp-bg-card);
  border-radius: var(--cp-radius-card);
  padding: 16px 14px;
  box-shadow: var(--cp-shadow-card);
  border: var(--cp-border);
  margin-bottom: 16px;
}
._sectionCard_1jn6c_299:last-child {
  margin-bottom: 0;
}
._sectionHeader_1jn6c_339 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}
._sectionTitle_1jn6c_357 {
  margin: 0;
  font-family: var(--cp-font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--cp-accent);
}
._sectionNote_1jn6c_373 {
  font-size: 12px;
  color: var(--cp-text-muted);
}
/* ===========================
   PET SECTION
   =========================== */
._btnClaimPet_1jn6c_389 {
  padding: 7px 14px;
  background: linear-gradient(135deg, #F97316, #EA580C);
  border: 3px solid rgba(0, 0, 0, 0.09);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--cp-font-body);
  box-shadow: 3px 3px 0 rgba(234, 88, 12, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
._btnClaimPet_1jn6c_389:hover {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 rgba(234, 88, 12, 0.32);
}
._petTypeLabel_1jn6c_427 {
  font-size: 11px;
  font-weight: 700;
  color: var(--cp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}
._petLevelBar_1jn6c_445 {
  background: #FFF7ED;
  border-radius: 12px;
  padding: 9px 13px;
  margin-bottom: 8px;
  border: 2px solid rgba(249, 115, 22, 0.11);
}
._petLevelHeader_1jn6c_461 {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--cp-text-muted);
  margin-bottom: 6px;
}
._petLevelName_1jn6c_477 {
  font-weight: 700;
  color: var(--cp-text);
}
._progressTrack_1jn6c_487 {
  height: 8px;
  background: #FDE8D8;
  border-radius: 4px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 0, 0, 0.06);
}
._progressBar_1jn6c_503 {
  height: 100%;
  background: linear-gradient(90deg, #F97316, #FB923C);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}
/* ===========================
   TASK LIST
   =========================== */
._taskList_1jn6c_523 {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
._taskItem_1jn6c_535 {
  background: #FFF7ED;
  border-radius: 14px;
  padding: 12px 14px;
  border: 2px solid rgba(249, 115, 22, 0.11);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
._taskItem_1jn6c_535:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 rgba(249, 115, 22, 0.14);
}
._taskItemHeader_1jn6c_561 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
._taskTitle_1jn6c_575 {
  font-weight: 700;
  font-size: 14px;
  color: var(--cp-text);
  margin: 0 0 4px;
}
._taskMeta_1jn6c_589 {
  font-size: 12px;
  color: var(--cp-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
._taskPoints_1jn6c_607 {
  color: var(--cp-primary);
  font-weight: 700;
}
._taskDeadline_1jn6c_617 {
  font-size: 11px;
  color: #A8A29E;
  margin-top: 2px;
}
/* Task Status Badges — Standalone */
._statusSuccess_1jn6c_631 {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #16A34A;
  background: #F0FDF4;
  border: 2px solid #BBF7D0;
}
._statusInfo_1jn6c_657 {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #2563EB;
  background: #EFF6FF;
  border: 2px solid #BFDBFE;
}
._statusWarning_1jn6c_683 {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #D97706;
  background: #FFFBEB;
  border: 2px solid #FDE68A;
}
._statusDanger_1jn6c_709 {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #DC2626;
  background: #FEF2F2;
  border: 2px solid #FECACA;
}
/* ===========================
   SCORE TIMELINE
   =========================== */
._scoreTimeline_1jn6c_741 {
  display: flex;
  flex-direction: column;
}
._scoreItem_1jn6c_751 {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #FDE8D8;
}
._scoreItem_1jn6c_751:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
._scoreAvatar_1jn6c_777 {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  border: 2px solid rgba(0, 0, 0, 0.06);
}
._scoreAvatarPos_1jn6c_801 { background: #F0FDF4; }
._scoreAvatarNeg_1jn6c_803 { background: #FEF2F2; }
._scoreBody_1jn6c_807 {
  flex: 1;
  min-width: 0;
}
._scoreReason_1jn6c_817 {
  font-size: 13px;
  color: var(--cp-text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 0 2px;
}
._scoreEffect_1jn6c_837 {
  font-size: 12px;
  color: var(--cp-text-muted);
}
._scoreRevoked_1jn6c_847 {
  font-size: 12px;
  color: var(--cp-primary);
  margin-top: 2px;
}
._scoreTime_1jn6c_741 {
  font-size: 11px;
  color: #A8A29E;
  margin-top: 2px;
}
._scoreDelta_1jn6c_871 {
  font-weight: 700;
  font-size: 15px;
  font-family: var(--cp-font-heading);
  white-space: nowrap;
}
._scoreDeltaPos_1jn6c_885 { color: var(--cp-success); }
._scoreDeltaNeg_1jn6c_887 { color: var(--cp-danger); }
/* ===========================
   ACHIEVEMENT GRID
   =========================== */
._achieveGrid_1jn6c_897 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
._achieveCard_1jn6c_909 {
  border-radius: 16px;
  padding: 13px 12px;
  border: 2px solid #FCD34D;
  background: linear-gradient(135deg, #FFFBEB, #FFF7ED);
  box-shadow: 3px 3px 0 rgba(217, 119, 6, 0.14);
  transition: transform 0.15s ease;
}
._achieveCard_1jn6c_909:hover {
  transform: translateY(-2px);
}
._achieveCard_1jn6c_909._locked_1jn6c_935 {
  border: 2px dashed #D1D5DB;
  background: #F9FAFB;
  box-shadow: none;
  opacity: 0.62;
}
._achieveIcon_1jn6c_949 {
  font-size: 24px;
  margin-bottom: 5px;
  display: block;
}
._achieveName_1jn6c_961 {
  font-weight: 700;
  font-size: 13px;
  color: #92400E;
  margin: 0 0 4px;
}
._achieveCard_1jn6c_909._locked_1jn6c_935 ._achieveName_1jn6c_961 { color: #9CA3AF; }
._achieveDesc_1jn6c_979 {
  font-size: 12px;
  color: #78716C;
  line-height: 1.4;
  margin: 0;
}
._achieveCard_1jn6c_909._locked_1jn6c_935 ._achieveDesc_1jn6c_979 { color: #9CA3AF; }
._achieveDate_1jn6c_997 {
  font-size: 11px;
  color: #A8A29E;
  margin-top: 5px;
}
._achieveBadge_1jn6c_1009 {
  display: inline-flex;
  align-items: center;
  background: #FEF3C7;
  border: 1.5px solid #FCD34D;
  color: #92400E;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}
/* ===========================
   LEADERBOARD
   =========================== */
._lbTabs_1jn6c_1039 {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
._lbTab_1jn6c_1039 {
  padding: 5px 13px;
  border-radius: 20px;
  border: 2px solid rgba(0, 0, 0, 0.07);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--cp-font-body);
  font-weight: 700;
  transition: all 0.18s ease;
  background: #FFF7ED;
  color: var(--cp-text-muted);
}
._lbTab_1jn6c_1039._active_1jn6c_1077 {
  background: var(--cp-primary);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 2px 2px 0 rgba(234, 88, 12, 0.28);
}
._lbTab_1jn6c_1039:not(._active_1jn6c_1077):hover {
  background: #FDE8D8;
  color: var(--cp-accent);
}
._lbList_1jn6c_1101 {
  display: flex;
  flex-direction: column;
}
._lbRow_1jn6c_1111 {
  display: flex;
  align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid #FDE8D8;
  border-radius: 10px;
  transition: background 0.15s;
}
._lbRow_1jn6c_1111:last-child {
  border-bottom: none;
}
._lbRow_1jn6c_1111._isMe_1jn6c_1137 {
  background: linear-gradient(90deg, #FFF7ED, #FFEDD5);
  padding: 11px 10px;
}
._lbRank_1jn6c_1147 {
  width: 30px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--cp-text-muted);
  flex-shrink: 0;
}
._lbRank_1jn6c_1147._top3_1jn6c_1165 { font-size: 20px; }
._lbName_1jn6c_1169 {
  flex: 1;
  margin-left: 10px;
  font-size: 14px;
  color: var(--cp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
._lbRow_1jn6c_1111._isMe_1jn6c_1137 ._lbName_1jn6c_1169 {
  font-weight: 700;
  color: #EA580C;
}
._lbPoints_1jn6c_1199 {
  font-weight: 700;
  color: var(--cp-primary);
  font-size: 14px;
  font-family: var(--cp-font-heading);
  white-space: nowrap;
}
/* ===========================
   EMPTY / LOADING STATES
   =========================== */
._emptyState_1jn6c_1221 {
  text-align: center;
  padding: 26px 12px;
  color: var(--cp-text-muted);
  font-size: 14px;
}
._emptyIcon_1jn6c_1235 {
  font-size: 38px;
  margin-bottom: 8px;
  display: block;
}
._loadingState_1jn6c_1247 {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--cp-font-heading);
  font-size: 18px;
  color: var(--cp-text-muted);
}
/* ===========================
   MODAL — PET PLAZA
   =========================== */
._modalOverlay_1jn6c_1269 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
._modalBox_1jn6c_1291 {
  background: var(--cp-bg-card);
  border-radius: 24px;
  padding: 22px 18px;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.11), 0 20px 40px rgba(0, 0, 0, 0.16);
  border: var(--cp-border);
}
._modalHeader_1jn6c_1315 {
  text-align: center;
  margin-bottom: 18px;
}
._modalIcon_1jn6c_1325 {
  font-size: 34px;
  margin-bottom: 6px;
  display: block;
}
._modalTitle_1jn6c_1337 {
  margin: 0 0 4px;
  font-family: var(--cp-font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--cp-accent);
}
._modalSubtitle_1jn6c_1353 {
  color: var(--cp-text-muted);
  font-size: 13px;
  margin: 0;
}
._speciesGrid_1jn6c_1365 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
._speciesCard_1jn6c_1379 {
  border: 3px solid #E5E7EB;
  border-radius: 16px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  background: #F9FAFB;
  transition: all 0.18s ease;
}
._speciesCard_1jn6c_1379:hover:not(._selected_1jn6c_1399) {
  border-color: #FB923C;
  background: #FFF7ED;
}
._speciesCard_1jn6c_1379._selected_1jn6c_1399 {
  border-color: var(--cp-primary);
  background: #FFF7ED;
  box-shadow: 3px 3px 0 rgba(249, 115, 22, 0.22);
}
._speciesEmoji_1jn6c_1421 {
  font-size: 26px;
  margin-bottom: 4px;
  display: block;
}
._speciesName_1jn6c_1433 {
  font-weight: 700;
  font-size: 11px;
  color: var(--cp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
._selectedPreview_1jn6c_1451 {
  text-align: center;
  margin-bottom: 14px;
}
._selectedPreviewIcon_1jn6c_1461 {
  font-size: 44px;
  margin-bottom: 6px;
  display: block;
}
._selectedPreviewName_1jn6c_1473 {
  color: var(--cp-primary);
  font-weight: 700;
  font-size: 16px;
  font-family: var(--cp-font-heading);
}
._selectedPreviewDesc_1jn6c_1487 {
  color: var(--cp-text-muted);
  font-size: 13px;
  margin-top: 4px;
}
._nameBox_1jn6c_1499 {
  margin-bottom: 14px;
}
._inputLabel_1jn6c_1507 {
  display: block;
  font-size: 14px;
  color: var(--cp-text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
._inputText_1jn6c_1523 {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 3px solid #E5E7EB;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  font-family: var(--cp-font-body);
  color: var(--cp-text);
  background: #fff;
  transition: border-color 0.18s;
}
._inputText_1jn6c_1523:focus {
  border-color: var(--cp-primary);
}
._btnRow_1jn6c_1559 {
  display: flex;
  gap: 10px;
}
._btnPrimary_1jn6c_1569 {
  flex: 2;
  padding: 12px 0;
  border-radius: var(--cp-radius-btn);
  border: 3px solid rgba(0, 0, 0, 0.09);
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--cp-font-body);
  box-shadow: 3px 3px 0 rgba(234, 88, 12, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
._btnPrimary_1jn6c_1569:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 4px 5px 0 rgba(234, 88, 12, 0.32);
}
._btnPrimary_1jn6c_1569:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  border-color: transparent;
  box-shadow: none;
}
._btnSecondary_1jn6c_1625 {
  flex: 1;
  padding: 12px 0;
  border-radius: var(--cp-radius-btn);
  border: 3px solid #E5E7EB;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--cp-font-body);
  color: var(--cp-text-muted);
  transition: background 0.15s ease;
}
._btnSecondary_1jn6c_1625:hover {
  background: #F9FAFB;
}
._btnFullWidth_1jn6c_1661 {
  width: 100%;
  padding: 12px 0;
  border-radius: var(--cp-radius-btn);
  border: 3px solid rgba(0, 0, 0, 0.09);
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--cp-font-body);
  box-shadow: 3px 3px 0 rgba(234, 88, 12, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 4px;
}
._btnFullWidth_1jn6c_1661:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 4px 5px 0 rgba(234, 88, 12, 0.32);
}
._btnFullWidth_1jn6c_1661:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  border-color: transparent;
  box-shadow: none;
}
/* ===========================
   TOAST
   =========================== */
._toast_1jn6c_1725 {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #DC2626;
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px;
  z-index: 2000;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
/* ===========================
   RESPONSIVE — TABLET (768px+)
   =========================== */
@media (min-width: 768px) {
  ._page_1jn6c_23 {
    padding: 22px;
  }

  ._statsGrid_1jn6c_209 {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
  }

  ._statValue_1jn6c_261 {
    font-size: 30px;
  }

  ._mainGrid_1jn6c_283 {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }

  ._sectionCard_1jn6c_299 {
    padding: 20px 18px;
    margin-bottom: 20px;
  }

  ._sectionTitle_1jn6c_357 {
    font-size: 17px;
  }

  ._headerLeft_1jn6c_117 h2 {
    font-size: 24px;
  }

  ._achieveGrid_1jn6c_897 {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  ._speciesGrid_1jn6c_1365 {
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  }

  ._modalBox_1jn6c_1291 {
    padding: 26px 22px;
  }
}
/* ===========================
   RESPONSIVE — DESKTOP (1024px+)
   =========================== */
@media (min-width: 1024px) {
  ._page_1jn6c_23 {
    padding: 30px;
  }

  ._statsGrid_1jn6c_209 {
    gap: 16px;
  }

  ._statValue_1jn6c_261 {
    font-size: 32px;
  }

  ._sectionCard_1jn6c_299 {
    padding: 22px 20px;
  }

  ._sectionTitle_1jn6c_357 {
    font-size: 18px;
  }

  ._achieveGrid_1jn6c_897 {
    grid-template-columns: repeat(4, 1fr);
  }

  ._headerLeft_1jn6c_117 h2 {
    font-size: 26px;
  }

  ._lbName_1jn6c_1169 {
    font-size: 15px;
  }
}
/* ===========================
   RESPONSIVE — LARGE (1440px+)
   =========================== */
@media (min-width: 1440px) {
  ._container_1jn6c_83 {
    max-width: 1380px;
  }
}
/* ===========================
   ACCESSIBILITY
   =========================== */
@media (prefers-reduced-motion: reduce) {
  ._btnLogout_1jn6c_163,
  ._btnClaimPet_1jn6c_389,
  ._btnPrimary_1jn6c_1569,
  ._btnSecondary_1jn6c_1625,
  ._btnFullWidth_1jn6c_1661,
  ._lbTab_1jn6c_1039,
  ._taskItem_1jn6c_535,
  ._achieveCard_1jn6c_909,
  ._progressBar_1jn6c_503 {
    transition: none !important;
  }
}
._btnLogout_1jn6c_163:focus-visible,
._btnClaimPet_1jn6c_389:focus-visible,
._btnPrimary_1jn6c_1569:focus-visible,
._btnSecondary_1jn6c_1625:focus-visible,
._btnFullWidth_1jn6c_1661:focus-visible,
._lbTab_1jn6c_1039:focus-visible,
._inputText_1jn6c_1523:focus-visible {
  outline: 3px solid var(--cp-primary);
  outline-offset: 2px;
}



/* =====================================================
   ParentPage.module.css — Claymorphism Design System
   Design: Warm Teal · Family · Education · Responsive
   Breakpoints: 375 | 480 | 768 | 1024 | 1440
   ===================================================== */
/* ===========================
   DESIGN TOKENS
   =========================== */
._page_1nmhy_23 {
  --pp-primary:       #10B981;
  --pp-primary-dark:  #059669;
  --pp-secondary:     #34D399;
  --pp-cta:           #F97316;
  --pp-bg:            #F0FDF4;
  --pp-bg-card:       #FFFFFF;
  --pp-text:          #1C1917;
  --pp-text-muted:    #6B7280;
  --pp-accent:        #065F46;
  --pp-success:       #16A34A;
  --pp-danger:        #DC2626;
  --pp-warning:       #D97706;
  --pp-info:          #2563EB;
  --pp-shadow-card:   4px 4px 0 rgba(0, 0, 0, 0.08), 0 6px 18px rgba(16, 185, 129, 0.08);
  --pp-shadow-btn:    3px 3px 0 rgba(0, 0, 0, 0.12);
  --pp-border:        3px solid rgba(0, 0, 0, 0.06);
  --pp-radius-card:   20px;
  --pp-radius-btn:    12px;
  --pp-font-heading:  'Baloo 2', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --pp-font-body:     'Comic Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  min-height: 100vh;
  background: var(--pp-bg);
  font-family: var(--pp-font-body);
  color: var(--pp-text);
  padding: 14px;
  box-sizing: border-box;
}
._container_1nmhy_83 {
  max-width: 1200px;
  margin: 0 auto;
}
/* ===========================
   HEADER
   =========================== */
._header_1nmhy_99 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 10px;
  flex-wrap: wrap;
}
._headerLeft_1nmhy_117 h2 {
  margin: 0;
  font-family: var(--pp-font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--pp-accent);
  line-height: 1.2;
}
._subtitle_1nmhy_135 {
  color: var(--pp-text-muted);
  font-size: 13px;
  margin-top: 3px;
  margin-bottom: 0;
}
._headerRight_1nmhy_149 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
._btnLogout_1nmhy_163 {
  padding: 8px 18px;
  background: var(--pp-bg-card);
  border: var(--pp-border);
  border-radius: var(--pp-radius-btn);
  cursor: pointer;
  color: var(--pp-text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--pp-font-body);
  box-shadow: var(--pp-shadow-btn);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
._btnLogout_1nmhy_163:hover {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.12);
}
/* ===========================
   STATS GRID
   =========================== */
._statsGrid_1nmhy_209 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
._statCard_1nmhy_223 {
  border-radius: var(--pp-radius-card);
  padding: 14px 16px;
  color: #fff;
  box-shadow: var(--pp-shadow-card);
  border: 3px solid rgba(255, 255, 255, 0.25);
}
._statCard_1nmhy_223._green_1nmhy_239  { background: linear-gradient(135deg, #10B981, #059669); }
._statCard_1nmhy_223._orange_1nmhy_241 { background: linear-gradient(135deg, #F97316, #EA580C); }
._statCard_1nmhy_223._blue_1nmhy_243   { background: linear-gradient(135deg, #3B82F6, #2563EB); }
._statCard_1nmhy_223._purple_1nmhy_245 { background: linear-gradient(135deg, #A855F7, #7C3AED); }
._statLabel_1nmhy_249 {
  font-size: 12px;
  opacity: 0.88;
  font-weight: 600;
}
._statValue_1nmhy_261 {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--pp-font-heading);
  margin-top: 4px;
  line-height: 1;
}
/* ===========================
   TAB BAR
   =========================== */
._tabBar_1nmhy_283 {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  background: var(--pp-bg-card);
  border-radius: var(--pp-radius-card);
  padding: 6px;
  box-shadow: var(--pp-shadow-card);
  border: var(--pp-border);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
._tabBar_1nmhy_283::-webkit-scrollbar {
  display: none;
}
._tabBtn_1nmhy_319 {
  flex: 1;
  min-width: 80px;
  padding: 10px 8px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--pp-font-body);
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  color: var(--pp-text-muted);
}
._tabBtn_1nmhy_319:hover {
  background: #F0FDF4;
  color: var(--pp-primary);
}
._tabBtnActive_1nmhy_361 {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: var(--pp-shadow-btn);
}
/* Tab 显示辅助：桌面显示完整标签，手机显示图标+短标签 */
._tabFull_1nmhy_375 {
  display: inline;
}
._tabMobileWrap_1nmhy_383 {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
._tabMobileIcon_1nmhy_397 {
  font-size: 22px;
  line-height: 1;
}
._tabMobileLabel_1nmhy_407 {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}
._tabBadge_1nmhy_419 {
  display: inline-block;
  background: #EF4444;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  padding: 0 5px;
  font-weight: 700;
  line-height: 16px;
  vertical-align: middle;
  margin-left: 4px;
  min-width: 16px;
  text-align: center;
}
/* ===========================
   SECTION CARD
   =========================== */
._sectionCard_1nmhy_455 {
  background: var(--pp-bg-card);
  border-radius: var(--pp-radius-card);
  padding: 18px 16px;
  box-shadow: var(--pp-shadow-card);
  border: var(--pp-border);
  margin-bottom: 16px;
}
._sectionCard_1nmhy_455:last-child {
  margin-bottom: 0;
}
._sectionHeader_1nmhy_481 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}
._sectionTitle_1nmhy_499 {
  margin: 0;
  font-family: var(--pp-font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--pp-accent);
}
._sectionNote_1nmhy_515 {
  font-size: 12px;
  color: var(--pp-text-muted);
}
/* ===========================
   INFO BANNER
   =========================== */
._infoBanner_1nmhy_531 {
  background: #FFF7ED;
  border: 2px solid #FDE68A;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #D97706;
  line-height: 1.5;
}
/* ===========================
   RECITATION / TASK CARDS
   =========================== */
._taskList_1nmhy_559 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
._taskCard_1nmhy_571 {
  background: #F0FDF4;
  border-radius: 16px;
  padding: 14px 16px;
  border: 2px solid rgba(16, 185, 129, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
._taskCard_1nmhy_571:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 rgba(16, 185, 129, 0.15);
}
._taskTitle_1nmhy_597 {
  font-weight: 700;
  font-size: 15px;
  color: var(--pp-text);
  margin: 0 0 4px;
}
._taskMeta_1nmhy_611 {
  font-size: 12px;
  color: var(--pp-text-muted);
  margin-bottom: 10px;
}
._taskStatusRow_1nmhy_623 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
._badgeSuccess_1nmhy_637 {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  color: #16A34A;
  background: #F0FDF4;
  border: 2px solid #BBF7D0;
}
._badgeWarn_1nmhy_661 {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  color: #D97706;
  background: #FFFBEB;
  border: 2px solid #FDE68A;
}
._badgeDanger_1nmhy_685 {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  color: #DC2626;
  background: #FFF2F0;
  border: 2px solid #FFCCC7;
}
._feedAwardedTag_1nmhy_709 {
  font-size: 13px;
  font-weight: 700;
  color: #16A34A;
  margin-bottom: 8px;
}
._btnConfirm_1nmhy_723 {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--pp-font-body);
  box-shadow: 3px 3px 0 rgba(5, 150, 105, 0.30);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
._btnConfirm_1nmhy_723:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 rgba(5, 150, 105, 0.30);
}
._btnConfirm_1nmhy_723:disabled {
  background: #D1D5DB;
  box-shadow: none;
  cursor: default;
  color: #9CA3AF;
}
/* ===========================
   OVERVIEW TASK ROW
   =========================== */
._taskRow_1nmhy_783 {
  background: #F0FDF4;
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 2px solid rgba(16, 185, 129, 0.10);
  transition: transform 0.15s ease;
}
._taskRow_1nmhy_783:last-child {
  margin-bottom: 0;
}
._taskRow_1nmhy_783:hover {
  transform: translateX(2px);
}
._taskRowTitle_1nmhy_825 {
  font-size: 14px;
  font-weight: 600;
  color: var(--pp-text);
}
._taskTypeBadge_1nmhy_837 {
  font-size: 11px;
  color: var(--pp-text-muted);
  margin-left: 6px;
}
._taskRowStatus_1nmhy_849 {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
._taskRowStatus_1nmhy_849._done_1nmhy_863  { color: #16A34A; }
._taskRowStatus_1nmhy_849._pend_1nmhy_865  { color: #D97706; }
/* ===========================
   SCORE TIMELINE
   =========================== */
._scoreList_1nmhy_875 {
  display: flex;
  flex-direction: column;
  gap: 0;
}
._scoreItem_1nmhy_887 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #F0FDF4;
}
._scoreItem_1nmhy_887:last-child {
  border-bottom: none;
}
._scoreAvatar_1nmhy_911 {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
._scoreAvatar_1nmhy_911._up_1nmhy_933   { background: #F0FDF4; }
._scoreAvatar_1nmhy_911._down_1nmhy_935 { background: #FFF2F0; }
._scoreInfo_1nmhy_939 {
  flex: 1;
  min-width: 0;
}
._scoreTitle_1nmhy_949 {
  font-size: 13px;
  color: var(--pp-text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
._scoreMeta_1nmhy_967 {
  font-size: 12px;
  color: var(--pp-text-muted);
  margin-top: 2px;
}
._scoreAiComment_1nmhy_979 {
  font-size: 12px;
  color: #7C3AED;
  margin-top: 2px;
}
._scoreDate_1nmhy_991 {
  font-size: 11px;
  color: #A8A29E;
  margin-top: 2px;
}
._scoreDelta_1nmhy_1003 {
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
._scoreDelta_1nmhy_1003._up_1nmhy_933   { color: #16A34A; }
._scoreDelta_1nmhy_1003._down_1nmhy_935 { color: #DC2626; }
/* ===========================
   PET SECTION
   =========================== */
._petTypeLabel_1nmhy_1027 {
  font-size: 11px;
  font-weight: 700;
  color: var(--pp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}
/* ===========================
   AI REPORT
   =========================== */
._reportContent_1nmhy_1051 {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
  background: #F0FDF4;
  border-radius: 12px;
  padding: 12px 16px;
  white-space: pre-wrap;
  border: 2px solid rgba(16, 185, 129, 0.12);
}
._reportEmpty_1nmhy_1073 {
  font-size: 13px;
  color: #A8A29E;
  text-align: center;
  padding: 14px 0;
}
._btnReport_1nmhy_1087 {
  padding: 8px 18px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  color: #fff;
  border: none;
  border-radius: var(--pp-radius-btn);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--pp-font-body);
  box-shadow: 3px 3px 0 rgba(109, 40, 217, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
._btnReport_1nmhy_1087:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 rgba(109, 40, 217, 0.28);
}
._btnReport_1nmhy_1087:disabled {
  background: #D1D5DB;
  box-shadow: none;
  cursor: default;
  color: #9CA3AF;
}
/* ===========================
   MESSAGE / CONTACT CARDS
   =========================== */
._teacherGrid_1nmhy_1147 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
._teacherCard_1nmhy_1161 {
  background: #F0FDF4;
  border: 2px solid rgba(16, 185, 129, 0.12);
  border-radius: 16px;
  padding: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
._teacherCard_1nmhy_1161:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 rgba(16, 185, 129, 0.15);
}
._teacherName_1nmhy_1187 {
  font-weight: 700;
  color: var(--pp-text);
  font-size: 15px;
  margin-bottom: 4px;
}
._teacherClass_1nmhy_1201 {
  font-size: 12px;
  color: var(--pp-text-muted);
  margin-bottom: 4px;
}
._teacherPhone_1nmhy_1213 {
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 12px;
}
._btnMessage_1nmhy_1225 {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--pp-font-body);
  box-shadow: 3px 3px 0 rgba(5, 150, 105, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
._btnMessage_1nmhy_1225:hover {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 rgba(5, 150, 105, 0.25);
}
._contactCount_1nmhy_1265 {
  font-size: 12px;
  color: #8C8C8C;
  background: #ECFDF5;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  white-space: nowrap;
}
/* ===========================
   CHILDREN SELECTOR
   =========================== */
._childrenRow_1nmhy_1291 {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
._childrenRow_1nmhy_1291::-webkit-scrollbar {
  display: none;
}
._childCard_1nmhy_1317 {
  flex: 0 0 auto;
  min-width: 160px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid rgba(16, 185, 129, 0.14);
  background: #f8fffb;
  color: #064e3b;
  cursor: pointer;
  transition: all 0.2s ease;
}
._childCard_1nmhy_1317:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.10);
}
._childCardActive_1nmhy_1353 {
  border-color: #059669;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.16);
}
._childCardName_1nmhy_1365 {
  font-size: 15px;
  font-weight: 700;
  color: #064e3b;
}
._childCardClass_1nmhy_1377 {
  font-size: 12px;
  color: #047857;
  margin-top: 4px;
}
._childCardRelation_1nmhy_1389 {
  font-size: 12px;
  color: #10b981;
  margin-top: 6px;
}
/* ===========================
   EMPTY STATE
   =========================== */
._emptyState_1nmhy_1407 {
  text-align: center;
  padding: 40px 20px;
  color: #A8A29E;
  font-size: 14px;
  background: #F9FAFB;
  border-radius: 16px;
  border: 2px dashed #D1FAE5;
}
._emptyIcon_1nmhy_1427 {
  font-size: 36px;
  margin-bottom: 10px;
}
/* ===========================
   LOADING
   =========================== */
._loadingWrap_1nmhy_1443 {
  text-align: center;
  padding: 80px 20px;
  color: var(--pp-text-muted);
  font-size: 15px;
}
._spinner_1nmhy_1457 {
  font-size: 36px;
  animation: _spin_1nmhy_1457 1.2s linear infinite;
  display: inline-block;
  margin-bottom: 10px;
}
@keyframes _spin_1nmhy_1457 {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* ===========================
   SWITCHING BAR（切换学生提示条）
   =========================== */
._switchingBar_1nmhy_1487 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  font-size: 13px;
  color: #047857;
  font-weight: 600;
  animation: _fadeInDown_1nmhy_1 0.2s ease;
}
._switchingDot_1nmhy_1517 {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  animation: _pulse_1nmhy_1 0.9s ease-in-out infinite;
}
@keyframes _fadeInDown_1nmhy_1 {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes _pulse_1nmhy_1 {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}
/* Tab 内容区淡入 */
._tabContent_1nmhy_1557 {
  animation: _tabFadeIn_1nmhy_1 0.22s ease;
}
@keyframes _tabFadeIn_1nmhy_1 {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ===========================
   RESPONSIVE — ≥1024px Desktop
   =========================== */
@media (min-width: 1024px) {
  ._page_1nmhy_23 {
    padding: 24px;
  }

  ._statsGrid_1nmhy_209 {
    grid-template-columns: repeat(4, 1fr);
  }

  ._mainTwoCol_1nmhy_1599 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }
}
/* ===========================
   RESPONSIVE — Tablet (768px)
   =========================== */
@media (max-width: 1023px) and (min-width: 768px) {
  ._page_1nmhy_23 {
    padding: 16px;
  }

  ._statsGrid_1nmhy_209 {
    grid-template-columns: repeat(2, 1fr);
  }

  ._mainTwoCol_1nmhy_1599 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }

  ._tabBtn_1nmhy_319 {
    font-size: 12px;
    padding: 9px 8px;
  }
}
/* ===========================
   RESPONSIVE — Mobile (< 768px)
   底部导航栏模式
   =========================== */
@media (max-width: 767px) {
  ._page_1nmhy_23 {
    padding: 10px 10px calc(74px + env(safe-area-inset-bottom, 0px));
  }

  /* Header 顶吸，始终可见 */
  ._header_1nmhy_99 {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(240, 253, 244, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin: -10px -10px 14px;
    padding: 10px 10px 8px;
    flex-direction: row;
    align-items: center;
  }

  ._headerLeft_1nmhy_117 h2 {
    font-size: 18px;
  }

  ._statsGrid_1nmhy_209 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  ._statValue_1nmhy_261 {
    font-size: 22px;
  }

  ._mainTwoCol_1nmhy_1599 {
    display: block;
  }

  /* 底部固定导航栏 */
  ._tabBar_1nmhy_283 {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-bottom: 0;
    border-radius: 20px 20px 0 0;
    padding: 6px 4px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 100;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.12), 0 -1px 0 rgba(0, 0, 0, 0.04);
    gap: 0;
  }

  /* Tab 按鈕：竖向图标+文字布局 */
  ._tabBtn_1nmhy_319 {
    flex: 1;
    min-width: 0;
    padding: 6px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 10px;
  }

  /* 桌面标签在手机隐藏 */
  ._tabFull_1nmhy_375 {
    display: none;
  }

  /* 手机图标+短标签显示 */
  ._tabMobileWrap_1nmhy_383 {
    display: flex;
  }

  /* 待确认数量徽章：绝对定位到图标右上角 */
  ._tabBadge_1nmhy_419 {
    position: absolute;
    top: 4px;
    left: calc(50% + 6px);
    margin-left: 0;
    min-width: 14px;
    line-height: 14px;
    font-size: 9px;
    padding: 0 3px;
  }

  ._teacherGrid_1nmhy_1147 {
    grid-template-columns: 1fr;
  }

  ._childCard_1nmhy_1317 {
    min-width: 140px;
  }

  ._childCardName_1nmhy_1365 {
    font-size: 14px;
  }
}
/* ===========================
   RESPONSIVE — Small Mobile (≤480px)
   =========================== */
@media (max-width: 480px) {
  ._page_1nmhy_23 {
    padding: 8px 8px calc(70px + env(safe-area-inset-bottom, 0px));
  }

  ._header_1nmhy_99 {
    flex-direction: row;
    align-items: center;
    margin: -8px -8px 12px;
    padding: 8px 8px 6px;
  }

  ._headerLeft_1nmhy_117 h2 {
    font-size: 16px;
  }

  ._subtitle_1nmhy_135 {
    font-size: 12px;
  }

  ._statsGrid_1nmhy_209 {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  ._statValue_1nmhy_261 {
    font-size: 20px;
  }

  ._statLabel_1nmhy_249 {
    font-size: 11px;
  }

  ._tabMobileIcon_1nmhy_397 {
    font-size: 20px;
  }

  ._sectionCard_1nmhy_455 {
    padding: 14px 12px;
  }

  ._sectionTitle_1nmhy_499 {
    font-size: 15px;
  }

  ._childCard_1nmhy_1317 {
    min-width: 120px;
    padding: 10px 12px;
  }
}
/* ===========================
   RESPONSIVE — 375px
   =========================== */
@media (max-width: 375px) {
  ._page_1nmhy_23 {
    padding: 6px 6px calc(68px + env(safe-area-inset-bottom, 0px));
  }

  ._header_1nmhy_99 {
    margin: -6px -6px 12px;
    padding: 6px 6px 5px;
  }

  ._tabBtn_1nmhy_319 {
    padding: 5px 1px;
  }

  ._tabMobileIcon_1nmhy_397 {
    font-size: 18px;
  }

  ._tabMobileLabel_1nmhy_407 {
    font-size: 9px;
  }

  ._statValue_1nmhy_261 {
    font-size: 18px;
  }

  ._childCard_1nmhy_1317 {
    min-width: 108px;
    padding: 8px 10px;
  }

  ._childCardName_1nmhy_1365 {
    font-size: 13px;
  }
}
/* ===========================
   ACCESSIBILITY
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.db-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 214, 102, 0.34), transparent 24%),
    radial-gradient(circle at top right, rgba(91, 180, 255, 0.28), transparent 28%),
    linear-gradient(180deg, #f4fbff 0%, #eef7ff 44%, #fdf7ec 100%);
  color: #334155;
  font-family: 'YouYuan', '幼圆', 'Trebuchet MS', 'Microsoft YaHei', sans-serif;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.db-page::before,
.db-page::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

.db-page::before {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(255, 184, 107, 0.28), transparent 65%);
}

.db-page::after {
  width: 360px;
  height: 360px;
  left: -100px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(122, 223, 155, 0.28), transparent 62%);
}

/* 顶栏 */
.db-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(91, 180, 255, 0.14);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(91, 180, 255, 0.08);
}
.db-header-left { display: flex; align-items: center; gap: 10px; }
.db-logo {
  font-size: 1.8rem;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(91, 180, 255, 0.22), rgba(255, 209, 102, 0.36));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  border: 3px solid rgba(255,255,255,0.88);
  transform: rotate(-8deg);
}
.db-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.db-title {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #2563eb;
  font-family: 'YouYuan', '幼圆', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
}
.db-title-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transform: rotate(-12deg);
}
.db-live-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(122, 223, 155, 0.28);
  color: #157f3b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.db-subtitle {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #64748b;
}
.db-header-right { display: flex; align-items: center; gap: 12px; }
.db-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.db-user { font-size: 0.92rem; opacity: 0.92; color: #475569; }
.db-refresh-time {
  font-size: 0.76rem;
  color: #64748b;
}

/* 主体 */
.db-main {
  flex: 1;
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* 行布局 */
.db-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 卡片通用 */
.db-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(252,253,255,0.86));
  border: 1px solid rgba(91, 180, 255, 0.14);
  border-radius: 18px;
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 18px 40px rgba(135, 186, 255, 0.12);
}
.db-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
  opacity: 0.96;
  color: #334155;
  font-family: 'YouYuan', '幼圆', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
}
.db-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.db-card-caption {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #64748b;
}
.db-card-chip-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.db-card-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(91, 180, 255, 0.12);
  border: 1px solid rgba(91, 180, 255, 0.18);
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
}

.db-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(91, 180, 255, 0.14), transparent 32%),
    linear-gradient(140deg, rgba(255, 209, 102, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(247, 251, 255, 0.92));
  border: 1px solid rgba(91, 180, 255, 0.16);
  box-shadow: 0 24px 60px rgba(135, 186, 255, 0.16);
  position: relative;
  overflow: hidden;
}
.db-hero-card::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 56px;
  top: 16px;
  right: 120px;
  border-radius: 999px;
  background: rgba(255,255,255,0.52);
  filter: blur(2px);
}
.db-hero-card::after {
  content: '';
  position: absolute;
  width: 86px;
  height: 86px;
  right: 32px;
  bottom: -14px;
  border-radius: 50%;
  background: rgba(255, 209, 102, 0.24);
}
.db-hero-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}
.db-hero-kicker {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.22);
  color: #b7791f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.db-hero-title {
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.15;
  color: #1d4ed8;
  font-family: 'YouYuan', '幼圆', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
}
.db-hero-desc {
  margin: 0;
  max-width: 720px;
  color: #64748b;
  line-height: 1.7;
  font-size: 0.95rem;
}
.db-hero-pills {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}
.db-hero-pill {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,250,255,0.88));
  border: 1px solid rgba(122, 223, 155, 0.24);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.db-hero-decoration {
  position: absolute;
  right: 24px;
  top: 20px;
  display: flex;
  gap: 12px;
  font-size: 1.4rem;
  z-index: 0;
  opacity: 0.9;
}
.db-hero-decoration span:nth-child(1) { transform: rotate(-8deg) translateY(2px); }
.db-hero-decoration span:nth-child(2) { transform: rotate(10deg); }
.db-hero-decoration span:nth-child(3) { transform: rotate(-12deg) translateY(8px); }
.db-hero-pill-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}
.db-hero-pill-value {
  font-size: 1.05rem;
  line-height: 1.35;
  color: #ef7d00;
}
.db-hero-pill-value--wide {
  color: #475569;
}

/* 概览卡片 */
.db-overview-row { flex-wrap: nowrap; }
@media (max-width: 768px) { .db-overview-row { flex-wrap: wrap; } }
.db-stat-card {
  flex: 1;
  min-width: 140px;
  text-align: center;
  padding: 22px 16px 18px;
  position: relative;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 16px 0 rgba(203, 213, 225, 0.28), 0 22px 30px rgba(148, 163, 184, 0.16);
  overflow: visible;
}
.db-stat-card::before {
  content: '';
  position: absolute;
  width: 44px;
  height: 14px;
  left: 18px;
  top: -8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  transform: rotate(-8deg);
}
.db-stat-card::after {
  content: '✨';
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 1rem;
  opacity: 0.9;
}
.db-stat-card--sky {
  background: linear-gradient(180deg, #eef8ff 0%, #dff2ff 100%);
  transform: rotate(-1.5deg);
}
.db-stat-card--mint {
  background: linear-gradient(180deg, #effff4 0%, #daf6e7 100%);
  transform: rotate(1deg);
}
.db-stat-card--sun {
  background: linear-gradient(180deg, #fff9e8 0%, #ffeeba 100%);
  transform: rotate(-0.8deg);
}
.db-stat-card--peach {
  background: linear-gradient(180deg, #fff2ee 0%, #ffd9cc 100%);
  transform: rotate(1.4deg);
}
.db-stat-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  width: 62px;
  height: 62px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: rgba(255,255,255,0.74);
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.12);
}
.db-stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ef7d00;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 209, 102, 0.2);
  font-family: 'YouYuan', '幼圆', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
}
.db-stat-unit { font-size: 1.2rem; font-weight: 600; }
.db-stat-label { font-size: 0.8rem; opacity: 0.9; margin-top: 6px; color: #64748b; }

/* 图表行 */
.db-chart-row { align-items: flex-start; }
.db-chart-card { min-width: 0; }
.db-chart-note {
  margin-top: 8px;
  font-size: 0.76rem;
  color: #64748b;
}
.db-chart-empty {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 让 recharts tooltip/legend 文字在暗色背景可见 */
.recharts-default-tooltip {
  background: rgba(255,255,255,0.96) !important;
  border-color: rgba(91, 180, 255, 0.18) !important;
  color: #334155 !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 30px rgba(135, 186, 255, 0.2) !important;
}
.recharts-tooltip-label { color: #334155 !important; }
.recharts-tooltip-item { color: #ef7d00 !important; }
.recharts-text { fill: #64748b !important; }
.recharts-cartesian-axis-line { stroke: rgba(148, 163, 184, 0.35) !important; }

/* 动态播报条 */
.db-activity-bar {
  flex: 1;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(255,209,102,0.24), rgba(122,223,155,0.18));
  border-color: rgba(255,184,107,0.28);
}
.db-activity-label {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  color: #ef7d00;
}
.db-activity-text {
  font-size: 0.88rem;
  opacity: 0.95;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-activity-text--lvup {
  color: #16a34a;
  font-weight: 700;
  font-size: 0.95rem;
  animation: db-lvup-pulse 1.2s ease-in-out infinite;
}
@keyframes db-lvup-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 宠物网格 */
.db-pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
  max-height: 480px;
  overflow-y: auto;
}
.db-pet-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,251,255,0.9));
  border: 1px solid rgba(91, 180, 255, 0.14);
  border-radius: 16px;
  padding: 18px 12px 12px;
  text-align: center;
  position: relative;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 14px 0 rgba(203, 213, 225, 0.24), 0 18px 26px rgba(148, 163, 184, 0.12);
}
.db-pet-card::before {
  content: '';
  position: absolute;
  width: 42px;
  height: 14px;
  top: -7px;
  left: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  transform: rotate(-9deg);
}
.db-pet-card::after {
  content: '⭐';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 4px 10px rgba(148, 163, 184, 0.18);
  font-size: 0.9rem;
}
.db-pet-card:hover { transform: translateY(-2px); }
.db-pet-card--tone-0 {
  background: linear-gradient(180deg, #eef8ff 0%, #dff2ff 100%);
  transform: rotate(-1.2deg);
}
.db-pet-card--tone-1 {
  background: linear-gradient(180deg, #fff9e8 0%, #fff0c8 100%);
  transform: rotate(1deg);
}
.db-pet-card--tone-2 {
  background: linear-gradient(180deg, #effff4 0%, #daf6e7 100%);
  transform: rotate(-0.7deg);
}
.db-pet-card--tone-3 {
  background: linear-gradient(180deg, #fff2ee 0%, #ffe1d6 100%);
  transform: rotate(1.3deg);
}
.db-pet-card--empty {
  opacity: 0.88;
}
.db-pet-card--empty::after {
  content: '🌼';
}
.db-pet-card--clickable {
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(99,102,241,0);
}
.db-pet-card--clickable:hover {
  border-color: rgba(91, 180, 255, 0.4);
  box-shadow: 0 16px 28px rgba(91, 180, 255, 0.16);
}
.db-pet-card--clickable:focus-visible {
  outline: 2px solid rgba(91, 180, 255, 0.75);
  outline-offset: 2px;
}
.db-pet-state {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.24);
  color: #b7791f;
  font-size: 0.68rem;
  font-weight: 700;
}
.db-pet-state--active {
  background: rgba(122, 223, 155, 0.28);
  color: #157f3b;
}
.db-pet-avatar {
  width: 72px;
  height: 72px;
  margin: 10px auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.db-pet-emoji { font-size: 2rem; }
.db-pet-name {
  font-size: 0.94rem;
  font-weight: 900;
  margin-bottom: 2px;
  color: #334155;
  font-family: 'YouYuan', '幼圆', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
}
.db-pet-level { font-size: 0.73rem; color: #2563eb; margin-bottom: 8px; }
.db-pet-exp-bar {
  height: 6px;
  background: rgba(91, 180, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.db-pet-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #5bb4ff, #ffd166);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.db-pet-owner { font-size: 0.75rem; opacity: 0.85; margin-bottom: 4px; color: #64748b; }
.db-pet-pts { font-size: 0.8rem; color: #ef7d00; font-weight: 700; }
.db-pet-card-hint {
  margin-top: 6px;
  font-size: 0.68rem;
  color: #2563eb;
  opacity: 0.85;
}

.db-detail-back {
  background: rgba(255,255,255,0.88);
  color: #2563eb;
  border: 1px solid rgba(91, 180, 255, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.db-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.db-detail-panel {
  min-height: 100%;
}
.db-detail-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 16px;
}
.db-detail-records {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.db-detail-record {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.db-detail-record:last-child {
  border-bottom: none;
}
.db-detail-record-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 180, 255, 0.12);
  flex-shrink: 0;
  font-size: 1rem;
}
.db-detail-record-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
}
.db-detail-record-meta {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.6;
}
.db-detail-record-delta {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}
.db-detail-record-delta--up {
  color: #16a34a;
}
.db-detail-record-delta--down {
  color: #ef4444;
}

.db-empty {
  text-align: center;
  padding: 40px 0;
  opacity: 0.9;
  font-size: 0.9rem;
  color: #64748b;
}

/* 响应式 */
@media (max-width: 900px) {
  .db-hero-card { grid-template-columns: 1fr; }
  .db-hero-decoration { display: none; }
  .db-chart-row { flex-direction: column; }
  .db-chart-card { flex: none !important; width: 100%; }
  .db-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .db-header {
    padding: 12px 14px;
    align-items: flex-start;
  }
  .db-header-right {
    align-items: flex-start;
  }
  .db-main { padding: 14px 12px 20px; }
  .db-card,
  .db-hero-card { padding: 16px; }
  .db-stat-value { font-size: 1.6rem; }
  .db-card-head {
    flex-direction: column;
  }
  .db-card-chip-group {
    justify-content: flex-start;
  }
  .db-pet-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
.pet-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(91, 180, 255, 0.35);
  border-radius: 10px;
  padding: 5px 10px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  z-index: 20;
  pointer-events: none;
  animation: bubble-in 0.3s ease-out forwards;
}

.pet-bubble--out {
  animation: bubble-out 0.45s ease-in forwards;
}

/* 事件气泡（加减分时） */
.pet-bubble--event {
  background: rgba(240, 255, 245, 0.97);
  border-color: rgba(34, 197, 94, 0.5);
}

/* 全班公告气泡（橙色） */
.pet-bubble--broadcast {
  background: rgba(255, 247, 235, 0.97);
  border-color: rgba(251, 146, 60, 0.6);
  border-width: 2px;
  max-width: 200px;
}

.pet-bubble__text {
  font-size: 0.72rem;
  color: #334155;
  font-weight: 500;
  line-height: 1.3;
  display: block;
}

.pet-bubble--broadcast .pet-bubble__text {
  color: #92400e;
  font-weight: 600;
}

/* 下方尖角 */
.pet-bubble__arrow {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid rgba(255, 255, 255, 0.96);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.08));
}

.pet-bubble--event .pet-bubble__arrow {
  border-top-color: rgba(240, 255, 245, 0.97);
}

.pet-bubble--broadcast .pet-bubble__arrow {
  border-top-color: rgba(255, 247, 235, 0.97);
}

@keyframes bubble-in {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.85); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0)   scale(1);    }
}

@keyframes bubble-out {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1);    }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.88); }
}
.score-pop {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 50;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: score-pop-fly 1.1s ease-out forwards;
}

.score-pop--positive {
  color: #22c55e;
}

.score-pop--negative {
  color: #ef4444;
}

@keyframes score-pop-fly {
  0%   { opacity: 0;   transform: translateX(-50%) translateY(0)     scale(0.5); }
  10%  { opacity: 1;   transform: translateX(-50%) translateY(0)     scale(1.3); }
  20%  { opacity: 1;   transform: translateX(-50%) translateY(0)     scale(1.0); }
  70%  { opacity: 1;   transform: translateX(-50%) translateY(-40px) scale(1.0); }
  100% { opacity: 0;   transform: translateX(-50%) translateY(-65px) scale(0.8); }
}
/* ── ClassroomScreenPage —— 彩虹宠物乐园 · 学生向课堂大屏 ── */
/*
 * 设计取向：ClassDojo 的儿童友好头像 + 班级优化大师的课堂工具感 + 儿童游戏主界面的明亮乐园感。
 * 关键原则：投影可读、少霓虹、少压抑深色、宠物最大化、学生姓名优先、0分改成“待唤醒”。
 */

@property --rollcall-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --cs-ink: #24324b;
  --cs-muted: #667085;
  --cs-sky-1: #c7f0ff;
  --cs-sky-2: #eaf7ff;
  --cs-mint: #c9f7df;
  --cs-sun: #ffd166;
  --cs-coral: #ff8a80;
  --cs-pink: #ff78b7;
  --cs-purple: #8b5cf6;
  --cs-blue: #3b82f6;
  --cs-green: #22c55e;
  --cs-card: rgba(255, 255, 255, 0.86);
  --cs-card-strong: #ffffff;
  --cs-shadow: 0 18px 40px rgba(68, 99, 140, 0.20);
}

.cs-page {
  min-height: 100vh;
  color: var(--cs-ink);
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Nunito', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 244, 181, 0.95) 0 8%, transparent 20%),
    radial-gradient(circle at 90% 12%, rgba(255, 185, 223, 0.72) 0 10%, transparent 24%),
    linear-gradient(180deg, #bdeeff 0%, #eaf8ff 42%, #fff8df 100%);
}

/* 云朵、彩虹、草地氛围：比暗紫更适合学生，也更适合投影 */
.cs-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 16% 22%, rgba(255,255,255,0.85) 0 5%, transparent 5.2%),
    radial-gradient(ellipse at 22% 20%, rgba(255,255,255,0.75) 0 6%, transparent 6.2%),
    radial-gradient(ellipse at 78% 26%, rgba(255,255,255,0.72) 0 6%, transparent 6.2%),
    radial-gradient(ellipse at 84% 24%, rgba(255,255,255,0.82) 0 4.8%, transparent 5%),
    linear-gradient(90deg, rgba(255,122,122,0.22), rgba(255,214,102,0.18), rgba(102,224,163,0.16), rgba(96,165,250,0.18), rgba(168,85,247,0.16));
  opacity: 0.7;
}

.cs-page::after {
  content: '';
  position: fixed;
  left: -4vw;
  right: -4vw;
  bottom: -46px;
  height: 150px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 15% 100%, #8ee68d 0 38%, transparent 39%),
    radial-gradient(ellipse at 42% 100%, #9beb95 0 42%, transparent 43%),
    radial-gradient(ellipse at 74% 100%, #82dc84 0 38%, transparent 39%),
    linear-gradient(180deg, transparent 0, rgba(115, 217, 118, 0.86) 52%, #70d270 100%);
}

.cs-page > * { position: relative; z-index: 1; }

/* ─── 全班公告横幅 ──────────────────────────────────────── */
.cs-broadcast-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: min(1120px, calc(100vw - 48px));
  background: linear-gradient(135deg, #ff8a3d 0%, #ff4d8d 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 34px;
  border-radius: 999px;
  font-size: clamp(1.4rem, 2.2vw, 2.4rem);
  font-weight: 1000;
  letter-spacing: 0.03em;
  box-shadow: 0 16px 40px rgba(255, 93, 89, 0.32), 0 0 0 5px rgba(255,255,255,0.55) inset;
  animation: banner-slam 0.42s cubic-bezier(.22,.68,0,1.2);
}

.cs-broadcast-bell { font-size: 1.25em; animation: bell-ring 0.35s ease-in-out 3; display: inline-block; }
.cs-broadcast-content { max-width: 1000px; text-align: center; }
@keyframes bell-ring { 0%,100%{transform:rotate(0)}25%{transform:rotate(-18deg)}75%{transform:rotate(18deg)} }
@keyframes banner-slam { from{transform:translateX(-50%) translateY(-140%);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }

/* ─── 顶部工具栏 ─────────────────────────────────────────── */
.cs-topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 18px 22px 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border: 3px solid rgba(255,255,255,0.95);
  border-radius: 28px;
  box-shadow: var(--cs-shadow), 0 0 0 1px rgba(93, 135, 190, 0.06) inset;
  flex-shrink: 0;
}

.cs-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 250px; }
.cs-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 2.1rem;
  background: linear-gradient(135deg, #fff 0%, #fff2b8 55%, #ffd6ec 100%);
  box-shadow: 0 10px 24px rgba(255, 177, 77, 0.26), 0 0 0 3px #fff inset;
  animation: logo-float 3s ease-in-out infinite;
}
@keyframes logo-float { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-4px) rotate(3deg)} }

.cs-brand-stack { display: flex; flex-direction: column; line-height: 1.05; }
.cs-title {
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  font-weight: 1000;
  color: #1f3b72;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cs-subtitle {
  margin-top: 5px;
  font-size: 0.9rem;
  font-weight: 900;
  color: #64748b;
  white-space: nowrap;
}

.cs-tab-nav { display: flex; gap: 10px; flex: 1; justify-content: center; }
.cs-tab-btn {
  background: #fff;
  border: 3px solid #dbeafe;
  border-radius: 999px;
  color: #3b5a87;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 1000;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.08);
}
.cs-tab-btn--active {
  color: #fff;
  border-color: rgba(255,255,255,0.9);
  background: linear-gradient(135deg, #4facfe 0%, #8b5cf6 52%, #ff78b7 100%);
  box-shadow: 0 14px 30px rgba(113, 92, 246, 0.26), 0 0 0 4px rgba(255,255,255,0.9) inset;
  transform: translateY(-2px);
}
.cs-tab-btn:hover { transform: translateY(-2px); }

.cs-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 360px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cs-clock {
  font-size: clamp(1.35rem, 1.75vw, 2rem);
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
  color: #b45309;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #fff9d8 0%, #ffed9b 100%);
  border: 3px solid #fff;
  border-radius: 20px;
  padding: 8px 15px;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.18), 0 0 0 2px rgba(251, 191, 36, 0.35) inset;
}

/* 糖果计时器：未开始时不再显示 --:--，避免老师误以为坏了 */
.cs-timer-card {
  position: relative;
  min-width: 150px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 10px;
  border-radius: 24px;
  border: 3px solid #fff;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.18), 0 0 0 2px rgba(255,255,255,0.65) inset;
}
.cs-timer-card::before {
  content: '';
  position: absolute;
  inset: -40% -12%;
  background: linear-gradient(120deg, transparent 0 36%, rgba(255,255,255,0.58) 46%, transparent 56% 100%);
  transform: translateX(-55%);
  animation: timer-shine 4.8s ease-in-out infinite;
  pointer-events: none;
}
.cs-timer-card--idle {
  background: linear-gradient(135deg, #e0f7ff 0%, #f3e8ff 52%, #fff7ed 100%);
  color: #2563eb;
}
.cs-timer-card--running {
  min-width: 176px;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 52%, #a855f7 100%);
  color: #fff;
  animation: timer-running-breathe 2.2s ease-in-out infinite;
  box-shadow: 0 14px 28px rgba(99, 102, 241, 0.26), 0 0 0 2px rgba(255,255,255,0.7) inset;
}
.cs-timer-card--urgent {
  background: linear-gradient(135deg, #ffcf33 0%, #ff7a3d 45%, #ef4444 100%);
  animation: timer-urgent-pop 0.62s ease-in-out infinite alternate;
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.34), 0 0 0 3px rgba(255,255,255,0.88) inset;
}
.cs-timer-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  flex-shrink: 0;
  font-size: 1.55rem;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.12);
  z-index: 1;
}
.cs-timer-card--running .cs-timer-icon,
.cs-timer-card--urgent .cs-timer-icon {
  background: rgba(255,255,255,0.24);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35) inset;
}
.cs-timer-text { display: flex; flex-direction: column; line-height: 1; z-index: 1; }
.cs-timer-main {
  font-size: clamp(1.08rem, 1.45vw, 1.7rem);
  font-weight: 1000;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cs-timer-card--running .cs-timer-main,
.cs-timer-card--urgent .cs-timer-main {
  font-size: clamp(1.45rem, 1.9vw, 2.25rem);
}
.cs-timer-sub {
  margin-top: 5px;
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0.82;
}
.cs-timer-spark {
  position: absolute;
  right: 7px;
  top: 3px;
  font-size: 1.02rem;
  animation: timer-sparkle 1.5s ease-in-out infinite;
}
@keyframes timer-shine { 0%, 52% { transform: translateX(-70%); } 72%, 100% { transform: translateX(70%); } }
@keyframes timer-running-breathe { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-2px); } }
@keyframes timer-urgent-pop { from{ transform: scale(1); } to{ transform: scale(1.055); } }
@keyframes timer-sparkle { 0%,100%{ transform: scale(0.85) rotate(0); opacity: 0.7; } 50%{ transform: scale(1.25) rotate(12deg); opacity: 1; } }

.cs-live-status {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 1000;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  white-space: nowrap;
}
.cs-live-status--connected { color: #15803d; background: #dcfce7; border-color: #86efac; }
.cs-live-status--connecting { color: #b45309; background: #fef3c7; border-color: #fcd34d; }
.cs-live-status--offline { color: #dc2626; background: #fee2e2; border-color: #fca5a5; }
.cs-live-status--remote-online { color: #047857; background: #d1fae5; border-color: #6ee7b7; }
.cs-live-status--remote-waiting { color: #0369a1; background: #e0f2fe; border-color: #7dd3fc; }
.cs-live-status--remote-offline { color: #dc2626; background: #fee2e2; border-color: #fca5a5; }

/* ─── 家长寄语：单条清爽祝福带，不再像系统滚动告警 ─────────── */
.cs-ticker-bar {
  display: flex;
  align-items: center;
  overflow: hidden;
  margin: 12px 28px 0;
  height: 52px;
  flex-shrink: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 10px 24px rgba(255, 157, 188, 0.16);
}
.cs-ticker-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 22px;
  height: 100%;
  background: linear-gradient(135deg, #ff78b7, #ffb86c);
  font-size: 1rem;
  font-weight: 1000;
  color: #fff;
  white-space: nowrap;
}
.cs-ticker-track-wrap { flex: 1; overflow: hidden; height: 100%; display: flex; align-items: center; }
.cs-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-move var(--ticker-dur, 50s) linear infinite;
  font-size: 1.08rem;
  font-weight: 900;
  color: #7c2d12;
}
.cs-ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-move { from{transform:translateX(100vw)} to{transform:translateX(-100%)} }
.cs-ticker-item { display: inline-flex; align-items: center; gap: 6px; }
.cs-ticker-sep { display: inline-block; margin: 0 34px; color: #fb7185; font-size: 1.2rem; }

/* ─── 舞台：班级神兽 + 工具箱 + 今日之星 + 宠物阵列 ───────── */
.cs-stage-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 26px 34px;
  align-items: stretch;
  min-height: 0;
}
.cs-left-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  scrollbar-width: none;
}
.cs-left-rail::-webkit-scrollbar { display: none; }
.cs-pet-area { min-height: 0; display: flex; }

.cs-guardian-panel, .cs-tools-panel, .cs-teams-panel,
.cs-spotlight-panel {
  min-height: 0;
  border-radius: 32px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.72)),
    radial-gradient(circle at 20% 12%, rgba(255,209,102,0.45), transparent 42%);
  border: 4px solid #fff;
  box-shadow: var(--cs-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cs-guardian-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(255,255,255,0.62), transparent 32%),
    linear-gradient(145deg, #dff7ff 0%, #fff5c7 50%, #ffd6ec 100%);
}
.cs-guardian-panel::after {
  content: '';
  position: absolute;
  width: 170px;
  height: 170px;
  right: -58px;
  bottom: -70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.38);
}
.cs-guardian-copy { position: relative; z-index: 2; }
.cs-guardian-copy h2 { margin: 2px 0 6px; color: #1d4ed8; font-size: 1.55rem; line-height: 1.08; }
.cs-guardian-copy p { margin: 0; color: #52637f; font-weight: 900; font-size: .9rem; line-height: 1.45; }
.cs-guardian-beast { position: relative; height: 126px; display: grid; place-items: center; margin: 2px 0; z-index: 2; }
.cs-guardian-aura { position: absolute; width: 116px; height: 116px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,214,102,.58), transparent 72%); animation: guardian-aura 2.4s ease-in-out infinite alternate; }
.cs-guardian-emoji { position: relative; font-size: 5.2rem; filter: drop-shadow(0 12px 18px rgba(37,99,235,.18)); animation: guardian-float 3s ease-in-out infinite; }
.cs-guardian-beast--awake .cs-guardian-emoji { animation: guardian-awake .85s ease-in-out infinite alternate; }
.cs-guardian-lv { position: absolute; right: 26%; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: linear-gradient(135deg, #8b5cf6, #4facfe); color: #fff; font-weight: 1000; border: 3px solid #fff; box-shadow: 0 8px 16px rgba(99,102,241,.2); }
.cs-energy-track { height: 20px; background: rgba(255,255,255,.72); border: 3px solid #fff; border-radius: 999px; overflow: hidden; z-index: 2; position: relative; }
.cs-energy-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #34d399, #4facfe, #a855f7, #ff78b7); transition: width 1s cubic-bezier(.34,1.56,.64,1); }
.cs-energy-meta { display: flex; align-items: baseline; gap: 5px; color: #1d4ed8; font-weight: 1000; z-index: 2; }
.cs-energy-meta strong { font-size: 1.6rem; color: #c2410c; }
.cs-energy-meta span { color: #64748b; }
.cs-energy-meta em { margin-left: auto; font-style: normal; background: #fff; border-radius: 999px; padding: 4px 9px; color: #16a34a; }
@keyframes guardian-aura { from{transform:scale(.92); opacity:.72} to{transform:scale(1.08); opacity:1} }
@keyframes guardian-float { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-7px) rotate(3deg)} }
@keyframes guardian-awake { from{transform:translateY(-3px) scale(1) rotate(-4deg)} to{transform:translateY(-10px) scale(1.08) rotate(5deg)} }

.cs-tools-panel { background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(239,246,255,.78)); }
.cs-tools-head { display:flex; align-items:flex-end; justify-content:space-between; gap: 10px; }
.cs-tools-head h2 { margin: 2px 0 0; color:#1d4ed8; font-size: 1.35rem; line-height:1; }
.cs-tool-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.cs-tool-card { position:relative; display:flex; align-items:center; gap:10px; width:100%; min-height:62px; padding:10px 12px; border-radius:20px; background:#fff; border:3px solid rgba(255,255,255,.95); box-shadow:0 8px 16px rgba(59,130,246,.08); overflow:hidden; cursor:pointer; text-align:left; font-family:inherit; transition: transform .16s ease, box-shadow .16s ease; }
.cs-tool-card:hover { transform: translateY(-2px) scale(1.01); box-shadow:0 14px 24px rgba(59,130,246,.16); }
.cs-tool-card:active { transform: scale(.985); }
.cs-tool-card--focus { background: linear-gradient(135deg, #fee2e2, #fff); }
.cs-tool-card--quiet { background: linear-gradient(135deg, #fef3c7, #fff); }
.cs-tool-card--discuss { background: linear-gradient(135deg, #dcfce7, #fff); }
.cs-tool-card--urgent { background: linear-gradient(135deg, #ffedd5, #fee2e2); animation: timer-urgent-pop .72s ease-in-out infinite alternate; }
.cs-tool-card--active { background: linear-gradient(135deg, #fef08a, #dbeafe); animation: tool-active .25s ease-in-out infinite alternate; }
.cs-tool-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border-radius:16px; background:rgba(255,255,255,.82); font-size:1.55rem; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.cs-tool-text { min-width:0; flex:1; display:flex; flex-direction:column; gap:3px; }
.cs-tool-text strong { color:#172554; font-size:1rem; font-weight:1000; }
.cs-tool-text span { color:#64748b; font-size:.82rem; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cs-tool-tap { flex:0 0 auto; border-radius:999px; padding:5px 8px; background:linear-gradient(135deg,#60a5fa,#a78bfa); color:#fff; font-size:.68rem; font-weight:1000; box-shadow:0 6px 12px rgba(99,102,241,.18); }
@keyframes tool-active { from{transform:scale(1)} to{transform:scale(1.025)} }

.cs-teams-panel { background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,247,237,.78)); }
.cs-team-list { display:flex; flex-direction:column; gap:8px; }
.cs-team-row { display:grid; grid-template-columns: 34px 52px 1fr 44px; align-items:center; gap:8px; padding:8px 10px; border-radius:18px; background:#fff; border:2px solid rgba(255,255,255,.95); box-shadow:0 6px 12px rgba(51,96,140,.08); }
.cs-team-rank { font-size:1.35rem; }
.cs-team-name { color:#172554; font-weight:1000; font-size:.92rem; }
.cs-team-bar { height:12px; background:#e2e8f0; border-radius:999px; overflow:hidden; }
.cs-team-bar span { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg, var(--team-color), #fff176); transition:width .8s cubic-bezier(.34,1.56,.64,1); }
.cs-team-row strong { text-align:right; color:#b45309; font-size:.95rem; }

.cs-spotlight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cs-section-eyebrow { font-size: 0.78rem; font-weight: 1000; color: #f97316; letter-spacing: 0.12em; }
.cs-spotlight-head h2 { margin: 2px 0 0; font-size: clamp(1.55rem, 2vw, 2.25rem); line-height: 1; color: #1d4ed8; }
.cs-class-stats { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: 0.88rem; font-weight: 1000; color: #475569; }
.cs-class-stats span { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 999px; padding: 5px 10px; }
.cs-spotlight-list { display: grid; grid-template-rows: 1.25fr 1fr 1fr; gap: 12px; flex: 1; min-height: 0; }
.cs-star-card {
  position: relative;
  border: 0;
  border-radius: 28px;
  padding: 12px;
  cursor: pointer;
  color: var(--cs-ink);
  background: linear-gradient(145deg, #fff 0%, #fff8d7 100%);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.18), 0 0 0 4px #fff inset;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 10px;
  transition: transform 0.18s, box-shadow 0.18s;
  overflow: hidden;
}
.cs-star-card::after {
  content: '';
  position: absolute;
  right: -34px;
  top: -34px;
  width: 98px;
  height: 98px;
  border-radius: 999px;
  background: rgba(255,255,255,0.36);
}
.cs-star-card:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 18px 34px rgba(245, 158, 11, 0.22), 0 0 0 4px #fff inset; }
.cs-star-card--1 { background: linear-gradient(145deg, #fff7c2 0%, #ffd166 100%); }
.cs-star-card--2 { background: linear-gradient(145deg, #f8fafc 0%, #dbeafe 100%); }
.cs-star-card--3 { background: linear-gradient(145deg, #fff7ed 0%, #fdba74 100%); }
.cs-star-medal { grid-row: 1 / 4; font-size: 2.2rem; z-index: 1; }
.cs-star-pet { grid-row: 1 / 4; width: 116px; height: 116px; display: grid; place-items: center; justify-self: center; z-index: 1; }
.cs-star-card > .cs-mood-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}
.cs-star-name { grid-column: 2; font-size: clamp(1.35rem, 1.8vw, 2rem); font-weight: 1000; color: #172554; z-index: 1; }
.cs-star-points { grid-column: 2; width: fit-content; margin-top: 5px; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,0.82); color: #c2410c; font-size: 1.08rem; font-weight: 1000; z-index: 1; }

/* ─── 宠物阵列 ───────────────────────────────────────────── */
.cs-pet-grid {
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 16px;
  align-content: start;
  overflow: auto;
  padding: 2px 4px 8px;
  scrollbar-width: none;
}
.cs-pet-grid::-webkit-scrollbar { display: none; }

.cs-pet-card {
  position: relative;
  min-height: 236px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.82) 100%);
  border: 4px solid rgba(255,255,255,0.96);
  border-radius: 30px;
  padding: 14px 12px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.22s;
  box-shadow: 0 12px 26px rgba(51, 96, 140, 0.15), 0 0 0 1px rgba(93, 135, 190, 0.08) inset;
  overflow: visible;
}
.cs-pet-card::before {
  content: '';
  position: absolute;
  inset: 10px 10px auto;
  height: 82px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(199,240,255,0.78), rgba(255,237,179,0.72));
  z-index: -0;
}
.cs-pet-card:hover { transform: translateY(-8px) scale(1.035); box-shadow: 0 22px 42px rgba(51, 96, 140, 0.22), 0 0 0 4px rgba(255,255,255,0.9) inset; }
.cs-pet-card--spotlight { border-color: #fde68a; box-shadow: 0 14px 30px rgba(245,158,11,0.22), 0 0 0 4px rgba(255,255,255,0.9) inset; }
.cs-pet-card--happy {
  border-color: rgba(34, 197, 94, 0.58);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(236,253,245,0.9));
}
.cs-pet-card--happy::before { background: linear-gradient(135deg, rgba(187,247,208,0.88), rgba(254,240,138,0.72)); }
.cs-pet-card--hungry {
  border-color: rgba(251, 191, 36, 0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,247,237,0.92));
}
.cs-pet-card--hungry::before { background: linear-gradient(135deg, rgba(254,243,199,0.9), rgba(255,237,213,0.78)); }
.cs-pet-card--sick {
  border-color: rgba(45, 212, 191, 0.68);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(236,254,255,0.9));
}
.cs-pet-card--sick::before { background: linear-gradient(135deg, rgba(204,251,241,0.86), rgba(220,252,231,0.74)); }
.cs-pet-card--sleeping {
  border-color: rgba(148, 163, 184, 0.44);
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(241,245,249,0.82));
}
.cs-pet-card--sleeping::before { background: linear-gradient(135deg, rgba(224,242,254,0.76), rgba(226,232,240,0.64)); }
.cs-pet-card--waiting { opacity: 0.9; filter: saturate(0.86); }
.cs-pet-card--waiting .cs-student-pts { background: #eef2ff; color: #6366f1; border-color: #c7d2fe; }
.cs-pet-card--rollcall {
  border-color: #ffb703 !important;
  z-index: 20;
}
.cs-pet-card--rollcall::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 36px;
  pointer-events: none;
  background:
    conic-gradient(from var(--rollcall-angle, 0deg), #ff4d8d, #ffd166, #34d399, #4facfe, #8b5cf6, #ff4d8d);
  opacity: .9;
  filter: blur(1px);
  z-index: -1;
  animation: rollcall-ring-spin .55s linear infinite;
}
.cs-pet-card--rollcall-running {
  animation: rollcall-card-hop .18s ease-in-out infinite alternate;
  box-shadow: 0 0 0 8px rgba(255, 209, 102, 0.28), 0 20px 56px rgba(251,146,60,0.36) !important;
}
.cs-pet-card--rollcall-result {
  animation: rollcall-result-pop 1.05s ease-in-out infinite alternate;
  box-shadow: 0 0 0 10px rgba(255, 214, 102, 0.44), 0 24px 64px rgba(236,72,153,0.36) !important;
}
.cs-pet-card--rollcall-result::after {
  inset: -14px;
  opacity: 1;
  filter: blur(0);
  animation: rollcall-ring-spin 1.2s linear infinite, rollcall-result-glow 1.05s ease-in-out infinite alternate;
}
.cs-rollcall-chip {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  z-index: 30;
  white-space: nowrap;
  border-radius: 999px;
  border: 3px solid #fff;
  padding: 7px 14px;
  color: #fff;
  font-size: .86rem;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(30, 64, 120, .22);
  pointer-events: none;
}
.cs-rollcall-chip--running { background: linear-gradient(135deg, #4facfe, #8b5cf6); }
.cs-rollcall-chip--result { background: linear-gradient(135deg, #ff7a3d, #ff4d8d); animation: rollcall-chip-pop .8s ease-in-out infinite alternate; }
@keyframes rollcall-ring-spin { to { --rollcall-angle: 360deg; } }
@keyframes rollcall-card-hop { from{transform:translateY(-2px) scale(1.02)} to{transform:translateY(-8px) scale(1.06)} }
@keyframes rollcall-result-pop { from{transform:translateY(-6px) scale(1.06) rotate(-.6deg)} to{transform:translateY(-12px) scale(1.1) rotate(.6deg)} }
@keyframes rollcall-result-glow { from{box-shadow:0 0 0 rgba(255,255,255,0)} to{box-shadow:0 0 26px rgba(255, 77, 141, .55)} }
@keyframes rollcall-chip-pop { from{transform:translateX(-50%) translateY(0) scale(1)} to{transform:translateX(-50%) translateY(-3px) scale(1.05)} }

.cs-pet-img-wrap {
  position: relative;
  width: 122px;
  height: 122px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.cs-pet-img-wrap::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,236,175,0.55) 45%, transparent 72%);
  animation: aura-pulse 2.8s ease-in-out infinite alternate;
}
@keyframes aura-pulse { from{opacity:.72; transform:scale(.96)} to{opacity:1; transform:scale(1.06)} }
.cs-no-pet { font-size: 3.6rem; opacity: 0.65; filter: grayscale(.25); }

.cs-mood-badge {
  position: absolute;
  top: 0;
  right: -6px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.95);
  font-size: 0.76rem;
  font-weight: 1000;
  line-height: 1;
  color: #fff;
  box-shadow: 0 8px 16px rgba(15,23,42,0.14), 0 0 0 1px rgba(255,255,255,0.52) inset;
  pointer-events: none;
  white-space: nowrap;
}
.cs-mood-badge--happy { background: linear-gradient(135deg, #22c55e, #facc15); animation: mood-badge-pop 1.6s ease-in-out infinite; }
.cs-mood-badge--healthy { background: linear-gradient(135deg, #38bdf8, #22c55e); }
.cs-mood-badge--hungry { background: linear-gradient(135deg, #f59e0b, #fb923c); }
.cs-mood-badge--sick { background: linear-gradient(135deg, #14b8a6, #22c55e); }
.cs-mood-badge--sleeping { background: linear-gradient(135deg, #94a3b8, #60a5fa); }
@keyframes mood-badge-pop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }

.cs-mood-fx {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  font-weight: 1000;
  text-shadow: 0 2px 4px rgba(255,255,255,0.95), 0 0 10px currentColor;
}
.cs-mood-fx--happy {
  left: 5px;
  top: 12px;
  color: #facc15;
  font-size: 1.45rem;
  animation: mood-happy-spark 1.35s ease-in-out infinite;
}
.cs-mood-fx--hungry {
  left: 6px;
  bottom: 16px;
  font-size: 1.35rem;
  animation: mood-hungry-food 2s ease-in-out infinite;
}
.cs-mood-fx--sick {
  left: 4px;
  top: 22px;
  color: #06b6d4;
  font-size: 1.3rem;
  animation: mood-sick-drop 1.8s ease-in-out infinite;
}
.cs-mood-fx--sleeping {
  right: 2px;
  top: 34px;
  color: #64748b;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  animation: mood-sleep-zzz 2.3s ease-in-out infinite;
}
@keyframes mood-happy-spark { 0%,100%{opacity:.45; transform:scale(.86) rotate(-12deg)} 50%{opacity:1; transform:scale(1.28) rotate(12deg)} }
@keyframes mood-hungry-food { 0%,100%{transform:translateY(0) rotate(-8deg); opacity:.75} 50%{transform:translateY(-7px) rotate(8deg); opacity:1} }
@keyframes mood-sick-drop { 0%,100%{transform:translate(0,0); opacity:.42} 45%{transform:translate(2px,8px); opacity:1} 80%{transform:translate(-1px,12px); opacity:.25} }
@keyframes mood-sleep-zzz { 0%{opacity:0; transform:translate(0,10px) scale(.85)} 40%{opacity:1} 100%{opacity:0; transform:translate(-8px,-18px) scale(1.15)} }

.cs-student-name {
  margin-top: 2px;
  font-size: clamp(1.25rem, 1.45vw, 1.7rem);
  color: #172554;
  font-weight: 1000;
  line-height: 1.08;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-pet-name {
  font-size: 0.9rem;
  font-weight: 900;
  color: #64748b;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-pet-level {
  font-size: 0.82rem;
  font-weight: 1000;
  color: #fff;
  background: linear-gradient(135deg, var(--level-color, #8b5cf6), #4facfe);
  border: 3px solid rgba(255,255,255,0.92);
  padding: 3px 11px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 6px 12px rgba(59,130,246,0.16);
}
.cs-student-pts {
  margin-top: 3px;
  font-size: clamp(1.2rem, 1.5vw, 1.8rem);
  font-weight: 1000;
  color: #b45309;
  background: #fff7cc;
  padding: 4px 16px;
  border-radius: 999px;
  border: 3px solid #fde68a;
  line-height: 1.25;
  box-shadow: 0 8px 16px rgba(245,158,11,0.12);
}

/* ─── 积分排行：明亮领奖台风格 ───────────────────────────── */
.cs-leaderboard {
  flex: 1;
  padding: 24px 32px 38px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
.cs-board-title {
  width: fit-content;
  font-size: 1.05rem;
  font-weight: 1000;
  color: #1d4ed8;
  background: rgba(255,255,255,0.78);
  border: 3px solid #fff;
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 14px;
  margin-top: 10px;
  box-shadow: 0 8px 18px rgba(59,130,246,0.12);
}
.cs-board-title--activity { margin-top: 26px; }
.cs-board-list { display: flex; flex-direction: column; gap: 10px; }
.cs-board-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.86);
  border-radius: 22px;
  border: 3px solid rgba(255,255,255,0.95);
  box-shadow: 0 10px 22px rgba(51,96,140,0.12);
  transition: transform 0.15s;
}
.cs-board-row:hover { transform: translateX(5px); }
.cs-board-row--top1 { background: linear-gradient(135deg, #fff7c2, #fff); border-color: #fde68a; }
.cs-board-row--top2 { background: linear-gradient(135deg, #eff6ff, #fff); border-color: #bfdbfe; }
.cs-board-row--top3 { background: linear-gradient(135deg, #ffedd5, #fff); border-color: #fed7aa; }
.cs-board-rank { font-size: 1.9rem; min-width: 44px; text-align: center; }
.cs-board-pet-thumb { width: 58px; height: 58px; flex-shrink: 0; }
.cs-board-sname { flex: 0 0 150px; font-size: 1.28rem; font-weight: 1000; color: #172554; }
.cs-board-bar-wrap { flex: 1; height: 16px; background: #e0f2fe; border-radius: 999px; overflow: hidden; border: 2px solid #fff; }
.cs-board-bar { height: 100%; background: linear-gradient(90deg, #4facfe, #8b5cf6, #ff78b7); border-radius: 999px; transition: width 1s cubic-bezier(.34,1.56,.64,1); }
.cs-board-pts { min-width: 90px; text-align: right; font-size: 1.45rem; font-weight: 1000; color: #b45309; }
.cs-activity-list { display: flex; flex-direction: column; gap: 8px; }
.cs-activity-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(255,255,255,0.78); border-radius: 18px; font-size: 1rem; border: 3px solid rgba(255,255,255,0.86); }
.cs-act-name { flex: 0 0 100px; color: #172554; font-weight: 1000; }
.cs-act-delta { min-width: 58px; font-weight: 1000; font-size: 1.1rem; }
.cs-act-delta.pos { color: #16a34a; }
.cs-act-delta.neg { color: #dc2626; }
.cs-act-reason { flex: 1; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }

/* ─── 备用寄语卡片 ───────────────────────────────────────── */
.cs-letters { flex: 1; padding: 20px 32px; }
.cs-letters-empty { text-align: center; color: #64748b; padding: 80px; font-size: 1.2rem; font-weight: 900; }
.cs-letters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cs-letter-card { background: rgba(255,255,255,0.86); border: 3px solid #fff; border-radius: 24px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--cs-shadow); }
.cs-letter-content { font-size: 1.08rem; color: #172554; line-height: 1.7; font-weight: 900; }
.cs-letter-meta { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; }
.cs-letter-author { color: #f97316; font-weight: 1000; }
.cs-letter-student { color: #64748b; font-weight: 800; }

/* ─── 工具岛触控弹窗（一体机可直接操作）──────────────────── */
.cs-tool-modal-backdrop { position: fixed; inset: 0; z-index: 320; display:flex; align-items:center; justify-content:center; padding: 28px; background: rgba(36, 50, 75, .38); backdrop-filter: blur(10px); }
.cs-tool-modal { width: min(780px, 94vw); max-height: 88vh; overflow:auto; border-radius: 36px; border: 6px solid rgba(255,255,255,.96); background: linear-gradient(180deg, #ffffff 0%, #eff6ff 48%, #fff7ed 100%); box-shadow: 0 30px 80px rgba(30,64,120,.34); padding: 26px; animation: tool-modal-pop .22s cubic-bezier(.34,1.56,.64,1); }
@keyframes tool-modal-pop { from{opacity:0; transform:scale(.92) translateY(16px)} to{opacity:1; transform:scale(1) translateY(0)} }
.cs-tool-modal-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.cs-tool-modal-head h2 { margin:4px 0 0; color:#172554; font-size: clamp(1.7rem, 2.4vw, 2.5rem); line-height:1; }
.cs-tool-modal-close { width:54px; height:54px; border-radius:20px; border:3px solid #fecaca; background:#fee2e2; color:#dc2626; font-size:1.25rem; font-weight:1000; cursor:pointer; }
.cs-tool-modal-grid { display:grid; gap:16px; }
.cs-tool-modal-grid--modes { grid-template-columns: repeat(3, 1fr); }
.cs-tool-modal-grid--timer { grid-template-columns: repeat(3, 1fr); }
.cs-tool-modal-stack { display:flex; flex-direction:column; gap:16px; }
.cs-big-action { min-height:138px; border:4px solid rgba(255,255,255,.96); border-radius:28px; background:linear-gradient(145deg,#fff,#e0f2fe); color:#172554; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; box-shadow:0 14px 28px rgba(51,96,140,.14); font-family:inherit; transition:transform .14s ease, box-shadow .14s ease; }
.cs-big-action:hover { transform:translateY(-4px) scale(1.015); box-shadow:0 22px 42px rgba(51,96,140,.2); }
.cs-big-action:active { transform:scale(.98); }
.cs-big-action > span { font-size:2.5rem; }
.cs-big-action strong { font-size:1.25rem; font-weight:1000; }
.cs-big-action em { font-style:normal; color:#64748b; font-size:.9rem; font-weight:900; text-align:center; padding:0 8px; }
.cs-big-action--discuss { background:linear-gradient(145deg,#dcfce7,#fff); }
.cs-big-action--quiet { background:linear-gradient(145deg,#fef3c7,#fff); }
.cs-big-action--focus { background:linear-gradient(145deg,#fee2e2,#fff); }
.cs-big-action.active { outline:6px solid rgba(96,165,250,.28); box-shadow:0 20px 42px rgba(59,130,246,.22), inset 0 0 0 4px #fff; }
.cs-primary-action, .cs-stop-action { border:0; border-radius:24px; padding:18px 24px; color:#fff; font-size:1.25rem; font-weight:1000; cursor:pointer; font-family:inherit; box-shadow:0 16px 34px rgba(59,130,246,.24); }
.cs-primary-action { background:linear-gradient(135deg,#22c55e,#3b82f6,#a855f7); }
.cs-stop-action { background:linear-gradient(135deg,#f97316,#ef4444); }
.cs-rollcall-preview { min-height:190px; border-radius:32px; border:4px solid #fff; background:linear-gradient(145deg,#fff7c2,#dbeafe); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; box-shadow:0 14px 28px rgba(245,158,11,.14); }
.cs-rollcall-dice { font-size:3.6rem; animation: logo-float 1.8s ease-in-out infinite; }
.cs-rollcall-preview strong { color:#172554; font-size:clamp(1.8rem,3vw,3rem); font-weight:1000; }
.cs-rollcall-preview em { font-style:normal; color:#64748b; font-weight:900; }
.cs-task-editor { min-height:130px; resize:vertical; border-radius:26px; border:4px solid #bfdbfe; background:#fff; color:#172554; padding:18px; font-size:1.18rem; line-height:1.6; font-weight:900; outline:none; font-family:inherit; }
.cs-task-editor:focus { border-color:#60a5fa; box-shadow:0 0 0 6px rgba(96,165,250,.18); }
.cs-task-presets { display:grid; grid-template-columns: repeat(2, 1fr); gap:10px; }
.cs-task-presets button { border:3px solid #e0f2fe; background:#fff; color:#1d4ed8; border-radius:18px; padding:12px 14px; font-weight:1000; cursor:pointer; font-family:inherit; text-align:left; }
.cs-task-presets button:hover { background:#eff6ff; }

/* ─── QuickScoreOverlay ──────────────────────────────────── */
.cs-overlay-backdrop { position: fixed; inset: 0; background: rgba(33, 50, 84, 0.42); backdrop-filter: blur(8px); z-index: 300; display: flex; align-items: center; justify-content: center; }
.cs-overlay {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border: 5px solid rgba(255,255,255,0.96);
  border-radius: 32px;
  padding: 28px;
  min-width: 360px;
  max-width: 460px;
  width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 28px 70px rgba(30, 64, 120, 0.32);
}
.cs-overlay-header { display: flex; align-items: center; gap: 12px; }
.cs-overlay-name { font-size: 1.5rem; font-weight: 1000; color: #172554; flex: 1; }
.cs-overlay-pet { font-size: 0.95rem; color: #64748b; font-weight: 900; }
.cs-overlay-close { background: #fee2e2; border: 2px solid #fecaca; color: #dc2626; border-radius: 12px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; font-weight: 1000; }
.cs-overlay-presets { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-overlay-preset { flex: 1 1 58px; border-radius: 16px; border: 3px solid #e2e8f0; background: #fff; color: #64748b; padding: 12px 4px; font-size: 1.12rem; font-weight: 1000; cursor: pointer; transition: transform .12s, box-shadow .12s; min-width: 54px; }
.cs-overlay-preset:hover { transform: translateY(-2px); }
.cs-overlay-preset.pos { color: #16a34a; border-color: #bbf7d0; }
.cs-overlay-preset.neg { color: #dc2626; border-color: #fecaca; }
.cs-overlay-preset.active.pos { background: #dcfce7; border-color: #22c55e; box-shadow: 0 8px 18px rgba(34,197,94,0.16); }
.cs-overlay-preset.active.neg { background: #fee2e2; border-color: #ef4444; box-shadow: 0 8px 18px rgba(239,68,68,0.14); }
.cs-overlay-custom, .cs-overlay-reason { box-sizing: border-box; background: #fff; border: 3px solid #dbeafe; border-radius: 16px; color: #172554; padding: 12px 14px; font-size: 1rem; font-weight: 900; outline: none; }
.cs-overlay-custom { flex: 1 1 90px; text-align: center; }
.cs-overlay-reason { width: 100%; }
.cs-overlay-custom:focus, .cs-overlay-reason:focus { border-color: #60a5fa; }
.cs-overlay-confirm { background: linear-gradient(135deg, #22c55e, #3b82f6); color: #fff; border: none; border-radius: 18px; padding: 16px; font-size: 1.2rem; font-weight: 1000; cursor: pointer; box-shadow: 0 12px 26px rgba(59,130,246,0.22); }
.cs-overlay-confirm:disabled { opacity: 0.45; cursor: not-allowed; }
.cs-overlay-confirm:not(:disabled):hover { transform: translateY(-1px); }

/* ─── Toast ──────────────────────────────────────────────── */
.cs-toast { position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%); background: #172554; border: 4px solid rgba(255,255,255,0.9); color: #fff; padding: 16px 34px; border-radius: 999px; font-size: 1.12rem; font-weight: 1000; z-index: 400; box-shadow: 0 18px 40px rgba(30, 64, 120, 0.35); animation: toast-in 0.28s cubic-bezier(.34,1.56,.64,1); pointer-events: none; white-space: nowrap; }
@keyframes toast-in { from{opacity:0; transform:translateX(-50%) translateY(16px) scale(.92)} to{opacity:1; transform:translateX(-50%) translateY(0) scale(1)} }

/* ─── 投影/一体机适配 ─────────────────────────────────────── */
@media (min-width: 1500px) {
  .cs-stage-shell { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 22px; padding: 20px 34px 42px; }
  .cs-pet-grid { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 18px; }
  .cs-pet-card { min-height: 252px; }
  .cs-pet-img-wrap { width: 132px; height: 132px; }
}

@media (min-width: 1900px) {
  .cs-pet-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
  .cs-pet-card { min-height: 278px; }
  .cs-pet-img-wrap { width: 148px; height: 148px; }
}

@media (max-width: 1150px) {
  .cs-stage-shell { grid-template-columns: 1fr; }
  .cs-left-rail { display: none; }
  .cs-spotlight-panel { display: none; }
  .cs-topbar { flex-wrap: wrap; }
  .cs-tab-nav { order: 3; width: 100%; }
  .cs-topbar-right { margin-left: auto; min-width: 0; }
  .cs-live-status { display: none; }
}

@media (max-width: 900px) {
  .cs-topbar { margin: 10px 10px 0; gap: 10px; padding: 10px; border-radius: 22px; }
  .cs-logo { width: 46px; height: 46px; font-size: 1.7rem; }
  .cs-subtitle { display: none; }
  .cs-tab-btn { padding: 9px 16px; font-size: .92rem; }
  .cs-clock { font-size: 1rem; border-width: 2px; padding: 5px 8px; }
  .cs-ticker-bar { margin: 10px 12px 0; height: 46px; }
  .cs-stage-shell { padding: 12px; }
  .cs-pet-grid { grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 12px; }
  .cs-pet-card { min-height: 214px; border-radius: 24px; }
  .cs-pet-img-wrap { width: 104px; height: 104px; }
}


/* 诊断提示：避免接口失败时静默空白 */
.cs-diagnosis-banner {
  margin: -8px auto 12px;
  width: min(1180px, calc(100% - 32px));
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid rgba(251, 146, 60, .45);
  color: #9a3412;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(251, 146, 60, .18);
  position: relative;
  z-index: 20;
}

.cs-diagnosis-banner em {
  font-style: normal;
  font-weight: 700;
  color: #c2410c;
}

.cs-empty-state {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  border-radius: 32px;
  background: rgba(255, 255, 255, .82);
  border: 3px dashed rgba(96, 165, 250, .38);
  color: #1e3a8a;
  box-shadow: 0 24px 60px rgba(59, 130, 246, .16);
  padding: 38px;
}

.cs-empty-state > span {
  font-size: 76px;
  filter: drop-shadow(0 10px 16px rgba(59, 130, 246, .22));
}

.cs-empty-state h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 1000;
}

.cs-empty-state p {
  margin: 0;
  max-width: 760px;
  font-size: clamp(17px, 1.6vw, 24px);
  font-weight: 700;
  line-height: 1.55;
  color: #475569;
}

.cs-empty-state--warning {
  border-color: rgba(251, 146, 60, .5);
  color: #9a3412;
  background: linear-gradient(135deg, rgba(255, 247, 237, .9), rgba(255, 255, 255, .86));
}


/* ─── 全屏沉浸式计时器：学生向糖果乐园风 ───────────────────── */
.cs-timer-stage {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 46px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 244, 181, .96) 0 8%, transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(255, 178, 220, .86) 0 10%, transparent 26%),
    radial-gradient(circle at 50% 108%, rgba(119, 232, 139, .86) 0 22%, transparent 38%),
    linear-gradient(180deg, #9ee7ff 0%, #eaf7ff 48%, #fff0c2 100%);
  animation: timer-stage-in .24s ease-out;
}
.cs-timer-stage::before,
.cs-timer-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cs-timer-stage::before {
  background:
    radial-gradient(ellipse at 16% 28%, rgba(255,255,255,.9) 0 5%, transparent 5.4%),
    radial-gradient(ellipse at 24% 25%, rgba(255,255,255,.72) 0 6.5%, transparent 6.9%),
    radial-gradient(ellipse at 76% 30%, rgba(255,255,255,.78) 0 6%, transparent 6.4%),
    radial-gradient(ellipse at 86% 27%, rgba(255,255,255,.86) 0 5.2%, transparent 5.6%);
  opacity: .86;
}
.cs-timer-stage::after {
  background:
    linear-gradient(100deg, rgba(255,122,122,.18), rgba(255,214,102,.18), rgba(96,215,160,.16), rgba(96,165,250,.18), rgba(168,85,247,.16));
  mix-blend-mode: soft-light;
}
.cs-timer-stage--urgent {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 244, 181, .96) 0 8%, transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(255, 138, 138, .8) 0 10%, transparent 26%),
    linear-gradient(180deg, #ffd08a 0%, #fff2c7 44%, #ffe3df 100%);
}
.cs-timer-stage--paused {
  background:
    radial-gradient(circle at 18% 16%, rgba(224, 231, 255, .92) 0 8%, transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(216, 180, 254, .72) 0 10%, transparent 26%),
    linear-gradient(180deg, #dbeafe 0%, #f5f3ff 52%, #fff7ed 100%);
}
.cs-timer-stage--done {
  animation: timer-stage-in .24s ease-out, timer-done-confetti .9s ease-in-out infinite alternate;
}
.cs-timer-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.cs-timer-orbit span {
  position: absolute;
  font-size: clamp(28px, 4vw, 70px);
  filter: drop-shadow(0 12px 20px rgba(30,64,120,.22));
  animation: timer-floaty 4.8s ease-in-out infinite;
}
.cs-timer-orbit span:nth-child(1) { left: 9%; top: 16%; animation-delay: -.4s; }
.cs-timer-orbit span:nth-child(2) { right: 10%; top: 20%; animation-delay: -1.4s; }
.cs-timer-orbit span:nth-child(3) { left: 13%; bottom: 16%; animation-delay: -2.2s; }
.cs-timer-orbit span:nth-child(4) { right: 14%; bottom: 18%; animation-delay: -3.1s; }
.cs-timer-panel {
  position: relative;
  z-index: 2;
  width: min(1180px, 94vw);
  min-height: min(760px, 86vh);
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: clamp(18px, 2.4vw, 34px);
  align-items: center;
  padding: clamp(24px, 3.4vw, 54px);
  border-radius: clamp(32px, 4vw, 58px);
  border: 8px solid rgba(255,255,255,.94);
  background:
    linear-gradient(135deg, rgba(255,255,255,.93), rgba(255,255,255,.72)),
    radial-gradient(circle at 20% 18%, rgba(255, 232, 121, .45), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(255, 120, 183, .24), transparent 30%);
  box-shadow: 0 38px 100px rgba(56, 92, 150, .32), 0 0 0 3px rgba(255,255,255,.55) inset;
  overflow: hidden;
}
.cs-timer-panel::before {
  content: '';
  position: absolute;
  inset: -18% -8% auto;
  height: 44%;
  background: linear-gradient(90deg, rgba(255,122,122,.22), rgba(255,214,102,.22), rgba(96,215,160,.18), rgba(96,165,250,.2), rgba(168,85,247,.18));
  border-radius: 999px;
  transform: rotate(-5deg);
  opacity: .72;
}
.cs-timer-stage-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 5;
  min-width: 72px;
  height: 54px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, #fee2e2);
  color: #dc2626;
  font-size: 1.06rem;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(239,68,68,.18);
}
.cs-timer-mascot {
  grid-row: 1 / span 2;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}
.cs-timer-mascot-aura {
  position: absolute;
  width: min(320px, 28vw);
  height: min(320px, 28vw);
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ff78b7, #ffd166, #34d399, #60a5fa, #a855f7, #ff78b7);
  filter: blur(4px);
  opacity: .72;
  animation: timer-aura-spin 5s linear infinite;
}
.cs-timer-mascot-emoji {
  position: relative;
  z-index: 1;
  width: min(260px, 24vw);
  height: min(260px, 24vw);
  display: grid;
  place-items: center;
  border-radius: 42%;
  background: linear-gradient(135deg, #fff, #fff7d6 58%, #ffd6ec);
  border: 8px solid rgba(255,255,255,.92);
  font-size: clamp(88px, 11vw, 170px);
  box-shadow: 0 28px 56px rgba(245, 158, 11, .25), 0 0 0 6px rgba(255,255,255,.55) inset;
  animation: timer-mascot-bob 2.2s ease-in-out infinite;
}
.cs-timer-copy {
  position: relative;
  z-index: 1;
  align-self: end;
  text-align: left;
}
.cs-timer-copy h2 {
  margin: 8px 0 10px;
  font-size: clamp(38px, 5vw, 78px);
  line-height: 1;
  font-weight: 1000;
  color: #1e3a8a;
  text-shadow: 0 4px 0 rgba(255,255,255,.85);
}
.cs-timer-copy p {
  margin: 0;
  font-size: clamp(18px, 2vw, 30px);
  line-height: 1.35;
  font-weight: 900;
  color: #475569;
}
.cs-timer-running-box,
.cs-timer-picker {
  position: relative;
  z-index: 1;
  align-self: start;
}
.cs-timer-running-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.cs-timer-ring {
  width: min(420px, 36vw);
  height: min(420px, 36vw);
  min-width: 300px;
  min-height: 300px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#22c55e var(--timer-progress), rgba(226,232,240,.8) 0);
  box-shadow: 0 22px 58px rgba(34,197,94,.24), 0 0 0 12px rgba(255,255,255,.75);
  transition: background .25s ease;
}
.cs-timer-stage--urgent .cs-timer-ring {
  background: conic-gradient(#ef4444 var(--timer-progress), rgba(255,237,213,.9) 0);
  animation: timer-urgent-ring .7s ease-in-out infinite alternate;
  box-shadow: 0 24px 64px rgba(239,68,68,.34), 0 0 0 12px rgba(255,255,255,.78);
}
.cs-timer-stage--paused .cs-timer-ring {
  background: conic-gradient(#8b5cf6 var(--timer-progress), rgba(226,232,240,.9) 0);
}
.cs-timer-stage--stopwatch .cs-timer-ring {
  background: conic-gradient(#06b6d4 var(--timer-progress), rgba(224,242,254,.9) 0);
  box-shadow: 0 22px 58px rgba(6,182,212,.24), 0 0 0 12px rgba(255,255,255,.75);
}
.cs-timer-stage--stopwatch .cs-timer-big-time { color: #0891b2; }
.cs-timer-ring-inner {
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #f8fbff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.8), inset 0 -18px 36px rgba(59,130,246,.08);
}
.cs-timer-big-time {
  font-size: clamp(64px, 8vw, 132px);
  line-height: .9;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
  letter-spacing: -.05em;
}
.cs-timer-stage--urgent .cs-timer-big-time { color: #dc2626; }
.cs-timer-stage--paused .cs-timer-big-time { color: #7c3aed; }
.cs-timer-ring-inner em {
  margin-top: 12px;
  font-style: normal;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 1000;
  color: #64748b;
}
.cs-timer-progress-track {
  width: min(620px, 54vw);
  height: 24px;
  border: 5px solid #fff;
  border-radius: 999px;
  background: rgba(226,232,240,.8);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(30,64,120,.12) inset;
}
.cs-timer-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #60a5fa, #a855f7);
  transition: width .25s ease;
}
.cs-timer-stage--urgent .cs-timer-progress-track span { background: linear-gradient(90deg, #fbbf24, #fb7185, #ef4444); }
.cs-timer-controls {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.cs-timer-control {
  min-width: 180px;
  border: 5px solid #fff;
  border-radius: 28px;
  padding: 18px 30px;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 1000;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 18px 38px rgba(30,64,120,.22);
}
.cs-timer-control--pause { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.cs-timer-control--cancel { background: linear-gradient(135deg, #fb7185, #ef4444); }
.cs-timer-picker {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cs-timer-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 8px;
  border: 5px solid #fff;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 16px 34px rgba(30,64,120,.12);
}
.cs-timer-mode-tabs button {
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 1000;
  cursor: pointer;
}
.cs-timer-mode-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6, #ec4899);
  box-shadow: 0 12px 28px rgba(99,102,241,.26);
}
.cs-timer-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 16px;
}
.cs-timer-preset-card {
  min-height: 140px;
  border: 5px solid #fff;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff, #e0f7ff 52%, #fff4c2);
  color: #1e3a8a;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 16px 34px rgba(59,130,246,.18);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cs-timer-preset-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 22px 46px rgba(59,130,246,.24); }
.cs-timer-preset-card span { font-size: clamp(34px, 3.6vw, 58px); }
.cs-timer-preset-card strong { font-size: clamp(22px, 2.2vw, 34px); font-weight: 1000; }
.cs-timer-preset-card em { font-style: normal; font-size: clamp(14px, 1.2vw, 18px); font-weight: 900; color: #64748b; }
.cs-timer-custom-box {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-radius: 28px;
  border: 5px solid #fff;
  background: linear-gradient(135deg, #fef3c7, #ffffff);
  box-shadow: 0 16px 34px rgba(245,158,11,.16);
}
.cs-timer-custom-box > div { display: flex; flex-direction: column; gap: 4px; }
.cs-timer-custom-box strong { font-size: 24px; font-weight: 1000; color: #92400e; }
.cs-timer-custom-box span { font-size: 14px; font-weight: 800; color: #78716c; }
.cs-timer-custom-box label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 1000;
  color: #92400e;
}
.cs-timer-custom-box input {
  width: 76px;
  height: 58px;
  border: 4px solid #fde68a;
  border-radius: 18px;
  text-align: center;
  font-size: 24px;
  font-weight: 1000;
  color: #1e3a8a;
  outline: none;
}
.cs-timer-custom-box input:focus { border-color: #f59e0b; }
.cs-timer-custom-box button {
  height: 62px;
  border: 0;
  border-radius: 20px;
  padding: 0 24px;
  font-size: 20px;
  font-weight: 1000;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 14px 30px rgba(236,72,153,.22);
  cursor: pointer;
}
.cs-stopwatch-start-box {
  min-height: 390px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 14px;
  padding: clamp(24px, 3vw, 46px);
  border-radius: 36px;
  border: 6px solid #fff;
  background:
    radial-gradient(circle at 20% 18%, rgba(125, 211, 252, .55), transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(196, 181, 253, .46), transparent 32%),
    linear-gradient(135deg, #ecfeff, #ffffff 54%, #f5f3ff);
  box-shadow: 0 22px 48px rgba(6,182,212,.18);
}
.cs-stopwatch-hero {
  width: min(180px, 18vw);
  height: min(180px, 18vw);
  min-width: 128px;
  min-height: 128px;
  display: grid;
  place-items: center;
  border-radius: 44px;
  background: linear-gradient(135deg, #cffafe, #ffffff, #ddd6fe);
  border: 6px solid #fff;
  font-size: clamp(62px, 8vw, 128px);
  box-shadow: 0 20px 42px rgba(14,165,233,.22);
  animation: timer-mascot-bob 2.2s ease-in-out infinite;
}
.cs-stopwatch-start-box strong {
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 1000;
  color: #0e7490;
}
.cs-stopwatch-start-box p {
  max-width: 640px;
  margin: 0;
  font-size: clamp(18px, 1.8vw, 28px);
  line-height: 1.35;
  font-weight: 900;
  color: #475569;
}
.cs-stopwatch-start-box button {
  min-height: 74px;
  border: 0;
  border-radius: 999px;
  padding: 0 44px;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 1000;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);
  box-shadow: 0 18px 42px rgba(37,99,235,.28);
  cursor: pointer;
}
@keyframes timer-stage-in { from{opacity:0; transform:scale(1.02)} to{opacity:1; transform:scale(1)} }
@keyframes timer-floaty { 0%,100%{transform:translateY(0) rotate(-5deg)} 50%{transform:translateY(-22px) rotate(8deg)} }
@keyframes timer-aura-spin { to{transform:rotate(360deg)} }
@keyframes timer-mascot-bob { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-12px) rotate(3deg)} }
@keyframes timer-urgent-ring { from{transform:scale(1)} to{transform:scale(1.035)} }
@keyframes timer-done-confetti { from{filter:saturate(1)} to{filter:saturate(1.25) brightness(1.03)} }

@media (max-width: 1100px) {
  .cs-timer-panel { grid-template-columns: 1fr; min-height: auto; text-align: center; }
  .cs-timer-mascot { grid-row: auto; min-height: 200px; }
  .cs-timer-copy { text-align: center; }
  .cs-timer-preset-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .cs-timer-custom-box { grid-template-columns: 1fr 1fr; }
  .cs-timer-custom-box > div { grid-column: 1 / -1; }
  .cs-timer-custom-box button { grid-column: 1 / -1; }
}
/* ── ClassroomRemotePage —— 手机遥控器样式（升级版） ── */

.remote-page {
  min-height: 100svh;
  background: linear-gradient(160deg, #04081a 0%, #070d24 60%, #040812 100%);
  color: #f1f5f9;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  padding-bottom: 48px;
}

/* header */
.remote-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  background: rgba(4,8,26,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(139,92,246,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.remote-logo {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 6px rgba(139,92,246,0.7));
}

.remote-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.remote-title {
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.remote-user {
  font-size: 0.72rem;
  color: #64748b;
}

.remote-presence {
  width: fit-content;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.1);
}

.remote-presence--online {
  color: #bbf7d0;
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.28);
}

.remote-presence--connecting {
  color: #fde68a;
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.25);
}

.remote-presence--offline {
  color: #fecaca;
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.28);
}

.remote-screen-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(99,102,241,0.4);
  transition: opacity 0.15s, transform 0.1s;
}

.remote-screen-btn:active { opacity: 0.75; transform: scale(0.96); }

/* sections */
.remote-section {
  margin: 14px 12px 0;
  background: rgba(15,23,42,0.7);
  border-radius: 16px;
  padding: 14px 14px;
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
}

.remote-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* tools */
.remote-tools { display: flex; flex-direction: column; gap: 10px; }

.remote-tool-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.remote-tool-btn:active { opacity: 0.75; transform: scale(0.97); }

.remote-tool-btn--rollcall {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 0 16px rgba(249,115,22,0.35);
}

.remote-timer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.remote-tool-btn--timer {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #cbd5e1;
  flex: 1 1 auto;
  font-size: 0.8rem;
  padding: 9px 10px;
}

/* broadcast */
.remote-broadcast-row {
  display: flex;
  gap: 8px;
}

.remote-broadcast-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  color: #f1f5f9;
  font-size: 0.88rem;
  outline: none;
}

.remote-broadcast-input:focus {
  border-color: rgba(249,115,22,0.5);
  background: rgba(249,115,22,0.05);
}

.remote-broadcast-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(249,115,22,0.35);
}

.remote-broadcast-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.remote-broadcast-btn:not(:disabled):active { opacity: 0.8; transform: scale(0.97); }

/* score presets */
.remote-score-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.remote-preset-btn {
  flex: 1 1 52px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #64748b;
  padding: 10px 4px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-width: 50px;
}

.remote-preset-btn.positive { color: #4ade80; border-color: rgba(74,222,128,0.25); }
.remote-preset-btn.negative { color: #f87171; border-color: rgba(248,113,113,0.25); }

.remote-preset-btn--active.positive {
  background: rgba(74,222,128,0.15);
  border-color: rgba(74,222,128,0.5);
  color: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,0.2);
}

.remote-preset-btn--active.negative {
  background: rgba(248,113,113,0.15);
  border-color: rgba(248,113,113,0.5);
  color: #f87171;
  box-shadow: 0 0 10px rgba(248,113,113,0.2);
}

.remote-custom-input {
  flex: 1 1 76px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 9px 10px;
  color: #f1f5f9;
  font-size: 0.9rem;
  text-align: center;
  outline: none;
  min-width: 58px;
}

.remote-custom-input:focus { border-color: rgba(139,92,246,0.5); }

.remote-reason-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  color: #f1f5f9;
  font-size: 0.88rem;
  margin-bottom: 12px;
  outline: none;
}

.remote-reason-input:focus { border-color: rgba(139,92,246,0.4); }

/* student list */
.remote-loading {
  text-align: center;
  color: #334155;
  padding: 20px;
  font-size: 0.88rem;
}

.remote-student-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}

.remote-student-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  width: 100%;
  color: #f1f5f9;
}

.remote-student-btn:active { opacity: 0.8; }

.remote-student-btn--selected {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 12px rgba(99,102,241,0.15);
}

.remote-student-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 700;
}

.remote-student-pet {
  font-size: 0.76rem;
  color: #64748b;
}

.remote-student-pts {
  font-size: 0.82rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a78bfa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 40px;
  text-align: right;
}

/* confirm bar */
.remote-confirm-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(37,99,235,0.12);
  border: 1.5px solid rgba(99,102,241,0.35);
  border-radius: 12px;
  padding: 11px 14px;
  margin-top: 10px;
  box-shadow: 0 0 16px rgba(99,102,241,0.1);
}

.remote-confirm-text {
  flex: 1;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.remote-confirm-text strong.positive { color: #4ade80; }
.remote-confirm-text strong.negative { color: #f87171; }
.remote-confirm-text em { color: #64748b; font-style: normal; font-size: 0.82rem; }

.remote-confirm-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 20px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(99,102,241,0.35);
  transition: opacity 0.15s, transform 0.1s;
}

.remote-confirm-btn:not(:disabled):active { opacity: 0.8; transform: scale(0.97); }
.remote-confirm-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* toast */
.remote-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(4,8,26,0.95);
  border: 1px solid rgba(139,92,246,0.3);
  color: #f1f5f9;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 400;
  box-shadow: 0 6px 32px rgba(0,0,0,0.6);
  white-space: nowrap;
  animation: toast-up 0.25s ease-out;
  pointer-events: none;
}

@keyframes toast-up {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* header */
.remote-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  position: sticky;
  top: 0;
  z-index: 100;
}

.remote-logo {
  font-size: 1.5rem;
}

.remote-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.remote-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.remote-user {
  font-size: 0.75rem;
  color: #94a3b8;
}

.remote-screen-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.remote-screen-btn:active { opacity: 0.75; }

/* sections */
.remote-section {
  margin: 14px 14px 0;
  background: #1e293b;
  border-radius: 12px;
  padding: 14px;
}

.remote-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* tools */
.remote-tools { display: flex; flex-direction: column; gap: 10px; }

.remote-tool-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.remote-tool-btn:active { opacity: 0.75; transform: scale(0.97); }

.remote-tool-btn--rollcall {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-size: 1rem;
}

.remote-timer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.remote-tool-btn--timer {
  background: #334155;
  color: #e2e8f0;
  flex: 1 1 auto;
  font-size: 0.8rem;
  padding: 8px 10px;
}

/* broadcast */
.remote-broadcast-row {
  display: flex;
  gap: 8px;
}

.remote-broadcast-input {
  flex: 1;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 8px;
  padding: 9px 12px;
  color: #f1f5f9;
  font-size: 0.88rem;
  outline: none;
}

.remote-broadcast-input:focus {
  border-color: #f97316;
}

.remote-broadcast-btn {
  background: #f97316;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.remote-broadcast-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.remote-broadcast-btn:not(:disabled):active { opacity: 0.8; }

/* score presets */
.remote-score-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.remote-preset-btn {
  flex: 1 1 56px;
  border: 1.5px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #94a3b8;
  padding: 9px 4px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-width: 52px;
}

.remote-preset-btn.positive { color: #4ade80; border-color: #166534; }
.remote-preset-btn.negative { color: #f87171; border-color: #7f1d1d; }

.remote-preset-btn--active.positive {
  background: #166534;
  color: #fff;
}

.remote-preset-btn--active.negative {
  background: #7f1d1d;
  color: #fff;
}

.remote-custom-input {
  flex: 1 1 80px;
  background: #0f172a;
  border: 1.5px solid #475569;
  border-radius: 8px;
  padding: 8px 10px;
  color: #f1f5f9;
  font-size: 0.9rem;
  text-align: center;
  outline: none;
  min-width: 60px;
}

.remote-custom-input:focus { border-color: #6366f1; }

.remote-reason-input {
  width: 100%;
  box-sizing: border-box;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 8px;
  padding: 9px 12px;
  color: #f1f5f9;
  font-size: 0.88rem;
  margin-bottom: 12px;
  outline: none;
}

.remote-reason-input:focus { border-color: #6366f1; }

/* student list */
.remote-loading {
  text-align: center;
  color: #64748b;
  padding: 16px;
  font-size: 0.88rem;
}

.remote-student-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.remote-student-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  border: 1.5px solid #1e293b;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  width: 100%;
  color: #f1f5f9;
}

.remote-student-btn:active { opacity: 0.8; }

.remote-student-btn--selected {
  background: #1e3a5f;
  border-color: #3b82f6;
}

.remote-student-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
}

.remote-student-pet {
  font-size: 0.78rem;
  color: #94a3b8;
}

.remote-student-pts {
  font-size: 0.82rem;
  color: #a78bfa;
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

/* confirm bar */
.remote-confirm-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e3a5f;
  border: 1.5px solid #3b82f6;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}

.remote-confirm-text {
  flex: 1;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.remote-confirm-text strong.positive { color: #4ade80; }
.remote-confirm-text strong.negative { color: #f87171; }
.remote-confirm-text em { color: #94a3b8; font-style: normal; font-size: 0.82rem; }

.remote-confirm-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.remote-confirm-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.remote-confirm-btn:not(:disabled):active { opacity: 0.8; }

/* toast */
.remote-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #334155;
  color: #f1f5f9;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toast-in 0.25s ease-out;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 手机适配 */
@media (max-width: 480px) {
  .remote-section { margin: 10px 10px 0; padding: 12px; }
  .remote-preset-btn { min-width: 44px; flex: 1 1 44px; }
}

/* No.55: 工具箱新增课堂状态灯 + 当前任务遥控 */
.remote-mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.remote-mode-btn {
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 6px;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.remote-mode-btn:active { transform: scale(0.97); opacity: .82; }
.remote-mode-btn--discuss { background: linear-gradient(135deg, rgba(34,197,94,.22), rgba(20,184,166,.16)); border-color: rgba(34,197,94,.3); }
.remote-mode-btn--quiet { background: linear-gradient(135deg, rgba(245,158,11,.22), rgba(251,191,36,.15)); border-color: rgba(245,158,11,.3); }
.remote-mode-btn--focus { background: linear-gradient(135deg, rgba(239,68,68,.22), rgba(244,63,94,.16)); border-color: rgba(239,68,68,.32); }
.remote-task-row { display: flex; gap: 8px; }
.remote-task-input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 12px;
  color: #f1f5f9;
  font-size: 0.84rem;
  outline: none;
}
.remote-task-input:focus { border-color: rgba(56,189,248,.45); background: rgba(56,189,248,.05); }
.remote-task-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.remote-task-btn:disabled { opacity: .38; cursor: not-allowed; }



/* 远程计时器控制：预设 + 自定义 + 暂停/继续/取消 */
.remote-timer-custom-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1.4fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.16);
}
.remote-timer-custom-row input {
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f8fafc;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  outline: none;
}
.remote-timer-custom-row input:focus {
  border-color: rgba(56,189,248,.55);
  box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}
.remote-timer-custom-row span {
  color: #93c5fd;
  font-weight: 1000;
  font-size: 1.2rem;
}
.remote-timer-custom-row button {
  height: 42px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
}
.remote-timer-control-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.remote-timer-control {
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 13px;
  padding: 10px 6px;
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
}
.remote-timer-control--stopwatch { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.remote-timer-control--pause { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.remote-timer-control--resume { background: linear-gradient(135deg, #16a34a, #22c55e); }
.remote-timer-control--cancel { background: linear-gradient(135deg, #fb7185, #ef4444); }
.remote-timer-control:active,
.remote-timer-custom-row button:active { transform: scale(.97); opacity: .82; }
