:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --primary: #2b5aa6;
  --primary-dark: #1f4485;
  --primary-soft: #eef4ff;
  --accent: #f05548;
  --line: #e5e9f0;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--primary); }

/* ================= 顶部导航 ================= */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 62px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt b { font-size: 15px; letter-spacing: .2px; }
.brand-txt i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.topbar-right { display: flex; align-items: center; gap: 8px; }
#user-box, #guest-box { display: flex; align-items: center; gap: 8px; }
.top-hint { white-space: nowrap; }
.username { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.credits-badge {
  background: #fff7e6; border: 1px solid #f3d19e; color: #8a5a00;
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

/* ================= 页面框架 ================= */
.wrap { max-width: 1200px; margin: 0 auto; padding: 26px 24px 44px; }

/* ================= 左侧导航布局 ================= */
.shell { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 18px; align-items: start; }
.main-col { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.side-nav {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px;
  box-shadow: 0 1px 3px rgba(31, 41, 55, .04);
}
.nav-cap { font-size: 12px; color: var(--muted); padding: 4px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink);
  font-size: 14px; font-family: inherit; text-align: left;
  cursor: pointer; transition: background .15s;
  white-space: nowrap;
}
.nav-item:hover { background: #f2f6fc; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side-nav { position: static; flex-direction: row; align-items: center; overflow-x: auto; padding: 6px; }
  .nav-cap { display: none; }
  .nav-item { padding: 8px 12px; }
}
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 22px; letter-spacing: .2px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.6; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 18px; align-items: start; }
.col-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.col-side {
  min-width: 0; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 78px;
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(31, 41, 55, .04);
}
.card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.step {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); margin-top: 1px;
}
.card-title h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-title .hint { margin-top: 4px; display: block; }
.tag-soft {
  font-size: 11px; font-weight: 400; color: var(--muted);
  background: #f1f4f9; border-radius: 5px; padding: 1px 6px;
}

label { display: block; font-weight: 600; font-size: 13.5px; }
.hint { color: var(--muted); font-weight: 400; font-size: 12px; }
code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ================= 上传区 ================= */
.dropzone {
  border: 2px dashed #cbd6e6; border-radius: 12px; padding: 30px 20px;
  text-align: center; cursor: pointer; transition: all .15s;
  background: #fbfcfe;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dz-inner { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.dz-icon { font-size: 26px; margin-bottom: 2px; }
.dz-main { font-size: 14px; color: var(--ink); font-weight: 600; }
.dropzone:hover .dz-main, .dropzone:hover .dz-sub { color: var(--primary); }
.dz-sub { font-size: 12px; }

/* ================= 表单控件 ================= */
textarea, select,
input[type="text"], input[type="number"], input[type="tel"],
input[type="password"], input[type="search"], input[type="url"] {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font-size: 13.5px; font-family: inherit; color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; min-height: 178px; line-height: 1.7; }
textarea:focus, select:focus,
input[type="text"]:focus, input[type="number"]:focus, input[type="tel"]:focus,
input[type="password"]:focus, input[type="search"]:focus, input[type="url"]:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 90, 166, .1);
}
input[type="text"]::placeholder, input[type="number"]::placeholder { color: #A8B2C0; }
select { cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--primary); margin-top: 2px; }

