/* ============================================================
   有备 · 前端样式
   视觉体系对齐 n9e-assistant(小莺)的 fc-* 精致化做法,品牌色相
   保留有备青绿:浅色画布带品牌青氛围光晕 + 白色面板 + rgba 毛边
   + 三级品牌色相阴影 + 宋体问候 + 微交互;教育意象用「备」印章承担。
   ============================================================ */

:root {
  color-scheme: light;

  /* Brand — 品牌青绿 */
  --brand: #0d9488;
  --brand-2: #14b8a6;
  --brand-deep: #0f766e;
  --brand-ink: #115e59;
  --brand-tint: #f0fdfa;
  --brand-soft: #ccfbf1;
  --brand-bg: #ddf3ef;
  --accent-line: rgba(13, 148, 136, 0.35);
  --accent-line-2: rgba(13, 148, 136, 0.16);
  --accent-ring: rgba(13, 148, 136, 0.15);
  --grad-accent: linear-gradient(180deg, #14b8a6, #0d9488);

  /* Surface */
  --paper: #f5f8f7;
  --paper-2: #eef2f1;
  --raised: #ffffff;
  --hover: #f2f5f4;
  --pressed: #e5ebe9;
  --bg: var(--paper);
  --card: var(--raised);

  /* Ink */
  --ink: #182420;
  --ink-2: #46534f;
  --ink-3: #92a09b;

  /* Hairlines(rgba 毛边,叠在任何底色上都自然) */
  --line: rgba(18, 38, 34, 0.12);
  --line-strong: rgba(18, 38, 34, 0.18);
  --line-soft: rgba(18, 38, 34, 0.07);

  /* Status */
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;

  /* Radii / Shadow / Easing */
  --radius: 14px;
  --shadow-soft: 0 1px 2px rgba(19, 78, 74, 0.05), 0 4px 14px -6px rgba(19, 78, 74, 0.08);
  --shadow-rise: 0 2px 4px rgba(19, 78, 74, 0.06), 0 12px 32px -12px rgba(19, 78, 74, 0.16);
  --shadow-pop: 0 4px 8px rgba(19, 78, 74, 0.07), 0 24px 56px -18px rgba(19, 78, 74, 0.24);
  --shadow: var(--shadow-soft);
  --shadow-lg: var(--shadow-pop);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, Georgia, "Songti SC", "STSong", "SimSun", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  /* 画布:浅底 + 两团极淡的品牌青光晕,给页面一点空气感 */
  background:
    radial-gradient(900px 480px at 88% -12%, rgba(13, 148, 136, 0.06), transparent 62%),
    radial-gradient(760px 460px at -8% 112%, rgba(13, 148, 136, 0.05), transparent 62%),
    var(--paper);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: rgba(13, 148, 136, 0.18); }

.boot {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

/* ---------- 动效关键帧 ---------- */

@keyframes rise {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(5px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* 钤印呼吸:极缓的落章意象,对应小莺的星标 */
@keyframes sealBreathe {
  0%, 100% { transform: rotate(-2deg) scale(1); }
  50%      { transform: rotate(2deg) scale(1.05); }
}

@keyframes sendRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0); }
}

/* ---------- 印章 logo ---------- */

.seal {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #14b8a6, var(--brand-deep));
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px -3px rgba(13, 148, 136, 0.45);
  flex: none;
  user-select: none;
}
.seal-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 36px; }
.seal-hero {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-size: 24px;
  font-family: var(--serif);
  animation: sealBreathe 6s ease-in-out infinite;
}

/* ---------- 通用控件 ---------- */

