/* ============================================================
   星际创作站 · 设计系统
   风格：童趣 + 科技混合（方案文档 15 章）
   蓝紫渐变主色 / 大圆角 / 轻投影 / 轻快动效
   ============================================================ */

:root {
  --blue: #4f7cff;
  --purple: #8b5cf6;
  --grad: linear-gradient(135deg, #4f7cff 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, #eef3ff 0%, #f3efff 100%);
  --orange: #ff9f43;
  --green: #10b981;
  --bg: #f5f8ff;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e6ecf7;
  --danger: #ef4444;
  --radius: 16px;
  --radius-btn: 12px;
  --shadow: 0 6px 24px rgba(79, 124, 255, 0.1);
  --shadow-lg: 0 14px 40px rgba(79, 124, 255, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}
/* 页面顶部柔光渐变 */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 320px;
  background:
    radial-gradient(600px 240px at 12% 0%, rgba(139, 92, 246, 0.12), transparent 70%),
    radial-gradient(700px 260px at 85% 0%, rgba(79, 124, 255, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
main, .page { position: relative; z-index: 1; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; cursor: pointer; }
.logo .bot { font-size: 26px; filter: drop-shadow(0 3px 6px rgba(79,124,255,.35)); animation: botFloat 3.2s ease-in-out infinite; }
.logo .name { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 1px; }
.topbar .spacer { flex: 1; }
.topbar a.plain { color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: 999px; transition: .2s; }
.topbar a.plain:hover { color: var(--blue); background: var(--grad-soft); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer;
  padding: 12px 24px; border-radius: var(--radius-btn);
  font-size: 16px; font-weight: 700;
  transition: transform .18s, box-shadow .18s, opacity .18s;
  user-select: none;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(79, 124, 255, .35); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(79, 124, 255, .42); }
.btn.orange { background: linear-gradient(135deg, #ffb25e, #ff9f43); color: #fff; box-shadow: 0 6px 18px rgba(255, 159, 67, .35); }
.btn.orange:hover { transform: translateY(-2px); }
.btn.ghost { background: #fff; color: var(--blue); border: 2px solid var(--line); }
.btn.ghost:hover { border-color: var(--blue); background: var(--grad-soft); }
.btn.danger-ghost { background: #fff; color: var(--danger); border: 2px solid #fee2e2; }
.btn.danger-ghost:hover { background: #fef2f2; border-color: var(--danger); }
.btn.small { padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn.big { padding: 16px 34px; font-size: 19px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.card.hover { transition: transform .2s ease, box-shadow .2s ease; }
.card.hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

/* ---------- 徽章 / 芯片 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line);
  color: var(--muted); font-weight: 700; font-size: 14px;
  cursor: pointer; transition: .18s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(79,124,255,.3); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid #e3e9fb;
  font-size: 12px; font-weight: 700; color: var(--purple); white-space: nowrap;
}

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 14px; color: var(--ink); }
.input, .textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-btn);
  font-size: 16px; font-family: inherit;
  background: #fbfcff;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, .12);
  background: #fff;
}
.textarea { resize: vertical; min-height: 72px; }
.hint { font-size: 13px; color: var(--muted); }

/* ---------- 页面容器 ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 26px 22px 70px; }

/* ---------- 区块标题 ---------- */
.sec { display: flex; align-items: center; gap: 10px; margin: 30px 0 16px; font-size: 20px; font-weight: 800; }
.sec .ico { font-size: 24px; }
.sec .more { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- 作品卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.work-card { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.work-cover {
  position: relative; aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  font-size: 58px;
  overflow: hidden;
}
.work-cover .pin {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,.92); color: var(--orange);
  font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.work-cover .vtag {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(30,41,59,.72); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.work-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.work-name { font-weight: 800; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-intro { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.author-chip { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
a.author-chip { color: inherit; text-decoration: none; border-radius: 8px; padding: 1px 2px; }
a.author-chip:hover .nick { color: var(--blue); text-decoration: underline; }
.import-lines { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; line-height: 1.9; }

/* ---------- 学生端作品管理 ---------- */
.card-ops { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; flex-wrap: wrap; }
.card-ops a {
  color: var(--blue); font-weight: 700; text-decoration: none;
  padding: 5px 10px; border-radius: 9px; background: #fff; border: 1.5px solid var(--line);
  transition: .15s;
}
.card-ops a:hover { border-color: var(--blue); background: var(--grad-soft); }
.card-ops a.del { color: var(--danger); border-color: #fee2e2; }
.card-ops a.del:hover { border-color: var(--danger); background: #fef2f2; }
.mini-stat { color: var(--muted); font-weight: 600; margin-right: auto; }
.mini-warn { color: var(--orange); font-weight: 700; font-size: 12px; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.trash-row:first-child { border-top: 0; }
.trash-row .t-name { font-weight: 700; color: var(--muted); }
.trash-row .t-meta { color: #94a3b8; font-size: 12px; }

/* ---------- 作品封面 ---------- */
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-pick-wrap { margin-top: 16px; text-align: left; }
.cp-title { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.cover-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-item {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer;
  background: #fff; overflow: hidden; padding: 0; transition: .15s;
}
.cp-item img { width: 100%; height: 100%; object-fit: cover; }
.cp-item:hover { transform: scale(1.08); }
.cp-item.on { border-color: var(--blue); background: var(--grad-soft); box-shadow: 0 0 0 3px rgba(79, 124, 255, .15); }
.author-chip .ava { font-size: 18px; }
.author-chip .nick { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 96px; }
.work-meta .likes { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: #fb7185; font-weight: 700; }
button.likes.like-inline {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; color: #fb7185;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; transition: .15s;
}
button.likes.like-inline:hover { background: #fff1f2; transform: scale(1.1); }
button.likes.like-inline.liked { animation: heartPop .4s cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- 成就面板（学生端高浓度） ---------- */
.achv {
  background: var(--grad);
  border-radius: 20px; color: #fff;
  padding: 22px 26px;
  box-shadow: 0 14px 34px rgba(79, 124, 255, .35);
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.achv::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.achv .stat { text-align: center; min-width: 74px; }
.achv .stat .num { font-size: 26px; font-weight: 900; line-height: 1.2; }
.achv .stat .lbl { font-size: 12px; opacity: .85; font-weight: 600; }
.achv .divider { width: 1px; height: 44px; background: rgba(255,255,255,.25); }
.achv .level-block { flex: 1; min-width: 220px; }
.achv .level-line { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; }
.achv .level-line .next { font-size: 12px; font-weight: 600; opacity: .85; margin-left: auto; }
.progress { height: 10px; background: rgba(255,255,255,.25); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.progress .bar { height: 100%; background: #fff; border-radius: 999px; transition: width .6s ease; min-width: 6px; }
.flame { display: inline-block; animation: sway 1.6s ease-in-out infinite; transform-origin: bottom center; }
.flame.big { font-size: 30px; }

/* ---------- 上传区 ---------- */
.dropzone {
  border: 2.5px dashed #c3d2f5;
  border-radius: var(--radius);
  background: #fbfcff;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #f2f6ff; transform: scale(1.005); }
.dropzone .big-ico { font-size: 44px; display: block; margin-bottom: 8px; }
.dropzone .t1 { font-weight: 800; font-size: 17px; }
.dropzone .t2 { font-size: 13px; color: var(--muted); margin-top: 4px; }
.picked {
  display: flex; align-items: center; gap: 10px;
  background: var(--grad-soft); border: 2px solid var(--blue);
  border-radius: var(--radius-btn); padding: 12px 16px; margin-top: 10px;
  font-weight: 700;
}
.picked .x { margin-left: auto; cursor: pointer; color: var(--muted); font-weight: 800; padding: 2px 8px; border-radius: 8px; }
.picked .x:hover { background: rgba(79,124,255,.12); color: var(--blue); }

/* ---------- 空状态 & 机器人 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .bot { font-size: 74px; display: inline-block; animation: botFloat 3s ease-in-out infinite; filter: drop-shadow(0 10px 16px rgba(79,124,255,.25)); }
.empty .t { font-size: 18px; font-weight: 700; margin-top: 14px; color: var(--ink); }
.empty .s { font-size: 14px; margin-top: 4px; }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 41, 59, .45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal {
  background: #fff; border-radius: 20px;
  padding: 28px; max-width: 420px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: popIn .28s cubic-bezier(.34, 1.56, .64, 1);
  max-height: 90vh; overflow: auto;
}
.modal h3 { font-size: 20px; margin-bottom: 14px; }
.modal .close-x { float: right; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; padding: 4px; }

/* ---------- 提示气泡 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast-item {
  background: rgba(30, 41, 59, .92); color: #fff;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 86vw;
}
.toast-item.good { background: linear-gradient(135deg, #10b981, #059669); }
.toast-item.bad { background: linear-gradient(135deg, #f87171, #ef4444); }

/* ---------- 全屏遮罩庆祝（上传成功） ---------- */
.celebrate-mask {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(30, 41, 59, .55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .25s ease;
}
.celebrate {
  background: #fff; border-radius: 24px; padding: 36px 30px 30px;
  max-width: 430px; width: 100%; text-align: center;
  animation: popIn .4s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
.celebrate .stars { font-size: 46px; letter-spacing: 8px; }
.celebrate h2 { font-size: 26px; margin: 10px 0 4px; }
.celebrate .sub { color: var(--muted); font-size: 14px; }
.celebrate .qr-box { margin: 18px auto 6px; padding: 12px; width: fit-content; background: #fff; border: 2px dashed var(--line); border-radius: 16px; }
.celebrate .qr-box img { width: 168px; height: 168px; display: block; }
.celebrate .qr-tip { font-size: 12px; color: var(--muted); }
.celebrate .acts { display: flex; gap: 12px; margin-top: 20px; }
.celebrate .acts .btn { flex: 1; }
.confetti { position: fixed; top: -20px; z-index: 130; pointer-events: none; animation: confettiFall linear forwards; }

/* ---------- 表格（老师端） ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tb { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.tb th {
  text-align: left; padding: 12px 14px;
  background: var(--grad-soft); color: var(--ink);
  font-size: 13px; white-space: nowrap;
}
.tb td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tb tr:hover td { background: #fafbff; }
.tb .code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 800; letter-spacing: 2px; color: var(--blue); font-size: 15px; }
.tb .ops { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.ok { background: #ecfdf5; color: var(--green); }
.tag.off { background: #f1f5f9; color: var(--muted); }
.tag.feat { background: #fff7ed; color: var(--orange); }

/* ---------- 详情页（家长端 · 低浓度降噪） ---------- */
.detail-top { display: flex; align-items: center; gap: 10px; padding: 16px 22px 0; max-width: 1060px; margin: 0 auto; width: 100%; }
.detail-top .mini-logo { font-weight: 800; font-size: 15px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.detail-head { max-width: 1060px; margin: 18px auto 0; padding: 0 22px; width: 100%; }
.detail-head h1 { font-size: 26px; font-weight: 900; }
.detail-head .byline { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.run-frame {
  max-width: 1060px; margin: 18px auto 0; padding: 0 22px; width: 100%;
}
.run-box {
  position: relative;
  background: #0f172a;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  max-height: 640px;
  width: 100%;
}
.run-box iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.run-tools { display: flex; gap: 10px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.like-btn {
  display: inline-flex; align-items: center; gap: 9px;
  border: none; cursor: pointer;
  padding: 12px 26px; border-radius: 999px;
  background: #fff; border: 2px solid #fecdd3;
  color: #fb7185; font-size: 17px; font-weight: 800;
  transition: transform .18s, box-shadow .18s;
  box-shadow: var(--shadow);
}
.like-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.like-btn .heart { font-size: 20px; display: inline-block; }
.like-btn.liked { background: linear-gradient(135deg, #fb7185, #f43f5e); color: #fff; border-color: transparent; }
.like-btn.liked .heart { animation: heartPop .45s cubic-bezier(.34,1.56,.64,1); }
.detail-desc { max-width: 1060px; margin: 22px auto 0; padding: 0 22px; }
.detail-desc .card { padding: 20px 24px; }
.detail-desc h3 { font-size: 16px; margin-bottom: 6px; }
.share-card { max-width: 1060px; margin: 22px auto 60px; padding: 0 22px; }
.share-card .card {
  display: flex; align-items: center; gap: 20px; padding: 20px 26px; flex-wrap: wrap;
}
.share-card img.qr { width: 110px; height: 110px; border-radius: 10px; border: 1px solid var(--line); }
.share-card .t { font-weight: 800; font-size: 16px; }
.share-card .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.rotate-hint {
  display: none;
  margin: 0 auto 12px; max-width: 1016px;
  background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c;
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
  text-align: center;
}
@media (max-width: 640px) and (orientation: portrait) {
  .rotate-hint.can { display: block; animation: fadeIn .4s ease; }
}
@media (max-width: 640px) {
  .run-box { aspect-ratio: auto; height: 68vh; border-radius: 14px; }
  .detail-head h1 { font-size: 21px; }
  .wrap { padding: 18px 14px 60px; }
  .topbar { padding: 12px 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .achv { padding: 18px; gap: 16px; }
  .achv .divider { display: none; }
}

/* ---------- 学生码登录 ---------- */
.login-stage { min-height: 92vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; text-align: center; padding: 44px 36px 38px; }
.login-card .bot { font-size: 72px; display: inline-block; animation: botFloat 3s ease-in-out infinite; filter: drop-shadow(0 12px 18px rgba(79,124,255,.3)); }
.login-card h1 { font-size: 26px; margin-top: 10px; }
.login-card .sub { color: var(--muted); margin-top: 6px; font-size: 15px; }
.code-input {
  margin-top: 26px;
  width: 100%; text-align: center;
  font-size: 34px; font-weight: 900; letter-spacing: 12px;
  padding: 14px 10px 14px 22px;
  border: 3px solid var(--line); border-radius: 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--blue); background: #fbfcff;
}
.code-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(79,124,255,.14); }
.code-input.err { animation: shake .4s ease; border-color: var(--danger); }
.code-input.long { font-size: 21px; letter-spacing: 3px; padding-left: 13px; }
.login-card .btn { width: 100%; margin-top: 18px; }
.login-foot { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------- 头像选择 ---------- */
.ava-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.ava-pick span {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line); background: #fff; transition: .15s;
}
.ava-pick span:hover { transform: scale(1.12); }
.ava-pick span.on { border-color: var(--blue); background: var(--grad-soft); box-shadow: 0 0 0 3px rgba(79,124,255,.15); }

/* ---------- 打印学生码 ---------- */
.print-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12mm; max-width: 860px; margin: 20px auto; }
.pcard {
  border: 2px solid #d7e2f7; border-radius: 18px;
  padding: 18px; text-align: center;
  break-inside: avoid; page-break-inside: avoid;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.pcard .brand { font-weight: 900; font-size: 15px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pcard .ava { font-size: 44px; line-height: 1.2; }
.pcard .nick { font-weight: 800; font-size: 19px; }
.pcard .lbl { color: var(--muted); font-size: 12px; }
.pcard .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 30px; font-weight: 900; letter-spacing: 8px; color: #1e293b; padding-left: 8px; }
.pcard .code.long { font-size: 19px; letter-spacing: 2px; padding-left: 2px; }
.pcard img { width: 96px; height: 96px; }
@media print {
  body::before { display: none; }
  .no-print { display: none !important; }
  body { background: #fff; }
  .pcard { border-color: #cbd5e1; }
}
@media (max-width: 640px) { .print-cards { grid-template-columns: 1fr; } }

/* ---------- 老师端布局 ---------- */
.tabs { display: flex; gap: 10px; margin: 22px 0 18px; flex-wrap: wrap; }
.panel { padding: 22px; }
.panel h3 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel h3 .btn { margin-left: auto; }
.inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.inline-form .field { margin-bottom: 0; flex: 1; min-width: 150px; }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.stat-card { flex: 1; min-width: 150px; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.stat-card .ico { font-size: 30px; }
.stat-card .n { font-size: 24px; font-weight: 900; line-height: 1.2; }
.stat-card .l { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- 动画 ---------- */
@keyframes botFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes sway { 0%, 100% { transform: rotate(-7deg) scale(1); } 50% { transform: rotate(7deg) scale(1.08); } }
@keyframes heartPop { 0% { transform: scale(1); } 45% { transform: scale(1.55); } 100% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.86) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-9px); } 50% { transform: translateX(9px); } 75% { transform: translateX(-5px); } }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(720deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
