/* 数演智能体 ShowMath · 三栏版（2026-09-25） */
* , *::before , *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  --green: #16a34a;
  --green-deep: #15803d;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --ink: #1c3a2e;
  --ink-sub: #5b7a6c;
  --line: #e3efe8;
  --bg: #f4f8ff;
  --card: #ffffff;
  --red: #ef4444;
  --amber: #d97706;
  --blue: #2563eb;
  --shadow: 0 8px 24px rgba(22,163,74,.10), 0 2px 6px rgba(22,163,74,.06);
  --radius: 14px;
}
html, body { height: 100%; }
body {
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 380px at 12% -8%, rgba(187,247,208,.45) 0%, rgba(187,247,208,0) 70%),
    radial-gradient(820px 360px at 100% 0%, rgba(134,239,172,.3) 0%, rgba(134,239,172,0) 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; }

.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ---------- 顶栏 ---------- */
.topbar {
  flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(135deg, #e9f9ef 0%, #c9f0d9 100%);
  color: var(--green-deep); box-shadow: 0 4px 18px rgba(21,128,61,.12); z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; background: #fff; color: var(--green);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  box-shadow: 0 2px 8px rgba(21,128,61,.15);
}
.brand .logo-img { width: 30px; height: 30px; display: block; box-shadow: 0 2px 8px rgba(21,128,61,.15); border-radius: 9px; }
.brand small { font-weight: 500; color: rgba(21,128,61,.72); font-size: 11px; letter-spacing: 1.5px; margin-left: 8px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.token-pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: default;
  border: 0; font-size: 12.5px; font-weight: 600; color: var(--green-deep);
  background: rgba(21,128,61,.08); padding: 7px 13px; border-radius: 999px;
}
.token-pill b { font-weight: 800; }
.login-btn { border: 0; cursor: pointer; font-weight: 700; font-size: 13.5px; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-deep)); padding: 8px 20px; border-radius: 999px; box-shadow: 0 3px 10px rgba(22,163,74,.25); }
.login-btn:hover { filter: brightness(1.05); }
/* 模型切换器（顶栏，与 token-pill 同风格半透明深绿底） */
.model-switch { position: relative; }
.model-chip { display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--green-deep); background: rgba(21,128,61,.08); padding: 7px 12px; border-radius: 999px; font-family: inherit; }
.model-chip:hover { background: rgba(21,128,61,.15); }
.model-chip b { font-weight: 800; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; min-width: 230px; width: max-content; max-width: 360px; background: rgba(255,255,255,.82); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border: 1px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 14px 38px rgba(10,40,25,.20); padding: 6px; }
.model-menu.show { display: block; }
.mm-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.mm-item:hover { background: var(--green-50); }
.mm-item.on { background: var(--green-50); }
.mm-item.on .mm-name { color: var(--green-deep); }
.mm-check { width: 14px; flex-shrink: 0; color: var(--green-deep); font-weight: 800; }
.mm-name { font-weight: 600; color: var(--ink); font-size: 13px; white-space: nowrap; }
.mm-sub { margin-left: auto; font-size: 11px; color: var(--ink-sub); padding-left: 8px; white-space: nowrap; }
/* 菜单内分隔与"自定义配置"入口 */
.mm-sep { height: 1px; background: var(--line); margin: 5px 8px; }
.mm-custom { color: var(--green-deep); font-weight: 700; }
.mm-custom svg { width: 14px; height: 14px; flex: 0 0 auto; }
.mm-custom .mm-name { color: var(--green-deep); }
.mm-custom.is-on .mm-name::after { content: '✓'; margin-left: 8px; color: var(--green); font-weight: 800; }
.user-chip { position: relative; }
.user-chip-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(21,128,61,.08); border: 0; border-radius: 999px; padding: 4px 12px 4px 5px; color: var(--green-deep); cursor: pointer; }
.user-chip-btn:hover { background: rgba(21,128,61,.15); }
.uavatar { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--green-deep); display: grid; place-items: center; font-weight: 800; font-size: 14px; overflow: hidden; }
.avimg { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.uname { font-size: 13px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 0; top: 44px; min-width: 224px; width: max-content; max-width: 300px; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  color: var(--ink); border: 1px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 14px 40px rgba(10,40,25,.20);
  padding: 8px; display: none;
}
.user-dropdown.show { display: block; }
.dd-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-av { width: 38px; height: 38px; border-radius: 50%; background: var(--green-100); color: var(--green-deep); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.dd-name { font-weight: 800; font-size: 14px; }
.dd-role { font-size: 12px; color: var(--ink-sub); }
.dd-item { width: 100%; text-align: left; border: 0; background: none; cursor: pointer; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; color: var(--red); font-weight: 700; }
.dd-item:hover { background: #fef2f2; }
/* 签到行：左文案右按钮（已签到灰色禁用），始终一行显示 */
.signin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; white-space: nowrap; }
.signin-txt { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.signin-act { flex-shrink: 0; border: 0; cursor: pointer; padding: 6px 16px; border-radius: 9px; font-size: 12.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-deep)); box-shadow: 0 3px 10px rgba(22,163,74,.25); }
.signin-act:hover { filter: brightness(1.05); }
.signin-act[disabled] { background: #e5e7eb; color: #9ca3af; box-shadow: none; cursor: default; }

/* ---------- 三栏 ---------- */
.stage { flex: 1; min-height: 0; }
.chat-layout { display: flex; height: 100%; }

/* 顶栏最左：会话记录收起/展开（与学情同款汉堡） */
.side-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto;
  border: 0; border-radius: 10px; cursor: pointer; margin-right: 4px;
  background: rgba(21,128,61,.10); color: var(--green-deep);
  transition: background .15s;
}
.side-toggle:hover { background: rgba(21,128,61,.18); }
.side-toggle svg { width: 18px; height: 18px; }
/* 左栏收起：宽度动画折叠到 0 */
.side { width: 236px; flex-shrink: 0; background: rgba(255,255,255,.72); backdrop-filter: blur(10px); border-right: 1px solid var(--line); display: flex; transition: width .22s ease, opacity .2s ease, margin .22s ease; overflow: hidden; }
.chat-layout.side-collapsed .side { width: 0; opacity: 0; border-right-color: transparent; pointer-events: none; }
.side-inner { width: 100%; display: flex; flex-direction: column; padding: 14px 12px; min-height: 0; }
.new-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  border: 0; cursor: pointer; border-radius: 12px; padding: 11px;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #fff; font-weight: 800; font-size: 14px; box-shadow: var(--shadow);
}
.new-btn:hover { filter: brightness(1.05); }
.sess-title { font-size: 12px; font-weight: 800; color: var(--ink-sub); letter-spacing: 2px; margin: 16px 4px 8px; }
.sess-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -4px; padding: 0 4px; }
.sess-item {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid transparent; background: none; border-radius: 11px; padding: 9px 30px 9px 11px;
  transition: background .15s;
}
.sess-item:hover { background: rgba(22,163,74,.07); }
.sess-item.active { background: var(--green-100); border-color: var(--green-200); }
.sess-item .st { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-item .sm { display: block; font-size: 11px; color: var(--ink-sub); margin-top: 2px; }
.sess-item .del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 0; border-radius: 7px; background: none; color: #b6c8bf; cursor: pointer; opacity: 0; transition: opacity .15s; font-size: 15px; line-height: 1; }
.sess-item:hover .del { opacity: 1; }
.sess-item .del:hover { background: #fee2e2; color: var(--red); }
.sess-empty { font-size: 12.5px; color: var(--ink-sub); text-align: center; padding: 22px 8px; line-height: 1.8; }
.side-foot { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.side-tip { font-size: 11.5px; line-height: 1.7; color: var(--ink-sub); margin-top: 9px; }

/* 中栏 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 22px; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 4% 10px; display: flex; flex-direction: column; gap: 15px; scroll-behavior: smooth; }
.msg { display: flex; max-width: 96%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.bot { align-self: flex-start; }
.avatar { width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.msg.bot .avatar { background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; margin-right: 10px; }
.msg.user .avatar { background: #e2e8f0; color: #475569; margin-left: 10px; }
.bub { padding: 11px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.75; word-break: break-word; }
.msg.bot .bub { background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(22,163,74,.05); border-top-left-radius: 4px; }
.msg.user .bub { background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; border-top-right-radius: 4px; }
.bub b, .bub strong { font-weight: 800; }
.bub .mq { color: var(--green-deep); font-weight: 800; }
.bub .expr { display: inline-block; background: var(--green-50); border: 1px solid var(--green-200); border-radius: 8px; padding: 1px 8px; margin: 1px 2px; font-weight: 700; }
.msg.user .bub .expr { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); }
.bub ul, .bub ol { margin: 4px 0 2px 20px; }
.bub li { margin: 2px 0; }
.bub .reveal { margin-top: 6px; padding: 8px 12px; border-left: 3px solid var(--green-300); background: var(--green-50); border-radius: 0 8px 8px 0; }
.bub .tag { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.tag.ask { background: #fff7ed; color: var(--amber); }
.tag.ok { background: var(--green-100); color: var(--green-deep); }
.tag.no { background: #fee2e2; color: var(--red); }
.tag.prep { background: #eff6ff; color: var(--blue); }
.tag.done { background: #f0fdf4; color: var(--green-deep); border: 1px solid var(--green-200); }

/* 思考中 */
.thinking { display: flex; align-items: center; gap: 9px; color: var(--ink-sub); font-size: 13.5px; }
.thinking .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.1s infinite ease-in-out; }
.thinking .dot:nth-child(2) { animation-delay: .18s; }
.thinking .dot:nth-child(3) { animation-delay: .36s; }
@keyframes pulse { 0%,100% { transform: scale(.7); opacity: .4 } 50% { transform: scale(1); opacity: 1 } }
.think-track { margin-top: 5px; font-size: 12px; color: var(--ink-sub); min-height: 18px; }

/* 快捷回复 chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 4% 8px; }
.chips.hidden { display: none; }
.chip { border: 1px solid var(--green-200); background: var(--green-50); color: var(--green-deep); font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.chip:hover { background: var(--green-100); }

/* 输入框：扫描 + 发送按钮内嵌于输入框右侧，垂直居中 */
.input-card { margin: 0 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px 10px 8px 16px; display: flex; align-items: center; gap: 10px; }
.input-card textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; font: inherit; font-size: 14.5px; line-height: 1.6; color: var(--ink); max-height: 130px; background: transparent; padding: 6px 0; }
.input-actions { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.send-btn { width: 38px; height: 38px; border-radius: 11px; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(22,163,74,.3); }
.send-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
/* 扫描按钮：与发送按钮同尺寸圆角方块，浅色底相机图标 */
.cam-btn { background: var(--green-50); color: var(--green-deep); border: 1px solid var(--green-200); box-shadow: none; }
.cam-btn:hover { background: var(--green-100); }

/* 语音按钮：与扫描按钮同尺寸，录音时红色脉冲 */
.mic-btn { background: var(--green-50); color: var(--green-deep); border: 1px solid var(--green-200); box-shadow: none; }
.mic-btn:hover { background: var(--green-100); }
.mic-btn.recording { background: #fff1f0; color: #d4380d; border-color: #ffccc7; animation: micPulse 1.3s ease-in-out infinite; }
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212,56,13,.10); }
  50%      { box-shadow: 0 0 0 8px rgba(212,56,13,.20); }
}