.script-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.file-inline { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.tips { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.tips summary { cursor: pointer; font-size: 12.5px; color: var(--primary); list-style: none; }
.tips summary::-webkit-details-marker { display: none; }
.tips summary::before { content: "▸ "; }
.tips[open] summary::before { content: "▾ "; }
.tips ul { margin: 10px 0 0; padding-left: 18px; }
.tips li { font-size: 12.5px; color: #4b5563; line-height: 1.9; }
.tips .hint { margin-top: 8px; }

/* ================= 侧栏设置 ================= */
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; cursor: pointer; margin-bottom: 16px;
}
.switch-row:hover { border-color: #c9d7ea; }
.copy-visual-note {
  font-weight: 400; font-size: 12px; line-height: 1.65; color: var(--muted);
}
.switch-txt { display: flex; flex-direction: column; gap: 3px; }
.switch-txt b { font-size: 13.5px; }
.switch-txt i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.tgl {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto;
  width: 38px; height: 22px; border-radius: 999px; background: #d6dde8;
  position: relative; cursor: pointer; transition: background .18s;
}
.tgl::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s;
}
.tgl:checked { background: var(--primary); }
.tgl:checked::after { transform: translateX(16px); }

.setting { margin-bottom: 16px; }
.setting-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.setting-head label { margin: 0; }

.side-foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.cost-hint { color: var(--muted); font-size: 11.5px; line-height: 1.6; margin-top: 10px; text-align: center; }
.error { color: var(--accent); font-size: 12.5px; margin-top: 10px; line-height: 1.6; }

.info-card { padding: 18px 22px; }
.info-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.info-list li { display: flex; gap: 10px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.info-list b { flex: 0 0 30px; color: var(--ink); font-weight: 600; }

/* ================= 按钮 ================= */
.btn-primary {
  width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: background .15s; text-align: center; display: block;
  text-decoration: none; font-family: inherit;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font-size: 13px; cursor: pointer;
  font-family: inherit; text-decoration: none; display: inline-block;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-line {
  padding: 6px 12px; border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--muted); font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn-line:hover { color: var(--accent); }
.btn-mini { padding: 3px 11px; font-size: 12px; font-weight: 400; }

/* 主行动大按钮（渐变 + 悬浮上浮感），文案成片 / 生成 PPT 用 */
.btn-hero {
  flex: 1; padding: 13px 22px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #2b5aa6 0%, #4a7bd0 60%, #5c8ee0 100%);
  color: #fff; font-size: 15.5px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; font-family: inherit; text-align: center;
  box-shadow: 0 4px 14px rgba(43, 90, 166, .28);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn-hero:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(43, 90, 166, .38); filter: brightness(1.06); }
.btn-hero:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(43, 90, 166, .3); }
.btn-hero:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.btn-row .error { flex: 1; }
.btn-sm { width: auto; padding: 7px 16px; font-size: 13px; display: inline-block; }

/* ================= 提示条 ================= */
.key-banner {
  background: #fff7e6; border: 1px solid #f3d19e; border-radius: 10px;
  padding: 12px 14px; font-size: 12.5px; color: #8a5a00; margin-bottom: 16px;
  line-height: 1.8;
}
.key-banner code { background: #fdeecb; }

/* ================= 任务与结果 ================= */
.task-card { margin-top: 18px; }
.task-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.task-head h2 { font-size: 16px; }
.badge {
  flex: 0 0 auto; font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: #eef2ff; color: var(--primary);
}
.badge.done { background: #e8f7ee; color: #1a7f4b; }
.badge.failed { background: #fdecec; color: var(--accent); }
.progress { height: 8px; background: #edf0f5; border-radius: 999px; overflow: hidden; }
.bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #4a7fd4);
  transition: width .4s ease;
}
#task-meta { margin-top: 10px; }
#warnings { margin: 12px 0 0; padding-left: 18px; }
#warnings li { color: #b7791f; font-size: 12.5px; margin-bottom: 4px; line-height: 1.6; }
.result { margin-top: 18px; }
video { width: 100%; max-height: 620px; border-radius: 10px; background: #000; margin-bottom: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result .row-between .btn-primary { width: auto; padding: 10px 22px; }

.foot { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 22px; }
.admin-link { text-decoration: none; border-bottom: 1px dashed #b9cbe8; }
.admin-link:hover { border-bottom-style: solid; }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
  overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 14px; width: min(400px, 100%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .2); padding: 18px 20px 20px;
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head b { font-size: 16px; }
.modal-x { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.modal-body input {
  width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.modal-body input:focus { outline: none; border-color: var(--primary); }
.modal-err { color: var(--accent); font-size: 13px; margin: -4px 0 10px; }
.modal-btns { display: flex; gap: 10px; margin-top: 4px; }
.modal-btns .btn-primary, .modal-btns .btn-ghost { width: 100%; padding: 11px; }

/* 充值价目表（弹窗内） */
#modal-redeem { width: min(560px, 100%); }
.tier-tb {
  width: 100%; table-layout: fixed; border-collapse: collapse;
  margin-bottom: 12px; font-size: 13px; font-variant-numeric: tabular-nums;
}
.tier-tb th {
  text-align: left; font-weight: 600; color: var(--muted, #7b8494);
  padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tier-tb td {
  padding: 8px; border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tier-tb tr:last-child td { border-bottom: none; }
.tier-tb .muted { color: var(--muted, #7b8494); font-weight: 400; font-size: 12px; margin-left: 3px; }
.tier-tb .tk-pay { font-weight: 700; color: var(--primary); }
.tier-tb .tk-credit { font-weight: 700; }
.tier-tb .tk-bonus {
  font-style: normal; font-size: 10.5px; font-weight: 700; color: #c2740a;
  background: #fff5e0; border: 1px solid #ffe2ae; border-radius: 999px;
  padding: 0 5px; margin-left: 4px; vertical-align: 1px;
}
.tier-tb tfoot td {
  border-bottom: none; padding: 8px 8px 0; white-space: normal;
  color: var(--muted, #7b8494); font-size: 11.5px; line-height: 1.6;
}

/* 充值公告 */
.recharge-notice {
  background: rgba(255, 212, 59, .10);
  border: 1px solid rgba(255, 212, 59, .45);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.7;
}
.recharge-notice b { display: block; margin-bottom: 3px; font-size: 13px; }
.recharge-notice p { margin: 0; color: var(--ink, #2a3242); }
.recharge-notice p b { display: inline; color: #b3541e; }

/* ================= 案例展示 ================= */
.case-card { margin-top: 18px; }
.case-body {
  display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 24px; align-items: start;
}
.case-media {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #0b1a33; line-height: 0;
}
.case-media video { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; background: #0b1a33; }
.case-info h3 { font-size: 16.5px; line-height: 1.5; }
.case-sub { color: var(--muted); font-size: 12.8px; margin-top: 6px; line-height: 1.7; }
.case-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 12px; }
.case-meta li {
  background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 999px; padding: 4px 11px; font-size: 12.5px; white-space: nowrap;
}
.case-meta li b { font-weight: 600; }
.case-steps { margin: 0 0 12px 17px; font-size: 13px; line-height: 1.95; color: #374151; }
.case-note { font-size: 11.8px; color: var(--muted); line-height: 1.7; }

/* ================= 响应式 ================= */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; }
  .case-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ---- 文案成片（漫画 PRO）---- */
.pro-badge {
  display: inline-block; vertical-align: 2px; margin-left: 4px;
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, #ff9a3c, #ff5e8a); color: #fff;
}
.copy-lock {
  background: #fff8e6; border: 1px solid #f2d791; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: #8a6116; margin-bottom: 14px;
}
.copy-text-label { display: block; font-weight: 600; font-size: 13.5px; }
.copy-text-label textarea {
  margin-top: 8px; width: 100%; resize: vertical;
  font: inherit; line-height: 1.7;
}
.copy-hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 14px; }
.copy-hint b { color: var(--primary); }
.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.form-grid label {
  display: flex; flex-direction: column; gap: 6px;
  font-weight: 600; font-size: 13.5px;
}
.copy-grid { margin-bottom: 16px; }
.rate-line { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.rate-line input[type="range"] { flex: 1; }
.voice-line { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.voice-line select { flex: 1; min-width: 0; }
.voice-line .btn-mini { white-space: nowrap; flex-shrink: 0; }
.style-preview {
  width: 96px; height: 54px; object-fit: cover; flex-shrink: 0;
  border-radius: 6px; border: 1px solid var(--line); background: #eef2f7;
}
.copy-ai-bar {
  display: flex; align-items: center; gap: 8px; font-weight: 400;
  margin: 8px 0 4px; flex-wrap: wrap;
}
.copy-ai-bar .btn-mini { white-space: nowrap; flex-shrink: 0; }
.copy-ai-sep { width: 1px; height: 18px; background: #C9D6EA; margin: 0 2px; flex-shrink: 0; }
.copy-ai-bar input[type="text"] {
  flex: 1; min-width: 160px; padding: 4px 10px; font-size: 13px;
}
.copy-ai-bar select {
  padding: 3px 8px; font-size: 12px; flex-shrink: 0;
}
.copy-ai-bar .btn-ai-write {
  color: #215293; background: #eef5ff; border-color: #9bbce8;
  font-weight: 600; box-shadow: 0 1px 4px rgba(43, 90, 166, .10);
}
.copy-ai-bar .btn-ai-write:hover { background: #e3efff; border-color: #6f9fdf; }
.ppt-done-box {
  background: #f4f8fd; border: 1px solid #dbe6f3; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px;
}
.ppt-done-title { font-weight: 700; color: var(--primary); margin: 0 0 6px; }

/* ---- 实验交互式作品（画廊 + 外部/本地 iframe）---- */
.lab-tip { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.lab-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 16px; text-align: left;
  background: #f7fafd; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s;
  font: inherit;
}
.lab-item:hover { transform: translateY(-2px); border-color: #b8cfef; box-shadow: 0 4px 14px rgba(43,90,166,.10); }
.lab-ico { font-size: 24px; line-height: 1; }
.lab-t { font-weight: 700; font-size: 14.5px; color: var(--ink, #1f2937); }
.lab-d { font-size: 12.5px; color: var(--muted); }
.lab-frame-box {
  position: relative;
  height: min(72vh, 720px);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #f7fafd;
}
.lab-frame { width: 100%; height: 100%; border: 0; display: block; }
/* 查看器头部：窄屏下按钮一行、标题独占一行，避免标题被挤成竖排 */
#lab-viewer .card-head { flex-wrap: wrap; align-items: center; }
#lab-viewer .card-head #lab-viewer-title { min-width: 0; }
/* 宽屏模式：作品按 1200px 宽渲染，容器横向滚动（窄屏看桌面版式不挤扁） */
.lab-frame-box.wide { overflow-x: auto; overflow-y: hidden; }
.lab-frame-box.wide .lab-frame { width: 1200px; }
@media (max-width: 720px) {
  .lab-frame-box { height: 62vh; }
  .lab-frame-box.wide .lab-frame { width: 1100px; }
  .lab-grid { grid-template-columns: repeat(2, 1fr); }
  #lab-viewer .card-head { gap: 8px; row-gap: 6px; }
  #lab-viewer .card-head #lab-viewer-title {
    order: -1; flex: 1 1 100%; font-size: 15px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #lab-viewer .card-head .btn-mini { padding: 5px 9px; font-size: 12px; }
}
@media (max-width: 720px) {
  .topbar-in { padding: 0 14px; height: 56px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-logo { height: 32px; }
  .brand-txt b { font-size: 13.5px; white-space: nowrap; }
  .brand-txt i { display: none; }
  .top-hint, .username { display: none; }
  #user-box, #guest-box { gap: 6px; }
  .credits-badge { padding: 3px 9px; font-size: 12px; white-space: nowrap; }
  .btn-mini { padding: 3px 9px; white-space: nowrap; }
  .wrap { padding: 20px 16px 36px; }
  .page-head h1 { font-size: 20px; }
  .card { padding: 18px 16px; }
  .dropzone { padding: 26px 14px; }
  textarea { min-height: 160px; }
}

/* ---- 邀请弹窗 ---- */
.invite-code-box {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  background: #f5f8fd; border: 1px dashed #c9d7ea; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
}
.invite-code-box b {
  font-size: 23px; letter-spacing: 4px; color: var(--primary);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.invite-stat { font-size: 12.5px; color: var(--muted); text-align: center; margin-bottom: 9px; }
.invite-stat b { color: var(--ink); }
.invite-rule { line-height: 1.75; margin-bottom: 14px; }
.modal-ok { color: #1a7f4b; font-size: 12.5px; margin-top: 10px; text-align: center; line-height: 1.6; }

@media (max-width: 480px) {
  .brand-txt { display: none; }
  /* 窄屏价目表：压缩字号与内边距，保证四列不折行 */
  .tier-tb { font-size: 12px; }
  .tier-tb th, .tier-tb td { padding: 7px 4px; }
  .tier-tb .tk-bonus { font-size: 9.5px; padding: 0 3px; margin-left: 2px; }
  .tier-tb tfoot td { font-size: 11px; padding: 8px 4px 0; }
  #modal-redeem { padding: 16px 14px 16px; }
}

/* ---- 剩余时间 ---- */
.task-eta {
  margin-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.task-eta.finished { color: #1a7f4b; }

/* ---- 历史生成记录 ---- */
.hist-card { margin-top: 18px; }
.hist-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hist-head h3 { font-size: 15px; }
.hist-list { list-style: none; display: flex; flex-direction: column; }
.hist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line, #eef2f8);
}
.hist-item:last-child { border-bottom: none; }
.hist-item .badge { flex: 0 0 auto; }
.hist-main { flex: 1; min-width: 0; }
.hist-name { font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.hist-actions a, .hist-actions button { white-space: nowrap; }
.badge.running { background: #eef4fd; color: var(--primary); }
.hist-progress { display: inline-block; width: 90px; height: 6px;
  background: #eef2f8; border-radius: 3px; overflow: hidden; vertical-align: middle; }
.hist-progress .bar { height: 100%; background: var(--primary); border-radius: 3px;
  transition: width .6s; }
@media (max-width: 520px) {
  .hist-meta { white-space: normal; line-height: 1.5; }
  .hist-item { gap: 8px; }
  .hist-actions { gap: 6px; }
  .hist-progress { width: 60px; }
}

/* ---- 分辨率与帧率 ---- */
.rf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rf-row select { width: 100%; }
@media (max-width: 400px) { .rf-row { grid-template-columns: 1fr; } }
.rf-size { margin: 6px 0 4px; font-variant-numeric: tabular-nums; color: var(--primary); font-weight: 600; }

/* ---- 代理充值卡 ---- */
.step-agent { background: #fff4e5; color: #b45309; }
#agent-card input[type="text"], #agent-card input[type="number"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13.5px; margin-top: 6px;
  background: #fff; box-sizing: border-box;
}
#agent-card input:focus { outline: none; border-color: var(--primary); }
#agent-card select { width: 100%; }
#agent-balance { margin-top: 8px; }

/* ---- 公告横幅 ---- */
.notice-bar {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 16px; padding: 11px 14px;
  border-radius: 12px; font-size: 13.5px; line-height: 1.7;
  border: 1px solid #c7dbfa; background: #eff5fe; color: #1e3a6e;
  box-shadow: 0 1px 3px rgba(31, 41, 55, .04);
}
.notice-bar.warn { border-color: #fed7aa; background: #fff7ed; color: #92400e; }
.notice-icon { flex: 0 0 auto; }
.notice-text { flex: 1; white-space: pre-wrap; word-break: break-word; }
.notice-x {
  flex: 0 0 auto; border: 0; background: transparent; color: inherit;
  font-size: 17px; line-height: 1.3; cursor: pointer; padding: 0 2px; opacity: .6;
}
.notice-x:hover { opacity: 1; }

/* 首屏充值公告 */
.recharge-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 12px 16px;
  border-radius: 12px; border: 1px solid #ffe0a3;
  background: linear-gradient(90deg, #fff8e6, #fffdf8);
  box-shadow: 0 1px 3px rgba(31, 41, 55, .04);
}
.rb-tag {
  flex: 0 0 auto; padding: 3px 10px; border-radius: 999px;
  background: #ffd43b; color: #7a4b00; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.rb-text { flex: 1 1 260px; min-width: 0; font-size: 13px; line-height: 1.7; }
.rb-text b { display: block; color: #8a5300; font-size: 13.5px; }
.rb-text span { display: block; color: #6b7280; font-size: 12.5px; }
.rb-btn {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid #f0b429; background: #fff; color: #8a5300;
  font-size: 12.5px; font-weight: 600;
}
.rb-btn:hover { background: #fff4d6; }

/* ---- 上传课件预检信息条（2026-11-25） ---- */
.pptx-info { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:10px; }
.pptx-info[hidden] { display:none; }
.pi-chip { font-size:12.5px; line-height:1; padding:7px 10px; border-radius:999px;
           background:#EEF1FB; color:#3A4A7A; border:1px solid #DDE4F7; white-space:nowrap; }
.pi-cost { background:#FFF4E6; border-color:#F6DDB8; color:#9A5B12; }
.pi-note { font-size:12.5px; color:#6B7794; }
.pptx-info.warn .pi-note { color:#B4532A; }
.pptx-info.loading .pi-line { font-size:12.5px; color:#6B7794; }
.pi-chip.pi-warn { background:#FDECEC; border-color:#F5C2C2; color:#B42318; }

/* ---- 积分明细（2026-11-25） ---- */
.log-tools { display:flex; align-items:center; gap:10px; }
.log-head, .log-item { display:grid; grid-template-columns: 84px 1fr 76px 76px;
                       gap:10px; align-items:center; }
.log-head { font-size:12px; color:#8A94AC; padding:0 10px 6px; }
.log-head span:nth-child(3), .log-head span:nth-child(4) { text-align:right; }
.log-item { padding:10px; border-top:1px solid #EEF1F7; font-size:13px; }
.log-t { color:#6B7794; font-variant-numeric:tabular-nums; }
.log-a { display:flex; align-items:baseline; gap:8px; min-width:0; }
.log-tag { font-weight:600; font-size:12.5px; padding:2px 8px; border-radius:999px;
           background:#EEF1FB; color:#3A4A7A; white-space:nowrap; }
.log-tag.in { background:#E9F7EF; color:#1F7A45; }
.log-tag.out { background:#FDECEC; color:#B42318; }
.log-detail { color:#6B7794; font-style:normal; overflow:hidden; text-overflow:ellipsis;
              white-space:nowrap; }
.log-d, .log-b { text-align:right; font-variant-numeric:tabular-nums; }
.log-d.in { color:#1F7A45; font-weight:600; }
.log-d.out { color:#B42318; font-weight:600; }
.log-b { color:#3A4A7A; }
@media (max-width: 640px) {
  .log-head { display:none; }
  .log-item { grid-template-columns: 1fr auto; grid-row-gap:4px; }
  .log-t { grid-column:1; grid-row:1; font-size:12px; }
  .log-d, .log-b { grid-row:1; }
  .log-b { grid-column:2; }
  .log-d { grid-column:2; }
  .log-a { grid-column:1 / -1; grid-row:2; }
}
#credits-badge { cursor: pointer; }

/* ---- 文案成片/文本出手绘：标题不再被长说明挤成两行 ---- */
#copy-form-card .card-head h2 { white-space: nowrap; flex: 0 0 auto; }
#copy-form-card .card-head .muted { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) {
  #copy-form-card .card-head { flex-wrap: wrap; }
  #copy-form-card .card-head h2 { white-space: normal; font-size: 14.5px; }
}