.btn {
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--ink-2);
  border-radius: 10px;
  padding: 9px 18px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.2s, color 0.15s,
    transform 0.15s var(--ease-out);
}
.btn:hover { border-color: var(--line-strong); background: var(--hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover:not(:disabled) {
  background: var(--grad-accent);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -6px rgba(15, 118, 110, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:active:not(:disabled) { transform: none; filter: brightness(0.98); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); border-color: transparent; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 24px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field-label {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.field input, .field select, .field textarea, .field-static {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--raised);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field select { appearance: auto; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.field select:disabled { background: var(--paper-2); color: var(--ink-3); }
.field-static {
  background: var(--paper-2);
  color: var(--ink-2);
  border-color: transparent;
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.error-bar {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- 登录页 ---------- */

.login-page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(720px 460px at 72% 18%, rgba(13, 148, 136, 0.1), transparent 60%),
    radial-gradient(640px 420px at 18% 88%, rgba(13, 148, 136, 0.07), transparent 60%),
    var(--paper);
}
.login-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(860px, 100%);
  background: var(--raised);
  border-radius: 20px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  border: 1px solid var(--line);
  animation: rise 0.5s var(--ease-out) both;
}
.login-brand {
  background: linear-gradient(160deg, var(--brand-tint), #fff 70%);
  padding: 48px 40px;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-brand h1 {
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: 2px;
  color: var(--brand-ink);
  margin-top: 6px;
}
.slogan { color: var(--ink-2); font-size: 15px; }
.brand-points {
  margin-top: auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink-2);
  font-size: 13.5px;
}
.brand-points li { padding-left: 20px; position: relative; }
.brand-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--brand);
  opacity: 0.7;
}
.login-form {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-tabs {
  display: flex;
  background: var(--paper-2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 4px;
}
.login-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 7px 0;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.login-tabs button.on {
  background: var(--raised);
  color: var(--brand-ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(19, 78, 74, 0.1);
}

/* ---------- 主布局 ---------- */

.app { display: flex; height: 100%; overflow: hidden; }

.sidebar {
  width: 272px;
  flex: none;
  background: var(--raised);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  gap: 14px;
}
.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.15s;
}
.side-head:hover { background: var(--hover); }
.side-title { display: flex; flex-direction: column; line-height: 1.25; }
.side-title b { font-size: 17px; letter-spacing: 1px; color: var(--brand-ink); }
.side-title small { color: var(--ink-3); font-size: 12px; }

.new-btn {
  border-radius: 11px;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand-bg);
  border-color: var(--accent-line-2);
  color: var(--brand-ink);
  font-weight: 550;
  box-shadow: none;
}
.new-btn:hover:not(:disabled) {
  background: #cfeee8;
  filter: none;
  box-shadow: 0 4px 12px -6px rgba(13, 148, 136, 0.4);
  transform: translateY(-1px);
}
.new-btn:active:not(:disabled) { transform: none; box-shadow: none; }
.new-plus { font-size: 15px; line-height: 1; transition: transform 0.25s var(--ease-spring); }
.new-btn:hover .new-plus { transform: rotate(90deg); }

.conv-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -4px;
  padding: 0 4px;
}
.conv-empty {
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
  padding: 28px 0;
}
.conv-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 9px;
  padding: 8px 10px 8px 12px;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
/* 左侧指示条:默认收起,激活时亮起 */
.conv-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--brand);
  transform: translateY(-50%);
  transition: height 0.25s var(--ease-out);
}
.conv-item:hover { background: var(--hover); }
.conv-item.active { background: var(--brand-tint); color: var(--brand-ink); font-weight: 500; }
.conv-item.active::before { height: 60%; }
.conv-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
}
.conv-time { flex: none; font-size: 11.5px; color: var(--ink-3); }

.side-user {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-line { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
  display: grid;
  place-items: center;
  flex: none;
}
.user-info { min-width: 0; }
.user-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-quota { font-size: 12px; color: var(--ink-3); }
.quota-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--paper-2);
  overflow: hidden;
}
.quota-bar i {
  display: block;
  height: 100%;
  background: var(--grad-accent);
  border-radius: 3px;
  transition: width 0.3s;
}
.user-actions { display: flex; gap: 6px; }
/* basis 取内容宽：管理员多一个「管理」按钮时，等分会把「偏好设置」挤到换行 */
.user-actions .btn { flex: 1 1 auto; white-space: nowrap; padding-left: 8px; padding-right: 8px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

/* 移动端侧栏 */
.side-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--ink-2);
  box-shadow: var(--shadow-soft);
}
.side-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 27, 0.3);
  z-index: 39;
}

/* ---------- 对话主页(空态) ---------- */