/* 右栏备课板 */
.panel { width: 420px; flex-shrink: 0; border-left: 1px solid var(--line); background: rgba(255,255,255,.62); overflow-y: auto; }
.panel-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px; color: var(--ink-sub); font-size: 13px; line-height: 1.9; }
.panel-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; box-shadow: 0 2px 8px rgba(22,163,74,.05); }
.pcard h4 { font-size: 13px; font-weight: 800; color: var(--green-deep); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.pcard .qtext { font-size: 13.5px; line-height: 1.7; color: var(--ink); background: var(--green-50); border-radius: 9px; padding: 9px 11px; }
.kv { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; margin: 3px 0; }
.kv .k { flex: 0 0 56px; color: var(--ink-sub); font-weight: 700; }
.kv .v { flex: 1; min-width: 0; }
.kp-list { display: flex; flex-wrap: wrap; gap: 5px; }
.kp { font-size: 11.5px; font-weight: 700; background: var(--green-100); color: var(--green-deep); border-radius: 999px; padding: 2px 9px; }
.psteps { display: flex; flex-direction: column; gap: 6px; }
.pstep { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; cursor: pointer; border-radius: 9px; padding: 6px 7px; transition: background .15s; }
.pstep:hover { background: var(--green-50); }
.pstep .pn { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: #e8f3ec; color: var(--ink-sub); }
.pstep.done .pn { background: var(--green-200); color: var(--green-deep); }
.pstep.active { background: var(--green-50); }
.pstep.active .pn { background: var(--green); color: #fff; }
.pstep.lock { color: #9ab3a6; }
.pstep .pt { font-weight: 700; }
.pstep.lock .pt { font-weight: 500; }
.viz-card { overflow: hidden; }
.viz-stage { background: #fbfdff; border: 1px dashed #d6e6dc; border-radius: 10px; padding: 6px; display: grid; place-items: center; }
.viz-stage svg { max-width: 100%; height: auto; display: block; }
.viz-note { font-size: 11.5px; color: var(--ink-sub); margin-top: 7px; line-height: 1.6; }
.viz-stepno { font-size: 11.5px; font-weight: 800; color: var(--green-deep); margin-bottom: 5px; }
details.answer-card summary { cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--amber); list-style: none; }
details.answer-card summary::before { content: '▶ '; font-size: 10px; }
details.answer-card[open] summary::before { content: '▼ '; }
.answer-body { margin-top: 8px; font-size: 13px; line-height: 1.8; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 9px 11px; }
.review-line { font-size: 11.5px; color: var(--ink-sub); margin-top: 6px; }
.review-line.repaired { color: var(--amber); }

/* ---------- 登录弹窗（流光玻璃：淡蒙版轻模糊，卡片近透明白玻璃；2026-09-26 对齐交互课件 SimMath 定稿参数） ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.24); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; }
.modal-mask.show { display: flex; }
.login-card {
  width: 400px;
  max-height: 92vh; overflow-y: auto;
  background: rgba(255,255,255,.42);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 20px;
  padding: 26px 26px 20px;
  box-shadow: 0 30px 70px rgba(10,40,25,.20), inset 0 1px 0 rgba(255,255,255,.65);
  /* 玻璃层上浅灰文字会显淡，弹窗内整体调深一档 */
  --ink-3:#5b6b7f;
}
.login-top { text-align: center; margin-bottom: 16px; }
.login-logo { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; font-weight: 800; font-size: 24px; margin-bottom: 8px; }
.login-logo-img { width: 50px; height: 50px; margin-bottom: 8px; }
.login-top h2 { font-size: 19px; font-weight: 800; color: var(--ink); }
.login-top p { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
/* 账号密码行：小图标 + 下划线输入框（与交互课件同款，聚焦线变绿） */
.login-line {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line);
  transition: border-color .18s;
}
.login-line:focus-within { border-bottom-color: var(--green); }
.login-line svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--ink-3); }
.login-line input {
  flex: 1; min-width: 0; height: 46px; padding: 0;
  border: 0; outline: none; background: transparent;
  font-size: 14px; color: var(--ink);
}
.login-line input::placeholder { color: var(--ink-3); }
/* 密码眼睛 */
.login-eye {
  flex: 0 0 auto; width: 30px; height: 30px; margin-right: -6px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: 8px;
  color: var(--ink-3); cursor: pointer; padding: 0;
  transition: color .18s, background .18s;
}
.login-eye:hover { color: var(--green); background: rgba(22,163,74,.08); }
.login-eye svg { width: 18px; height: 18px; }
.login-eye .eye-off { display: none; }
.login-eye.is-showing .eye-on { display: none; }
.login-eye.is-showing .eye-off { display: block; }
/* 邮箱验证码行：下划线输入 + 玻璃发送按钮 */
.code-row { display: flex; align-items: flex-end; gap: 10px; }
.code-row .login-line { flex: 1; min-width: 0; }
.code-send {
  flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 999px;
  background: rgba(255,255,255,.45);
  backdrop-filter: blur(12px) saturate(1.5); -webkit-backdrop-filter: blur(12px) saturate(1.5);
  color: var(--green-deep); border: 1px solid rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 14px rgba(21,128,61,.14);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.code-send:hover { background: rgba(255,255,255,.62); }
.code-send:disabled { color: #9ca3af; background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.6); cursor: default; box-shadow: none; }
.login-err { min-height: 18px; font-size: 12px; color: #dc2626; margin: 7px 2px 2px; line-height: 1.5; }
.login-ok { width: 100%; height: 46px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; margin-top: 10px; }
.login-ok:hover { filter: brightness(1.05); }
.login-demo { width: 100%; height: 38px; margin-top: 8px; border: 0; background: none; color: var(--ink-sub); font-size: 13px; cursor: pointer; text-decoration: underline; }
.login-note { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 8px; }

/* ---------- 自定义模型配置弹窗（流光玻璃，配置仅存本地浏览器） ---------- */
.cfg-card { width: 420px; max-width: 92vw; max-height: 92vh; overflow-y: auto; }
.cfg-head { text-align: center; margin-bottom: 14px; }
.cfg-head h2 { font-size: 18px; font-weight: 800; color: var(--ink); }
.cfg-head p { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }
.cfg-field { margin-bottom: 14px; }
.cfg-field > label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.cfg-actions { display: flex; gap: 10px; margin-top: 14px; }
.cfg-btn { flex: 1; height: 44px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.cfg-btn-test { background: rgba(255,255,255,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--green-deep); border: 1px solid rgba(255,255,255,.9); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.cfg-btn-test:hover { background: rgba(255,255,255,.68); }
.cfg-btn-save { border: 0; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-deep)); box-shadow: 0 6px 18px rgba(22,163,74,.3); }
.cfg-btn-save:hover { filter: brightness(1.05); }
.cfg-test-msg { min-height: 18px; font-size: 12px; margin: 6px 2px 0; line-height: 1.5; }
.cfg-test-msg.ok { color: var(--green-deep); }
.cfg-test-msg.err { color: #dc2626; }
.cfg-clear { width: 100%; margin-top: 8px; border: 0; background: none; color: var(--ink-sub); font-size: 12px; cursor: pointer; text-decoration: underline; }

/* 积分用量全屏页 */
.heat-screen { position: fixed; inset: 0; z-index: 150; display: none; overflow-y: auto; background: linear-gradient(165deg, #f4faf6 0%, #e9f4ee 60%, #e3f0e8 100%); }
.heat-screen.show { display: block; }
.heat-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 30px; background: rgba(255,255,255,.8); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.heat-title { font-size: 21px; font-weight: 800; color: var(--ink); }
.heat-sub2 { font-size: 12px; color: #8ba396; margin-top: 3px; }
.heat-close { border: none; background: var(--green); color: #fff; font-weight: 700; font-size: 13.5px; padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: filter .15s; }
.heat-close:hover { filter: brightness(1.08); }
.heat-wrap-body { max-width: 1060px; margin: 22px auto 50px; padding: 0 26px; display: flex; flex-direction: column; gap: 16px; }
.heat-chart-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 18px 10px; box-shadow: 0 8px 30px rgba(22,120,70,.06); }
.heat-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hs-cell { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.hs-cell .k { font-size: 11.5px; color: #8ba396; font-weight: 700; }
.hs-cell .v { font-size: 19px; font-weight: 800; color: var(--ink); margin-top: 5px; white-space: nowrap; }
.hs-cell .v small { font-size: 12px; color: #9ab3a6; font-weight: 600; }
.heat-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: 0 8px 30px rgba(22,120,70,.06); }
.heat-h { font-size: 15.5px; font-weight: 800; margin-bottom: 12px; }
@media (max-width: 900px) { .heat-stats { grid-template-columns: repeat(3, 1fr); } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); background: rgba(20,40,30,.92); color: #fff; font-size: 13px; padding: 10px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; max-width: 80%; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 响应式：窄屏隐藏右栏（可后续做抽屉） */
@media (max-width: 1080px) { .panel { display: none; } .side { width: 200px; } }
@media (max-width: 820px) { .side { display: none; } .main { padding: 0 12px; } .brand small { display: none; } }
