:root {
  --bg: #f2f7ef;
  --bg-2: #eaf3e6;
  --card: #ffffff;
  --line: #e2eadd;
  --text: #2c3a2e;
  --muted: #849482;
  --primary: #5aa75a;
  --primary-dark: #3f8a48;
  --primary-soft: #e7f3e4;
  --accent: #f0a43a;
  --accent-dark: #d98a1f;
  --danger: #e05d5d;
  --gold: #e6b64b;
  --sky1: #bfe6f2;
  --sky2: #eaf7fb;
  --soil: #a9764a;
  --soil-dark: #85572f;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 18px rgba(63, 92, 61, 0.08);
  --shadow-hover: 0 10px 30px rgba(63, 92, 61, 0.14);
  --shadow-lg: 0 18px 50px rgba(48, 70, 47, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(181, 220, 165, 0.18), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(255, 214, 140, 0.18), transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  background: #fff; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: #cfdcc9; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(90, 167, 90, .16); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }

/* ============ 登录页 ============ */
.login-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(165deg, #eaf7fb 0%, #cde9f0 28%, #d8ecd0 58%, #f3e3bb 100%);
  overflow: hidden;
}
.login-screen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 224, 130, .95) 0 34px, transparent 35px),
    radial-gradient(ellipse at 12% 8%, rgba(255,255,255,.85) 0 70px, transparent 71px),
    radial-gradient(ellipse at 90% 80%, rgba(255,255,255,.55) 0 90px, transparent 91px);
}
.login-sky { position: absolute; inset: 0; pointer-events: none; }
.login-sky::before, .login-sky::after {
  position: absolute; font-size: 42px; opacity: .5; animation: floatCloud 20s linear infinite;
}
.login-sky::before { content: "🌻"; top: 10%; left: -60px; }
.login-sky::after { content: "🌿"; bottom: 12%; left: -60px; animation-delay: -10s; }
@keyframes floatCloud { 0% { transform: translateX(0); } 100% { transform: translateX(calc(100vw + 120px)); } }

