:root {
  --bg: #FBFBFD;
  --surface: #FFFFFF;
  --ink: #16181D;
  --sub: #6B7280;
  --faint: #9CA3AF;
  --line: #ECECF0;
  --line-strong: #DEDEE6;
  --accent: #2F6BFF;
  --accent-soft: #EEF3FF;
  --danger: #E5484D;
  --danger-soft: #FFF0F0;
  --ok: #12A150;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 29, .04);
  --shadow: 0 10px 30px rgba(16, 18, 29, .07);
  --shadow-lg: 0 24px 60px rgba(16, 18, 29, .12);
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 420px at 88% -8%, rgba(47, 107, 255, .10), transparent 60%),
    radial-gradient(560px 380px at 4% 108%, rgba(255, 122, 89, .08), transparent 60%);
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(47, 107, 255, .18); }

/* ---------------- layout ---------------- */
.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.side {
  width: 252px;
  flex: 0 0 252px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: -.02em;
}
.brand .name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }

.btn-new {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-radius: 13px; border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.btn-new:hover { border-color: #C9CBD6; }
.btn-new kbd {
  font-size: 11px; color: var(--faint); background: #F4F5F7;
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px;
}

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.side-label {
  font-size: 11px; letter-spacing: .16em; color: var(--faint);
  text-transform: uppercase; padding: 10px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 11px; font-size: 14px; color: #3F434C;
}
.nav-item:hover { background: #F4F5F8; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; opacity: .8; }
.nav-item .tag {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 99px;
  background: #F1F2F5; color: var(--faint); letter-spacing: .04em;
}

.hist { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.hist::-webkit-scrollbar { width: 6px; }
.hist::-webkit-scrollbar-thumb { background: #E1E2E8; border-radius: 99px; }
.hist-item {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px; border-radius: 10px; font-size: 13.5px; color: #4B5058;
  white-space: nowrap;
}
.hist-item:hover { background: #F4F5F8; }
.hist-item .h-ico {
  flex: 0 0 auto; width: 14px; text-align: center;
  font-size: 12.5px; color: var(--faint);
}
.hist-item .h-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hist-item .h-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 99px; }
.hist-item .h-dot.done { background: #34B37E; }
.hist-item .h-dot.failed { background: #E5622D; }
.hist-item .h-dot.run { background: #2F6BFF; }
.hist-empty { font-size: 12.5px; color: var(--faint); padding: 8px 12px; }

.side-foot {
  border-top: 1px solid var(--line); padding-top: 12px;
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--sub);
}
.side-foot .dot-ok { width: 7px; height: 7px; border-radius: 99px; background: var(--ok); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }

/* ---------------- hero / composer ---------------- */
.hero {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 24px 90px; gap: 26px;
}
.wordmark {
  font-size: 54px; font-weight: 850; letter-spacing: -.055em; line-height: 1;
  background: linear-gradient(180deg, #16181D 30%, #4A4F5C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark.small { font-size: 34px; }
.hero-sub { color: var(--sub); font-size: 15px; margin-top: -14px; }

.composer-wrap { width: min(760px, 100%); }
.composer {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 18px 18px 12px;
  box-shadow: var(--shadow); transition: border-color .18s, box-shadow .18s;
}
.composer:focus-within { border-color: #B9C6F0; box-shadow: 0 14px 40px rgba(47, 107, 255, .10); }
.composer textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font-size: 16.5px; line-height: 1.6; min-height: 28px; max-height: 220px;
}
.composer textarea::placeholder { color: #A8ADB8; }
.composer-bar {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #FAFAFC;
  padding: 6px 11px; border-radius: 99px; font-size: 13px; color: #4B5058;
}
.tool-btn:hover { background: #F3F4F8; }
.composer-bar .spacer { flex: 1; }
.mode-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #FAFAFC;
  padding: 6px 12px; border-radius: 99px; font-size: 13px; color: #4B5058;
}
.send-btn {
  width: 38px; height: 38px; border-radius: 99px; border: 0;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  font-size: 16px; transition: transform .12s, opacity .12s;
}
.send-btn:hover { transform: translateY(-1px); }
.send-btn:disabled { opacity: .35; transform: none; cursor: default; }

.quick-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.quick {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.8);
  padding: 9px 15px; border-radius: 99px; font-size: 14px; color: #3F434C;
  box-shadow: var(--shadow-sm);
}
.quick:hover { border-color: #C9CBD6; background: #fff; }

/* ---------------- chat thread ---------------- */
.thread {
  flex: 1; overflow-y: auto; padding: 30px 24px 180px;
  display: flex; flex-direction: column; align-items: center;
}
.thread-inner { width: min(760px, 100%); display: flex; flex-direction: column; gap: 20px; }
.msg { display: flex; gap: 12px; }
.msg .avatar {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.msg.user .avatar { background: #F0F1F5; color: #4B5058; }
.msg.ai .avatar { background: var(--ink); color: #fff; }
.msg .bubble { padding-top: 3px; font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.msg.ai .bubble .reason {
  margin-bottom: 8px; padding: 10px 12px; border-radius: 10px;
  background: #F7F8FA; color: var(--sub); font-size: 13px; line-height: 1.6;
}
.caret { display: inline-block; width: 7px; height: 16px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- Markdown ---------------- */
.msg.ai .bubble.md { white-space: normal; }
.md-body { display: block; }
.md-body > *:first-child { margin-top: 0; }
.md-body > *:last-child { margin-bottom: 0; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4 {
  margin: 18px 0 8px; line-height: 1.35; font-weight: 700; color: var(--ink);
}
.md-body h1 { font-size: 22px; }
.md-body h2 { font-size: 19px; }
.md-body h3 { font-size: 17px; }
.md-body h4 { font-size: 15.5px; }
.md-body p { margin: 8px 0; }
.md-body ul, .md-body ol { margin: 8px 0; padding-left: 22px; }
.md-body li { margin: 3px 0; }
.md-body li > ul, .md-body li > ol { margin: 3px 0; }
.md-body blockquote {
  margin: 10px 0; padding: 6px 12px; border-left: 3px solid var(--line-strong);
  background: #FAFAFC; border-radius: 0 8px 8px 0; color: #4B5058;
}
.md-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .9em; padding: 2px 5px; border-radius: 5px;
  background: #F1F2F6; color: #B4292E;
}
.md-body pre {
  margin: 10px 0; padding: 13px 15px; border-radius: 10px;
  background: #F6F8FA; border: 1px solid var(--line);
  overflow-x: auto; font-size: 13px; line-height: 1.55;
}
.md-body pre code {
  padding: 0; background: transparent; color: inherit; font-size: inherit;
  display: block; white-space: pre;
}
.md-body table {
  margin: 12px 0; border-collapse: collapse; width: 100%; font-size: 14px;
  display: block; overflow-x: auto;
}
.md-body th, .md-body td {
  border: 1px solid var(--line); padding: 7px 10px; text-align: left;
  vertical-align: top;
}
.md-body th { background: #F7F8FA; font-weight: 650; white-space: nowrap; }
.md-body tr:nth-child(even) td { background: #FCFCFD; }
.md-body .md-img {
  display: block; max-width: 100%; height: auto; margin: 10px 0;
  border-radius: 10px; border: 1px solid var(--line);
}
.md-body .katex-display { margin: 12px 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }

/* ---------------- 附件 ---------------- */
.attach-strip { display: none; flex-wrap: wrap; gap: 7px; padding: 0 2px 10px; }
.attach-strip.on { display: flex; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  border: 1px solid var(--line); background: #F7F8FA; border-radius: 99px;
  padding: 4px 6px 4px 11px; font-size: 12.5px; color: #4B5058;
}
.attach-chip b { font-weight: 550; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip i { font-style: normal; color: var(--sub); font-size: 11.5px; }
.attach-chip button {
  border: 0; background: transparent; color: #9299A6; font-size: 15px;
  width: 20px; height: 20px; border-radius: 99px; line-height: 1;
}
.attach-chip button:hover { background: #E8EAF0; color: #4B5058; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  border: 1px solid var(--line); background: #F7F8FA; border-radius: 8px;
  padding: 4px 9px; font-size: 12.5px; color: #4B5058; text-decoration: none;
}
a.file-chip:hover { border-color: #C9CBD6; background: #fff; }

.dock {
  position: fixed; left: 252px; right: 0; bottom: 0;
  padding: 14px 24px 22px; display: flex; justify-content: center;
  background: linear-gradient(180deg, rgba(251,251,253,0), var(--bg) 42%);
}
.dock .composer-wrap { width: min(760px, 100%); }

/* ---------------- module pages ---------------- */
.page { padding: 30px 40px 120px; max-width: 1180px; margin: 0 auto; width: 100%; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; font-weight: 750; }
.page-head p { margin: 0; color: var(--sub); font-size: 14px; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel-pad { padding: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--sub); font-weight: 600; letter-spacing: .02em; }
.input, select.input {
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 13px;
  background: #fff; font-size: 14.5px; outline: 0; width: 100%;
}
.input:focus { border-color: #B9C6F0; box-shadow: 0 0 0 3px rgba(47,107,255,.10); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

.btn {
  border: 0; border-radius: 12px; padding: 11px 20px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: #F4F5F8; color: #3F434C; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.wide { width: 100%; }

/* theme grid */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.theme-card {
  border: 2px solid transparent; border-radius: 14px; overflow: hidden;
  cursor: pointer; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .14s, border-color .14s;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card.on { border-color: var(--accent); }
.theme-card .swatch { height: 74px; display: flex; align-items: flex-end; padding: 10px; gap: 5px; }
.theme-card .swatch i { width: 14px; height: 14px; border-radius: 5px; display: block; }
.theme-card .meta { padding: 9px 11px 11px; }
.theme-card .meta b { display: block; font-size: 13.5px; font-weight: 650; }
.theme-card .meta span { font-size: 11.5px; color: var(--faint); }

/* outline editor */
.outline { display: flex; flex-direction: column; gap: 10px; }
.slide-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.slide-row .idx {
  flex: 0 0 26px; height: 26px; border-radius: 8px; background: #F4F5F8;
  display: grid; place-items: center; font-size: 12px; color: var(--sub); font-weight: 700;
}
.slide-row .body { flex: 1; min-width: 0; }
.slide-row .t { font-weight: 650; font-size: 14.5px; }
.slide-row .b { font-size: 12.5px; color: var(--sub); margin-top: 3px; }
.slide-row .layout {
  font-size: 10.5px; color: var(--faint); background: #F7F8FA;
  padding: 2px 7px; border-radius: 99px; letter-spacing: .04em;
}

/* 可编辑大纲 */
.deck-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.deck-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.deck-title { font-size: 15px; font-weight: 700; }
.deck-sub { font-size: 12.5px; color: var(--sub); }
.outline-tip { font-size: 12px; color: var(--faint); margin: 0 0 12px; }
.row-input {
  border: 1px solid transparent; border-radius: 8px; background: transparent;
  padding: 5px 7px; width: 100%; font: inherit; color: var(--ink); outline: 0;
  transition: border-color .12s, background .12s;
}
.row-input:hover { background: #F8F9FC; }
.row-input:focus {
  background: #fff; border-color: #C9D4F5;
  box-shadow: 0 0 0 3px rgba(47,107,255,.08);
}
.row-input.t { font-weight: 650; font-size: 14.5px; }
.row-input.sub-row { font-weight: 600; font-size: 13px; color: var(--accent); }
.row-input.b, .row-input.row-area { font-size: 12.8px; color: var(--sub); }
.row-area { resize: vertical; min-height: 34px; line-height: 1.5; }
.row-input.stat-row { font-weight: 750; color: var(--accent); flex: 0 0 130px; }
.row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.row-col { min-width: 0; }
.row-inline { display: flex; gap: 10px; align-items: center; margin-top: 2px; }

/* progress */
.progress-wrap { display: none; margin-top: 16px; }
.progress-wrap.on { display: block; }
.bar { height: 8px; border-radius: 99px; background: #EEF0F4; overflow: hidden; }
.bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #7FA3FF);
  transition: width .4s ease;
}
.progress-text { font-size: 12.5px; color: var(--sub); margin-top: 8px; display: flex; justify-content: space-between; }

.result { display: none; margin-top: 18px; }
.result.on { display: block; }
.result .filebox {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #FCFCFE;
}
.result .ext {
  width: 42px; height: 48px; border-radius: 8px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.result .name { font-weight: 650; font-size: 14.5px; }
.result .sub { font-size: 12.5px; color: var(--sub); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.case {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-sm);
}
.case .thumb { height: 118px; background: linear-gradient(135deg, #EEF3FF, #FFF4F0); position: relative; }
.case .thumb::after {
  content: ""; position: absolute; inset: 18px 22px; border-radius: 6px;
  background: repeating-linear-gradient(180deg, rgba(22,24,29,.10) 0 6px, transparent 6px 14px);
}
.case .cap { padding: 10px 13px 13px; font-size: 13.5px; }

/* ---------------- countdown card ---------------- */
.timer {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 218px; border-radius: 14px; overflow: hidden;
  background: #191C24; color: #E8EAEF;
  box-shadow: 0 18px 44px rgba(16,18,29,.30);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 12.5px;
}
.timer.warn { background: #2B1418; border-color: rgba(229,72,77,.55); }
.timer-head { display: flex; align-items: center; gap: 8px; padding: 9px 11px; }
.timer-head .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-head .renew {
  margin-left: auto; border: 0; border-radius: 7px; padding: 3px 8px;
  background: #EEF3FF; color: #2F6BFF; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.timer-body { display: flex; align-items: center; gap: 10px; padding: 0 11px 10px; }
.timer-num { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.timer.warn .timer-num { color: #FF8A8A; }
.timer-side { font-size: 10.5px; color: #9AA2B1; line-height: 1.35; }
.timer.warn .timer-side { color: #E9A0A0; }
.timer-note {
  padding: 7px 11px; background: rgba(229,72,77,.14); color: #FFC0C0;
  font-size: 11px; display: none;
}
.timer.warn .timer-note { display: block; }
.timer-mini { cursor: pointer; }

/* ---------------- modal / toast ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(16,18,29,.36); z-index: 90;
  display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px);
}
.mask.on { display: flex; }
.dialog {
  width: 420px; max-width: calc(100% - 32px); background: #fff; border-radius: 20px;
  padding: 22px; box-shadow: var(--shadow-lg);
}
.dialog h3 { margin: 0 0 6px; font-size: 17px; }
.dialog p { margin: 0 0 16px; color: var(--sub); font-size: 13.5px; }
.dialog .row { margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(10px);
  background: #191C24; color: #fff; padding: 10px 18px; border-radius: 99px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 120; max-width: 80vw;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { color: var(--faint); font-size: 13.5px; padding: 14px 0; }

/* ---------------- mobile bottom nav ---------------- */
.mnav { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .dock {
    left: 0;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  .page { padding: 22px 18px 96px; }

  .mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px));
  }
  .mnav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 2px; border-radius: 10px;
    font-size: 11px; font-weight: 600; color: var(--sub); white-space: nowrap;
  }
  .mnav-item .ico { font-size: 16px; line-height: 1; color: var(--faint); }
  .mnav-item.active { color: var(--accent); background: rgba(47, 107, 255, .07); }
  .mnav-item.active .ico { color: var(--accent); }

  /* 倒计时卡在手机上收成右上角小胶囊，避免压住底栏和输入框 */
  .timer {
    top: 10px; right: 10px; bottom: auto; width: auto;
    display: flex; align-items: center;
  }
  .timer-head { padding: 0 0 0 9px; }
  .timer-head .code { display: none; }
  .timer-head .renew { margin-left: 0; }
  .timer-body { padding: 8px 10px; }
  .timer-side { display: none; }
  .timer-num { font-size: 17px; }
  .timer-note { display: none !important; }
  .toast { bottom: calc(106px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------- PPT 页（模板墙风格） ---------------- */
.tplpage { width: min(1120px, 100%); margin: 0 auto; padding: 34px 28px 96px; }
.tpl-hero { text-align: center; padding: 18px 0 6px; }
.tpl-hero .wordmark-lg {
  font-size: 44px; font-weight: 850; letter-spacing: -.05em; line-height: 1;
  background: linear-gradient(180deg, #16181D 30%, #4A4F5C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tpl-hero .sub { color: var(--sub); font-size: 13.5px; margin-top: 10px; }

.composer-xl { width: min(760px, 100%); margin: 22px auto 0; text-align: left; }
.composer-xl .composer { padding: 16px 16px 12px; }
.composer-xl textarea { min-height: 52px; font-size: 15.5px; }
.chip-style {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); background: #FAFAFC; border-radius: 12px;
  padding: 5px 10px 5px 6px; font-size: 12.5px; color: #4B5058; cursor: pointer;
  margin-bottom: 10px;
}
.chip-style .sw {
  width: 34px; height: 26px; border-radius: 7px; display: block;
  border: 1px solid rgba(0,0,0,.06);
}
.chip-style b { font-weight: 600; }
.composer-xl .composer-bar { margin-top: 8px; }
.mini-select {
  border: 1px solid var(--line); background: #FAFAFC; border-radius: 99px;
  padding: 5px 10px; font-size: 12.5px; color: #4B5058; outline: 0;
}
.subbar {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  margin-top: 12px; flex-wrap: wrap;
}
.subbar .input { max-width: 260px; padding: 7px 12px; font-size: 12.5px; border-radius: 99px; }

.tpl-tabs {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  margin: 30px 0 16px;
}
.tpl-tab {
  border: 0; background: transparent; color: var(--sub);
  padding: 7px 14px; border-radius: 99px; font-size: 13.5px;
}
.tpl-tab:hover { background: #F3F4F8; color: #3F434C; }
.tpl-tab.on { background: var(--ink); color: #fff; font-weight: 600; }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .tpl-grid { grid-template-columns: 1fr; } }

.tpl { cursor: pointer; }
.tpl-prev {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: var(--p-bg); padding: 16px 18px; display: flex; flex-direction: column;
  border: 2px solid transparent; box-shadow: var(--shadow-sm);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.tpl:hover .tpl-prev { transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl.on .tpl-prev { border-color: var(--accent); }
.tpl-prev .pv-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--p-accent); }
.tpl-prev .pv-dot {
  position: absolute; right: 14px; top: 14px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--p-accent2); opacity: .9;
}
.tpl-prev .pv-title {
  height: 10px; width: 58%; border-radius: 3px; background: var(--p-ink); opacity: .82;
}
.tpl-prev .pv-sub {
  height: 5px; width: 34%; border-radius: 3px; background: var(--p-accent);
  margin-top: 8px; opacity: .85;
}
.tpl-prev .pv-lines { margin-top: auto; display: flex; flex-direction: column; gap: 5px; }
.tpl-prev .pv-line { height: 4px; border-radius: 2px; background: var(--p-ink); opacity: .16; }
.tpl-prev .pv-line:nth-child(2) { width: 86%; }
.tpl-prev .pv-line:nth-child(3) { width: 68%; }
.tpl-prev .pv-cta {
  margin-top: 10px; align-self: flex-start; font-size: 10.5px; padding: 4px 9px;
  border-radius: 99px; background: var(--p-accent); color: #fff; opacity: .9;
}
.tpl-name {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: #3F434C; padding: 8px 2px 0;
}
.tpl-name .tick { color: var(--accent); font-weight: 800; display: none; }
.tpl.on .tpl-name .tick { display: inline; }
.tpl-name em { font-style: normal; color: var(--faint); font-size: 11.5px; }

.panel-slide { display: none; }
.panel-slide.on { display: block; }
.gen-state {
  display: none; text-align: center; padding: 26px 0 6px; color: var(--sub); font-size: 13.5px;
}
.gen-state.on { display: block; }
.tpl-prev .pv-cta { opacity: 0; transform: translateY(4px); transition: opacity .16s, transform .16s; }
.tpl:hover .tpl-prev .pv-cta, .tpl.on .tpl-prev .pv-cta { opacity: 1; transform: none; }
.chip-style .sw { transition: background .2s; }
.attach-chips { display: none; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #F4F5F8; border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 10px; font-size: 12px; color: #4B5058; max-width: 100%;
}
.attach-chip b { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip em { font-style: normal; color: var(--faint); font-size: 11px; }
.attach-chip .ok { color: var(--ok); font-weight: 800; }
.attach-chip .x { cursor: pointer; color: #A8ADB8; font-size: 14px; line-height: 1; padding: 0 2px; }
.attach-chip .x:hover { color: var(--danger); }

/* ---------------- PPT Agent 页 ---------------- */
.agent { width: min(1000px, 100%); margin: 0 auto; padding: 18px 24px 90px; }
.agent-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 26px;
}
.agent-top .tip {
  flex: 1; min-width: 0;
  background: #FFF8E6; border: 1px solid #F4E2B8; color: #8A6212;
  border-radius: 12px; padding: 10px 14px; font-size: 13px; line-height: 1.6;
}
.agent-top .quota {
  background: #F4F5F8; border: 1px solid var(--line); border-radius: 99px;
  padding: 7px 14px; font-size: 12.5px; color: var(--sub); white-space: nowrap;
}
.agent-top .quota b { color: var(--ink); }
.agent-top .quit { font-size: 13px; color: var(--sub); white-space: nowrap; }

.agent-head { text-align: center; margin: 6px 0 26px; }
.agent-head h1 {
  margin: 0; font-size: 46px; letter-spacing: -.02em; font-weight: 800;
  font-family: "Songti SC", "Source Han Serif SC", Georgia, serif;
}
.agent-head h1 em { font-style: normal; }
.agent-head p { margin: 10px 0 0; font-size: 13.5px; color: var(--sub); }

.agent-composer {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 24px;
  padding: 18px 18px 14px; box-shadow: var(--shadow);
}
.agent-composer:focus-within { border-color: #C3CDF0; }
.agent-composer textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font-size: 15.5px; line-height: 1.65; min-height: 64px; max-height: 240px;
}
.agent-composer textarea::placeholder { color: #A8ADB8; }
.agent-mid { display: flex; align-items: center; gap: 8px; margin-top: 6px; }

.drop {
  margin-top: 12px; border: 1.5px dashed var(--line-strong); border-radius: 16px;
  padding: 14px 16px; cursor: pointer; background: #FCFCFD;
  transition: border-color .16s, background .16s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: #F8FAFF; }
.drop .h { font-size: 13.5px; font-weight: 650; color: #3F434C; }
.drop .h em { font-style: normal; color: var(--faint); font-weight: 400; margin-left: 8px; font-size: 12px; }
.drop .d { font-size: 12px; color: var(--faint); margin-top: 5px; line-height: 1.6; }
.drop .attach-chips { margin-top: 10px; }

.ranges { display: flex; align-items: center; gap: 8px; margin: 16px 2px 0; flex-wrap: wrap; }
.ranges .lbl { font-size: 12.5px; color: var(--faint); margin-right: 2px; }
.range {
  border: 1px solid var(--line); background: #fff; color: #4B5058;
  padding: 7px 14px; border-radius: 99px; font-size: 13px;
}
.range:hover { border-color: #C9CBD6; }
.range.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

.cta-row { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.style-sum {
  flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 16px;
}
.style-sum b { display: block; font-size: 14px; }
.style-sum span { font-size: 11.5px; color: var(--faint); }
.cta {
  border: 0; border-radius: 14px; padding: 14px 26px; font-size: 15px; font-weight: 700;
  background: var(--ink); color: #fff; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(16,18,29,.18);
}
.cta:hover { transform: translateY(-1px); }
.cta:disabled { opacity: .5; transform: none; }
.fine { font-size: 11.5px; color: var(--faint); text-align: center; margin-top: 14px; line-height: 1.8; }

.agent .tpl-tabs { margin: 30px 0 16px; }
.agent .tpl-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1080px) { .agent .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .agent .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
.tpl-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-prev .pv-bar, .tpl-prev .pv-title, .tpl-prev .pv-sub, .tpl-prev .pv-lines, .tpl-prev .pv-cta, .tpl-prev .pv-dot { display: none; }
.tpl-check {
  position: absolute; right: 9px; top: 9px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; display: none; place-items: center;
  font-size: 12px; font-weight: 800; box-shadow: 0 2px 8px rgba(47,107,255,.4);
}
.tpl.on .tpl-check { display: grid; }