.home {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.home-center {
  margin: auto;
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 48px;
}

.welcome { text-align: center; animation: rise 0.5s var(--ease-out) both; }
.welcome-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.welcome-sub {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  animation: rise 0.55s var(--ease-out) both 0.12s;
}

/* ---------- composer(主页与对话页共用输入壳) ---------- */

.composer-hero { margin-top: 26px; animation: rise 0.55s var(--ease-out) both 0.08s; }

.composer {
  width: 100%;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.composer:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-ring), var(--shadow-rise);
}
.composer textarea {
  display: block;
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  padding: 13px 16px 6px;
  line-height: 1.7;
  max-height: 200px;
  color: var(--ink);
  overflow-y: auto;
}
.composer textarea::placeholder { color: var(--ink-3); }
.composer textarea:disabled { color: var(--ink-3); }
.composer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 10px 16px;
}
.composer-row .spacer { flex: 1; }

/* 待发图片缩略条：选中即上传，上传中盖一层遮罩，右上角叉可移除 */
.composer-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 0;
}
.composer-thumbs .thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line, #e3e6e8);
  background: var(--paper-2, #f6f7f8);
}
.composer-thumbs .thumb.bad { border-color: #d1495b; }
.composer-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.composer-thumbs .thumb-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
}
.composer-thumbs .thumb-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  line-height: 16px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.composer-thumbs .thumb-x:hover { background: rgba(0, 0, 0, 0.75); }
/* 拖文件到输入框上方时给个明确的落点提示 */
.composer.drag-over { border-color: var(--accent, #0f766e); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }

/* 任务类型标签：课件类任务（动画/游戏/互动/PPT/简报）的路由靠 context.taskType，
   模型猜不出来，得让教师在输入框里先点一下；未选时是底部一排 chip，选中后收成
   文字上方的绿标签。文本类任务不放这儿——模型能从描述里自己认。 */
.composer-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.task-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 5px 4px 11px;
  font-size: 12.5px;
  color: var(--brand-ink);
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  animation: popIn 0.2s var(--ease-out) both;
}
.task-tag svg { width: 14px; height: 14px; flex: none; }
/* locked = 会话已绑定的类型，撤不掉，只作提示：弱化成灰底 */
.task-tag.locked {
  padding: 4px 11px;
  color: var(--ink-3);
  background: var(--paper-2, #f6f7f8);
  border-color: var(--line);
  animation: none;
}
.task-tag-x {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--brand-ink);
  font-size: 14px;
  line-height: 1;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.task-tag-x:hover { opacity: 1; background: rgba(13, 148, 136, 0.14); }

.task-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.task-chip svg { width: 14px; height: 14px; flex: none; }
.task-chip:hover:not(:disabled) {
  color: var(--brand-ink);
  border-color: var(--accent-line);
  background: var(--brand-tint);
}
.task-chip:disabled { opacity: 0.45; cursor: default; }
.composer-row .send { margin-left: auto; }

.attach {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink-3);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.attach svg { width: 18px; height: 18px; }
.attach:hover:not(:disabled) { color: var(--ink); background: rgba(0, 0, 0, 0.05); }
.attach:disabled { opacity: 0.4; cursor: default; }
.composer-hint { flex: 1; font-size: 12px; color: var(--ink-3); user-select: none; }

.send {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: filter 0.15s, transform 0.15s var(--ease-spring), box-shadow 0.2s, background 0.2s;
}
.send:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px -4px rgba(15, 118, 110, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.send:active:not(:disabled) { transform: scale(0.92); }
.send:disabled {
  background: var(--pressed);
  color: var(--ink-3);
  box-shadow: none;
  cursor: default;
}
.icon-send { width: 15px; height: 15px; }
.icon-stop { width: 12px; height: 12px; border-radius: 3px; background: #fff; }
.send.streaming { animation: sendRing 1.6s ease-in-out infinite; }

/* ---------- 建议 chips ---------- */

.schips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.schip {
  padding: 7px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(19, 78, 74, 0.04);
  animation: rise 0.5s var(--ease-out) both;
  transition: color 0.15s, border-color 0.15s, background 0.15s,
    transform 0.18s var(--ease-out), box-shadow 0.2s;
}
.schip:nth-child(1) { animation-delay: 0.15s; }
.schip:nth-child(2) { animation-delay: 0.22s; }
.schip:nth-child(3) { animation-delay: 0.29s; }
.schip:nth-child(4) { animation-delay: 0.36s; }
.schip:hover {
  color: var(--brand-ink);
  border-color: var(--accent-line);
  background: var(--brand-tint);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -8px rgba(13, 148, 136, 0.4);
}
.schip:active { transform: none; }

/* ---------- 精确选课(次要入口) ---------- */

.pick-link {
  margin-top: 26px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  transition: color 0.15s;
  animation: rise 0.5s var(--ease-out) both 0.4s;
}
.pick-link:hover { color: var(--brand-deep); }

.pick-card {
  width: 100%;
  margin-top: 14px;
  animation: popIn 0.3s var(--ease-out) both;
}
.pick-body {
  padding: 22px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cascade {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.edition-note {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: -10px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 999px;
  padding: 7px 18px;
  color: var(--ink-2);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--accent-line); color: var(--brand-deep); }
.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 10px -4px rgba(13, 148, 136, 0.5);
}
.chip-more { border-style: dashed; color: var(--ink-3); }

.zuti-panel {
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.zuti-panel .field input, .zuti-panel .field select { background: var(--raised); }

.hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: -8px;
}

/* ---------- 对话页 ---------- */

.chat-wrap { flex: 1; display: flex; overflow: hidden; }
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 28px 24px 12px; }
.chat-col {
  width: min(760px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.row-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  animation: rise 0.35s var(--ease-out) both;
}
/* 教师发的图：跟在气泡上方，最多一行四张 */
.bubble-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 82%;
}
.bubble-images img {
  max-width: 168px;
  max-height: 168px;
  border-radius: 10px;
  border: 1px solid var(--accent-line-2);
  display: block;
  object-fit: cover;
  background: var(--paper-2, #f6f7f8);
}
.bubble-images a:hover img { filter: brightness(0.97); }
.bubble-user {
  max-width: 82%;
  background: linear-gradient(135deg, #e9f7f4, #dbf1ec);
  border: 1px solid var(--accent-line-2);
  color: var(--ink);
  border-radius: 12px 12px 4px 12px;
  padding: 9px 15px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* AI 回复:不加卡片框,内容直接铺在画布上(对齐小莺) */
.ai-turn {
  min-width: 0;
  padding: 2px 4px;
  animation: rise 0.35s var(--ease-out) both;
}

.thinking {
  color: var(--ink-3);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.thinking .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 1.2s ease-in-out infinite;
}
/* 整体进度：百分比只在模型给了任务清单时才有，已用时长一直挂在行尾。
   数字用 tabular-nums，秒级刷新时不会左右跳宽。 */
.thinking-pct {
  margin-left: 6px;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}
.thinking-time {
  margin-left: auto;
  flex: none;
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.thinking-bar {
  margin-top: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-soft);
  overflow: hidden;
}
.thinking-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--brand);
  transition: width 0.4s var(--ease-out);
}
/* 长任务提示：跑过 8 分钟才出现，安抚"是不是卡住了" */
.thinking-note {
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: 10px;
  animation: popIn 0.3s var(--ease-out) both;
}
.thinking .dot:nth-child(2) { animation-delay: 0.2s; }
.thinking .dot:nth-child(3) { animation-delay: 0.4s; margin-right: 6px; }
@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.streaming::after {
  content: "▍";
  color: var(--brand);
  animation: pulse 1s infinite;
}

/* 对话内选择卡(课次定位歧义时):保留实体卡片形态 */
.choice-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 4px 16px 16px 16px;
  box-shadow: var(--shadow-soft);
  padding: 18px 22px;
  animation: rise 0.35s var(--ease-out) both;
}
.choice-card.done { opacity: 0.72; }
.choice-q { font-weight: 600; margin-bottom: 12px; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s, transform 0.18s var(--ease-out),
    box-shadow 0.2s;
}
.choice-opt:hover:not(:disabled) {
  border-color: var(--accent-line);
  background: var(--brand-tint);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(13, 148, 136, 0.4);
}
.choice-opt:disabled { cursor: default; }
.choice-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12.5px;
  display: grid;
  place-items: center;
  flex: none;
}
.choice-opt:hover:not(:disabled) .choice-num { background: var(--brand-soft); color: var(--brand-ink); }
.choice-label { min-width: 0; word-break: break-word; }
.choice-other {
  width: 100%;
  margin-top: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  outline: none;
  background: var(--raised);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.choice-other:focus {
  border-style: solid;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* 执行时间线:叙述段落 + 可展开命令组 + 思考行(实时/回放同构) */
.timeline-say { margin: 8px 0; }
.timeline-say:first-child { margin-top: 0; }

.steps { margin: 10px 0; }
.steps:first-child { margin-top: 0; }
.steps-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: var(--ink-3);
  text-align: left;
  transition: color 0.15s;
}
.steps-toggle:hover { color: var(--brand-deep); }
.steps-ico { flex: none; display: flex; }
.steps-ico svg { width: 14px; height: 14px; display: block; }
.steps-ico.running { color: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
.steps-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}
.steps-dur { flex: none; color: var(--ink-3); font-size: 11.5px; }
.steps-arrow { flex: none; color: var(--ink-3); font-size: 11px; }
.steps-detail {
  margin: 4px 0 6px;
  border-left: 3px solid var(--brand-soft);
  background: var(--paper-2);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}
.step-item { display: flex; flex-direction: column; gap: 2px; }
.step-line {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
}
.step-fail { flex: none; color: var(--danger); font-size: 11px; }
.step-verb {
  flex: none;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 1.7;
  align-self: flex-start;
}
.step-what { min-width: 0; }
/* 任务清单卡:模型 update_plan 的 TODO 快照,随进度实时更新勾选态 */
.plan-card {
  margin: 10px 0;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 14px 12px;
}
.plan-card:first-child { margin-top: 0; }
.plan-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.plan-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-count { margin-left: auto; flex: none; font-size: 11.5px; color: var(--ink-3); }
.plan-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}
.plan-mark { flex: none; width: 16px; text-align: center; color: var(--ink-3); }
.plan-step.completed .plan-mark { color: var(--brand-deep); }
.plan-step.completed .plan-text { color: var(--ink-3); text-decoration: line-through; }
.plan-step.inProgress .plan-mark { color: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
.plan-step.inProgress .plan-text { color: var(--ink); }
.plan-text { min-width: 0; word-break: break-word; }

/* 提示行:瞬态重试/服务端告警(非致命,琥珀色弱提示) */
.notice-line {
  margin: 8px 0;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(217, 158, 46, 0.1);
  border: 1px solid rgba(217, 158, 46, 0.28);
  color: #9a6b1a;
  font-size: 12.5px;
  line-height: 1.6;
}

/* 文件卡:长文档在对话流中的收纳区块(点击 → 右侧预览面板) */
.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  box-shadow: var(--shadow-soft);
  animation: rise 0.35s var(--ease-out) both;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.2s,
    transform 0.18s var(--ease-out);
}
.file-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
  box-shadow: var(--shadow-rise);
}
.file-card.active { border-color: var(--accent-line); background: var(--brand-tint); }
.file-ico {
  flex: none;
  width: 40px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: 9px;
}
.file-ico svg { width: 20px; height: 24px; }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.file-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta small { font-size: 12px; color: var(--ink-3); }
.file-open {
  flex: none;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.file-card:hover .file-open, .file-card.active .file-open {
  background: var(--brand);
  color: #fff;
}
/* 终稿撰写中的占位卡 */
.file-card.writing { border-style: dashed; }
.file-card.writing .file-ico { animation: pulse 1.2s ease-in-out infinite; }

/* 右侧预览面板(侧拉板) */
@keyframes panelIn {
  from { transform: translateX(28px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.preview-panel {
  flex: none;
  /* 默认占窗口 3/5;--panel-w 由 JS 按窗口比例算成像素(拖动/记忆见 chat.jsx)。
     max-width 给对话区留出至少 320px,拖到头也不会把对话挤没 */
  width: var(--panel-w, 60%);
  min-width: 360px;
  max-width: calc(100% - 320px);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--raised);
  border-left: 1px solid var(--line);
  animation: panelIn 0.3s var(--ease-out) both;
  overflow: hidden;
}
/* 左缘拖动分隔条:命中区 10px(手感),视觉只有 2px 高亮条 */
.preview-resizer {
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 10px;
  z-index: 6;
  cursor: col-resize;
  touch-action: none;
}
.preview-resizer::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.15s;
}
.preview-resizer:hover::after,
.preview-resizer:focus-visible::after,
body.resizing .preview-resizer::after {
  background: var(--brand);
}
.preview-resizer:focus-visible { outline: none; }
/* 拖动中:全局禁选中与文本光标;iframe 预览不吞事件(pointer capture 之外的双保险) */
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe { pointer-events: none; }

.preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.preview-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.preview-close:hover { background: var(--hover); color: var(--ink); }
.preview-tools { padding: 10px 18px 0; }
.preview-tools .toolbar { margin-top: 0; padding-top: 0; border-top: 0; }
.preview-body { flex: 1; overflow-y: auto; padding: 18px 22px 48px; }

@media (max-width: 980px) {
  .preview-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, 100%);
    max-width: 100%;
    min-width: 0;
    z-index: 45;
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
  }
  /* 窄屏面板是覆盖层,宽度由屏宽定,不提供拖动 */
  .preview-resizer { display: none; }
}

/* markdown 渲染 */
.md { line-height: 1.85; word-break: break-word; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 {
  margin: 1.2em 0 0.5em;
  line-height: 1.4;
  color: var(--ink);
}
.md h1 { font-size: 21px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.md h2 { font-size: 18px; }
.md h3 { font-size: 16px; color: var(--brand-ink); }
.md h4 { font-size: 15px; }
.md p, .md ul, .md ol { margin: 0.55em 0; }
.md ul, .md ol { padding-left: 1.6em; }
.md li { margin: 0.25em 0; }
.md strong { color: var(--ink); }
.md a { color: var(--brand-deep); }
.md hr { border: 0; border-top: 1px solid var(--line-soft); margin: 1.2em 0; }
.md blockquote {
  border-left: 3px solid var(--brand-soft);
  background: var(--brand-tint);
  border-radius: 0 8px 8px 0;
  padding: 8px 14px;
  color: var(--ink-2);
  margin: 0.7em 0;
}
.md code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-2);
  border-radius: 5px;
  padding: 2px 6px;
}
.md pre {
  background: #f7faf9;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0.8em 0;
}
.md pre code { background: transparent; padding: 0; font-size: 12.5px; line-height: 1.7; }
.md table {
  border-collapse: collapse;
  margin: 0.8em 0;
  width: 100%;
  display: block;
  overflow-x: auto;
  font-size: 13.5px;
}
.md th, .md td {
  border: 1px solid var(--line);
  padding: 7px 12px;
  text-align: left;
  vertical-align: top;
}
.md th { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; white-space: nowrap; }
.md tr:nth-child(even) td { background: #fafcfb; }

/* AI 卡片工具条 */
.toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.toolbar button {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: all 0.15s;
}
.toolbar button:hover:not(:disabled) {
  border-color: var(--accent-line);
  color: var(--brand-deep);
  background: var(--brand-tint);
}
.toolbar button:disabled { opacity: 0.5; cursor: default; }
.toolbar-err { font-size: 12px; color: var(--danger); }

/* 输入区 */
.chat-input {
  padding: 12px 24px 20px;
  background: linear-gradient(transparent, var(--paper) 40%);
}

/* ---------- 管理后台 ---------- */

.admin-page {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-head h2 { font-size: 21px; letter-spacing: -0.01em; }

.admin-sub {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 4px;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-card-head h3 { font-size: 16px; }

.admin-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.admin-num {
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--ink);
  padding: 5px 8px;
  font: inherit;
  font-size: 13px;
}

.admin-num:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-ring); }

.admin-table-wrap { overflow-x: auto; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.admin-table th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-3);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--hover); }
.admin-table tr.is-used { color: var(--ink-2); }
.admin-table .mono { font-family: var(--mono); font-size: 13px; }
.admin-dim { color: var(--ink-3); white-space: nowrap; }
.admin-empty { color: var(--ink-3); text-align: center; padding: 22px 0; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: nowrap;
}