.login-card {
  position: relative; z-index: 2; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.7); border-radius: 24px;
  padding: 38px 32px; width: 410px; max-width: 92vw; box-shadow: var(--shadow-lg);
}
.login-title {
  text-align: center; font-size: 32px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(120deg, #3f8a48, #7bbf5a, #3f8a48);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.login-sub { text-align: center; color: var(--muted); margin-bottom: 24px; }
.role-tabs { display: flex; gap: 6px; background: #eef3ec; border-radius: 14px; padding: 5px; margin-bottom: 22px; }
.role-tab {
  flex: 1; padding: 10px 6px; border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--muted); transition: .2s;
}
.role-tab:hover { color: var(--text); }
.role-tab.active { background: #fff; color: var(--primary-dark); box-shadow: 0 3px 10px rgba(63,92,61,.12); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field { display: flex; flex-direction: column; }
/* 📷 扫码进登录页时提示「已帮你选好：X班 张三」 */
.login-who { color: var(--primary-dark); font-size: 13px; min-height: 0; text-align: center; font-weight: 700; }
.login-who:not(:empty) { margin-bottom: 6px; }
.login-error { color: var(--danger); font-size: 13px; min-height: 18px; text-align: center; }
/* 🚫 顶栏常驻标记：学生端被暂停时提醒老师「现在是关着的」 */
.blocked-mark {
  background: #ffe0e0; color: var(--danger); font-size: 12px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; border: 1px solid #f3c2c2; white-space: nowrap;
}
/* 🚫 学生端被老师暂停：登录页上的提示条（比「密码错了」更显眼，因为它不是你输错，是老师关的） */
.login-blocked {
  background: #fff4f4; border: 1px solid #f3c2c2; color: var(--danger);
  font-size: 13px; font-weight: 700; text-align: center;
  padding: 8px 10px; border-radius: 8px; margin-bottom: 10px;
}
/* 🕒 每日维护时段（默认 17:00–18:30）：不是「出错了」而是「按点关门」，用暖色，别用错误红 */
.login-blocked.lw {
  background: #fff8e8; border-color: #f0d9a8; color: #8a5a00;
}
.login-hint { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; }
/* 🔑 90 天内免密码登录 */
.login-remember {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); cursor: pointer; user-select: none;
  margin-top: -2px;
}
.login-remember input { width: 16px; height: 16px; accent-color: var(--primary-dark); cursor: pointer; }
.login-remember:hover { color: var(--text); }

/* 👨‍👩‍👧 家长密码弹窗（明文只出现一次，老师当场复制发给家长） */
.pp-box { max-height: 62vh; overflow: auto; }
.pp-copy {
  width: 100%; font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 13px; line-height: 1.7;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 10px;
  background: var(--bg-2); color: var(--text); resize: vertical; box-sizing: border-box;
}
.pp-pwd { font-family: ui-monospace, Consolas, Menlo, monospace; letter-spacing: 1px; color: var(--primary-dark); }

/* 📚 学生端 / 家长端「我的作业」（只读，状态由老师登记） */
.hw-my-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.hw-my-list { display: flex; flex-direction: column; gap: 8px; }
.hw-my-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
}
.hw-my-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hw-my-date { font-size: 12px; color: var(--muted); }
.hw-my-title { font-weight: 600; word-break: break-all; }
.hw-my-tags { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.hw-my-tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.hw-my-tag.done { background: #e8f6ea; color: #2f7a3d; border-color: #bfe3c6; }
.hw-my-tag.miss { background: #f7e9e9; color: #b04141; border-color: #eecaca; }
.hw-my-tag.early { background: #e9f0fb; color: #2f5f9e; border-color: #c6d9f0; }
.hw-my-tag.ex { background: #f4ecfb; color: #6b3fa0; border-color: #dfd0ee; }
/* 🧑‍🎓 教师端 / 班级端「学生列表」里每条作业的两个按钮（2026-10-05）：
   「✅ 已交」「❌ 未交」两个都显示 —— 亮着的是当前状态，另一个弱化但照样能点；
   点没亮的那个就把状态翻过去，翻完不在当前筛选里 → 那一条从列表消失（和之前的操作一样）。
   ⚠️ 学生端不要这套：学生端只读，显示的是 hw-my-tag 状态标签。 */
.hw-stu-btns { display: inline-flex; gap: 6px; flex-shrink: 0; }
.hw-stu-btn { font-size: 12px; padding: 4px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: #f2f3f5; color: #9aa0a6; }
.hw-stu-btn:hover { filter: brightness(0.96); }
/* ⚠️ 点亮后的颜色**必须和作业列表里的 .hw-st.on.done / .hw-st.on.miss 一模一样**（实心 + 白字）：
   2026-10-05 老师反馈「学生列表这边的颜色太淡」，就是浅底深字那版被她否掉了。 */
.hw-stu-btn.on { font-weight: 700; color: #fff; }
.hw-stu-btn.done.on { background: #2e9e53; border-color: #2e9e53; }
.hw-stu-btn.miss.on { background: #d9534f; border-color: #d9534f; }

/* ============ 布局 ============ */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdfa); padding: 0 22px; height: 62px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(63,92,61,.06);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.brand {
  font-size: 19px; font-weight: 800;
  background: linear-gradient(120deg, #3f8a48, #6caf55);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.role-badge {
  background: linear-gradient(120deg, #e7f3e4, #d9ecd2); color: var(--primary-dark);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px; border: 1px solid #cfe5c7;
}
.class-name { font-size: 13px; color: var(--muted); }
.topnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.nav-tab {
  padding: 8px 14px; border-radius: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; transition: .18s;
}
.nav-tab:hover { background: #f0f5ed; color: var(--text); }
.nav-tab.active { background: linear-gradient(120deg, var(--primary), #6caf55); color: #fff; font-weight: 700; box-shadow: 0 3px 10px rgba(90,167,90,.35); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.main { flex: 1; padding: 22px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ============ 通用组件 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 11px; font-size: 14px; font-weight: 600;
  background: #eef3ec; color: var(--text); transition: transform .12s, box-shadow .15s, background .15s, filter .15s;
  border: 1px solid transparent;
}
.btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(120deg, var(--primary), #6caf55); color: #fff; box-shadow: 0 4px 12px rgba(90,167,90,.3); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(90,167,90,.4); }
.btn-accent { background: linear-gradient(120deg, var(--accent), #f5b954); color: #fff; box-shadow: 0 4px 12px rgba(240,164,58,.32); }
.btn-danger { background: linear-gradient(120deg, #ef7070, #e05d5d); color: #fff; box-shadow: 0 4px 12px rgba(224,93,93,.28); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f0f5ed; color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 1px solid rgba(255,255,255,.6); transition: box-shadow .2s;
}
.card + .card { margin-top: 16px; }
.card:hover { box-shadow: var(--shadow-hover); }
.card-title { font-size: 16px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title .right { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stat-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 20px;
  background: #f6f4ec; font-size: 13px; font-weight: 700;
}
.stat-pill.gold { background: #fdf3dc; color: #b27b16; }
.stat-pill.green { background: #e9f3e7; color: #3f7a3f; }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.tbl th { font-size: 12px; color: var(--muted); font-weight: 700; background: #f7faf6; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tr:hover td { background: #fafcfa; }
table.tbl td input, table.tbl td select { min-width: 80px; padding: 6px 8px; font-size: 13px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-red { background: #fdeaea; color: #c0392b; }
.badge-green { background: #e9f3e7; color: #3f7a3f; }
.badge-gray { background: #eef1ee; color: #7a8a7b; }

.points-pos { color: #c0392b; font-weight: 700; }  /* 加分用红色（涨） */
.points-neg { color: #27ae60; font-weight: 700; }  /* 扣分用绿色（跌） */

.muted { color: var(--muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.space-between { justify-content: space-between; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 20px;
  background: #eef3ec; font-size: 12px; cursor: pointer; border: 1px solid transparent; transition: .15s;
}
.chip:hover { background: #e3ede0; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(90,167,90,.3); }

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #ccd6cc; border-radius: 24px; transition: .25s; }
.switch .slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* Toast */
.toast-container { position: fixed; top: 74px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary); font-size: 14px; min-width: 200px; max-width: 340px;
  animation: slideIn .25s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.gold { border-left-color: var(--gold); }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(30,40,30,.45); backdrop-filter: blur(2px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); width: 580px; max-width: 100%; max-height: 90vh; overflow: auto; padding: 24px; animation: popIn .2s ease; }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 18px; margin-bottom: 16px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.form-row > * { flex: 1; }

/* ============ 排行榜 ============ */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  background: #fafcfa; border: 1px solid var(--line); transition: transform .12s, box-shadow .12s;
}
.rank-item:hover { transform: translateX(2px); box-shadow: var(--shadow); }
.rank-num { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: #eef3ec; }
/* 奖牌按「名次」上色，不按行位置 —— 并列第一的两位都要是金牌 */
.rank-item[data-rank="1"] { background: linear-gradient(120deg, #fff9e8, #fff3d1); border-color: #ffe6a8; }
.rank-item[data-rank="1"] .rank-num { background: #ffd700; color: #7a5200; box-shadow: 0 2px 8px rgba(255,215,0,.5); }
.rank-item[data-rank="2"] .rank-num { background: #d6d6d6; color: #555; }
.rank-item[data-rank="3"] .rank-num { background: #e8b98a; color: #7a4a20; }
.rank-name { font-weight: 600; flex: 1; }
.rank-score { font-weight: 800; font-size: 17px; }
.rank-score.pos { color: #c0392b; }
.rank-score.neg { color: #27ae60; }
.rank-score.zero { color: var(--muted); }
.rank-main { flex: 1; min-width: 0; }
.rank-ach { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rank-ach-chip {
  display: inline-flex; align-items: center; font-size: 11px; line-height: 1.6;
  padding: 1px 8px; border-radius: 999px; background: #f1f6ef;
  border: 1px solid var(--line); color: #3f5241; white-space: nowrap;
}
.rank-ach-none { font-size: 11px; color: var(--muted); }

/* ==================== 学生禁用（封禁） ==================== */
.ban-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ban-badge.on { background: #fdeaea; color: #c0392b; border: 1px solid #f3c4c4; }
.ban-badge.ok { background: #eef1ee; color: #7a8a7b; }
.ban-left { font-size: 12px; font-weight: 700; color: #c0392b; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* 卡片内的禁用提示条（商店/偷菜/抽奖页顶部） */
.ban-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fdeaea; border: 1px solid #f3c4c4; border-left: 5px solid #c0392b;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; color: #8e2b20;
}
.ban-banner-icon { font-size: 22px; line-height: 1.2; }
.ban-banner-sub { font-size: 12px; margin-top: 4px; color: #a3453a; font-variant-numeric: tabular-nums; }
.ban-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(24, 18, 14, .55); backdrop-filter: blur(2px);
}
.ban-overlay-inner {
  background: rgba(255, 255, 255, .96); border-radius: 18px;
  padding: 22px 34px; text-align: center; max-width: 86%;
  box-shadow: 0 14px 40px rgba(0,0,0,.35); border: 2px solid #f3c4c4;
}
.ban-overlay-icon { font-size: 44px; line-height: 1; }
.ban-overlay-title { font-size: 19px; font-weight: 800; color: #c0392b; margin-top: 8px; }
.ban-overlay-sub { font-size: 13px; color: #6b7a6c; margin-top: 4px; }
.ban-overlay-cd-label { font-size: 12px; color: var(--muted); margin-top: 14px; letter-spacing: 1px; }
.ban-overlay-cd {
  font-size: 30px; font-weight: 800; color: #c0392b; font-variant-numeric: tabular-nums;
  margin-top: 2px; letter-spacing: 1px;
}
.ban-overlay-reason { font-size: 13px; color: #8e2b20; margin-top: 10px; }
.ban-overlay-hint { font-size: 11px; color: var(--muted); margin-top: 12px; }

/* 设置页禁用管理 */
.ban-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; margin-bottom: 8px; border-radius: 12px;
  background: #fdf3f2; border: 1px dashed #f0c8c4;
}
.ban-row-main { flex: 1; min-width: 0; }
.ban-row-sub { font-size: 12px; color: #8e2b20; margin-top: 3px; }
.ban-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ban-pick-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-item.sp-banned { opacity: .75; border-color: #f0c8c4; background: #fdf3f2; }

/* ============ 积分趋势图（纯 SVG） ============ */
.trend-svg { width: 100%; height: auto; display: block; max-height: 200px; }
.trend-axis { stroke: var(--line); stroke-width: 1; }
.trend-bar-pos { fill: #5aa469; }
.trend-bar-neg { fill: #d97b6c; }
.trend-line { stroke: #4a7fd0; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-label { font-size: 11px; fill: var(--muted); }

/* ============ 操作日志类型标签 ============ */
.log-kind {
  display: inline-block; font-size: 11px; line-height: 1.6; padding: 1px 7px;
  border-radius: 999px; border: 1px solid var(--line); background: #f2f2f0; color: #4a4a46;
  white-space: nowrap;
}
.log-kind-score { background: #eef6ec; color: #3f6b3f; }
.log-kind-student { background: #eef2fa; color: #3f5480; }
.log-kind-achievement { background: #fdf3e3; color: #8a6320; }
.log-kind-data { background: #f4eefb; color: #5f4585; }
.log-kind-auth { background: #fbecec; color: #8a4141; }
.log-kind-settings, .log-kind-class { background: #eef5f7; color: #3c6a75; }
.sun { position: absolute; top: 14px; right: 34px; width: 46px; height: 46px; border-radius: 50%; background: #ffe08a; box-shadow: 0 0 34px #ffd76a; }
.cloud { position: absolute; font-size: 34px; opacity: .9; animation: cloudMove 30s linear infinite; }
@keyframes cloudMove { 0% { left: -60px; } 100% { left: 110%; } }
.pet-walker {
  position: absolute; top: 8px; left: -40px; font-size: 36px; z-index: 5;
  animation: petWalk 16s linear infinite; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2));
}
@keyframes petWalk { 0% { left: -40px; transform: scaleX(1); } 49% { transform: scaleX(1); } 50% { left: calc(100% + 40px); transform: scaleX(-1); } 99% { transform: scaleX(-1); } 100% { left: -40px; transform: scaleX(1); } }

.plots-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; max-width: 720px; margin: 0 auto; position: relative; z-index: 2; }
@media (max-width: 640px) { .plots-grid { grid-template-columns: repeat(3, 1fr); } }
.plot {
  aspect-ratio: 1; border-radius: 14px; position: relative; cursor: pointer;
  background: linear-gradient(180deg, var(--soil), var(--soil-dark));
  border: 3px solid #6d4a2c; box-shadow: inset 0 4px 10px rgba(0,0,0,.28), 0 3px 6px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center; transition: transform .15s, box-shadow .15s;
}
.plot:hover { transform: translateY(-4px); box-shadow: inset 0 4px 10px rgba(0,0,0,.28), 0 10px 18px rgba(0,0,0,.28); }
.plot .plant-emoji { font-size: 40px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.plot.growing .plant-emoji { animation: growBounce 2s ease infinite; font-size: 30px; }
@keyframes growBounce { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.08); } }
.plot.mature .plant-emoji { font-size: 46px; animation: readyGlow 1.2s ease infinite; }
@keyframes readyGlow { 0%,100% { filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); } 50% { filter: drop-shadow(0 0 14px #ffd76a); } }
.plot.shield::after { content: "🛡️"; position: absolute; top: -10px; right: -8px; font-size: 20px; z-index: 3; }
.plot .countdown {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: #fff; color: #333; font-size: 11px; font-weight: 700; padding: 2px 9px;
  border-radius: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.2); white-space: nowrap; z-index: 4;
}
.plot .countdown.mature { background: #ffd76a; color: #7a5200; }
.plot .progress { position: absolute; bottom: 4px; left: 10%; width: 80%; height: 6px; background: rgba(0,0,0,.3); border-radius: 6px; overflow: hidden; }
.plot .progress .fill { height: 100%; background: linear-gradient(90deg, #8fd46a, #5ec45e); border-radius: 6px; transition: width .5s; }
.plot .idx { position: absolute; bottom: 2px; right: 5px; font-size: 10px; color: rgba(255,255,255,.7); font-weight: 700; }

.rain { position: absolute; top: 0; left: 50%; font-size: 26px; z-index: 6; pointer-events: none; animation: rainDrop 1.2s ease forwards; }
@keyframes rainDrop { 0% { opacity: 1; transform: translateY(-10px); } 100% { opacity: 0; transform: translateY(60px); } }

.plot-menu { position: absolute; inset: 0; background: rgba(255,255,255,.97); border-radius: 12px; z-index: 10; padding: 8px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.plot-menu button { padding: 6px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.plot-menu button:hover { background: #eef3ec; }
.plot-menu button:disabled { opacity: .45; }

/* 商店/成就卡片 */
.shop-item { border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: flex; flex-direction: column; gap: 8px; background: #fafcfa; transition: .18s; }
.shop-item:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.shop-item .emoji { font-size: 42px; text-align: center; }
.shop-item .nm { font-weight: 700; text-align: center; }
.shop-item .desc { font-size: 12px; color: var(--muted); text-align: center; min-height: 32px; }
.shop-item .cost { text-align: center; font-size: 13px; font-weight: 700; color: #b27b16; }
.shop-item.locked { opacity: .72; filter: grayscale(.4); background: #f5f5f5; }
.shop-item.locked:hover { border-color: var(--line); box-shadow: none; transform: none; }

.ach-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 15px; text-align: center;
  background: linear-gradient(180deg, #fffdf5, #fff); position: relative; cursor: default; transition: .18s;
}
.ach-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.ach-card.locked { opacity: .5; filter: grayscale(.6); }
.ach-card .ach-emoji { font-size: 34px; }
.ach-card .ach-name { font-weight: 700; margin-top: 6px; font-size: 13px; }
.ach-tip {
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 12px;
  width: 200px; display: none; z-index: 30; text-align: left; line-height: 1.5;
}
.ach-card:hover .ach-tip { display: block; }
.ach-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #333; }

.notice-list { max-height: 360px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.notice-item { padding: 10px 14px; border-radius: 10px; background: #fafcfa; border-left: 4px solid var(--accent); font-size: 13px; }
.notice-time { font-size: 11px; color: var(--muted); margin-right: 8px; }

/* 标签页内联 */
.tabs-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-inline { padding: 7px 14px; border-radius: 20px; background: #eef3ec; font-size: 13px; font-weight: 600; color: var(--muted); }
.tab-inline.active { background: var(--primary); color: #fff; }

.section-hint { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* 经验条 */
.exp-bar { height: 12px; background: #eef1ee; border-radius: 10px; overflow: hidden; }
.exp-bar .fill { height: 100%; background: linear-gradient(90deg, #8fd46a, #4caf50); border-radius: 10px; transition: width .4s; }

.hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

/* 学生选择面板（积分选择用） */
.student-picker { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; max-height: 420px; overflow: auto; padding: 4px; }
.student-picker .sp-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; padding: 10px 4px; border-radius: 12px; background: #eef3ec; cursor: pointer;
  border: 2px solid transparent; transition: .15s; text-align: center;
}
.student-picker .sp-item .sp-num { font-size: 11px; color: var(--muted); font-weight: 600; line-height: 1.1; }
.student-picker .sp-item .sp-name { font-size: 16px; font-weight: 800; line-height: 1.2; word-break: break-all; }
.student-picker .sp-item .sp-points { font-size: 12px; font-weight: 700; color: #b27b16; line-height: 1.1; }
.student-picker .sp-item:hover { background: #e3ede0; transform: translateY(-1px); }
.student-picker .sp-item.active { background: var(--primary); border-color: var(--primary); box-shadow: 0 2px 8px rgba(90,167,90,.3); }
.student-picker .sp-item.active .sp-name { color: #fff; }
.student-picker .sp-item.active .sp-num { color: rgba(255,255,255,.85); }
.student-picker .sp-item.active .sp-points { color: #fff3c9; }

/* 班级端购买确认弹窗：学生姓名大字提示 */
.buy-name {
  font-size: 32px; font-weight: 800; color: var(--primary-dark);
  margin: 8px 0 6px; padding: 4px 18px; display: inline-block;
  background: #eef7ea; border-radius: 12px; border: 2px solid #cfe5c7;
}
.buy-detail { font-size: 16px; font-weight: 700; margin: 6px 0; }
.buy-total { font-size: 15px; color: #b27b16; font-weight: 700; margin-top: 10px; }
.buy-qty-hint { font-size: 13px; color: var(--muted); text-align: center; margin-top: 4px; }

/* 果实成熟实时提示横幅 */
.mature-banner {
  max-width: 1280px; width: 100%; margin: 12px auto 0; padding: 11px 16px;
  border-radius: 12px; font-size: 14px; font-weight: 700; text-align: center;
}
.mature-banner.has {
  background: linear-gradient(90deg, #fff4e0, #ffe0a3); color: #9a6b00;
  border: 1px solid #ffd27a; animation: bannerPulse 2s infinite;
}
.mature-banner.none { background: #eef3ec; color: #6b7c66; border: 1px solid #dbe5d8; }
@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 190, 80, .5); }
  50% { box-shadow: 0 0 0 7px rgba(255, 190, 80, 0); }
}

/* ============ 小组 ============ */
.group-select { min-width: 100px; width: auto; padding: 6px 8px; font-size: 13px; }
.group-list { display: flex; flex-direction: column; gap: 10px; }
.group-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fafcfa; transition: .15s;
}
.group-row:hover { border-color: #cfdcc9; box-shadow: var(--shadow); }
.group-name { font-weight: 700; }

/* ============ 班级端学生卡片选择器 ============ */
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.stu-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px 12px; border-radius: 14px; cursor: pointer; text-align: center;
  background: #fafcfa; border: 2px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.stu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #cfe0c9; }
.stu-card.active { border-color: var(--primary); background: linear-gradient(180deg, #eef7ea, #e2f0dc); box-shadow: 0 6px 16px rgba(90,167,90,.28); }
.stu-card .stu-avatar { font-size: 34px; line-height: 1; }
.stu-card .stu-name { font-weight: 700; font-size: 14px; }
.stu-card .stu-number { font-size: 11px; color: var(--muted); }
.stu-card .stu-ripe {
  position: absolute; top: 6px; right: 6px; font-size: 10px; font-weight: 700;
  background: #ff5d5d; color: #fff; padding: 2px 7px; border-radius: 20px;
  box-shadow: 0 2px 6px rgba(255,93,93,.4); animation: ripePulse 1.3s infinite;
}
/* 有果实成熟的学生卡片：金色描边 + 呼吸高亮 */
.stu-card.ripe {
  border-color: #ffb300;
  background: linear-gradient(180deg, #fff8e1, #ffefc2);
  animation: ripeCard 1.8s infinite;
}
.stu-card.ripe.active { border-color: #ff8a00; }
@keyframes ripeCard {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 179, 0, .45); }
  50% { box-shadow: 0 0 0 7px rgba(255, 179, 0, 0); }
}
@keyframes ripePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* 学生卡片成就悬浮提示（鼠标碰触学生姓名时显示） */
.stu-card .stu-ach-tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  width: 260px;
  max-height: 300px;
  overflow-y: auto;
  text-align: left;
  z-index: 80;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s, transform .18s, visibility .18s;
}
.stu-card:hover .stu-ach-tip {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.stu-card .stu-ach-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: #fff;
}
.stu-ach-head { font-weight: 800; font-size: 13px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.stu-ach-item { font-size: 12px; font-weight: 600; padding: 5px 0; border-bottom: 1px dashed #eef1ee; }
.stu-ach-item:last-child { border-bottom: none; }
.stu-ach-desc { font-size: 11px; color: var(--muted); font-weight: 400; }

/* ============ 大屏模式（一体机 / 投影展示） ============ */
.topbar-right .btn.active { background: var(--primary-soft); color: var(--primary-dark); }
body.big-screen { font-size: 17px; }
body.big-screen .main { max-width: 1600px; padding: 28px; }
body.big-screen .topbar { height: 74px; padding: 0 28px; }
body.big-screen .brand { font-size: 23px; }
body.big-screen .role-badge { font-size: 14px; padding: 6px 15px; }
body.big-screen .class-name { font-size: 15px; }
body.big-screen .nav-tab { font-size: 17px; padding: 11px 20px; }
body.big-screen .btn { font-size: 16px; padding: 12px 22px; border-radius: 13px; }
body.big-screen .btn-sm { font-size: 14px; padding: 8px 15px; }
body.big-screen .card { padding: 26px; border-radius: 20px; }
body.big-screen .card-title { font-size: 20px; }
body.big-screen .card-title .right { font-size: 14px; }
body.big-screen input, body.big-screen select, body.big-screen textarea { font-size: 16px; padding: 12px 14px; }
body.big-screen table.tbl th, body.big-screen table.tbl td { padding: 15px 16px; font-size: 15px; }
body.big-screen table.tbl th { font-size: 14px; }
body.big-screen .stat-pill { font-size: 16px; padding: 8px 18px; }
body.big-screen .mature-banner { font-size: 18px; padding: 15px 20px; }
body.big-screen .rank-item { padding: 15px 18px; border-radius: 14px; }
body.big-screen .rank-num { width: 42px; height: 42px; font-size: 18px; }
body.big-screen .rank-name { font-size: 17px; }
body.big-screen .rank-score { font-size: 22px; }
body.big-screen .rank-ach-chip { font-size: 13px; padding: 3px 11px; }
body.big-screen .rank-ach-none { font-size: 13px; }
body.big-screen .chip { font-size: 14px; padding: 7px 16px; }
body.big-screen .tab-inline { font-size: 15px; padding: 10px 20px; }
body.big-screen .plots-grid { max-width: 1000px; gap: 18px; }
body.big-screen .plot .plant-emoji { font-size: 56px; }
body.big-screen .plot.growing .plant-emoji { font-size: 42px; }
body.big-screen .plot.mature .plant-emoji { font-size: 64px; }
body.big-screen .plot .countdown { font-size: 13px; padding: 3px 12px; }
body.big-screen .stu-card { padding: 20px 12px 16px; border-radius: 16px; }
body.big-screen .stu-card .stu-avatar { font-size: 46px; }
body.big-screen .stu-card .stu-name { font-size: 17px; }
body.big-screen .stu-card .stu-number { font-size: 13px; }
body.big-screen .stu-card .stu-ripe { font-size: 12px; padding: 3px 9px; }
body.big-screen .shop-item .emoji { font-size: 56px; }
body.big-screen .shop-item .nm { font-size: 17px; }
body.big-screen .shop-item .desc { font-size: 14px; }
body.big-screen .shop-item .cost { font-size: 15px; }
body.big-screen .ach-card .ach-emoji { font-size: 46px; }
body.big-screen .ach-card .ach-name { font-size: 15px; }
body.big-screen .notice-item { font-size: 15px; }
body.big-screen .exp-bar { height: 15px; }
body.big-screen .group-row { padding: 13px 18px; }
body.big-screen .group-name { font-size: 16px; }
body.big-screen .ban-overlay-title { font-size: 24px; }
body.big-screen .ban-overlay-cd { font-size: 40px; }
body.big-screen .ban-overlay-cd-label { font-size: 15px; }
body.big-screen .ban-overlay-reason { font-size: 16px; }
body.big-screen .ban-overlay-hint { font-size: 13px; }
body.big-screen .ban-banner { font-size: 16px; }
body.big-screen .ban-banner-sub { font-size: 14px; }

/* ============ 积分操作/记录 左右分布（2:1） ============ */
.score-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
  align-items: start;
}
.score-layout > .card { overflow: hidden; }
.score-layout .score-col-record {
  max-height: 75vh;
  overflow: auto;
  position: sticky;
  top: 12px;
}
@media (max-width: 900px) {
  .score-layout { grid-template-columns: 1fr; }
  .score-layout .score-col-record { max-height: none; position: static; }
}

/* ============ 颁发成就 · 学生多选器 ============ */
.ga-picker {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  overflow: hidden;
}
.ga-picker-head {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.ga-picker-title { font-size: 13px; font-weight: 700; color: var(--text); }
.ga-count {
  display: inline-block; margin-left: 8px;
  background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700;
}
.ga-picker-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ga-picker-tools input {
  max-width: 200px; padding: 6px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--text); font-family: inherit;
}
.ga-picker-body {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 12px; max-height: 190px; overflow: auto;
}
.ga-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13px; color: var(--text); user-select: none;
  transition: background .15s, border-color .15s;
}
.ga-item:hover { border-color: var(--primary); }
.ga-item.on { background: var(--primary-soft); border-color: var(--primary); font-weight: 700; }
.ga-cb { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.ga-has {
  font-size: 11px; color: var(--muted); background: var(--bg-2);
  border-radius: 999px; padding: 1px 7px; font-weight: 400;
}
.ga-item.on .ga-has { color: var(--primary-dark); }
.ga-picker-tip { padding: 0 12px 10px; font-size: 12px; line-height: 1.6; }
body.big-screen .ga-item { font-size: 15px; padding: 8px 14px; }
body.big-screen .ga-picker-body { max-height: 260px; }
body.big-screen .ga-count { font-size: 14px; }
body.big-screen .ga-picker-tip { font-size: 13px; }
@media (max-width: 700px) {
  .ga-picker-tools { width: 100%; }
  .ga-picker-tools input { max-width: none; flex: 1; }
}

/* ==================== 精灵花园（garden/garden.js） ==================== */
/* 登录页改成纵向排布：登录卡在上，花园精灵角在下 */
.login-screen { flex-direction: column; }
.pet-showcase {
  position: absolute; inset: 0; z-index: 1;   /* 整个登录屏的大花园背景（卡片 z-index 2 盖在上面） */
  overflow: hidden;
  background: none; border: none; padding: 0; box-shadow: none; backdrop-filter: none;
}
.pshow-garden { position: absolute; inset: 0; }
.pshow-garden .gp-stage {
  width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto;
  border-radius: 0; margin: 0;
}
.pshow-cap {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3;
  background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.9);
  padding: 5px 16px; border-radius: 999px;
  text-align: center; font-size: 12.5px; color: #4a6b52; font-weight: 700;
  box-shadow: 0 4px 14px rgba(46,66,50,.14); white-space: nowrap; max-width: 92vw;
  overflow: hidden; text-overflow: ellipsis; margin: 0;
}
.pshow-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pshow-pet {
  position: relative; border: none; background: rgba(255,255,255,.9);
  border-radius: 14px; padding: 6px 8px 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pshow-pet:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 8px 18px rgba(48,70,47,.18); }
.pshow-img { display: block; }
.pshow-img .gp-img { width: 56px; height: 56px; object-fit: contain; display: block; }
.pshow-lv { display: block; text-align: center; font-size: 11px; color: #6b7a6e; padding: 2px 0 4px; }
.pshow-tip {
  position: fixed; z-index: 9999; background: #2c3a2e; color: #fff;
  padding: 7px 14px; border-radius: 10px; font-size: 13.5px; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.28); animation: pshowPop .18s ease;
}
@keyframes pshowPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 学生端花园页 */
.gp-hero { padding: 14px 18px; }
.gp-hero-stats { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; margin-bottom: 6px; }
.gp-hero-stats b { font-size: 17px; }
.gp-hero-hint { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.gp-wilds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.gp-wild {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg-2, #f6faf7); border: 1px dashed #bcd4c2;
  border-radius: 14px; padding: 10px;
}
.gp-wild.warn { border-color: #e0a14e; background: #fdf6ea; }
.gp-wild-img .gp-img { width: 64px; height: 64px; object-fit: contain; display: block; }
.gp-wild-body { flex: 1; min-width: 0; }
.gp-wild-btns { display: flex; flex-direction: column; gap: 4px; }
.gp-nm { font-weight: 700; font-size: 14.5px; }
.gp-stars { color: #e8a23c; font-size: 11px; letter-spacing: 1px; }
.gp-sub { font-size: 12px; color: #75857a; display: flex; align-items: center; gap: 4px; }
.gp-warn-txt { color: #c07a1f; font-weight: 600; }
.gp-rare { color: #B8860B; }
.gp-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.12); flex: none; }
.gp-dot.lock { opacity: .5; }
.gp-empty { font-size: 13px; color: #7d8d81; padding: 10px 2px; line-height: 1.7; }
.gp-balls { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.gp-ball { display: flex; gap: 10px; align-items: center; background: #f5f8fb; border: 1px solid #ccd8e4; border-radius: 14px; padding: 10px; }
.gp-ball-emoji { font-size: 30px; }
.gp-ball-body { flex: 1; }
.gp-pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.gp-pet { display: flex; gap: 10px; align-items: center; background: #f7fbf6; border: 1px solid #c4dcc8; border-radius: 14px; padding: 10px; }
.gp-pet.on-login { border-color: #d9b64a; background: #fdf8e7; box-shadow: 0 0 0 2px rgba(217,182,74,.25); }
.gp-pet-img { position: relative; }
.gp-pet-img .gp-img { width: 64px; height: 64px; object-fit: contain; display: block; }
.gp-login-badge { position: absolute; top: -6px; right: -10px; background: #d9b64a; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 8px; white-space: nowrap; }
.gp-lv { color: #3f8a48; font-size: 13px; }
.gp-catch { text-align: center; }
.gp-catch .gp-img { width: 120px; height: 120px; object-fit: contain; }
.gp-dex { max-height: 60vh; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.gp-dexrow { display: flex; gap: 8px; align-items: center; background: #f6faf7; border-radius: 10px; padding: 6px 8px; }
.gp-dexrow.miss { opacity: .55; }
.gp-deximg .gp-img { width: 44px; height: 44px; object-fit: contain; display: block; }
.gp-dexbody { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.gp-dots { display: flex; gap: 3px; margin-top: 4px; }
.gp-dexnum { font-size: 12px; color: #67806c; }
.gp-tag-evo { font-size: 10px; background: #e3ecf7; color: #3c6ea5; border-radius: 6px; padding: 1px 5px; }
.gp-dex-entry { padding: 4px 0; }

/* 教师端花园总览 */
.gp-tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.gp-tcard { background: #f8faf8; border: 1px solid #d2e0d5; border-radius: 14px; padding: 10px; }
.gp-tname { font-size: 14px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.gp-tpets { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; }
.gp-tpet { position: relative; display: inline-block; }
.gp-tpet .gp-img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 2px; display: block; }
.gp-tpet i { position: absolute; bottom: -2px; right: 0; font-style: normal; font-size: 9.5px; background: rgba(46,66,50,.82); color: #fff; border-radius: 6px; padding: 0 4px; }
.gp-tpet b { position: absolute; top: -4px; left: -2px; font-size: 11px; }
.gp-tsub { font-size: 11.5px; color: #6d7f72; margin-top: 6px; }
@media (max-width: 640px) {
  .gp-wilds, .gp-balls, .gp-pets, .gp-tgrid { grid-template-columns: 1fr; }
  .gp-hero-stats { gap: 10px; }
}

/* ===== 精灵花园 · 互动场景（scene.js） ===== */
#gp-scene-host { position: relative; }
.gp-stage {
  position: relative; width: 100%;
  aspect-ratio: 1080 / 690; min-height: 300px; max-height: 62vh;
  margin: 4px auto 0; border-radius: 14px; overflow: hidden;
  background: linear-gradient(#BFE3A8, #A5D685);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 6px 18px rgba(46,66,50,.10);
}
.gp-stage .gp-world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.gp-stage .gp-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gp-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
  font-size: 11.5px; color: #6d7f72; padding: 8px 2px 0;
}
/* 气泡（表情 / 演出提示） */
.bub {
  position: absolute; transform: translate(-50%, -100%);
  background: #fff; border: 1.5px solid #e2e6e4;
  border-radius: 12px; padding: 3px 9px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(20,20,25,.13);
}
.bub.emo { font-size: 21px; padding: 2px 8px; background: #fff; }
.bub.emo-pop { font-size: 26px; padding: 3px 10px; border-width: 2px; animation: gpEmoPop .3s cubic-bezier(.2,1.5,.4,1); }
@keyframes gpEmoPop {
  0%   { opacity: 0; transform: translate(-50%, -70%) scale(.4) rotate(-12deg); }
  60%  { opacity: 1; transform: translate(-50%, -104%) scale(1.12) rotate(4deg); }
  100% { opacity: 1; transform: translate(-50%, -100%) scale(1) rotate(0); }
}
.bub.float {
  background: rgba(255,255,255,.94); border-color: transparent; box-shadow: none;
  font-size: 14px; animation: gpFloatUp 1s ease-out forwards;
}
.bub.float::after { display: none; }
.bub.float.bad { color: #c2453c; font-weight: 700; }
@keyframes gpFloatUp { to { transform: translate(-50%, -160%); opacity: 0; } }
/* 水面波纹 */
.ripple { animation: gpRip 3.6s ease-in-out infinite; }
.ripple.rp0 { animation-delay: 0s; }
.ripple.rp1 { animation-delay: 1.2s; }
.ripple.rp2 { animation-delay: 2.4s; }
@keyframes gpRip { 0%,100% { opacity: .18; } 50% { opacity: .62; } }
/* 投球弹窗里的球按钮排 */
.gp-throwbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
/* 资料弹窗里的配色色板行 */
.gp-swatchrow { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.gp-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px #b8c4bd, 0 2px 6px rgba(0,0,0,.12);
  cursor: pointer; font-size: 13px; line-height: 26px; text-align: center;
  transition: transform .12s;
}
.gp-swatch:hover { transform: scale(1.12); }
.gp-swatch.cur { box-shadow: 0 0 0 3px #2f9e44; cursor: default; }
.gp-swatch.lock { background: #C7CBD1 !important; cursor: not-allowed; opacity: .8; }
/* 班级端只读花园页 */
.gp-ro-banner {
  background: #fff8e6; border: 1px solid #f0dfae; color: #7a5c14;
  border-radius: 10px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 10px;
}
.gp-stupick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.gp-stuchip {
  border: 1.5px solid #cfdcd2; background: #fff; border-radius: 18px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; transition: all .12s;
}
.gp-stuchip:hover { border-color: #2f9e44; }
.gp-stuchip.on { background: #2f9e44; border-color: #2f9e44; color: #fff; }
.gp-stuchip .gp-sub { opacity: .75; font-size: 11.5px; margin-left: 2px; }
@media (max-width: 640px) {
  .gp-stage { min-height: 240px; }
  .gp-legend { flex-direction: column; gap: 2px; }
}


/* ==================== 同班精灵交换（学生端） ==================== */
.gp-ex-empty { text-align:center; padding: 10px 0 6px; }
.gp-ex-empty .btn { margin-top: 10px; }
.gp-ex-tip { font-size: 12.5px; color: #6d7f72; max-width: 640px; margin: 0 auto; line-height: 1.7; }
.gp-expanel { border: 1px solid #dce8da; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; background: #fbfdf9; }
.gp-exhead { display:flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 8px; }
.gp-exhead b { font-size: 15px; }
.gp-exstate { font-size: 12.5px; color: #4a6b52; }
.gp-exbar { display:flex; align-items:center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gp-exstep { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: #edf2ea; color: #8b9a8e; font-weight: 700; }
.gp-exstep.now { background: #fff3cd; color: #9a7b1f; }
.gp-exstep.ok { background: #d9f0dd; color: #2b7a3d; }
.gp-exarrow { color: #a9b8ac; font-style: normal; font-weight: 700; }
.gp-excols { display:flex; align-items: stretch; gap: 10px; }
.gp-excol { flex: 1; min-width: 0; }
.gp-excolt { font-size: 12px; font-weight: 700; color: #57705c; margin-bottom: 6px; }
.gp-expet { border: 1px solid #dce8da; border-radius: 12px; background: #fff; padding: 8px 10px 10px; text-align: center; }
.gp-expet .gp-img { width: 74px; height: 74px; object-fit: contain; }
.gp-expet b { display: block; font-size: 13.5px; margin-top: 2px; }
.gp-expet i { display: block; font-style: normal; font-size: 11.5px; color: #6d7f72; margin-top: 2px; }
.gp-exwait { display: block; font-style: normal; font-size: 12.5px; color: #9aa89d; padding: 22px 0; }
.gp-exside { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #57705c; font-weight: 700; margin-bottom: 4px; }
.gp-exflag { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: #edf2ea; color: #8b9a8e; font-weight: 700; }
.gp-exflag.ok { background: #d9f0dd; color: #2b7a3d; }
.gp-exact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: center; }
.gp-exact .btn { font-size: 12.5px; padding: 5px 10px; }
.gp-ex-waiting { font-size: 12.5px; color: #9a7b1f; background: #fff3cd; border-radius: 999px; padding: 5px 12px; }
.gp-exswap { display:flex; align-items:center; font-size: 22px; color: #b8860b; font-weight: 800; }
.gp-exnote { font-size: 11px; color: #b06a2c; margin-top: 6px; text-align: center; }
.gp-exmates { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 6px 0 2px; }
.gp-exmate { border: 1px solid #cfe3cc; background: #fff; border-radius: 12px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; transition: all .15s ease; }
.gp-exmate:hover:not(:disabled) { background: #eaf6e6; border-color: #74b877; }
.gp-exmate:disabled { color: #9aa89d; background: #f0f2ef; cursor: not-allowed; }
.gp-exoffers { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.gp-exoffer { position: relative; border: 1px solid #dce8da; background: #fff; border-radius: 12px; padding: 8px 6px 10px; text-align: center; cursor: pointer; transition: all .15s ease; }
.gp-exoffer:hover:not(:disabled) { border-color: #74b877; background: #f2faf0; }
.gp-exoffer .gp-img { width: 62px; height: 62px; object-fit: contain; }
.gp-exoffer b { display: block; font-size: 12.5px; }
.gp-exoffer i { display: block; font-style: normal; font-size: 10.5px; color: #6d7f72; margin-top: 2px; line-height: 1.5; }
.gp-exoffer.busy { opacity: .55; cursor: not-allowed; }
.gp-exoffer em { display: block; font-size: 10.5px; color: #b06a2c; font-style: normal; margin-top: 2px; }
.gp-exmate.exblock { background: #f6f1ec; border-color: #e3d7c8; color: #a8968a; }
.gp-exoffer.exblock { opacity: .5; filter: grayscale(.55); }
.gp-exoffer.exblock em { color: #a6702c; }
.gp-exconfirm { max-width: 340px; margin: 4px auto 8px; }
.gp-exconfirm-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px dashed #dce8da; font-size: 13.5px; }
.gp-exconfirm-row span { color: #6d7f72; }
@media (max-width: 560px) {
  .gp-excols { flex-direction: column; }
  .gp-exswap { justify-content: center; }
}

/* ============================================================
   2026-09-19 · 登录页大花园（缩放 / 拖动）
   ============================================================ */
.pshow-ctl {
  position: absolute; right: 18px; bottom: 18px; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .86); box-shadow: 0 6px 18px rgba(30, 60, 40, .18);
  backdrop-filter: blur(4px);
}
.pshow-zbtn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid #cfe0d2;
  background: #fff; color: #3f5c46; font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.pshow-zbtn:hover { background: #eef7ee; }
.pshow-zoom { width: 130px; accent-color: #6aa9ff; }
.pshow-tipcap {
  position: absolute; left: 0; right: 0; bottom: 6px; z-index: 4;
  text-align: center; font-size: 11.5px; color: #4a6b52;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .9); pointer-events: none;
}
.gp-stage.gp-dragging { cursor: grabbing; }
.gp-stage.gp-dragging .gp-world { user-select: none; }

/* ============================================================
   我的精灵 · 详细信息列表
   ============================================================ */
.gp-empty { padding: 18px; text-align: center; color: #7b8a7f; font-size: 13px; }
.gp-petlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 10px; }
.gp-petcard {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px; border: 1px solid #e2ece4; border-radius: 12px; background: #fff;
  cursor: pointer; transition: .15s; width: 100%;
}
.gp-petcard:hover { border-color: #9ecfa8; box-shadow: 0 4px 14px rgba(48, 70, 47, .12); transform: translateY(-2px); }
.gp-petcard.balled { background: #f4f6f8; opacity: .82; }
.gp-petimg { position: relative; flex: 0 0 62px; height: 62px; display: block; }
.gp-petimg .gp-img { width: 62px; height: 62px; object-fit: contain; display: block; }
.gp-ballmark, .gp-upmark {
  position: absolute; right: -2px; bottom: -2px; font-style: normal; font-size: 13px;
  background: #fff; border-radius: 50%; padding: 1px; box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.gp-upmark { right: auto; left: -2px; bottom: auto; top: -2px; font-size: 11px; }
.gp-petinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gp-petinfo b { font-size: 14px; color: #2f4a36; display: flex; align-items: center; gap: 6px; }
.gp-lv { font-style: normal; font-size: 11px; color: #fff; background: #6aa9ff; border-radius: 8px; padding: 1px 6px; }
.gp-petinfo > i { font-style: normal; font-size: 12px; color: #5d6f63; }
.gp-petsub { font-style: normal; font-size: 11px; color: #8b9a90; }
.gp-pettags { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.gp-tag {
  font-weight: 500; font-size: 10.5px; padding: 2px 7px; border-radius: 8px;
  background: #eef1f4; color: #77868a; white-space: nowrap;
}
.gp-tag.on { background: #fff4d6; color: #a97a12; }

/* ============================================================
   许愿池
   ============================================================ */
.gp-wish-now { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.gp-wish-img { flex: 0 0 62px; height: 62px; display: block; }
.gp-wish-img .gp-img { width: 62px; height: 62px; object-fit: contain; display: block; }
.gp-wishpick { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.gp-wishpick label { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5d6f63; }
.gp-sel { padding: 7px 8px; border: 1px solid #d7e3da; border-radius: 8px; background: #fff; font-size: 13px; }
.gp-wishprev { border-top: 1px dashed #e2ece4; padding-top: 8px; }
.gp-wishrow {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed #e6eee8;
}
.gp-wish-body { flex: 1; min-width: 0; font-size: 13px; color: #2f4a36; }
.gp-wish-btns { display: flex; gap: 6px; }

/* ============================================================
   进化道具
   ============================================================ */
.gp-stones { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.gp-stone {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid #eadfbe; border-radius: 10px; background: #fffdf5;
}
.gp-stone-info { flex: 1; font-size: 13px; color: #4a3f22; }
.gp-stone-info .gp-sub { font-size: 11.5px; color: #8a7c55; }

/* 宠物资料里的信息表 */
.gp-petmeta {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px;
  margin: 10px 0; padding: 10px; background: #f6faf7; border-radius: 10px;
}
.gp-petmeta > div { display: flex; justify-content: space-between; font-size: 12px; color: #5d6f63; }
.gp-petmeta .wide { grid-column: 1 / -1; }
.gp-petmeta b { color: #2f4a36; font-weight: 600; }

/* 教师端设置里的小标题 / 杂项 */
.gp-set-sec { font-size: 13px; font-weight: 700; color: #2f4a36; margin: 4px 0 6px; }
.gp-hero-btns { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gp-tbtns { margin-top: 6px; display: flex; gap: 6px; }
.gp-ul { margin: 8px 0 8px 20px; font-size: 13px; color: #4a5c50; line-height: 1.9; }

@media (max-width: 560px) {
  .pshow-ctl { right: 10px; bottom: 10px; padding: 6px 8px; }
  .pshow-zoom { width: 92px; }
  .gp-petlist { grid-template-columns: 1fr; }
  .gp-petmeta { grid-template-columns: 1fr; }
}

/* 没有等级铭牌了，表情气泡统一挂在精灵正上方、也不带小尾巴 */
/* ===== 进化演出（全屏剧场：交替剪影 → 白光爆闪 → 新形态登场） ===== */
.gp-evo { position: fixed; inset: 0; z-index: 1500; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: gpEvoIn .45s ease both; user-select: none; }
.gp-evo.closing { animation: gpEvoOut .26s ease both; }
.gp-evo-bg { position: absolute; inset: 0;
  background: radial-gradient(130% 95% at 50% 62%, #33509a 0%, #16204a 42%, #05070f 100%); }
.gp-evo-rays { position: absolute; left: 50%; top: 52%; width: 240vmax; height: 240vmax;
  transform: translate(-50%, -50%); opacity: .45;
  background: conic-gradient(from 0deg, rgba(255,255,255,.20) 0 5deg, transparent 5deg 20deg);
  animation: gpEvoSpin 11s linear infinite; }
.gp-evo-ring { position: absolute; left: 50%; top: 52%; width: 300px; height: 300px; margin: -150px 0 0 -150px;
  border-radius: 50%; border: 3px solid rgba(255,255,255,.55);
  box-shadow: 0 0 60px rgba(130,190,255,.5), inset 0 0 60px rgba(130,190,255,.32);
  animation: gpEvoRing 1.5s ease-in-out infinite; }
.gp-evo-ring.r2 { width: 430px; height: 430px; margin: -215px 0 0 -215px;
  border-color: rgba(255,255,255,.26); animation-duration: 2.3s; animation-direction: reverse; }
.gp-evo-stage { position: relative; display: flex; align-items: center; justify-content: center; width: 320px; height: 320px; }
.gp-evo-glow { position: absolute; width: 250px; height: 250px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(150,215,255,.35) 55%, transparent 72%);
  animation: gpEvoGlow .85s ease-in-out infinite; }
.gp-evo-slot { position: relative; width: 250px; height: 250px;
  display: flex; align-items: flex-end; justify-content: center;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.5)); }
.gp-evo-slot > * { max-width: 100%; max-height: 100%; }
.gp-evo-img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.gp-evo-shake { animation: gpEvoShake .13s linear; }
.gp-evo-reveal { animation: gpEvoReveal .75s cubic-bezier(.2,1.5,.4,1) both; }
.gp-evo-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.gp-evo-flash.on { animation: gpEvoFlash .17s ease-out; }
.gp-evo.finished .gp-evo-flash { animation: gpEvoBurst .55s ease-out; }
.gp-evo-cap { position: relative; margin-top: 16px; color: #fff; font-size: 17px; font-weight: 700;
  text-align: center; padding: 0 18px; text-shadow: 0 2px 12px rgba(0,0,0,.65); }
.gp-evo-cap b { color: #ffe27a; }
.gp-evo-skip { position: absolute; right: 18px; bottom: 18px; z-index: 2;
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; }
.gp-evo-skip:hover { background: rgba(255,255,255,.28); }
.gp-evo-ok { position: relative; margin-top: 18px; }
.gp-evo-conf { position: absolute; top: -8%; font-size: 22px; font-style: normal;
  animation: gpEvoFall 1.7s linear forwards; pointer-events: none; }
@keyframes gpEvoIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gpEvoOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes gpEvoSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes gpEvoRing {
  0%, 100% { transform: scale(.88); opacity: .35; }
  50%      { transform: scale(1.07); opacity: .85; }
}
@keyframes gpEvoGlow {
  0%, 100% { transform: scale(.9); opacity: .55; }
  50%      { transform: scale(1.12); opacity: 1; }
}
@keyframes gpEvoShake {
  0%   { transform: translateX(-2px) scale(1); filter: brightness(1.9); }
  50%  { transform: translateX(2px) scale(1.03); filter: brightness(2.4); }
  100% { transform: translateX(0) scale(1); filter: brightness(1); }
}
@keyframes gpEvoReveal {
  0%   { opacity: .2; transform: scale(.35); filter: brightness(3); }
  55%  { opacity: 1; transform: scale(1.14); filter: brightness(1.25); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}
@keyframes gpEvoFlash { from { opacity: .5; } to { opacity: 0; } }
@keyframes gpEvoBurst { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
@keyframes gpEvoFall {
  from { transform: translateY(-30px) rotate(0deg); opacity: 1; }
  to   { transform: translateY(340px) rotate(220deg); opacity: 0; }
}

/* ===== 图鉴详情（点已收集的精灵 → 看样子 / 试配色） ===== */
.gp-dexrow.got { cursor: pointer; }
.gp-dexrow.got:hover { background: #eef7f0; box-shadow: inset 0 0 0 1.5px #bfe0c6; }
.gp-dexrow.miss { cursor: default; }
.gp-dexpet-art { width: 170px; height: 170px; margin: 2px auto 6px;
  display: flex; align-items: flex-end; justify-content: center; }
.gp-dexpet-art > * { max-width: 100%; max-height: 100%; }
.gp-dexpet-art .gp-img { width: 100%; height: 100%; object-fit: contain; }
.gp-dexpet-name { font-size: 17px; font-weight: 700; color: #2f4a36; text-align: center; }
.gp-dexpet-sub { font-size: 12px; color: #6d7f72; text-align: center; margin-bottom: 8px; }
.gp-dexhint { font-size: 11.5px; color: #6d7f72; text-align: center; margin-top: 8px; }
.gp-swatch.preview { box-shadow: 0 0 0 1.5px #b8c4bd, 0 2px 6px rgba(0,0,0,.12); }
.gp-swatch.peek { box-shadow: 0 0 0 3px #7fa8d8; }
.gp-swatch.unowned { filter: grayscale(.55); opacity: .92; }
.gp-swatch.unowned::after { content: ''; }

/* 叫声开关按钮（花园页标题右侧 / 登录页左下角） */
.gp-crybtn { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
  padding: 3px 11px; font-size: 12px; font-weight: 600; line-height: 1.5; border-radius: 999px;
  cursor: pointer; vertical-align: middle; border: 1px solid #bfe0c6; background: #eef7f0; color: #2f7a3f; }
.gp-crybtn:hover { background: #e2f1e6; }
.gp-crybtn.off { background: #f1f3f2; border-color: #d7dbd9; color: #8b9490; }
.gp-cryfab { position: absolute; left: 16px; bottom: 16px; z-index: 6;
  background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(0,0,0,.14); margin-left: 0; }

/* ===== 宠物出游 / 寄存箱（2026-09-19） ===== */
.gp-outing-now { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 4px 0 2px; }
.gp-outing-emoji { font-size: 44px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.12)); animation: gpOutingBob 1.8s ease-in-out infinite; }
@keyframes gpOutingBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
.gp-outing-items { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.gp-outing-item { background: #f3f8f2; border: 1px solid #dfe9dd; border-radius: 999px; padding: 5px 13px; font-size: 13px; }
.gp-outing-item .gp-sub { margin-left: 4px; }
.gp-petcard.static { cursor: default; }

/* ===== 精灵对战赛（2026-09-21） ===== */

/* 花园上方的滚动公告条：比赛信息一直滚动播出 */
.bt-ticker { display: flex; align-items: center; gap: 10px; overflow: hidden;
  background: linear-gradient(90deg, #fff6e2 0%, #fffdf7 60%, #fff6e2 100%);
  border: 1px solid #f0d9a6; border-radius: 999px; padding: 5px 14px; margin: 0 0 10px;
  box-shadow: 0 2px 8px rgba(190, 150, 60, .10); }
.bt-tick-tag { flex: none; font-weight: 700; color: #b3821f; font-size: 13px; }
.bt-tick-view { flex: 1; overflow: hidden; }
.bt-tick-run { display: inline-flex; gap: 48px; white-space: nowrap;
  animation: btRoll 24s linear infinite; will-change: transform; }
.bt-ticker:hover .bt-tick-run { animation-play-state: paused; }
.bt-tick-item { font-size: 13px; color: #6b5a2f; }
@keyframes btRoll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 比赛准备栏 */
.bt-block { border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fbfdfa; padding: 10px 12px; margin-bottom: 8px; }
.bt-block-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.bt-when { font-size: 12px; color: #6d7f72; }
.bt-left { font-size: 12px; font-weight: 700; color: #c0702a;
  background: #fff3e0; border-radius: 999px; padding: 1px 9px; }
.bt-block-sub { font-size: 12px; color: #6d7f72; margin: 2px 0 6px; }
.bt-sent { display: flex; align-items: center; gap: 14px; }
.bt-sent-t { font-weight: 700; font-size: 14px; color: #2f7a3f; margin-bottom: 2px; }
.bt-ball { flex: none; filter: drop-shadow(0 3px 5px rgba(0,0,0,.16)); }
.bt-unsent { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bt-last { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.bt-last-h { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.bt-last-me { font-size: 13px; color: #4a5a4c; margin-bottom: 6px; }

/* 属性徽章 */
.tp-tag { display: inline-block; padding: 1px 8px; margin: 1px 3px 1px 0; border-radius: 999px;
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  text-shadow: 0 1px 1px rgba(0,0,0,.28); white-space: nowrap; }
.bt-tags { margin: 2px 0; }

/* 选精灵出战 */
.bt-picklist { max-height: 52vh; overflow: auto; }
.bt-pick { display: flex; align-items: center; gap: 10px; padding: 7px 8px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 7px; background: #fff; }
.bt-pick:hover { background: #f4f9f2; border-color: #cfe3c8; }
.bt-pick-img { flex: none; width: 58px; text-align: center; }
.bt-pick-img .gp-img { width: 52px; height: 52px; }
.bt-pick-b { flex: 1; min-width: 0; }
.bt-confirm { display: flex; align-items: center; gap: 14px; }

/* 属性克制表 18 × 18 */
.bt-chart-wrap { max-height: 54vh; overflow: auto; }
.bt-chart { border-collapse: collapse; font-size: 11px; background: #fff; }
.bt-chart th, .bt-chart td { border: 1px solid #e6ece4; text-align: center; }
.bt-th { background: #f2f6f1; color: #fff; font-weight: 600; padding: 3px 5px;
  position: sticky; z-index: 2; white-space: nowrap; }
.bt-thc { top: 0; } .bt-thr { left: 0; z-index: 3; }
.bt-td { width: 32px; height: 23px; color: #a8b4a9; background: #fff; }
.bt-td.x2 { background: #ffe0e0; color: #c0392b; font-weight: 700; }
.bt-td.xh { background: #e4f1e0; color: #4a7a45; font-weight: 600; }
.bt-td.x0 { background: #eee; color: #90999a; }

/* 排名表 */
.bt-res-wrap { max-height: 54vh; overflow: auto; }
.bt-res { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; }
.bt-res th, .bt-res td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: middle; }
.bt-res th { background: #f2f6f1; font-size: 12px; }
.bt-res tr.bt-me { background: #fff8e6; }
.bt-rk { font-weight: 700; white-space: nowrap; }
.bt-rpet .gp-img { width: 34px; height: 34px; vertical-align: middle; margin-right: 4px; }
.bt-rpet { white-space: nowrap; }
.bt-prize { font-size: 12px; color: #6d7f72; }
.bt-v { display: inline-block; font-size: 11px; padding: 0 6px; margin: 1px 3px 1px 0;
  border-radius: 999px; background: #f2f4f2; color: #7a8a7c; }
.bt-v-win { background: #ffe3e3; color: #c0392b; }
.bt-v-draw { background: #eef1ee; color: #7a8a7c; }
.bt-v-lose { background: #e6efe4; color: #4a7a45; }

/* 教师端管理 */
.bt-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bt-history { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.bt-history .btn { padding: 3px 10px; font-size: 12.5px; }
.bt-input { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px; background: #fff; color: var(--text); font-family: inherit; }
#bt-new-title { min-width: 180px; }
.bt-mcard { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px;
  margin-bottom: 8px; background: #fbfdfa; }
.bt-mh { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.bt-st { font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; }
.bt-st.open { background: #fff3e0; color: #c0702a; }
.bt-st.done { background: #eef1ee; color: #7a8a7c; }
.bt-mbtns { display: flex; gap: 8px; margin-top: 7px; }
.bt-entries { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0; }
.bt-entry { display: inline-flex; align-items: center; gap: 4px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px 2px 2px; font-size: 12px; }
.bt-entry .gp-img { width: 30px; height: 30px; }
.bt-entry i { font-style: normal; color: #4a5a4c; }

/* 对战赛 · 名次奖励设置 */
.bt-prize-set { margin: 6px 0 10px; }
.bt-prize-set > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #4a5a4c; }
.bt-prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px; margin-top: 6px; }
.bt-prize-row { display: flex; align-items: center; gap: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; }
.bt-prize-row > span { flex: none; width: 78px; font-size: 12px; font-weight: 700; }
.bt-prize-row > div { display: flex; align-items: center; gap: 4px; }
.bt-prize-row label { font-size: 11px; color: #6d7f72; }
.bt-prize-row input { width: 64px; padding: 3px 6px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 12px; font-family: inherit; background: #fff; color: var(--text); }

/* ========================================
   属性徽章（对战赛 / 图鉴 / 精灵详情通用 · 2026-09-21）
   ======================================== */
.gp-typeline { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin: 4px 0 2px; }
.gp-typehint { font-size: 11.5px; color: #6b7a70; text-align: center; margin: 2px 6px 4px; line-height: 1.6; }
.gp-pettypes { display: flex; gap: 4px; flex-wrap: wrap; }
.gp-pettypes .tp-tag, .gp-dexbody .tp-tag { font-size: 9.5px; padding: 0 5px; border-radius: 6px; }
.gp-metatypes { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.gp-metatypes .tp-tag { font-size: 10.5px; padding: 1px 7px; }

/* ========================================
   小组赛对战表（行=自己 / 列=对手 · 2026-09-21）
   ======================================== */
.bt-h4 { font-size: 13px; font-weight: 600; margin: 12px 0 6px; color: #2f4a36; }
.bt-mx-wrap { max-height: 52vh; overflow: auto; }
.bt-mx { border-collapse: collapse; font-size: 12px; background: #fff; }
.bt-mx th, .bt-mx td { border: 1px solid var(--line); text-align: center; padding: 3px 4px; }
.bt-mx .gp-img { width: 30px; height: 30px; vertical-align: middle; }
.bt-mx-corner { background: #f2f6f1; font-size: 10.5px; color: #7a8a7c; white-space: nowrap; font-weight: 400; }
.bt-mx-corner span { display: block; }
.bt-mx-th, .bt-mx-row { background: #f2f6f1; font-size: 11px; font-weight: 500; white-space: nowrap; color: #3c5443; }
.bt-mx-th span, .bt-mx-row span { display: block; }
.bt-mx-th.me, .bt-mx tr.bt-me .bt-mx-row { background: #fff2d6; }
.bt-mx tr.bt-me { background: #fffdf5; }
.bt-mx-row { text-align: left; }
.bt-mx-cell { width: 32px; height: 32px; font-size: 16px; font-weight: 700; line-height: 1; }
.bt-mx-win { background: #ffe3e3; color: #c0392b; }
.bt-mx-draw { background: #eef1ee; color: #7a8a7c; }
.bt-mx-lose { background: #e6efe4; color: #4a7a45; }
.bt-mx-self { background: #f7f8f7; color: #c3ccc4; }
.bt-mx-sum, .bt-mx-total { background: #f7faf6; font-weight: 700; white-space: nowrap; }
.bt-mx-legend { font-size: 12px; color: #6d7f72; margin: 6px 0 0; line-height: 24px; }
.bt-mx-legend > span { display: inline-block; min-width: 22px; height: 21px; line-height: 21px;
  text-align: center; border-radius: 5px; font-weight: 700; }

/* 对战表：学生名 + 精灵名（v6） */
.bt-mx-nm { display: block; }
.bt-mx-sp { display: block; font-size: 10px; font-weight: 400; color: #7a8a7c; line-height: 1.3; margin-top: 1px; }
.bt-mx-th .gp-img { width: 24px; height: 24px; }
.bt-mx-row { min-width: 76px; }
.bt-mx-th { min-width: 60px; }
.bt-vsp { opacity: .72; font-size: 11px; }

/* 教师四项需求 v7 */
.gp-wish-stat { font-size: 11.5px; color: #6d7f72; margin-top: 2px; }
.gp-wish-stat b { color: #3c5443; }
/* 选参赛精灵时：这一只现在住在寄存箱里（花园 + 寄存箱都能直接派出去） */
.bt-pick-from { font-size: 11.5px; color: #5a7a4a; background: #eef7ea; border: 1px solid #cfe3c8;
  border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.bt-pick-off { opacity: .5; filter: grayscale(1); cursor: not-allowed; }
.bt-pick-cool { font-size: 11.5px; color: #a2703a; background: #fdf1de; border: 1px solid #f0dcbb;
  border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.log-undone { color: #b0603c; font-size: 12px; }

/* 团体赛 + 放生确认（v8） */
.bt-team { display: flex; gap: 10px; flex-wrap: wrap; }
.bt-slot { flex: 1 1 120px; min-width: 110px; border: 1px dashed #cfd9c9; border-radius: 10px;
  padding: 8px 6px; text-align: center; background: #fbfdf9; }
.bt-slot-done { border-style: solid; border-color: #bcd3bd; background: #f2f8f0; }
.bt-slot-h { font-size: 12px; font-weight: 700; color: #4a6b4f; margin-bottom: 4px; }
.bt-slot-done-t { font-size: 12px; color: #3c5443; margin-top: 2px; }
.bt-slotpet { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.6; white-space: nowrap; }
.bt-slotpet.empty { color: #98a89b; }
.bt-slot-score { color: #3c5443; }
.bt-slotno { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: 50%; background: #4a6b4f; color: #fff; font-size: 10px; font-weight: 700; }
.bt-slotno-empty { background: #d8e0d6; color: #8b9a8d; }
.bt-entry-team { gap: 3px; }
.bt-st.team { background: #e8f2ff; color: #2b5d8c; border-color: #c7ddf5; }
.bt-st.solo { background: #fdf1de; color: #8a5a1b; border-color: #f0dcbb; }
.bt-v-mid { background: #eef3ee; color: #4a6b4f; border: 1px solid #d8e2d6; }

/* ===== 登录页「最近一场战况」面板（比赛一结算自动上榜，教师端可关） ===== */
.lb-recap {
  position: absolute; z-index: 3; right: 26px; top: 50%; transform: translateY(-50%);
  width: 436px; max-width: 40vw; max-height: 88vh; overflow: auto;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.75); border-radius: 20px;
  padding: 16px 16px 12px; box-shadow: var(--shadow-lg);
}
.lb-recap.hidden { display: none; }
.lb-head { display: flex; align-items: center; gap: 8px; }
.lb-head .lb-ico { font-size: 18px; }
.lb-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: #3f5c3d; }
.lb-meta { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.lb-podium { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.lb-p { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 12px; background: #f4f7f2; }
.lb-p1 { background: #fff6dc; }
.lb-p2 { background: #eef1f5; }
.lb-p3 { background: #fbeeda; }
.lb-mr { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.lb-mr b { font-size: 19px; }
.lb-mr i { font-style: normal; font-size: 10px; color: var(--muted); }
.lb-mr .lb-tie { font-size: 10px; color: #b09a6a; background: rgba(255,255,255,.6); border-radius: 6px; padding: 1px 5px; }
.lb-avw { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 10px; }
.lb-avw .gp-img { width: 34px; height: 34px; }
.lb-ravw { width: 28px; height: 28px; }
.lb-ravw .gp-img { width: 24px; height: 24px; }
.lb-pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.lb-pinfo b { font-size: 14px; }
.lb-pinfo i { font-size: 11px; color: var(--muted); font-style: normal; }
.lb-pt { text-align: right; display: flex; flex-direction: column; line-height: 1.2; flex: none; }
.lb-pt b { font-size: 17px; color: #e07a5f; }
.lb-pt i { font-size: 10px; color: var(--muted); font-style: normal; }
.lb-pmore { font-size: 11px; color: var(--muted); padding: 0 10px 4px; }
.lb-sub { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.lb-mxwrap { overflow: auto; border-radius: 10px; border: 1px solid rgba(0,0,0,.07); }
.lb-mx { border-collapse: separate; border-spacing: 0; font-size: 11px; background: #fff; width: 100%; }
.lb-mx th, .lb-mx td { border-right: 1px solid rgba(0,0,0,.07); border-bottom: 1px solid rgba(0,0,0,.07);
  padding: 2px 3px; text-align: center; }
/* 左上 corner 格：横竖都固定，压在最上层 */
.lb-mx-cor { position: sticky; left: 0; top: 0; z-index: 6; background: #f7f9f6;
  box-shadow: 1px 0 0 rgba(0,0,0,.09), 0 1px 0 rgba(0,0,0,.09); }
/* 列头（上面一排参赛人员）竖着滚也钉住；行头（左边一列参赛人员）横着拖也钉住 */
.lb-mx-hd, .lb-mx-row { background: #f7f9f6; min-width: 54px; max-width: 64px; }
.lb-mx-hd { position: sticky; top: 0; z-index: 4; box-shadow: 0 1px 0 rgba(0,0,0,.09); }
.lb-mx-row { position: sticky; left: 0; z-index: 4; box-shadow: 1px 0 0 rgba(0,0,0,.09); }
.lb-mx-hd .lb-mx-s, .lb-mx-row .lb-mx-s { display: block; font-weight: 700; font-size: 11px; color: #2f4858;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-mx-hd .bt-mx-sp, .lb-mx-row .bt-mx-sp { display: block; font-size: 9px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-mx-c { width: 22px; height: 22px; font-size: 12px; }
.lb-mx-c.w { background: #eaf6e6; color: #2e7d32; font-weight: 700; }
.lb-mx-c.d { background: #fbf6e4; color: #a0771a; }
.lb-mx-c.l { background: #fdeaea; color: #b23b3b; }
.lb-mx-self { background: #f2f2f2; color: #bbb; }
.lb-mx-tot { background: #f7f9f6; font-weight: 800; color: #3f5c3d; width: 30px;
  position: sticky; right: 0; z-index: 3; box-shadow: -1px 0 0 rgba(0,0,0,.09); }
thead .lb-mx-tot { z-index: 6; top: 0; }
.lb-foot { margin-top: 10px; }
.lb-more { width: 100%; background: #3f8a48; color: #fff; border: 0; border-radius: 10px;
  padding: 8px 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.lb-more:hover { background: #357740; }
.lb-tip { font-size: 10px; color: #9aa79a; margin: 8px 0 0; text-align: center; }
.lb-rank { list-style: none; margin: 14px 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.lb-rank li { display: flex; align-items: center; gap: 8px; background: #f6f8f4; border-radius: 10px;
  padding: 6px 9px; font-size: 13px; }
.lb-rank li.lb-r1 { background: #fff6dc; }
.lb-rank li.lb-r2 { background: #eef1f5; }
.lb-rank li.lb-r3 { background: #fbeeda; }
.lb-rk { font-size: 11px; color: var(--muted); width: 44px; flex: none; }
.lb-rank b { font-weight: 700; }
.lb-rank i { font-style: normal; font-size: 11px; color: var(--muted); }
.lb-rs { margin-left: auto; font-weight: 800; color: #e07a5f; font-size: 12px; }
/* ===== 最大化弹窗（完整战况）：几乎占满屏幕 + 右上角 ✕ ===== */
.modal-wide { position: relative; width: min(96vw, 1500px); max-width: 96vw;
  height: calc(100vh - 44px); max-height: calc(100vh - 44px);
  padding: 20px 22px 18px; display: flex; flex-direction: column; overflow: hidden; }
.modal-wide h3 { flex: none; margin-bottom: 10px; padding-right: 46px; }
.modal-wide .modal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.modal-wide .modal-actions { flex: none; margin-top: 12px; }
.modal-x { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.13); background: #fff; color: #6b7b6b; font-size: 15px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 20; }
.modal-x:hover { background: #f1f5ee; color: #33402f; }
/* 左矩阵 + 右名次，各滚各的 */
.lb-full { flex: 1; min-height: 0; display: flex; gap: 16px; }
.lb-full-mx { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.lb-full-mx .lb-mxwrap { flex: 1; min-height: 0; }
.lb-full-rk { flex: 0 0 300px; max-width: 340px; min-height: 0; overflow: auto; }
.lb-full-rk .lb-rank { margin: 0; grid-template-columns: 1fr; }
/* 第 4 名及以后：不挂金银铜牌，只写数字名次 */
.lb-pn { background: #f4f7f2; }
.lb-mr .lb-num { font-size: 14px; font-weight: 800; color: #7b8a7b; background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.08); border-radius: 8px; padding: 1px 6px; }
@media (max-width: 900px) { .lb-full { flex-direction: column; overflow: auto; }
  .lb-full-rk { flex: none; max-width: none; overflow: visible; } }
@media (max-width: 1180px) { .lb-recap { display: none; } }


/* ============================================================
   精灵任务（2026-09-22）：谁来做（三种方式）+ 学生在花园里限时找精灵
   ============================================================ */
.qz-card { border-left: 4px solid #7CB342; }
.qz-card .qz-sub-hd { font-size: 13px; color: #7a8a76; margin: 2px 0 6px; }
.qz-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.qz-row > .qz-lb { width: 76px; flex: 0 0 76px; font-size: 13px; color: #5b6b57; font-weight: 600; }
.qz-sel, .qz-inp { padding: 4px 8px; border: 1px solid #d5dfd0; border-radius: 8px; background: #fff; font-size: 13px; }
.qz-n { width: 72px; }
.qz-tip { font-size: 12px; color: #8a9a86; }
.qz-rd { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: #4b5c47; }
.qz-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.qz-chip { display: inline-flex; align-items: center; gap: 3px; background: #f3f7f0; border: 1px solid #dfe8d9; border-radius: 999px; padding: 2px 8px 2px 4px; font-size: 12px; }
.qz-chip b { cursor: pointer; color: #b0483f; font-weight: 700; margin-left: 2px; }
.qz-sp { width: 26px; height: 26px; vertical-align: -8px; image-rendering: pixelated; }
.qz-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.qz-table th, .qz-table td { border: 1px solid #e6ece2; padding: 4px 6px; text-align: left; }
.qz-table th { background: #f6f9f4; }
.qz-my .qz-line { font-size: 13px; color: #4b5c47; margin: 4px 0; }
.qz-my .qz-line b { color: #3a6b2f; }
.qz-my .qz-act { margin-top: 8px; display: flex; align-items: center; gap: 8px; }

/* 游戏层 */
.qz-root, #qz-root { position: fixed; inset: 0; z-index: 3000; }
.qz-mask { position: absolute; inset: 0; background: rgba(20, 30, 18, .55); }
.qz-stage { position: absolute; inset: 22px; background: #eaf3e4; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
/* ⚠️ 麻将牌（.qz-tile）自带 z-index，会压过没设 z-index 的顶栏和「开始」遮罩 ——
   学生会看到一副牌盖住「开始！」按钮，点牌又因为还没开始而没反应（看起来就是「玩不了」）。
   所以 UI 层必须显式抬到牌上面。现在的分工是——
     牌一律落在 10~50（层数放开到 12 层也不会超过 50，见 quest.js 的 tileZ）
     暂存槽 / 顶栏 60    开始遮罩 80    结算浮层 90
   ⚠️ 任何时候都不要给牌设 50 以上的 z-index。 */
.qz-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #dfecd6; border-bottom: 1px solid #cfe0c6; position: relative; z-index: 60; }
.qz-need { font-size: 13px; color: #3a4a36; }
.qz-needchip { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid #cfe0c6; border-radius: 999px; padding: 1px 8px; margin: 0 3px; font-size: 12px; }
.qz-right { display: flex; align-items: center; gap: 10px; }
.qz-timer { font-size: 22px; font-weight: 800; color: #2f4a28; font-variant-numeric: tabular-nums; }
.qz-timer.warn { color: #d2382c; }
.qz-timer small { font-size: 12px; font-weight: 500; margin-left: 2px; }
.qz-lives { font-size: 13px; color: #5b6b57; }
.qz-x, .qz-x2 { border: none; background: #fff; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; font-size: 15px; }
.qz-x2 { border-radius: 999px; width: auto; padding: 4px 16px; margin-top: 8px; }
.qz-garden { position: relative; flex: 1; min-height: 0; }
.qz-basket { display: flex; gap: 8px; justify-content: center; padding: 8px; background: #f4f8f1; border-top: 2px dashed #c3d6b8; }
.qz-slot { min-width: 78px; height: 56px; border: 2px dashed #b9cfae; border-radius: 12px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: #9aa894; }
.qz-slot.over { border-color: #7CB342; background: #f0f8ea; }
.qz-slot.on { border-style: solid; border-color: #7CB342; color: #3a6b2f; font-weight: 700; }
.qz-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255, 255, 255, .82); z-index: 80; }
.qz-tipbig { background: #fff; border: 1px solid #dbe6d4; border-radius: 12px; padding: 6px 14px; font-size: 13px; color: #5b6b57; }
/* 开局说明里那行小字——教孩子怎么一眼看出「这座塔有几层、谁压着谁」 */
.qz-tipdim { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #dbe6d4; font-size: 12px; color: #7b8b76; line-height: 1.5; }
.qz-go { border: none; background: #7CB342; color: #fff; font-weight: 800; font-size: 17px; padding: 10px 26px; border-radius: 999px; cursor: pointer; }
.qz-ghost { position: fixed; width: 52px; height: 52px; pointer-events: none; transform: translate(-50%, -50%); z-index: 3100; image-rendering: pixelated; }
.qz-petdone { filter: grayscale(1) brightness(1.4); opacity: .45; }
.qz-petshake { animation: qzshake .35s; }
@keyframes qzshake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.qz-result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20, 30, 18, .5); z-index: 90; }
.qz-rbox { background: #fff; border-radius: 18px; padding: 22px 26px; text-align: center; min-width: 260px; max-width: 90%; }
.qz-ok { font-size: 19px; font-weight: 800; color: #3a6b2f; }
.qz-no { font-size: 17px; font-weight: 700; color: #b0483f; }
.qz-lines { margin: 10px 0 4px; font-size: 14px; line-height: 1.9; }
.qz-pick { flex: 1; min-width: 260px; }
.qz-pick-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.qz-pick-list { max-height: 168px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid #dbe6d4; border-radius: 10px; background: #fbfdf8; }
.qz-pick-item { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border: 1px solid #e2ead9; border-radius: 999px; background: #fff; font-size: 13px; cursor: pointer; }
.qz-pick-item.on { border-color: #7CB342; background: #f0f8ea; color: #3a6b2f; font-weight: 700; }
.qz-pick-item input { margin: 0; }
.qz-pick-item small { color: #93a48e; font-weight: 400; }
/* ===== NPC 机器人学生（班级端只看农田与花园） ===== */
.ban-badge.npc { background: #eef4ff; color: #3560a8; border: 1px solid #cddcf5; }
.npc-card { border-color: #cddcf5; background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%); }
.npc-card .card-title { color: #3560a8; }

/* ===== 学生端「班级端操作权限」开关 ===== */
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pv-item {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px;
  border: 1px solid #e2ead9; border-radius: 10px; background: #fbfdf8; cursor: pointer;
}
.pv-item:hover { border-color: #7CB342; }
.pv-top { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.pv-top input { margin: 0; width: 16px; height: 16px; }
.pv-desc { font-size: 11.5px; color: #8b9a8c; line-height: 1.5; }

/* ===== 教师端许愿：已同意 / 已驳回留痕 ===== */
.gp-wish-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.gp-wish-tag.ok { background: #eaf6ea; color: #2e7d4f; border: 1px solid #bfe3c6; }
.gp-wish-tag.no { background: #f6efef; color: #a5544c; border: 1px solid #e8cdc9; }
.gp-wishrow-done { opacity: .72; background: #fbfbf9; }
.gp-wishrow-done:hover { opacity: 1; }

/* 🌟 许愿正好是某位同学「缺的第 8 套配色」 */
.gp-wishrow-hit { background: #fffaf0; border-left: 3px solid #f0a441; padding-left: 8px; }
.gp-wishrow-hit:hover { background: #fff6e6; }
.gp-wish-hit { margin-top: 4px; font-size: 11.5px; line-height: 1.5; font-weight: 600; color: #98550d;
  background: #fff3df; border: 1px solid #f3d7ab; border-radius: 8px; padding: 4px 8px; }
.gp-wish-hot { margin: 6px 0 2px; font-size: 12px; line-height: 1.6; color: #8a4b0d;
  background: #fff6e6; border: 1px dashed #f0bd6b; border-radius: 10px; padding: 6px 10px; }

/* 成就馆 · 单人模式说明条（NPC 自娱自乐） */
.dh-alone { margin: 6px 0 8px; font-size: 12px; line-height: 1.7; color: #5d6b57;
  background: #f3f8ef; border: 1px dashed #c3d6b8; border-radius: 10px; padding: 6px 10px; }


/* 游戏内「要找的精灵」参照板（花园右侧大图） */
.qz-mid { display: flex; flex: 1; min-height: 0; }
.qz-side { flex: none; width: 116px; background: #f4f8f1; border-left: 2px dashed #c3d6b8; padding: 8px 6px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.qz-side-t { font-size: 12px; font-weight: 800; color: #3a6b2f; text-align: center; }
.qz-side-tip { font-size: 11px; color: #8a9a84; text-align: center; margin-top: auto; }
.qz-refs { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.qz-refs-row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.qz-ref { position: relative; width: 92px; background: #fff; border: 2px solid #cfe0c6; border-radius: 12px; padding: 4px 2px 5px; text-align: center; }
.qz-refimg { width: 100%; height: 62px; object-fit: contain; image-rendering: pixelated; display: block; }
.qz-refnm { font-size: 12px; color: #3a4a36; margin-top: 2px; line-height: 1.2; }
.qz-refck { display: none; position: absolute; top: 1px; right: 4px; font-size: 14px; font-weight: 800; color: #7CB342; }
.qz-ref.got { border-color: #7CB342; background: #f0f8ea; }
.qz-ref.got .qz-refimg { opacity: .35; filter: grayscale(1); }
.qz-ref.got .qz-refnm { color: #7a8a74; }
.qz-ref.got .qz-refck { display: block; }
.qz-sp40 { width: 40px; height: 40px; vertical-align: -12px; }
/* 「猜猜我是谁」的轮廓：同一张官方立绘压成纯黑剪影（不给学生看颜色和名字） */
.sil { filter: brightness(0) saturate(0); opacity: .82; }
.qz-ref.got .sil { filter: none; opacity: .35; }
.qz-refnm.who { color: #8a9a84; letter-spacing: 2px; }
@media (max-width: 720px) {
  .qz-mid { flex-direction: column; }
  .qz-side { width: auto; border-left: none; border-top: 2px dashed #c3d6b8; max-height: 104px; }
  .qz-refs { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

/* 记忆翻牌：牌背朝下，翻开两张一样的就消掉 */
.qz-board { display: grid; gap: 8px; width: 100%; max-width: 640px; margin: 0 auto; padding: 6px; align-content: center; }
.qz-cell { position: relative; aspect-ratio: 1 / 1; min-height: 52px; border-radius: 12px; overflow: hidden; cursor: pointer; background: #3f8a63; border: 2px solid rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; transition: transform .12s, border-color .12s; }
.qz-cell:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .6); }
.qz-cell .qz-cface { font-size: 26px; font-weight: 800; color: rgba(255, 255, 255, .9); }
.qz-cell .qz-cimg { display: none; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; background: #fff; padding: 5px; }
.qz-cell.open { border-color: #fff; }
.qz-cell.open .qz-cface { display: none; }
.qz-cell.open .qz-cimg { display: block; }
.qz-cell.got { opacity: .48; cursor: default; border-color: #9be0ae; }
.qz-cell.got:hover { transform: none; }
.qz-cell.got .qz-cimg { background: #eef8f0; }
.qz-cell.bad { border-color: #ff9a9a; animation: qzshake .38s; }
@keyframes qzCellFlip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.qz-cell.open .qz-cimg { animation: qzCellFlip .18s ease-out; }
/* 连连看：棋盘更大（最多 10 × 14），格子随容器缩，连线画在上面那层 svg 里 */
.qz-boardwrap { position: relative; width: 100%; max-width: 860px; height: min(64vh, 640px); margin: 0 auto; }
.qz-board-link { max-width: none; height: 100%; gap: 6px; grid-auto-rows: minmax(0, 1fr); }
.qz-board-link .qz-cell { aspect-ratio: auto; min-height: 0; height: 100%; }
.qz-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.qz-linkline { fill: none; stroke: #ffd54f; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; opacity: .95; }
.qz-cell.show { cursor: pointer; }
.qz-cell.show .qz-cface { display: none; }
.qz-cell.show .qz-cimg { display: block; }
.qz-cell.sel { border-color: #ffd54f; box-shadow: 0 0 0 3px rgba(255, 213, 79, .45); transform: translateY(-2px); }
.qz-cell.gone { opacity: 0; transform: scale(.5); pointer-events: none; }
@media (max-width: 720px) {
  .qz-boardwrap { height: min(52vh, 460px); }
  .qz-board-link { gap: 4px; }
}

/* ---- 💥 精灵消消乐 ---- */
.qz-stage-match .qz-mid { position: relative; }
.qz-board-match { max-width: 470px; gap: 6px; align-content: center; }
.qz-board-match .qz-mcell { aspect-ratio: 1 / 1; min-height: 0; border-radius: 14px; touch-action: none; }
.qz-board-match .qz-mcell .qz-cimg { background: #fffdf3; }
.qz-mcell.sel { border-color: #ffd54f; box-shadow: 0 0 0 4px rgba(255, 213, 79, .5); transform: translateY(-2px); }
/* 特殊精灵（光炮 / 同色星 / 爆破弹）右下角挂个徽章，点一下就炸 */
.qz-bomb { position: absolute; right: 2px; bottom: 1px; font-size: 15px; line-height: 1; padding: 1px 3px;
  border-radius: 6px; background: rgba(255, 152, 0, .94); color: #fff; font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35); pointer-events: none; }
.qz-combo { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); font-size: 32px;
  font-weight: 900; color: #ff7043; text-shadow: 0 2px 0 #fff, 0 0 16px rgba(255, 112, 67, .55);
  opacity: 0; pointer-events: none; white-space: nowrap; }
.qz-combo.on { animation: qzcombo .9s ease-out; }
@keyframes qzcombo {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}
/* 掉下来的格子带一个小动画，孩子才看得懂「上面压下来了」 */
.qz-mcell.qz-drop { animation: qzdrop .22s ease-out; }
@keyframes qzdrop { from { transform: translateY(-26px); opacity: .35; } to { transform: none; opacity: 1; } }
@media (max-width: 720px) {
  .qz-board-match { max-width: 96vw; gap: 4px; }
  .qz-combo { font-size: 26px; }
}

/* 拖动换位：按住的那只跟着手指走，邻居给它让位；浏览器自带的「拖图片」必须掐掉 */
.qz-board-match .qz-mcell, .qz-board-match .qz-mcell * { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.qz-board-match .qz-mcell .qz-cimg { pointer-events: none; }
.qz-board-match .qz-mcell.qz-ondrag { transition: none; border-color: #ffca28; box-shadow: 0 10px 20px rgba(0, 0, 0, .28); cursor: grabbing; }

/* ---- 🗼 精灵叠叠消 / 🐑 精了个灵：一副麻将牌，上面压着的抽不出来 ---- */
.qz-stage-tower .qz-mid { position: relative; padding: 6px 10px; }
.qz-board-tower { position: relative; display: block; width: 100%; max-width: 680px;
  height: 100%; min-height: 300px; margin: 0 auto; overflow: hidden; }
/* 一块麻将牌：左上有牌面高光、右下有厚度，四角只留一点点圆 ——
   牌与牌是**紧挨着**码的（不留缝），靠边框 + 厚度 + 落在下面的影子分出层次。
   ⚠️ 层数怎么看出来（孩子得能一眼数出这座塔有几层）：每一层给一组「颜值变量」，
   越往上（data-z 越大）牌面越亮、右下越厚、**投在下面那层牌上的影子越重**；
   最底下那层最暗，像被整座塔压在下面。要调就改下面这几组变量，别去动 background。 */
.qz-tile { position: absolute; left: 0; top: 0; width: 56px; height: 56px; cursor: pointer;
  /* 默认值（= 中间那层的样子）；每个 data-z 会整组覆盖 */
  --f1: #fffdf7; --f2: #fbf5e6; --f3: #efe2c0;      /* 牌面渐变：左上 → 右下 */
  --bd: #a89365;                                     /* 描边 */
  --edge: #ddcda4; --thick: 3px;                     /* 右下的「厚度」：越上层越厚 */
  --sx: 1px; --sy: 2px; --sb: 4px; --sa: .22;        /* 落在下一层牌上的影子 */
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  box-sizing: border-box; padding: 2px 1px 3px; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--bd);
  background: linear-gradient(157deg, var(--f1) 0%, var(--f2) 55%, var(--f3) 100%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .92),
              inset calc(-1 * var(--thick)) calc(-1 * var(--thick)) 0 var(--edge),
              var(--sx) var(--sy) var(--sb) rgba(74, 52, 16, var(--sa));
  transition: filter .12s, opacity .18s, transform .12s, background .12s;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
/* 第 1 层（最底下）→ 第 6 层：一层比一层亮、厚，影子也一层比一层重 */
.qz-tile[data-z="0"]  { --f1: #f2e7cf; --f2: #e9dbb8; --f3: #dbcba0; --bd: #8f7b48; --edge: #b09b6d; --thick: 2px; --sx: 0px; --sy: 1px; --sb: 2px;  --sa: .20; }
.qz-tile[data-z="1"]  { --f1: #f6ecda; --f2: #eee0c6; --f3: #e2d3ab; --bd: #917d4b; --edge: #b59f70; --thick: 2px; --sx: 0px; --sy: 1px; --sb: 3px;  --sa: .22; }
.qz-tile[data-z="2"]  { --f1: #fbf3e4; --f2: #f4e8d3; --f3: #e9dcb6; --bd: #998551; --edge: #bda878; --thick: 3px; --sx: 1px; --sy: 2px; --sb: 4px;  --sa: .24; }
.qz-tile[data-z="3"]  { --f1: #fdf8e8; --f2: #f7efda; --f3: #ecdfbd; --bd: #9d8757; --edge: #c3af80; --thick: 3px; --sx: 1px; --sy: 2px; --sb: 4px;  --sa: .26; }
.qz-tile[data-z="4"]  { --f1: #fffcf4; --f2: #fbf4e2; --f3: #f2e7c6; --bd: #a48d5c; --edge: #cbb788; --thick: 4px; --sx: 1px; --sy: 2px; --sb: 5px;  --sa: .28; }
.qz-tile[data-z="5"]  { --f1: #fffefb; --f2: #fff9e7; --f3: #f7eecf; --bd: #a89365; --edge: #d3c090; --thick: 4px; --sx: 2px; --sy: 3px; --sb: 6px;  --sa: .30; }
.qz-tile[data-z="6"]  { --f1: #ffffff; --f2: #fffbf0; --f3: #faf3d8; --bd: #ae9968; --edge: #dbc598; --thick: 5px; --sx: 3px; --sy: 4px; --sb: 7px;  --sa: .32; }
.qz-tile[data-z="7"]  { --f1: #ffffff; --f2: #fffdf4; --f3: #fdf6df; --bd: #b09a6b; --edge: #e0cfa2; --thick: 5px; --sx: 3px; --sy: 4px; --sb: 8px;  --sa: .32; }
.qz-tile[data-z="8"]  { --f1: #ffffff; --f2: #fffef9; --f3: #fffae8; --bd: #b6a070; --edge: #e5d5a9; --thick: 6px; --sx: 4px; --sy: 5px; --sb: 9px;  --sa: .34; }
.qz-tile[data-z="9"]  { --f1: #ffffff; --f2: #fffefe; --f3: #fffbec; --bd: #b8a276; --edge: #e8d9af; --thick: 6px; --sx: 4px; --sy: 6px; --sb: 10px; --sa: .34; }
.qz-tile[data-z="10"] { --f1: #ffffff; --f2: #ffffff; --f3: #fffdf5; --bd: #bcaa7a; --edge: #ebe0b4; --thick: 7px; --sx: 5px; --sy: 6px; --sb: 11px; --sa: .35; }
.qz-tile[data-z="11"] { --f1: #ffffff; --f2: #ffffff; --f3: #fffdf2; --bd: #bfa97c; --edge: #eee1bc; --thick: 7px; --sx: 5px; --sy: 7px; --sb: 12px; --sa: .36; }
.qz-tile .qz-sp { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain;
  image-rendering: pixelated; pointer-events: none; }
.qz-tile .qz-tnm { flex: 0 0 auto; max-width: 100%; font-size: 11px; line-height: 1.15;
  font-weight: 800; color: #7a6440; text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
/* 能点的那张亮一点（不位移，免得紧排的牌一 hover 就露出缝） */
.qz-tile:hover { filter: brightness(1.07); }
/* 被上面压着的：压暗一层，孩子一眼看得出「这只现在抽不出来」
   ⚠️ 别压太狠 —— 压过头就把「第几层」的明暗差别也抹平了，又变成数不清层数 */
.qz-tile.lock { filter: brightness(.82) saturate(.72); cursor: not-allowed; }
.qz-tile.lock:hover { filter: brightness(.82) saturate(.72); }
/* 划过一只被压住的牌（手机上直接点它）→ 压在它身上的那几只框红闪一闪，
   这是让孩子看懂「谁压着谁」最直接的一招 */
/* ⚠️ 这里绝对不许加 z-index！
   以前是 z-index:55 !important，本意是让「压着它的那几只」别被盖住。
   但层数一多，55 就既压过上层的牌、又把好几层压成同一级（同级比 DOM 顺序），
   结果 12 层的塔里 z=1 的牌会盖住 z=4 的牌 —— 玩家一点「表面那只」，消失的却是下面那层。
   命中顺序必须永远等于真实层序，所以标红只改样子，不动层。 */
.qz-tile.blk { border-color: #ff5252;
  box-shadow: 0 0 0 3px #ff5252, 0 0 14px 4px rgba(255, 82, 82, .5);
  animation: qzblk .45s ease-in-out 3; }
@keyframes qzblk { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.14); } }
/* 选中的那张：整个牌面染成金黄 + 粗内框，醒目又不挤到邻居 */
.qz-tile.sel { border-color: #ef8f00;
  background: linear-gradient(157deg, #fffdf2 0%, #ffeeb8 58%, #ffd977 100%);
  box-shadow: inset 0 0 0 3px #ffc107,
              inset 1px 1px 0 rgba(255, 255, 255, .92),
              inset -3px -3px 0 #e8b44e;
  filter: brightness(1.08); }
.qz-tile.gone { opacity: 0; transform: scale(.55); pointer-events: none; }
.qz-tile.bad { border-color: #e57373; animation: qzshake .38s; }
/* 下面的暂存槽（精了个灵）：凑够 3 只一样的就消掉 */
.qz-tray { display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 8px 8px 12px; flex-wrap: wrap; position: relative; z-index: 60;
  background: linear-gradient(#e8dcc0, #ddcea9); border-top: 2px solid #c4ad7c; }
.qz-tslot { width: 54px; height: 54px; border-radius: 10px; border: 2px dashed #b3a074;
  box-sizing: border-box; background: rgba(255, 255, 255, .45); display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.qz-tslot.on { border-style: solid; border-color: #8cc47a;
  background: linear-gradient(157deg, #fffdf7, #f0e4c4);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .95), inset -3px -3px 0 #dccca2, 2px 3px 0 #a89468; }
.qz-tslot .qz-sp { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
@media (max-width: 720px) {
  .qz-board-tower { max-width: 98vw; min-height: 240px; }
  .qz-tslot { width: 44px; height: 44px; }
}
/* ---- 🏛 精灵图鉴成就馆 ---- */
.dh-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.dh-tab { padding: 5px 12px; border-radius: 999px; border: 1px solid #d6e3cd; background: #fff; color: #4a6b46; font-size: 13px; cursor: pointer; }
.dh-tab.on { background: #5c9e4a; color: #fff; border-color: #5c9e4a; }
.dh-tip { font-size: 12px; color: #6b7f63; background: #f4f9f0; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.65; }
.dh-empty { font-size: 12.5px; color: #8b9a84; padding: 14px 10px; text-align: center; line-height: 1.8; }
.dh-more { margin-top: 10px; text-align: center; }
/* 初级：每只精灵一张卡 */
.dh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.dh-pcard { border: 1px solid #e3eddd; border-radius: 12px; padding: 8px 6px; text-align: center; background: #fffdf7; }
.dh-pcard.done { border-color: #ffd54f; background: #fffbe9; }
.dh-pic { line-height: 0; }
.dh-pic .dh-img { width: 52px; height: 52px; object-fit: contain; }
.dh-pname { font-size: 12.5px; font-weight: 700; color: #35503a; margin-top: 3px; word-break: break-all; }
.dh-pname small { display: block; font-weight: 400; color: #9aa89a; font-size: 10.5px; }
.dh-strip { display: flex; gap: 2px; justify-content: center; margin: 4px 0; }
.dh-sw { width: 8px; height: 8px; border-radius: 2px; background: #e3e8df; }
.dh-sw.on { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.dh-prog { font-size: 11.5px; color: #7d8f74; }
.dh-board { margin-top: 4px; }
.dh-rank { font-size: 11.5px; color: #35503a; display: flex; justify-content: space-between; gap: 4px; align-items: baseline; }
.dh-rank b { font-weight: 700; }
.dh-at { color: #9aa89a; font-size: 10.5px; }
.dh-none { font-size: 11.5px; color: #a9b6a3; padding: 2px 0; }
/* 中级 / 高级：属性卡 */
.dh-tlist { display: flex; flex-direction: column; gap: 8px; }
.dh-tcard { border: 1px solid #e3eddd; border-radius: 12px; background: #fffdf7; overflow: hidden; }
.dh-thead { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.dh-tbadge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.dh-tbadge.big { padding: 6px 14px; font-size: 14px; }
.dh-tbadge i { font-style: normal; }
.dh-tmeta { flex: 1; min-width: 0; }
.dh-fold { font-size: 11.5px; color: #7d8f74; white-space: nowrap; }
.dh-sps { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; padding: 8px 10px; border-top: 1px dashed #e3eddd; }
.dh-sp { text-align: center; font-size: 11px; color: #35503a; line-height: 1.3; }
.dh-sp .dh-img { width: 44px; height: 44px; object-fit: contain; }
.dh-sp.miss .dh-img { filter: grayscale(1); opacity: .32; }
.dh-sp.miss span { color: #b0bba9; }
/* 高级：一只精灵竖切 8 份（从上到下 = 8 套配色） */
.dh-slices-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; padding: 8px 10px; border-top: 1px dashed #e3eddd; }
.dh-sp8 { text-align: center; font-size: 11px; color: #35503a; line-height: 1.3; }
.dh-sp8 i { display: block; font-style: normal; font-size: 10.5px; color: #9aa89a; }
.dh-slices { position: relative; width: 52px; height: 64px; margin: 0 auto 2px; }
.dh-sl { position: absolute; left: 0; width: 100%; height: 12.5%; overflow: hidden; filter: grayscale(1); opacity: .28; }
.dh-sl.on { filter: none; opacity: 1; }
.dh-sl > span { position: absolute; left: 0; top: 0; width: 100%; height: 64px; display: block; }
.dh-simg { width: 52px; height: 64px; object-fit: contain; }
.dh-tcard.all .dh-thead { cursor: default; }
/* ⚠️ 配色预警（教师端） */
.dh-stus { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.dh-stu { padding: 6px 12px; border-radius: 10px; border: 1px solid #d6e3cd; background: #fff; color: #35503a; font-size: 13px; cursor: pointer; }
.dh-stu.warn { border-color: #e8642c; background: #fff3ec; color: #c0392b; font-weight: 700; }
.dh-stu.warn i { font-style: normal; margin-left: 4px; background: #e8642c; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }
.dh-stu.on { box-shadow: 0 0 0 3px rgba(255, 213, 79, .45); }
.dh-detail { border-top: 1px dashed #dfe8d9; padding-top: 8px; }
.dh-dname { font-weight: 700; color: #35503a; margin-bottom: 6px; }
.dh-drow { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.dh-ditem { border: 1px solid #e3eddd; border-radius: 10px; padding: 6px; text-align: center; background: #fffdf7; }
.dh-wish { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fff8e1; border: 1px solid #ffe082; color: #8d6e00; font-size: 12.5px; }
.dh-hitall { margin-top: 8px; font-size: 12px; color: #8d6e00; }
@media (max-width: 720px) {
  .dh-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .dh-sps { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .dh-slices-wrap { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
}

/* 📢 今日任务公告（班级端 / 学生端：谁还有任务没做完） */
.qz-notice { border-left:4px solid #f0a020; background:linear-gradient(180deg,#fff8e8,#fffdf7); }
.qz-nlist { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 2px; }
.qz-nm { display:inline-flex; align-items:center; gap:6px; padding:4px 9px; border-radius:999px;
  background:#fff; border:1px solid #f0d9a8; font-size:13px; line-height:1.5; }
.qz-nm i { font-style:normal; color:#a06a10; font-size:11.5px; }
.qz-nm.me { background:#ffe9b8; border-color:#e8a33c; box-shadow:0 1px 4px #e8a33c55; }
.qz-nm.me b { color:#8a4b00; }

/* 花园页分区标签（三端共用） */
.gp-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.gp-tab { padding:6px 13px; border-radius:999px; border:1px solid #dcdcdc; background:#fff;
  cursor:pointer; font-size:13px; color:#555; transition:all .15s; }
.gp-tab:hover { border-color:#8ac65f; color:#3f7a1f; }
.gp-tab.on { background:linear-gradient(180deg,#8ac65f,#5aa832); border-color:#5aa832; color:#fff;
  box-shadow:0 2px 6px #5aa83244; font-weight:600; }
.gp-tab i { font-style:normal; margin-left:5px; padding:0 6px; border-radius:999px;
  background:#e8642c; color:#fff; font-size:11px; }
/* 🆚 班级对抗赛 */
.bt-st.war { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.bt-cw-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; padding: 8px 10px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; }
.bt-cw-lab { font-size: 13px; font-weight: 500; color: #334155; }
.bt-cw-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #334155; cursor: pointer; }
.bt-cw-prog { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; padding: 8px 10px; background: #f8fafc; border-radius: 8px; }
.bt-cw-row { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.bt-cw-cn { min-width: 76px; font-weight: 500; color: #0f172a; }
.bt-cw-num { color: #475569; }
.bt-cw-cell { vertical-align: top; }
.bt-cw-cell.bt-cw-empty { background: #f1f5f9; }
.bt-cw-who { font-size: 13px; }
.bt-cw-pets { display: flex; gap: 2px; margin: 2px 0; }
.bt-cw-pets img { width: 26px; height: 26px; }
.bt-cw-sc { font-size: 12px; color: #475569; }
.bt-cw-mine { font-size: 13px; margin: 4px 0 8px; }
.bt-cw-g .bt-cw-cell { white-space: nowrap; }
/* 登录页战况 · 团体赛：一个格子里放三只精灵（三个比赛位各一只） */
.lb-avw3 { width: 72px; gap: 2px; }
.lb-avw3 .gp-img { width: 22px; height: 22px; }
.lb-avs { width: 22px; height: 22px; border-radius: 6px; background: #eceee9; color: var(--muted);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.lb-recap .lb-mxwrap { max-height: 240px; }
.lb-recap .lb-sub { margin-top: 10px; }
.lb-recap .lb-pinfo i { font-size: 10px; }

/* ===== 农场改版 20260927（自沙盒迁移）===== */


/* 农田上方的禁用遮罩：解禁倒计时 */
.farm-scene.frozen .farm-ground { filter: grayscale(.55) brightness(.92); }

.farm-scene.frozen .plot { cursor: not-allowed; }


/* ============ 农场（斜45°场景版：3×5 田 + 装饰布置 + 自动昼夜） ============ */
.farm-scene {
  border-radius: 20px; overflow: hidden; position: relative; isolation: isolate;
  height: 660px;
  background: linear-gradient(#aee1f9 0 27%, #bfe693 27% 100%);
  box-shadow: var(--shadow-hover);
  transition: background .6s;
  touch-action: none;
}

.farm-scene.frozen .fs-field, .farm-scene.frozen .fs-house img, .farm-scene.frozen .fs-prop img { filter: grayscale(.55) brightness(.92); }

.farm-scene.frozen .fs-tile { cursor: not-allowed; }

.farm-scene.night { background: linear-gradient(#0e1d3d 0 27%, #23407a 27% 100%); }

.fs-sky { position: absolute; inset: 0 0 73% 0; pointer-events: none; z-index: 1; }

.fs-sun { position: absolute; top: 12px; right: 40px; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(#fff7c4, #ffd54f); box-shadow: 0 0 30px #ffe082; }

.fs-cloud { position: absolute; font-size: 32px; opacity: .9; animation: cloudMove 36s linear infinite; }

.fs-moon { display: none; position: absolute; top: 10px; right: 48px; width: 42px; height: 42px; border-radius: 50%; background: #fdf6d8; box-shadow: -7px 4px 0 0 #d9d0a8 inset, 0 0 22px rgba(253,246,216,.8); }

.farm-scene.night .fs-sun { display: none; }

.farm-scene.night .fs-moon { display: block; }

.fs-stars { display: none; position: absolute; inset: 0; }

.farm-scene.night .fs-stars { display: block; }

.fs-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .85; animation: fsTw 2.4s ease infinite; }

@keyframes fsTw { 0%,100% { opacity: .85; } 50% { opacity: .2; } }

.fs-fly { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #ffe97a; box-shadow: 0 0 8px 2px rgba(255,233,122,.85); display: none; animation: fsFly 7s ease-in-out infinite; z-index: 300; }

.farm-scene.night .fs-fly { display: block; }

@keyframes fsFly { 0%,100% { transform: translate(0,0); opacity: .4; } 30% { opacity: 1; } 50% { transform: translate(60px,-26px); opacity: .7; } 80% { opacity: .9; } }

/* 房子（商店/仓库/花园入口；布置模式下可拖） */
.fs-house { position: absolute; width: 148px; cursor: pointer; transition: transform .18s; z-index: 20; }

.fs-house[data-house="shop"] { left: 7%; top: 7%; }

.fs-house[data-house="barn"] { left: 41%; top: 7%; }

.fs-house[data-house="garden"] { left: 73%; top: 7%; }

.fs-house::before { content: ""; position: absolute; left: 12%; bottom: -8px; width: 76%; height: 22px; background: radial-gradient(closest-side, rgba(30,50,10,.3), transparent 72%); border-radius: 50%; z-index: -1; }

.fs-house:hover { transform: translateY(-3px) scale(1.04); }

.fs-house img { width: 100%; display: block; filter: drop-shadow(0 5px 5px rgba(0,0,0,.18)); }

.fs-hlab { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: #5d4022; background: linear-gradient(#ffe9b8, #f5c96a); border: 2px solid #a9792f; border-radius: 10px; padding: 1px 12px; white-space: nowrap; box-shadow: 0 2px 5px rgba(0,0,0,.25); }

.farm-scene.night .fs-house img { filter: brightness(.55) saturate(.75); }

.farm-scene.night .fs-hlab { background: linear-gradient(#3c4d78, #2c3a5e); color: #ffe9b8; border-color: #1c2745; }

/* 装饰道具 */
.fs-prop { position: absolute; pointer-events: none; }

.fs-prop img { width: 100%; display: block; filter: drop-shadow(0 3px 3px rgba(0,0,0,.15)); }

.farm-scene.night .fs-prop img { filter: brightness(.55) saturate(.7); }

.fs-prop.tree img { animation: fsSway 5s ease-in-out infinite; transform-origin: 50% 90%; }

@keyframes fsSway { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(1.6deg); } }

/* 布置模式 */
.fs-deco-bar { position: absolute; left: 12px; top: 12px; z-index: 400; display: flex; gap: 8px; }

.farm-scene.edit .fs-prop, .farm-scene.edit .fs-house { pointer-events: auto; cursor: grab; }

.farm-scene.edit .fs-prop:hover, .farm-scene.edit .fs-house:hover { outline: 2px dashed #ffb300; outline-offset: 2px; border-radius: 12px; transform: none; }

.farm-scene.edit .fs-prop.drag, .farm-scene.edit .fs-house.drag { cursor: grabbing; outline: 2px solid #ffb300; outline-offset: 2px; border-radius: 12px; opacity: .92; }

/* 田块（100px 圆角菱形砖，昼/夜两套贴图）。z 上限 = 100+最高砖 y(318)≈418，必须 < 弹窗 960 */
.fs-field { position: absolute; left: calc(50% - 55px); top: 38%; width: 0; height: 0; }

.fs-tile { position: absolute; width: 100px; height: 66px; margin-left: -50px; margin-top: -44px; background-size: 100% 100%; cursor: pointer; transition: transform .15s; }

.fs-tile:hover { transform: scale(1.04); }

.fs-tile.soil { background-image: url(farm/tile_soil.png); }

.fs-tile.grass { background-image: url(farm/tile_grass.png); }

.farm-scene.night .fs-tile.soil { background-image: url(farm/tile_soil_night.png); }

.farm-scene.night .fs-tile.grass { background-image: url(farm/tile_grass_night.png); }

.fs-tile .fs-crop { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 50px; pointer-events: none; }

div.fs-crop { font-size: 24px; text-align: center; line-height: 1; }

.fs-tile .fs-fruit { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); width: 24px; pointer-events: none; animation: fsReady 1.4s ease infinite; }

/* 最终生长阶段：植株前挂果实（将熟=结果瞬间） */
.fs-fruit-front { position: absolute; left: 50%; top: 50%; translate: -50% calc(-50% - 39px); width: 26px; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); animation: fsReadyFruit 1.4s ease infinite; z-index: 2; }

@keyframes fsReadyFruit { 0%,100% { scale: 1; } 50% { scale: 1.12; } }

@keyframes fsReady { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.12); } }

.fs-tile.mature { filter: drop-shadow(0 0 8px rgba(255,190,40,.9)); }

.farm-scene.night .fs-tile.mature { filter: drop-shadow(0 0 7px rgba(255,190,40,.8)); }

.farm-scene.night .fs-tile img, .farm-scene.night .fs-tile .fs-chip { filter: brightness(.65) saturate(.8); }

.fs-no { position: absolute; left: 10px; top: 20px; font-size: 9px; color: rgba(255,255,255,.75); font-weight: 700; }

.fs-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-58%); font-size: 17px; }

.fs-sign { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-size: 10px; background: linear-gradient(#c98d4e, #a76f35); color: #fff; border: 2px solid #7c4f26; border-radius: 8px; padding: 1px 8px; white-space: nowrap; box-shadow: 0 2px 4px rgba(0,0,0,.3); }

.fs-sign::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 4px solid transparent; border-top: 6px solid #7c4f26; }

.fs-shield { position: absolute; top: -8px; right: 2px; font-size: 16px; }

.fs-chip { position: absolute; left: 50%; transform: translateX(-50%); bottom: 5px; font-size: 10px; background: rgba(0,0,0,.55); color: #fff; border-radius: 8px; padding: 1px 7px; white-space: nowrap; }

.fs-chip.mature { background: #ffd76a; color: #7a5200; font-weight: 700; }

/* 护卫（小狗/小猫）沿田前缘巡逻 */
.fs-pet { position: absolute; bottom: 4.5%; width: 66px; pointer-events: none; z-index: 950; }

.fs-pet img { width: 66px; display: block; }

.farm-scene.night .fs-pet img { filter: brightness(.72) saturate(.8); }

/* 出游中的宠物：缩小版在地平线（草地上缘）散步，压在房子/道具/田块最底层 */
.fs-pet-far { position: absolute; top: 23.5%; width: 30px; pointer-events: none; z-index: -1; }

.fs-pet-far img { width: 30px; display: block; }

.farm-scene.night .fs-pet-far img { filter: brightness(.55) saturate(.7); }

@keyframes fsFlash { 0%,100% { box-shadow: var(--shadow); } 30%,70% { box-shadow: 0 0 0 4px #ffd76a; } }

/* ---- 设置页分组标签页 ---- */
.set-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;position:sticky;top:0;z-index:20;background:var(--bg,#f1f5f9);padding:8px 0}
.set-tab{padding:9px 18px;border-radius:10px;border:1.5px solid var(--border,#e2e8f0);background:#fff;cursor:pointer;font-size:14px;font-weight:600;color:#475569;transition:all .15s}
.set-tab:hover{border-color:var(--primary,#8b5cf6);color:var(--primary,#8b5cf6)}
.set-tab.active{background:var(--primary,#8b5cf6);border-color:var(--primary,#8b5cf6);color:#fff}

/* 操作日志：鼠标悬停显示涉及的学生（2026-09-28） */
#log-tip{position:fixed;z-index:9999;display:none;max-width:320px;background:#fffbe8;border:1px solid #e0cf96;color:#5b4a1f;padding:6px 10px;border-radius:6px;font-size:12px;line-height:1.6;box-shadow:0 4px 12px rgba(0,0,0,.15);pointer-events:none}

/* ⬆️ 任务奖励「精灵升级」自选弹窗（2026-09-28） */
.qz-lvpick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; max-height: 46vh; overflow: auto; }
.qz-lvpet { display: inline-flex; align-items: center; gap: 5px; background: #f3f7f0; border: 1px solid #dfe8d9; border-radius: 999px; padding: 3px 10px 3px 4px; cursor: pointer; font-size: 12.5px; color: #35503a; }
.qz-lvpet img { width: 30px; height: 30px; object-fit: contain; image-rendering: pixelated; }
.qz-lvpet:hover { border-color: #9ec88a; background: #eaf4e4; }
.qz-lvpet.off { opacity: .45; cursor: default; }

/* ---- 任务游戏：关窗确认浮层（2026-09-30） ---- */
.qz-closeask { z-index: 120; background: rgba(20, 30, 18, .58); }
.qz-closeask .qz-rbox { border: 3px solid #e8a33d; box-shadow: 0 12px 34px rgba(0, 0, 0, .28); }

/* ---- 教师端精灵管理：升级档位按钮行（2026-09-30） ---- */
.gp-steprow{margin-top:10px}
.gp-stepbtns{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.gp-stepbtns .btn{flex:0 0 auto}

/* ---- 学生管理：批量禁用工具条（2026-09-30） ---- */
.sg-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:#f7f8f6;border:1px solid var(--line,#e5e7eb)}
.sg-tools .sg-picked{font-size:12.5px;color:var(--muted,#6b7280)}
.sg-tools .sg-picked b{color:#c0392b;font-size:14px}
.tbl input.sg-pick{width:16px;height:16px;cursor:pointer;accent-color:var(--primary,#5aa469)}

/* ---- 禁用原因：历史下拉 + 常用原因 chips ---- */
.ban-warn{padding:8px 11px;border-radius:9px;background:#fdf3f2;border:1px solid #f0c8c4;color:#8b3a30;font-size:12.5px;line-height:1.7;margin:8px 0}
datalist{display:none}

/* ---- 排行榜：时间段筛选面板（2026-09-30） ---- */
.lb-range{padding:11px 12px;border-radius:11px;background:#f7f8f6;border:1px solid var(--line,#e5e7eb)}
.lb-range label{font-size:12px;color:var(--muted,#6b7280);display:block;margin-bottom:3px}
.lb-range input[type=date]{width:100%;padding:6px 8px;border:1.5px solid var(--line,#e5e7eb);border-radius:8px;font-size:13px}

/* 精灵图鉴开放范围（教师端设置 · 2026-09-30） */
.dex-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:6px;
max-height:360px;overflow:auto;padding:6px;border:1px solid #e2e8df;border-radius:8px;background:#fbfdf9}
.dex-cell{border:1px solid #e2e8df;border-radius:7px;padding:4px 2px;text-align:center;cursor:pointer;background:#fff}
.dex-cell.on{background:#eaf6ea;border-color:#8fc98f}
.dex-cell:hover{border-color:#8bbb8b}
.dex-cell img{width:40px;height:40px;image-rendering:pixelated;display:block;margin:0 auto}
.dex-none{display:block;height:40px;line-height:40px;color:#b9c4b9;font-size:12px}
.dex-nm{font-size:11px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.dex-no{font-size:10px;color:#8a958a}
.dex-gen.on{background:#eaf6ea;border-color:#8fc98f}
.dex-gen.part{background:#fdf6e3;border-color:#e0c98a}

/* 精灵图按需加载时的占位底色（2026-09-30：1025 张一次性请求会打满连接池 → 尾部整批破图） */
.dex-cell img{background:#eef1f0;border-radius:5px}
.gp-deximg img,.gp-deximg svg{background:#eef1f0;border-radius:6px}


/* ==================== ↓↓ 自沙盒移植（2026-10-04）：工具栏 v2 + 作业/扫码样式 ==================== */
/* ============ 🧰 工具栏（倒计时 · 2026-10-02） ============ */
.cd-tool { border: 2px solid var(--accent); }
.cd-clock {
  font-size: 76px; font-weight: 800; text-align: center; letter-spacing: 3px;
  font-variant-numeric: tabular-nums; color: var(--primary-dark); line-height: 1.15;
}
.cd-clock.last10 { color: var(--accent-dark); }
.cd-clock.done { color: var(--danger); animation: cdBlink 1s step-end infinite; }
@keyframes cdBlink { 50% { opacity: .35; } }
.cd-clock-sub { text-align: center; color: var(--muted); margin: 4px 0 12px; }
.cd-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* 星星榜：深蓝夜空面板（仿老师给的样式）。名字压在星星正中、位于星星上层；
   星星一开始是暗的，点亮后金色 + 缓慢呼吸放大缩小 + 光晕一起脉动 */
.cd-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 22px 6px;
  background: linear-gradient(180deg, #242a58 0%, #1b2044 100%);
  border-radius: 14px; padding: 22px 12px 16px;
}
.cd-grid-empty { color: #99a1c4; }
@media (max-width: 900px) { .cd-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 560px) { .cd-grid { grid-template-columns: repeat(4, 1fr); } }
.cd-star { position: relative; text-align: center; cursor: pointer; user-select: none; padding: 4px 0; }
.cd-star svg {
  display: block; width: 58px; height: 58px; margin: 0 auto;
  transform: scale(var(--cd-s, 1)); transition: transform .25s;
}
.cd-star .cd-star-fill {
  fill: rgba(201, 173, 76, .24); stroke: rgba(224, 196, 96, .48); stroke-width: 1;
  transition: fill .25s, stroke .25s;
}
.cd-star-name {
  position: absolute; left: 0; right: 0; top: 24px; z-index: 2; text-align: center;
  font-size: 12.5px; font-weight: 700; color: #fff; pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
}
.cd-star-num { display: block; margin-top: 3px; font-size: 12px; color: #99a1c4; }
.cd-star.lit .cd-star-fill { fill: #f6c94a; stroke: #d9a72e; }
/* 点亮后：缓慢放大缩小的呼吸动效，光晕（drop-shadow）跟着一起脉动 */
.cd-star.lit svg { animation: cdBreath 2.8s ease-in-out infinite; }
@keyframes cdBreath {
  0%, 100% { transform: scale(var(--cd-s, 1)); filter: drop-shadow(0 0 5px rgba(246, 201, 74, .5)); }
  50% { transform: scale(calc(var(--cd-s, 1) * 1.15)); filter: drop-shadow(0 0 16px rgba(246, 201, 74, .95)); }
}
.cd-star.lit:hover .cd-star-fill { fill: #ffd964; }
/* 刚点亮 / 刚插入的那位带虚线框：↑ / ↓ 键盘微调的就是他 */
.cd-star.sel .cd-star-fill { stroke: #ffe9a8; stroke-width: 1.6; }
.cd-star.sel::after {
  content: ''; position: absolute; left: 50%; top: 4px; width: 62px; height: 62px;
  transform: translateX(-50%); border: 1.5px dashed rgba(255, 233, 168, .75); border-radius: 10px;
  pointer-events: none;
}
.cd-hint { font-size: 13px; color: #99a1c4; }
@media (prefers-reduced-motion: reduce) { .cd-star.lit svg { animation: none; } }
.cd-rank {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%); z-index: 3;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #f6c94a; color: #4a3800; font-size: 12px; font-weight: 800;
  line-height: 20px; text-align: center; box-shadow: 0 0 8px rgba(246, 201, 74, .55);
}
/* 并列名次的徽章（计时环节点徽章设置）：同分同名次，换个颜色提醒老师 */
.cd-rank.tie { background: #7fd4ff; color: #0c3a58; box-shadow: 0 0 8px rgba(127, 212, 255, .6); }
/* 选中星星两旁的 ↑ / ↓ 名次微调按钮（点星星出现）：左 ↑ 往前挪、右 ↓ 往后挪。
   放在星星外侧的夜空底上（深底金字 + 光晕），不压在金色星星上，一眼能看见 */
.cd-arrow {
  position: absolute; top: 20px; z-index: 6; width: 32px; height: 32px; padding: 0;
  border-radius: 50%; border: 2px solid #ffe9a8;
  background: rgba(20, 24, 54, .95); color: #ffe9a8;
  font-size: 19px; font-weight: 800; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px rgba(246, 201, 74, .55), 0 1px 6px rgba(0, 0, 0, .5);
}
.cd-arrow.left { left: calc(50% - 68px); }
.cd-arrow.right { right: calc(50% - 68px); }
.cd-arrow:hover { background: #f6c94a; border-color: #fff3c4; color: #4a3800; }

.cd-award { border: 2px solid var(--gold); }
.cd-award-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px;
  border-bottom: 1px dashed var(--line);
}
.cd-award-row:last-of-type { border-bottom: none; }
.cd-award-row .cd-plus { color: var(--primary-dark); font-weight: 800; white-space: nowrap; }
.cd-award-rest { flex-wrap: wrap; }
/* 倒计时快捷调时间（剩 N 分钟 / 加时 N 分钟） */
.cd-quick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.cd-quick-label { font-size: 13px; color: var(--muted); font-weight: 700; }

/* 班级端「未按时完成」规则提示（教师端开关 classShowMiss 打开时才出现；只显示规则，不列名单） */
.cd-miss-hint {
  margin: 6px 0 8px; padding: 7px 12px; border-radius: 10px;
  background: #fdf3e7; border-left: 4px solid var(--gold);
  color: #8a5a11; font-weight: 700; font-size: 15px;
}

.cd-rec { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden; }
.cd-rec-head { display: flex; gap: 8px; align-items: center; padding: 9px 12px; cursor: pointer; background: var(--primary-soft); }
.cd-rec-head:hover { background: #dcecd8; }
.cd-rec-edit { padding: 10px 12px; }
.cd-rec-row { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.cd-rec-miss { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fdf3e7; font-size: 13px; }
.cd-chip {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 700;
}
.cd-chip.warn { background: #fdeaea; color: var(--danger); }

.cd-chip.tie { background: #eef4ff; color: #3d6ed6; }
.cd-new { color: var(--primary-dark); font-weight: 800; min-width: 92px; text-align: right; font-size: 13px; }
/* ==================== 分贝控制器（读书激励 / 安静自习 · 2026-10-03） ==================== */
.tool-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tool-tab {
  border: 1.5px solid var(--line); background: var(--card); color: var(--muted);
  padding: 7px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.tool-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
/* 学生列表那两个筛选按钮：点亮的颜色**必须和作业列表里同名按钮一致**（老师 2026-10-05 提的）——
   默认 .tool-tab.on 一律是绿色，会让「❌ 未交」看起来跟「✅ 已交」一个意思，读不出来。 */
.tool-tab.on.miss { background: #d9534f; border-color: #d9534f; color: #fff; }
.tool-tab.on.done { background: #2e9e53; border-color: #2e9e53; color: #fff; }
.db-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.db-mode-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 12px; text-align: center; cursor: pointer; background: var(--bg-2); }
.db-mode-card.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--shadow); }
.db-mode-icon { font-size: 34px; margin-bottom: 4px; }
.db-mode-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.db-rules { background: var(--bg-2); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13.5px; }
.db-start-btn { font-size: 17px; padding: 10px 36px; }
.db-clock {
  font-size: 64px; font-weight: 800; text-align: center; letter-spacing: 3px;
  font-variant-numeric: tabular-nums; color: var(--primary-dark); line-height: 1.15;
}
.db-clock.last10 { color: var(--accent-dark); }
.db-clock.done { color: var(--danger); animation: cdBlink 1s step-end infinite; }
.db-light { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #9aa89a; vertical-align: middle; }
.db-light.ok { background: #43b649; box-shadow: 0 0 10px rgba(67, 182, 73, 0.55); }
.db-light.warn { background: var(--gold); box-shadow: 0 0 10px rgba(230, 182, 75, 0.55); }
.db-light.paused { background: var(--accent); box-shadow: 0 0 10px rgba(240, 164, 58, 0.5); }
.db-light.break { background: var(--danger); box-shadow: 0 0 10px rgba(224, 93, 93, 0.6); animation: cdBlink 0.8s step-end infinite; }
.db-now-row { text-align: center; margin: 8px 0 2px; }
.db-now { font-size: 54px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--primary-dark); }
.db-unit { color: var(--muted); margin-left: 8px; font-size: 14px; }
.db-hint { text-align: center; min-height: 22px; font-weight: 700; color: var(--accent-dark); font-size: 15px; }
.db-hint.good { color: var(--primary-dark); }
.db-mic-state { font-size: 12.5px; color: var(--muted); text-align: center; min-height: 18px; margin-bottom: 6px; }
.db-eff-bar-wrap { height: 18px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin: 10px 0 4px; border: 1px solid var(--line); }
.db-eff-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); width: 0; transition: width 0.4s; }
.db-eff-text { text-align: center; font-size: 13.5px; color: var(--text); }
.db-points { text-align: center; font-size: 14px; font-weight: 700; color: var(--primary-dark); margin: 4px 0; }
.db-interrupt-row { text-align: center; font-size: 13.5px; color: var(--muted); }
.db-interrupt-row b { color: var(--danger); }
.db-stats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.db-stat { background: var(--bg-2); border-radius: var(--radius-sm); padding: 8px 16px; text-align: center; min-width: 118px; font-size: 12.5px; color: var(--muted); }
.db-stat b { font-size: 19px; display: block; color: var(--text); }
.db-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin: 10px 0; }
.db-pick { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; gap: 6px; align-items: center; cursor: pointer; background: var(--card); }
.db-pick.on { border-color: var(--primary); background: var(--primary-soft); }
.db-pick input { width: auto; margin: 0; }
.db-pick-num { color: var(--muted); font-size: 12px; margin-left: auto; }
/* v2 外链版：分贝卡片（勾选行 + 每人分/级输入）与链接按钮 */
.db-pick { flex-direction: column; align-items: stretch; gap: 4px; }
.db-pick-head { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.db-pick-head input { width: auto; margin: 0; }
.db-per { display: flex; gap: 4px; align-items: center; font-size: 13px; color: var(--text); flex-wrap: wrap; }
.db-nw { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.db-per input { width: 56px; min-width: 0; padding: 3px 4px; font-size: 16px; font-weight: 700; color: var(--text); text-align: center; }
.db-per input::placeholder { color: var(--muted); font-weight: 400; font-size: 14px; }
.db-link-btns { display: flex; gap: 10px; justify-content: center; margin: 14px 0 6px; flex-wrap: wrap; }
.db-link-main { font-size: 17px; padding: 12px 30px; }
.db-dft-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; font-size: 14px; }
.db-dft-row input { width: 74px; font-size: 17px; font-weight: 700; color: var(--text); text-align: center; padding: 4px 6px; }

.db-mic-note { font-size: 12.5px; text-align: center; margin-top: 10px; }
.db-report-warn { background: #fdf3e7; border: 1px solid var(--gold); color: var(--accent-dark); border-radius: var(--radius-sm); padding: 8px 12px; margin: 8px 0; font-size: 13.5px; }
.db-cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.db-cfg-grid label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.db-cfg-grid input, .db-cfg-grid select { width: 100%; }
/* 📚 作业页（2026-10-03）：日期行 / 三态按钮 / 统计 chip / 结算行 / 历史行 */
.hw-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.hw-row label { margin: 0; }
.hw-date { width: auto; min-width: 150px; }
.hw-title { flex: 1 1 220px; min-width: 200px; }
.hw-btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.hw-stats { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.hw-chip { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--bg-2); color: var(--text); }
.hw-chip.done { background: #e3f6e8; color: #1c7c3c; }
.hw-chip.miss { background: #fdeaea; color: #c0392b; }
.hw-chip.leave { background: #fdf6e3; color: #8a6d1a; }
.hw-miss-names { color: #c0392b; }
.hw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.hw-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; background: var(--card); }
.hw-card.done { background: #f2fbf4; border-color: #bfe3c8; }
.hw-card.leave { background: #fffaf0; border-color: #ecd9a6; }
.hw-card-head { display: flex; justify-content: space-between; gap: 6px; font-weight: 600; margin-bottom: 6px; }
.hw-card-num { color: var(--muted); font-size: 12px; }
.hw-st-row { display: flex; gap: 4px; }
.hw-st { flex: 1; padding: 6px 2px; font-size: 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; font-family: inherit; }
.hw-st:hover { border-color: var(--primary); }
.hw-st.on { font-weight: 700; }
.hw-st.on.done { background: #2e9e53; border-color: #2e9e53; color: #fff; }
.hw-st.on.miss { background: #d9534f; border-color: #d9534f; color: #fff; }
.hw-st.on.leave { background: #d8a219; border-color: #d8a219; color: #fff; }
.hw-settle { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.hw-settle-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hw-settle-row input { width: 64px; font-size: 16px; font-weight: 700; text-align: center; padding: 3px 4px; color: var(--text); }
.hw-hist-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.hw-hist-row.on { background: var(--primary-soft); border-radius: 8px; }
.hw-hist-date { font-weight: 600; min-width: 150px; }
.hw-hist-title { font-weight: 400; color: var(--muted); margin-left: 6px; }
.hw-hist-row .hw-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hw-hist-award { color: var(--muted); font-size: 12px; }
.hw-hist-award.none { opacity: 0.7; }
.hw-hist-btns { margin-left: auto; display: flex; gap: 6px; }
.hw-cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }

/* 📚 作业 v2（2026-10-03 晚）：作业列表行 / 批改详情 / 金框黑框 / 学生列表 */
.hw-cross { display: flex; gap: 5px; align-items: center; margin: 0; font-size: 13px; white-space: nowrap; }
.hw-cross input { width: auto; margin: 0; }
.hw-rec { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: visible; }
.hw-rec.open { border-color: var(--primary); }
.hw-rec-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 10px; cursor: pointer; }
.hw-rec-row:hover { background: var(--primary-soft); border-radius: var(--radius-sm); }
.hw-rec-date { font-weight: 700; min-width: 96px; }
.hw-rec-title { flex: 1 1 160px; font-weight: 600; }
.hw-rec-btns { margin-left: auto; display: flex; gap: 6px; }
.hw-detail { border-top: 1px dashed var(--line); padding: 10px; }
.hw-chip.ex { background: #fdf1d6; color: #a0721a; }
.hw-card { position: relative; }
.hw-card.miss { background: var(--card); border-color: var(--line); }
/* v4（2026-10-03 深夜）：三笔结算各自独立，边框亮在对应按钮上 ——
   已交加分=金框、优秀加分=紫框、未交扣分=黑框；× 在各自按钮正上方，撤哪笔点哪个 */
.hw-st.aw { border: 2px solid #d4a017 !important; animation: hwAwGlow 1.6s ease-in-out infinite; }
.hw-st.exaw { border: 2px solid #8e44ad !important; animation: hwExGlow 1.6s ease-in-out infinite; }
.hw-st.dew { border: 2px solid #2b2b2b !important; box-shadow: 0 0 6px rgba(43,43,43,.4); }
@keyframes hwAwGlow {
  0%, 100% { box-shadow: 0 0 3px rgba(212,160,23,.55); }
  50% { box-shadow: 0 0 11px rgba(212,160,23,.95); }
}
@keyframes hwExGlow {
  0%, 100% { box-shadow: 0 0 3px rgba(142,68,173,.55); }
  50% { box-shadow: 0 0 11px rgba(142,68,173,.95); }
}
/* × 撤销：挂在按钮盒子上方正中（盒子上留出空间，不与卡片头重叠） */
.hw-st-row { margin-top: 12px; align-items: flex-end; }
.hw-st-box { position: relative; flex: 1; display: flex; }
.hw-st-box .hw-st { flex: 1; }
.hw-undo { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid #b34747; background: #fff; color: #b34747; font-size: 12px; line-height: 1;
  cursor: pointer; font-family: inherit; padding: 0; z-index: 2; }
.hw-undo:hover { background: #b34747; color: #fff; }
.hw-btn-ex { background: #8e44ad !important; border-color: #8e44ad !important; color: #fff !important; }
.hw-ex-badge { font-size: 12px; color: #a0721a; background: #fdf1d6; border-radius: 999px; padding: 1px 8px; }
.hw-st.ex.on { background: #d8a219; border-color: #d8a219; color: #fff; }
.hw-mark-txt { margin-top: 5px; font-size: 12px; color: #8a6d1a; font-weight: 600; }
.hw-card:has(.hw-st.dew) .hw-mark-txt { color: #444; }
/* v6（2026-10-04）：新增「⏰ 提前」= 提前完成作业，排在「已交」左边。点亮它连带点亮已交；
   奖励是第四笔独立结算（蓝框），规则与已交加分完全一样。四个按钮排一行，窄屏自动折成 2×2。 */
.hw-st-row { flex-wrap: wrap; }
.hw-st-box { flex: 1 1 0; min-width: 74px; }
.hw-st-row .hw-st { font-size: 11px; padding: 6px 1px; }
.hw-st.pre { border-color: #bcd8f2; }
.hw-st.pre.on { background: #2f7fd1; border-color: #2f7fd1; color: #fff; font-weight: 700; }
.hw-st.ew { border: 2px solid #2f7fd1 !important; animation: hwEwGlow 1.6s ease-in-out infinite; }
@keyframes hwEwGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(47,127,209,.55); } 50% { box-shadow: 0 0 0 3px rgba(47,127,209,.16); } }
.hw-card.early { background: #f2f7fd; border-color: #bcd8f2; }
.hw-pre-badge { font-size: 12px; color: #1d5fa8; background: #e4eefb; border-radius: 999px; padding: 1px 8px; }
.hw-chip.pre { background: #e4eefb; color: #1d5fa8; }
.hw-btn-pre { background: #2f7fd1 !important; border-color: #2f7fd1 !important; color: #fff !important; }
.hw-stu-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; align-items: flex-start; }
/* v4：姓名标签与下方面板同宽（固定单元宽度），标签内姓名居左、数量与箭头靠右 */
.hw-stu-unit { display: inline-flex; flex-direction: column; align-items: stretch; width: 260px; }
.hw-stu-chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; font-weight: 600; font-family: inherit; font-size: 14px; }
.hw-stu-chip b { background: #d9534f; color: #fff; border-radius: 999px; font-size: 12px; min-width: 20px; text-align: center; padding: 1px 5px; }
.hw-stu-chip.open { border-color: var(--primary); background: var(--primary-soft); }
.hw-stu-unit .hw-caret { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); line-height: 1; }
.hw-stu-unit .hw-pend { width: 100%; margin: 6px 0 2px; box-shadow: 0 4px 14px rgba(63,92,61,.10); }
.hw-cls-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hw-cls-label { font-weight: 700; color: var(--text); }
.hw-cls-chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2);
  cursor: pointer; font-family: inherit; font-size: 14px; }
.hw-cls-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.hw-pend { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; margin: 8px 0; }
.hw-pend-name { font-weight: 700; margin-bottom: 6px; }
.hw-pend-item { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.hw-pend-item:last-child { border-bottom: none; }
.hw-pend-title { flex: 1 1 120px; word-break: break-all; }

/* ---------- 🔳 扫码登记：码卡打印视图（2026-10-03） ---------- */
.qr-overlay { position: fixed; inset: 0; z-index: 400; background: #f2f5f0; overflow: auto; padding: 16px; }
.qr-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; max-width: 1100px; margin: 0 auto; }
.qr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 8px;
  text-align: center; page-break-inside: avoid; break-inside: avoid; }
/* 2026-10-05 老师定版式：**码在上、名字和号在下**（原来是名字在上、码在下）。
   一张卡只有一个码 → 让它铺满整张卡的宽度（合并后是 33×33 格，比原来的 21×21 密，
   靠放大把单个格子的实际尺寸补回来；打印时按卡宽自动撑满，不用写死像素）。 */
.qr-img { margin-bottom: 7px; }
.qr-img svg { width: 100%; height: auto; max-width: 190px; display: block; margin: 0 auto; }
.qr-name { font-size: 17px; font-weight: 800; }
.qr-num { font-size: 12px; color: var(--muted); margin-top: 1px; }
/* 🎨 码卡版式面板（2026-10-05 老师要能自己调姓名/学号的字体·字号·位置）
   卡面真正的字体/字号/对齐由 JS 写成**行内 style**（样式表里的 17px/12px 只是没调过时的默认值）。 */
.qr-style { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 14px; margin-bottom: 12px; max-width: 1100px; margin-left: auto; margin-right: auto;
  display: flex; flex-direction: column; gap: 6px; }
.qr-style-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.qr-style-k { min-width: 44px; font-weight: 700; color: var(--muted); }
.qr-style-row select { padding: 3px 6px; font-size: 13px; }
.qr-style-row input[type=range] { width: 120px; vertical-align: middle; }
.qr-style-row b { min-width: 42px; display: inline-block; font-variant-numeric: tabular-nums; }
.qr-style-seg { display: inline-flex; gap: 4px; }
/* 🧑‍🎓 学生列表：未交 / 已交 筛选 + 每条作业的日期前缀 */
.hw-stu-filter { margin-bottom: 10px; }
.hw-pend-date { font-size: 11px; color: var(--muted); margin-right: 6px; }

@media print {
  body > *:not(.qr-overlay) { display: none !important; }
  .qr-overlay { position: static; background: #fff; padding: 0; overflow: visible; }
  .qr-toolbar { display: none !important; }
  /* ⚠️ 之前「no-print」这个类根本没定义（工具栏是靠 .qr-toolbar 这条规则藏掉的）→
     新加的版式面板必须显式藏，否则打印第一页顶上会多出一块控件 */
  .qr-style, .no-print { display: none !important; }
  .qr-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: none; }
  .qr-card { border: 1px dashed #bbb; }
}

/* ---------- 📷 扫码登记：摄像头扫码视图（2026-10-04） ---------- */
.qr-scan-box { position: relative; max-width: 560px; margin: 0 auto; background: #000; border-radius: var(--radius-sm);
  overflow: hidden; aspect-ratio: 4 / 3; }
.qr-scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-scan-frame { position: absolute; left: 50%; top: 50%; width: 62%; max-width: 300px; aspect-ratio: 1;
  transform: translate(-50%, -50%); border: 3px solid #4caf50; border-radius: 14px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.35); pointer-events: none; }
.qr-scan-tip { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; text-align: center;
  font-size: 14px; color: #fff; background: rgba(0, 0, 0, 0.55); }
.qr-scan-last { position: absolute; left: 0; right: 0; top: 0; padding: 10px 12px; text-align: center;
  font-size: 18px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.45); }
.qr-scan-diag { max-width: 560px; margin: 8px auto 0; text-align: center; font-size: 12px; color: var(--muted); }
.hw-scan-count { font-weight: 700; }
.hw-scan-count b { font-size: 18px; }
.qr-scan-list { display: flex; flex-wrap: wrap; gap: 8px; max-width: 900px; margin: 14px auto 0; }
.qr-scan-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; }
.qr-scan-chip i { font-style: normal; font-size: 12px; font-weight: 400; color: var(--muted); }
.qr-scan-chip.gray { opacity: 0.55; }
.qr-scan-chip.bad { border-color: #c0392b; color: #c0392b; }
@media print { .qr-scan-overlay { display: none !important; } }

/* ==================== 🗺️ 六角地图（public/hexmap/，iframe 嵌入） ==================== */
/* 地图页要整块铺满：去掉 .main 的白边与最大宽度限制，让 iframe 撑满可用高度 */
.main.hexmap-mode { padding: 0; max-width: none; display: flex; overflow: hidden; }
.main.hexmap-mode #hexmap-frame { flex: 1 1 auto; width: 100%; min-width: 0; border: 0; display: block; background: #eef1f5; }
/* 大屏模式下同样铺满，别被 body.big-screen .main 的内边距挤小 */
body.big-screen .main.hexmap-mode { padding: 0; max-width: none; }

/* ---- 🗺️ 地图摘要（班级端 / 教师端只读数据，不出现地图本身） ---- */
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hm-card .card-title { font-size: 15px; }
.hm-terrs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.hm-terr { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
           padding: 3px 8px; border-radius: 999px; background: var(--bg-soft, #f2f4f7); color: var(--text); }
.hm-terr i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hm-terr.zero { opacity: 0.42; }
.hm-terr.total { font-weight: 700; }
.hm-sps { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-sp { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
         padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); }
.hm-sp i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hm-sp b { font-variant-numeric: tabular-nums; }
/* ⭐ 班级端「发现者」表里的星级（2026-10-16）。视觉与花园的 .gp-stars 保持一致，
   只是字号跟着表格走（.gp-stars 是 11px，在表格里偏小）。
   .hi = ★4 / ★5，加粗加深一档，方便老师一屏扫出稀有精灵。 */
.hm-star { color: #d9a441; font-size: 13px; letter-spacing: 2px; white-space: nowrap; }
.hm-star.hi { color: #e8850c; font-weight: 700; }

/* 🖼️ 班级端「发现者」表里的精灵立绘（2026-10-16 晚）。与学生端 openRecipeBook 的 44px 同一套图，
   表格里用 34px 刚好贴合行高；未发现行的占位格 = 灰色虚线框 + 淡问号（不写真实图片地址，防泄露）。 */
.hm-spcell { display: flex; align-items: center; gap: 9px; min-width: 120px; }
.hm-spimg { display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; }
.hm-spimg img { width: 34px; height: 34px; object-fit: contain; display: block; }
.hm-spimg.empty { border: 1px dashed var(--line, #e3e0d5); border-radius: 8px;
  color: #c9c4b4; font-size: 14px; font-weight: 700; }


/* ============ 📖 题库 ============ */
.pb-content { white-space: pre-wrap; font-family: inherit; font-size: 13.5px; line-height: 1.9;
  background: #faf7ef; border: 1px solid #eee3c8; border-radius: 8px; padding: 10px 12px;
  max-height: 260px; overflow: auto; margin: 10px 0 0; }
/* 题库里的 PDF 文件卡片 */
.pb-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #faf7ef; border: 1px solid #eee3c8; border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.pb-file-ico { font-size: 22px; line-height: 1; }
.pb-file-meta { color: #6b6456; font-size: 13px; flex: 1; min-width: 180px; }

/* ============================ ☁️ 教师空间（网盘） ============================ */
.sp-wrap{display:flex;gap:14px;align-items:flex-start}
.sp-side{width:236px;flex:0 0 236px;border:1px solid var(--line);border-radius:10px;background:var(--card,#fff);overflow:hidden}
.sp-tree{max-height:52vh;overflow:auto;padding:6px 0}
.sp-node{display:flex;align-items:center;gap:5px;padding:6px 8px;cursor:pointer;font-size:13px;border-radius:6px;margin:1px 4px}
.sp-node:hover{background:rgba(128,128,128,.08)}
.sp-node.on{background:rgba(46,160,67,.12);font-weight:700}
.sp-node.sys .sp-name{color:#8a5a00}
.sp-caret{width:12px;display:inline-block;color:var(--muted);font-size:11px;flex:0 0 12px}
.sp-caret.none{cursor:default}
.sp-ico{flex:0 0 auto}
.sp-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-badge{font-size:10px;font-weight:800;color:#8a5a00;background:#fff4d9;border:1px solid #f0d9a8;border-radius:999px;padding:0 6px;white-space:nowrap}
.sp-act{opacity:0;font-size:12px;cursor:pointer;padding:0 2px}
.sp-node:hover .sp-act{opacity:.75}
.sp-act:hover{opacity:1!important}
.sp-side-btns{display:flex;gap:6px;padding:8px;border-top:1px solid var(--line);flex-wrap:wrap}
.sp-side-btns .btn{flex:1;white-space:nowrap}
.sp-main{flex:1;min-width:0}
.sp-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.sp-crumbs{font-size:13px;color:var(--muted);cursor:pointer;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-crumb.last{color:var(--text);font-weight:700}
.sp-sep{margin:0 5px;opacity:.5}
.sp-q{max-width:180px;font-size:12px;padding:5px 8px}
.sp-tip{background:#fff8e8;border:1px solid #f0d9a8;color:#8a5a00;font-size:12px;border-radius:8px;padding:7px 10px;margin-bottom:8px;line-height:1.6}
.sp-selbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;padding:6px 8px;border:1px dashed var(--line);border-radius:8px;margin-bottom:6px}
.sp-list{border:1px solid var(--line);border-radius:10px;overflow:hidden}
.sp-row{display:flex;align-items:center;gap:10px;padding:9px 10px;border-top:1px solid var(--line);background:var(--card,#fff)}
.sp-row:first-child{border-top:0}
.sp-row.on{background:rgba(46,160,67,.07)}
.sp-fico{font-size:20px;flex:0 0 26px;text-align:center}
.sp-fmain{flex:1;min-width:0}
.sp-fname{font-size:13px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-fmeta{font-size:11.5px;color:var(--muted);margin-top:2px}
.sp-shared{color:#1a7f37;font-weight:700}
.sp-facts{display:flex;gap:4px;flex:0 0 auto}
.btn-xs{font-size:12px;padding:2px 7px;line-height:1.6}
.sp-share-cls{border:1px solid var(--line);border-radius:8px;padding:8px;margin-bottom:8px}
.sp-share-head{display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:6px}
.sp-share-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:4px 10px}
.sp-share-s{display:flex;align-items:center;gap:5px;font-size:13px;margin:0;cursor:pointer}
.sp-pre{max-height:64vh;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:13px;background:rgba(128,128,128,.06);padding:10px;border-radius:8px;margin:0}
.sp-frame{width:100%;height:68vh;border:0;border-radius:8px;background:#fff}
@media (max-width:820px){.sp-wrap{flex-direction:column}.sp-side{width:100%;flex:none}}
