/* ===========================================================
   作文AI批改 · 共用样式（清爽大气 + 科技灵动）
   本地文件，无任何外网依赖
   =========================================================== */

:root {
  --brand: #2e6bff;
  --brand-2: #00c2ff;
  --brand-soft: rgba(46, 107, 255, .10);
  --accent-red: #e5484d;
  --red-wash-1: rgba(229, 72, 77, .07);
  --red-wash-2: rgba(229, 72, 77, .15);
  --ok: #17b877;
  --warn: #ff9f2e;
  --bg: #f4f7ff;
  --card: rgba(255, 255, 255, .80);
  --line: rgba(46, 107, 255, .13);
  --text: #1b2340;
  --muted: #6b7692;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 12px 32px rgba(27, 35, 64, .09);
  --shadow-lg: 0 20px 50px rgba(27, 35, 64, .14);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* 科技感背景：网格 + 光晕 + 斜扫 */
.bg-deco { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-deco::before {
  content: ""; position: absolute; right: -18vh; top: -22vh; width: 78vh; height: 78vh; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 194, 255, .20), rgba(46, 107, 255, .10) 45%, transparent 70%);
  filter: blur(6px);
}
.bg-deco::after {
  content: ""; position: absolute; left: -14vh; bottom: -26vh; width: 66vh; height: 66vh; border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, rgba(229, 72, 77, .10), transparent 68%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(46, 107, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 107, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 78%);
}
.sheen { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sheen::before {
  content: ""; position: absolute; top: -40%; left: -30%; width: 40%; height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(8deg); animation: sheen 14s linear infinite;
}
@keyframes sheen { 0% { left: -40%; } 55% { left: 120%; } 100% { left: 120%; } }

/* ---------- 布局 ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 22px 120px; }
.wrap.wide { max-width: 1680px; }

.app-header {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 22px; margin-bottom: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
  position: sticky; top: 14px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(46, 107, 255, .35);
  display: grid; place-items: center; color: #fff; font-size: 24px;
}
.brand-title { font-size: 22px; font-weight: 700; letter-spacing: .5px; margin: 0; }
.brand-sub { font-size: 13px; color: var(--muted); margin: 0; letter-spacing: 2px; }
.spacer { flex: 1; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px;
  animation: rise .42s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.card-title .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.card-title small { font-weight: 400; color: var(--muted); font-size: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 17px; font-weight: 600; font-family: inherit; line-height: 1.2;
  padding: 14px 24px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease;
  min-height: 52px;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: #fff; border: none; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 10px 24px rgba(46, 107, 255, .32); }
.btn-ghost { background: rgba(255, 255, 255, .7); }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn-danger { background: linear-gradient(135deg, #ff6b6b, var(--accent-red)); color: #fff; border: none; box-shadow: 0 10px 24px rgba(229, 72, 77, .3); }
.btn-sm { font-size: 15px; padding: 10px 18px; min-height: 44px; }
.btn-block { width: 100%; }

/* ---------- 提交卡片（拍照 / 相册 / 录音 / 文字，四色马卡龙） ----------
   每张卡片通过 --pc(主色) / --pc-soft(浅底) / --pc-line(描边) / --pc-sub(说明文字) 换肤 */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile {
  --pc: #2e6bff; --pc-soft: #eaf1ff; --pc-line: rgba(46, 107, 255, .20); --pc-sub: #5b83d6;
  border: 1px solid var(--pc-line); border-radius: var(--radius);
  background: linear-gradient(160deg, #fff 40%, var(--pc-soft) 100%);
  color: var(--pc); padding: 20px;
  cursor: pointer; text-align: center; transition: transform .18s ease, box-shadow .22s ease, border-color .2s;
  min-height: 136px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(27, 35, 64, .10); border-color: var(--pc); }
.tile:active { transform: scale(.98); }
.tile.on { border-color: var(--pc); box-shadow: 0 0 0 4px var(--pc-soft), 0 14px 30px rgba(27, 35, 64, .10); }
.tile .ico {
  font-size: 30px; line-height: 1; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; box-shadow: 0 6px 16px rgba(27, 35, 64, .10);
}
.tile .t { font-size: 19px; font-weight: 800; color: var(--text); }
.tile .d { font-size: 13px; color: var(--pc-sub); }

/* 四色主题：拍照=天蓝 / 相册=薄荷绿 / 录音=玫瑰粉 / 文字=暖橙 */
.tile.c-sky   { --pc: #2e6bff; --pc-soft: #eaf1ff; --pc-line: rgba(46, 107, 255, .20); --pc-sub: #5b83d6; }
.tile.c-mint  { --pc: #12a37a; --pc-soft: #e4f7f0; --pc-line: rgba(18, 163, 122, .22); --pc-sub: #4a9a83; }
.tile.c-amber { --pc: #f0a020; --pc-soft: #fff4e2; --pc-line: rgba(240, 160, 32, .26); --pc-sub: #b98b45; }

/* 录音按钮：空闲是玫瑰粉浅色卡，录音中转深红 */
.record-btn {
  --pc: #f0628b; --pc-soft: #ffeef3; --pc-line: rgba(240, 98, 139, .22); --pc-sub: #c97e97;
  position: relative; width: 100%; min-height: 136px; border-radius: var(--radius);
  border: 1px solid var(--pc-line); cursor: pointer; color: var(--pc); font-family: inherit;
  background: linear-gradient(160deg, #fff 40%, var(--pc-soft) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  transition: transform .16s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.record-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(27, 35, 64, .10); }
.record-btn:active { transform: scale(.98); }
.record-btn.disabled { opacity: .55; pointer-events: none; }
.record-btn .ico {
  font-size: 30px; line-height: 1; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; box-shadow: 0 6px 16px rgba(27, 35, 64, .10);
}
.record-btn .t { font-size: 19px; font-weight: 800; color: var(--text); }
.record-btn .d { font-size: 13px; color: var(--pc-sub); }
.record-btn .wave { color: var(--pc); }
.record-btn.recording {
  background: linear-gradient(135deg, #ff7a7a, var(--accent-red));
  border-color: transparent; color: #fff; box-shadow: 0 14px 30px rgba(229, 72, 77, .32);
}
.record-btn.recording .ico { background: transparent; box-shadow: none; }
.record-btn.recording .t { color: #fff; }
.record-btn.recording .d { color: rgba(255, 255, 255, .92); }
.record-btn.recording .wave { color: #fff; }
.record-btn.recording::after {
  content: ""; position: absolute; inset: -8px; border-radius: calc(var(--radius) + 8px);
  border: 2px solid rgba(229, 72, 77, .45); animation: pulse 1.5s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.96); opacity: .9; } 100% { transform: scale(1.06); opacity: 0; } }
.record-time { font-size: 30px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; }

/* 声波 */
.wave { display: flex; align-items: flex-end; gap: 4px; height: 26px; }
.wave i { width: 4px; background: currentColor; border-radius: 2px; height: 8px; opacity: .85; }
.wave.on i { animation: wv .9s ease-in-out infinite; }
.wave i:nth-child(1) { animation-delay: 0s } .wave i:nth-child(2) { animation-delay: .1s }
.wave i:nth-child(3) { animation-delay: .2s } .wave i:nth-child(4) { animation-delay: .3s }
.wave i:nth-child(5) { animation-delay: .4s } .wave i:nth-child(6) { animation-delay: .5s }
.wave i:nth-child(7) { animation-delay: .6s } .wave i:nth-child(8) { animation-delay: .7s }
.wave i:nth-child(9) { animation-delay: .8s } .wave i:nth-child(10) { animation-delay: .9s }
.wave i:nth-child(11) { animation-delay: 1s } .wave i:nth-child(12) { animation-delay: 1.1s }
@keyframes wv { 0%, 100% { height: 8px; } 50% { height: 24px; } }

/* ---------- 状态 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px;
  font-size: 14px; font-weight: 700; background: var(--brand-soft); color: var(--brand);
  border: 1px solid transparent; white-space: nowrap;
}
.badge .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: breathe 1.4s infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.badge.ok { background: rgba(23, 184, 119, .12); color: #0e9c63; }
.badge.warn { background: rgba(255, 159, 46, .14); color: #d97b0a; }
.badge.err { background: rgba(229, 72, 77, .12); color: var(--accent-red); }
.badge.mute { background: rgba(107, 118, 146, .12); color: var(--muted); }

.no-badge {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800;
  box-shadow: 0 10px 22px rgba(46, 107, 255, .3);
}
.no-badge .n { font-size: 30px; line-height: 1; }
.no-badge .u { font-size: 14px; opacity: .9; }

/* ---------- AI 内容 ---------- */
/* 评价：红字 + 浅红底纹（甲方指定） */
.ai-comment {
  border-radius: var(--radius); padding: 20px 22px;
  background: linear-gradient(135deg, var(--red-wash-1), var(--red-wash-2));
  border: 1px solid rgba(229, 72, 77, .22);
  color: var(--accent-red); font-size: 20px; line-height: 1.85; font-weight: 600;
  white-space: pre-wrap; word-break: break-word;
  background-image: repeating-linear-gradient(135deg, rgba(229, 72, 77, .05) 0 12px, transparent 12px 24px), linear-gradient(135deg, var(--red-wash-1), var(--red-wash-2));
}
.ai-comment .praise { display: block; margin-bottom: 8px; }
.ai-comment .body { display: block; font-weight: 500; opacity: .95; }

/* 修改建议：独立高亮卡片 */
.ai-suggestion {
  position: relative; border-radius: var(--radius); padding: 20px 22px 20px 26px;
  background: linear-gradient(135deg, rgba(46, 107, 255, .07), rgba(0, 194, 255, .10));
  border: 1px solid rgba(46, 107, 255, .18); color: #1f3f8f; font-size: 19px; line-height: 1.9;
  white-space: pre-wrap; word-break: break-word;
}
.ai-suggestion::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.ai-suggestion b { color: var(--brand); }

.empty-hint { text-align: center; color: var(--muted); font-size: 16px; padding: 26px 10px; }

/* ---------- 图片查看器（双指缩放 / 拖拽） ---------- */
.viewer {
  position: relative; overflow: hidden; border-radius: var(--radius); background: #f0f3fb;
  border: 1px solid var(--line); touch-action: none; cursor: grab; user-select: none; min-height: 220px;
}
.viewer.dragging { cursor: grabbing; }
.viewer img { position: absolute; left: 50%; top: 50%; transform-origin: center center; will-change: transform; max-width: none; pointer-events: none; }
.viewer-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 3; }
.viewer-hint { position: absolute; left: 12px; top: 12px; font-size: 12px; color: #fff; background: rgba(27, 35, 64, .5); padding: 5px 11px; border-radius: 999px; z-index: 3; }
.img-raw { width: 100%; display: block; border-radius: var(--radius); border: 1px solid var(--line); }

/* ---------- 教师端红圈矩阵 ---------- */
.num-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 16px; justify-items: center;
}
@media (min-width: 1400px) { .num-grid { grid-template-columns: repeat(10, 1fr); } }
.num-cell {
  width: 92px; height: 92px; border-radius: 50%; cursor: pointer; position: relative;
  border: 3px solid var(--accent-red); background: #fff; color: var(--accent-red);
  display: grid; place-items: center; font-size: 32px; font-weight: 800; font-family: inherit;
  transition: transform .18s ease, box-shadow .22s ease; overflow: hidden;
}
.num-cell:hover { transform: scale(1.06); box-shadow: 0 10px 24px rgba(229, 72, 77, .28); }
.num-cell .thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .95; }
.num-cell .n { position: relative; z-index: 2; text-shadow: 0 1px 6px rgba(255, 255, 255, .9); }
.num-cell .n.on-thumb { color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.num-cell .tag {
  position: absolute; right: -4px; bottom: -4px; z-index: 3; font-size: 12px; font-weight: 700;
  background: #fff; border-radius: 999px; padding: 2px 9px; box-shadow: var(--shadow);
}
.num-cell.st-empty { border-color: #d3dbec; color: #a9b4cb; }
.num-cell.st-processing { border-color: var(--brand); color: var(--brand); animation: breathe 1.8s infinite; }
.num-cell.st-done { border-color: var(--ok); color: var(--ok); box-shadow: 0 6px 18px rgba(23, 184, 119, .22); }
.num-cell.st-done .tag { color: var(--ok); }
.num-cell.st-failed { border-color: var(--accent-red); color: var(--accent-red); }
.num-cell.flash { animation: flash 1.1s ease-out 2; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(46, 107, 255, 0); } 40% { box-shadow: 0 0 0 12px rgba(46, 107, 255, .25); } }

.stat-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 15px; font-weight: 700; color: var(--muted); }
.stat-pill b { color: var(--brand); font-size: 19px; }
.progress { width: 150px; height: 8px; border-radius: 999px; background: rgba(46, 107, 255, .14); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .5s ease; }

.seg { display: inline-flex; background: rgba(46, 107, 255, .08); border-radius: 999px; padding: 4px; }
.seg button { border: none; background: transparent; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--muted); padding: 9px 20px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow); }

/* ---------- 详情页左右分栏 ---------- */
.detail { display: grid; grid-template-columns: minmax(320px, 38%) 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .detail { grid-template-columns: 1fr; } }
.col-title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; color: var(--muted); margin: 0 0 12px; letter-spacing: 1px; }
.col-title .bar { width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.transcript { font-size: 19px; line-height: 1.95; color: #2b3556; white-space: pre-wrap; word-break: break-word; background: rgba(255, 255, 255, .7); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; }
.student-hero { display: flex; align-items: center; gap: 14px; }
.hero-no {
  width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--accent-red); color: var(--accent-red);
  display: grid; place-items: center; font-size: 28px; font-weight: 800; background: #fff;
  transition: color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
/* 详情页大号圈：与首页红圈矩阵同一套状态色 */
.hero-no.st-empty { border-color: #d3dbec; color: #a9b4cb; }
.hero-no.st-processing { border-color: var(--brand); color: var(--brand); animation: breathe 1.8s infinite; }
.hero-no.st-done { border-color: var(--ok); color: var(--ok); box-shadow: 0 8px 20px rgba(23, 184, 119, .22); }
.hero-no.st-failed { border-color: var(--accent-red); color: var(--accent-red); }

/* ---------- 朗读条 ---------- */
.readbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40;
  display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

/* ---------- 提示 ---------- */
.toast-wrap { position: fixed; left: 50%; top: 26px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 13px 22px; border-radius: 999px; background: rgba(27, 35, 64, .92); color: #fff;
  font-size: 16px; font-weight: 600; box-shadow: var(--shadow-lg); animation: rise .3s ease both;
}
.toast.err { background: linear-gradient(135deg, #ff7a7a, var(--accent-red)); }
.toast.ok { background: linear-gradient(135deg, #34d399, #17b877); }

.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(46, 107, 255, .2);
  border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; vertical-align: -4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-input, textarea.text-input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  font-family: inherit; font-size: 18px; line-height: 1.8; color: var(--text); background: #fff; resize: vertical;
}
.text-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

audio { width: 100%; margin-top: 8px; }
.kv { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 28, 52, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 20px; animation: fadeIn .22s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; padding: 26px 28px;
  animation: rise .3s cubic-bezier(.22, 1, .36, 1) both;
}
.modal-box.wide { max-width: 860px; }
.modal-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.modal-desc { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 8px; color: #3a4463; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- 图片全屏预览 ---------- */
.fs-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(12, 16, 32, .94);
  display: flex; flex-direction: column; animation: fadeIn .2s ease both;
}
.fs-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: #dbe4ff; font-size: 15px; }
.fs-bar .t { font-weight: 700; font-size: 18px; }
.fs-viewer { flex: 1; margin: 0 14px 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); }
.fs-tools { display: flex; gap: 8px; }

/* 竖屏图片容器：宽窄高瘦 */
.viewer.portrait { height: min(62vh, 720px); background: #eef2fb; }
@media (max-width: 980px) { .viewer.portrait { height: 46vh; } }

/* 座位号选择宫格（学生端） */
.seat-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px;
  max-height: 52vh; overflow: auto; padding: 4px;
}
@media (max-width: 560px) { .seat-grid { grid-template-columns: repeat(6, 1fr); } }
.seat {
  aspect-ratio: 1 / 1; min-height: 48px; border-radius: 14px; cursor: pointer;
  border: 2px solid rgba(46, 107, 255, .22); background: #fff; color: var(--brand);
  font-family: inherit; font-size: 22px; font-weight: 800;
  transition: transform .12s ease, background .2s ease, color .2s ease;
}
.seat:active { transform: scale(.93); }
.seat.on { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }

/* 悬浮设置按钮（教师端随时可点开设置） */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 45; width: 62px; height: 62px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 27px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 30px rgba(46, 107, 255, .38); display: grid; place-items: center;
  transition: transform .16s ease;
}
.fab:active { transform: scale(.94); }
.fab .ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(46, 107, 255, .35); animation: pulse 2.4s ease-out infinite; }
.eff-note { font-size: 14px; color: var(--muted); background: rgba(46, 107, 255, .06); border-radius: 12px; padding: 10px 14px; margin-top: 4px; }

/* 提示词历史版本 */
.history-box { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; max-height: 260px; overflow: auto; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(46, 107, 255, .10); }
.history-text { flex: 1; font-size: 14px; color: #48527a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-time { font-size: 12px; color: var(--muted); white-space: nowrap; }

.hint.warn-hint { color: #b06a05; background: rgba(255, 159, 46, .10); border-radius: 10px; padding: 8px 10px; }
.hint code { background: rgba(27, 35, 64, .06); padding: 1px 5px; border-radius: 5px; }
.text-input[readonly] { background: rgba(107, 118, 146, .07); color: #4a5570; cursor: default; }

/* 实际发送内容（排查提示词是否生效） */
.sent-box { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .7); padding: 12px 14px; }
.sent-label { font-size: 13px; font-weight: 700; color: var(--brand); margin: 6px 0 4px; }
.sent-pre {
  margin: 0 0 6px; padding: 10px 12px; background: #0f1626; color: #cfe0ff; border-radius: 10px;
  font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
  max-height: 190px; overflow: auto; font-family: Consolas, "Courier New", monospace;
}

/* 提示词快照（随作品存库） */
.snapshot-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .6); padding: 10px 14px; }
.snapshot-box summary { cursor: pointer; font-size: 15px; font-weight: 700; color: var(--brand); list-style: none; }
.snapshot-box summary::-webkit-details-marker { display: none; }
.snapshot-box summary::before { content: "▸ "; }
.snapshot-box[open] summary::before { content: "▾ "; }
.snap-row { margin-top: 10px; }
.snap-label { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.snap-meta { font-size: 13px; color: var(--muted); }

/* 提示词版本不一致提醒 */
.stale-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px; border-radius: 14px; font-size: 15px;
  background: rgba(255, 159, 46, .12); border: 1px solid rgba(255, 159, 46, .35); color: #b06a05;
}
.stale-banner span { flex: 1; }
.stale-banner b { color: #d97b0a; }