.tag-ok { background: var(--brand-soft); color: var(--brand-ink); }
.tag-muted { background: var(--paper-2); color: var(--ink-3); }
.tag-brand { background: var(--brand-tint); color: var(--brand-deep); margin-left: 6px; }

.tag-err { background: var(--danger-bg); color: var(--danger); }

.quota-cell { display: flex; align-items: center; gap: 6px; }
.quota-err { color: var(--danger); font-size: 12px; }
.quota-over { color: var(--danger); }

/* ---------- 管理后台：token 用量 ---------- */

.usage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 14px;
}
.usage-stat {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}
.usage-stat-n { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.usage-stat-k { font-size: 12px; color: var(--ink-3); }

.usage-bytask { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.usage-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
}
.usage-chip b { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.usage-chip i { font-style: normal; color: var(--ink-3); }

/* 额度 0 但确实烧了 token：退还过的任务，一眼定位浪费 */
.usage-free { color: var(--danger); }

.usage-more { display: flex; justify-content: center; padding-top: 12px; }

@media (max-width: 760px) {
  .admin-page { padding: 60px 16px 32px; }
  .admin-card { padding: 14px; }
}

/* ---------- 弹窗 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 27, 0.35);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  width: min(420px, 100%);
  background: var(--raised);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: popIn 0.25s var(--ease-out) both;
}
.modal h3 { font-size: 17px; }
.modal-sub { font-size: 13px; color: var(--ink-3); margin-top: -8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .login-card { grid-template-columns: 1fr; }
  .login-brand { padding: 32px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .brand-points { margin-top: 8px; }
}

@media (max-width: 760px) {
  .side-toggle { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-pop);
  }
  .sidebar.open { transform: translateX(0); }
  .side-mask { display: block; }
  .cascade { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .home { padding-top: 64px; }
  .welcome-title { font-size: 25px; gap: 10px; }
  .seal-hero { width: 36px; height: 36px; font-size: 20px; }
  .chat-scroll { padding-top: 60px; }
}

/* ---------- 动效降级 ---------- */

@media (prefers-reduced-motion: reduce) {
  .seal-hero, .schip, .pick-link, .welcome, .welcome-sub,
  .row-user, .ai-turn, .choice-card, .send.streaming, .login-card, .modal, .pick-card,
  .file-card, .preview-panel, .steps-ico.running, .file-card.writing .file-ico {
    animation: none;
  }
  .thinking .dot { animation: none; opacity: 0.7; }
  .thinking-bar i { transition: none; }
  .streaming::after { animation: none; }
}

/* 课件产物:预览缩略图条 + 交付文件卡(复用 .file-card 基座) */
.art-group { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.art-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}
.art-thumbs img {
  height: 96px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  flex: none;
  background: #fff;
  transition: border-color 0.15s, transform 0.18s var(--ease-out);
}
.art-thumbs img:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.art-card { cursor: default; }
.art-ico { font-size: 26px; height: auto; width: 40px; }
.art-actions { display: flex; gap: 6px; flex: none; align-items: center; }
.art-btn {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.art-btn:hover {
  border-color: var(--accent-line);
  color: var(--brand-deep);
  background: var(--brand-tint);
}
.art-btn-bar { display: inline-block; }

/* 产物内联预览:iframe 撑满面板;图片(幻灯片)等比缩放居中,深色衬底 */
.preview-body-art { padding: 0; display: flex; }
.preview-frame { flex: 1; width: 100%; border: 0; min-height: 100%; background: #fff; }
.preview-body-img {
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #263230; /* 深色放映衬底,与品牌青同相 */
  overflow: hidden;
}
.preview-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}

/* 面板内幻灯片翻页器 */
.slide-nav { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.slide-nav button {
  width: 26px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.2;
}
.slide-count {
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: center;
}
.art-btn-fail { border-color: var(--danger-line); color: var(--danger); background: var(--danger-bg); }
/* 下载回执:成功也给一句,避免「点了没反应」的错觉(文件其实已在下载目录) */
.art-dl { display: inline-flex; align-items: center; gap: 8px; }
.art-dl-tip { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.art-dl-err { color: var(--danger); }
.art-dl-alt {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--brand-deep);
  text-decoration: underline;
  cursor: pointer;
}
.art-thumbs img.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--accent-ring); }
