:root {
  --ink: #17191c; --ink-2: #24272c; --ink-3: #3a3e45; --paper: #f3f1ec; --surface: #fff; --line: #e0dcd3;
  --soft: #6b6d70; --faint: #9a9a96; --accent: #e4572e; --accent-dark: #c74420; --ok: #2f7d5b;
  --note: #fdf1dc; --note-ink: #7d5a12; --alert: #fbe6de; --alert-ink: #8f3a1c;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 15px; line-height: 1.65; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
h1 { font-size: 28px; line-height: 1.3; margin: 0; letter-spacing: -.3px; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 14px; margin: 0; }
p { margin: 0; }
a { color: var(--accent-dark); }
[hidden] { display: none !important; }

/* 入口 */
#entry { min-height: 100%; display: grid; place-items: center; background: var(--ink); color: #fff; padding: 24px; }
#entry-form { width: 100%; max-width: 380px; }
#entry h1 { font-size: 40px; }
#entry p { color: #b9bbbf; margin: 10px 0 28px; }
#entry input { width: 100%; padding: 16px 18px; font-size: 22px; letter-spacing: 3px; text-transform: uppercase; background: var(--ink-2); color: #fff; border: 1px solid var(--ink-3); border-radius: 10px; }
#entry input::placeholder { letter-spacing: 0; color: #777; text-transform: none; }
#entry input:focus { outline: 2px solid var(--accent); border-color: transparent; }
#entry button { width: 100%; margin-top: 12px; padding: 14px; background: var(--accent); border: 0; border-radius: 10px; color: #fff; font-size: 17px; font-weight: 600; }
#entry-error { color: #ff9b7d !important; margin: 12px 0 0 !important; min-height: 24px; }
#entry small { color: #85878b; }

/* 三栏 */
#shell { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; height: 100%; }
#rail { background: var(--ink); color: #e9e9e6; display: flex; flex-direction: column; padding: 16px 12px 12px; min-height: 0; }
.wordmark { font-size: 19px; font-weight: 700; padding: 0 8px; }
.new-work { margin: 18px 0 8px; padding: 11px; background: var(--accent); color: #fff; border: 0; border-radius: 9px; font-weight: 600; }
.new-work:hover { background: var(--accent-dark); }
.rail-label { color: #85878b; font-size: 12px; padding: 14px 8px 6px; }
#works { flex: 1; overflow-y: auto; min-height: 0; }
.work { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 9px 10px; border-radius: 8px; }
.work:hover { background: var(--ink-2); }
.work.on { background: var(--ink-3); }
.work b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work small { color: #9a9c9f; font-size: 12px; }
.rail-empty { color: #85878b; font-size: 13px; padding: 8px; }
.rail-foot { border-top: 1px solid var(--ink-3); padding: 12px 8px 0; margin-top: 10px; }
.rail-foot b { font-weight: 600; }
.rail-foot div { display: flex; gap: 14px; margin-top: 4px; }
.rail-foot button { background: none; border: 0; padding: 2px 0; color: #b9bbbf; font-size: 13px; }
.rail-foot button:hover { color: #fff; }

#stage { overflow-y: auto; padding: 18px 20px 40px; min-width: 0; }
#stage.paged-stage { padding-left: 54px; padding-right: 54px; }  /* 给两侧翻页箭头留位置 */
.stage-wrap { max-width: 1000px; margin: 0 auto; }
#inspector { overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line); padding: 16px 16px 32px; }
.block + .block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.block h2 { margin-bottom: 8px; }
.hint { color: var(--soft); font-size: 13px; }
.bullets { padding-left: 18px; margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.bullets li + li { margin-top: 4px; }
.source { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.source:last-child { border: 0; }
.source b { display: block; font-weight: 600; }
.source p { color: var(--soft); margin: 4px 0; }

/* 控件 */
.btn { padding: 9px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-weight: 500; }
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn.main { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.main:hover:not(:disabled) { background: var(--ink-3); }
.btn.go { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.go:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.small { flex: none; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.field { display: block; margin-top: 16px; font-size: 13px; color: var(--soft); }
.field input, .field textarea, .field select, .plain { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus, .field select:focus, .prompt:focus-within { outline: 2px solid var(--ink); outline-offset: -1px; }
.field input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { padding: 7px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; font-size: 14px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.voice { padding: 6px 12px; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink-3); }
.voice.recording { color: var(--alert-ink); border-color: var(--accent); background: var(--alert); }
.field + .voice { margin-top: 6px; }

/* 新创作 */
.compose h1 { font-size: 32px; margin-bottom: 18px; }
.prompt { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 10px; }
.prompt textarea { width: 100%; min-height: 110px; border: 0; outline: 0; resize: vertical; font-size: 17px; background: none; }
.compose h2 { margin: 26px 0 0; }
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.form-card { text-align: left; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.form-card b { display: block; }
.form-card small { color: var(--soft); }
.form-card.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.form-card em { display: block; font-style: normal; font-size: 12px; color: var(--accent-dark); margin-top: 2px; }
.why { margin-top: 10px; color: var(--soft); font-size: 14px; min-height: 22px; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.compose .btn.go { margin-top: 24px; padding: 13px 34px; font-size: 16px; }

/* 作品 */
.work-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.work-head h1 { font-size: 24px; }
.steps { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.steps button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--soft); white-space: nowrap; }
.steps button i { font-style: normal; font-size: 12px; margin-right: 6px; color: var(--faint); }
.steps button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.old-job { padding: 9px 14px; border-radius: 8px; background: #e9e6df; font-size: 14px; margin-bottom: 16px; }
.job.running, .job.queued { background: var(--note); color: var(--note-ink); }
.job.failed, .job.interrupted { background: var(--alert); color: var(--alert-ink); }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.sheet > .field:first-child { margin-top: 0; }
.editor { width: 100%; min-height: 460px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; font-size: 15px; line-height: 1.8; resize: vertical; background: #fff; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cost { font-size: 13px; color: var(--note-ink); }
.shot { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.shot:first-child { border-top: 0; padding-top: 0; }
.shot-no { font-weight: 700; font-size: 20px; }
.shot-no small { display: block; font-weight: 400; font-size: 12px; color: var(--soft); }
.shot .field:first-child { margin-top: 0; }
details summary { cursor: pointer; color: var(--soft); font-size: 13px; margin-top: 10px; }
.result { display: block; width: 100%; max-height: 62vh; background: #000; border-radius: 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.thumbs figure { margin: 0; font-size: 12px; color: var(--soft); }
.thumbs img, .thumbs video { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #e9e6df; border-radius: 8px; }
.pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.pick label { position: relative; font-size: 12px; color: var(--soft); cursor: pointer; }
.pick img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.pick input { position: absolute; top: 5px; left: 5px; }
#route-canvas { display: block; width: 100%; margin-top: 8px; border-radius: 8px; cursor: crosshair; }
.review { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.waiting { text-align: center; padding: 90px 20px; }
.waiting i { display: block; width: 30px; height: 30px; margin: 0 auto 16px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.issue { padding: 8px 10px; border-radius: 8px; margin-top: 8px; font-size: 13px; background: var(--note); color: var(--note-ink); }
.issue.strong { background: var(--alert); color: var(--alert-ink); }
.issue b { display: block; }
.preview-text { white-space: pre-wrap; background: var(--paper); border-radius: 10px; padding: 14px; font-size: 14px; }
.upload { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; background: var(--surface); }
.upload input { display: none; }

/* 下一步、状态、预览 */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6b6d70; margin-right: 6px; vertical-align: 1px; }
.dot.done { background: #55b98c; } .dot.busy { background: #f2b84b; } .dot.bad { background: var(--accent); }
.step-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; font-weight: 600; font-size: 16px; }
.step-title i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-style: normal; font-size: 12px; }
.compose .step-title:first-of-type { margin-top: 0; }
.compose .chips { margin-top: 0; }
.compose .forms { margin-top: 0; }
.start { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.compose .start .btn.go { margin-top: 0; }
.check { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 0; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.check i { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid var(--faint); border-radius: 50%; font-style: normal; font-size: 12px; color: #fff; flex: none; }
.check.done i { background: var(--ok); border-color: var(--ok); }
.check span { flex: 1; }
.check small { color: var(--soft); }
.check:hover span { text-decoration: underline; }
.steps button.done i { color: var(--ok); font-weight: 700; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 18px; background: var(--ink); color: #fff; border-radius: 12px; }
.next b { display: block; font-size: 16px; }
.next small { color: #c9cacc; font-size: 13px; }
.next .btn { flex: none; }
.next.running { justify-content: flex-start; background: var(--note); color: var(--note-ink); }
.next.running small { color: var(--note-ink); }
.next.running > i { width: 22px; height: 22px; flex: none; border: 3px solid #eeddb6; border-top-color: var(--note-ink); border-radius: 50%; animation: spin 1s linear infinite; }
.next.failed { background: var(--alert); color: var(--alert-ink); }
.next.failed small { color: var(--alert-ink); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--soft); } .facts dd { margin: 0; }
details.source { padding: 8px 0; }
details.source summary { color: var(--ink); font-size: 13px; margin: 0; }
.phone { border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 13px; background: #fff; }
.phone p { white-space: pre-wrap; margin-top: 6px; }
.phone img, .phone video { display: block; width: 100%; border-radius: 8px; }
.phone .title { display: block; margin-top: 8px; }
.phone .tags { color: #2b6cb0; }
.phone .who { display: flex; align-items: center; gap: 8px; }
.phone .who span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--ink); color: #fff; }
.phone .comment { margin-top: 8px; padding: 6px 8px; background: var(--paper); border-radius: 6px; }
.phone .cover { display: grid; place-items: center; aspect-ratio: 3 / 4; padding: 16px; text-align: center; font-size: 20px; font-weight: 700; background: var(--paper); border-radius: 8px; }
.phone .cover.empty { font-size: 14px; font-weight: 400; color: var(--soft); }

/* 助手对话 */
#stage:has(.chat) { padding-top: 24px; padding-bottom: 0; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 24px); }
.chat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chat-head h1 { font-size: 22px; }
.link { background: none; border: 0; padding: 0; color: var(--soft); font-size: 13px; text-decoration: underline; }
.link:hover { color: var(--ink); }
.compose > .link { display: block; margin-bottom: 10px; }
.messages { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 2px 2px 16px; }
.bubble { flex: none; max-width: 78%; padding: 11px 15px; border-radius: 14px; font-size: 16px; white-space: pre-wrap; }
.bubble.agent { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.coach { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.bubble.typing { color: var(--soft); }
.saved-note { align-self: flex-start; font-size: 12px; color: var(--ok); margin: -6px 0 0 4px; }
.saved-note .link { font-size: 12px; margin-left: 6px; }
.bubble.asks { max-width: 90%; }
.asks-title { display: block; margin-bottom: 4px; }
.asks ol { margin: 8px 0 0; padding-left: 22px; white-space: normal; }
.asks li { margin: 6px 0; line-height: 1.5; }
.asks li small { display: block; color: var(--soft); font-size: 13px; }
.quick button.start { border-color: var(--accent); color: var(--accent); }
.quick button.start:hover { background: var(--accent); color: #fff; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button { padding: 8px 14px; background: var(--surface); border: 1px solid var(--ink); border-radius: 99px; }
.quick button:hover { background: var(--ink); color: #fff; }
.plan { flex: none; align-self: stretch; background: var(--surface); border: 2px solid var(--ink); border-radius: 14px; padding: 16px 18px; }
.plan dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 14px; }
.plan dt { color: var(--soft); font-size: 13px; padding-top: 2px; }
.plan dd { margin: 0; }
.plan .format { font-weight: 700; font-size: 18px; }
.plan .swap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--soft); }
.chat-input { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 12px 0 16px; }
.chat-input textarea { flex: 1; min-height: 46px; max-height: 140px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; resize: none; }
.chat-input textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.chat-input .voice, .chat-input .btn { height: 46px; flex: none; }
.memory { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.memory button { background: none; border: 0; color: var(--faint); padding: 0 2px; }
.memory button:hover { color: var(--accent-dark); }

/* 素材库 */
.rail-link { display: block; width: 100%; padding: 9px 10px; background: none; border: 0; border-radius: 8px; color: #e9e9e6; text-align: left; }
.rail-link:hover { background: var(--ink-2); }
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.lib-tools .plain { width: 240px; margin: 0; }
.lib-tools .chips { margin: 0; }
.lib-note-categories { margin: 14px 0; }
.lib-note-categories .chips { margin: 6px 0 0; }
.lib-tag { display: inline-block; margin: 6px 10px 0; padding: 2px 7px; border-radius: 5px; background: var(--paper); font-size: 12px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 10px; }
.lib-card { padding: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-align: left; }
.lib-card:hover { border-color: var(--ink); }
.lib-cover { position: relative; aspect-ratio: 3 / 4; background: #e9e6df; }
.lib-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lib-cover span { position: absolute; right: 6px; bottom: 6px; padding: 1px 7px; background: #000a; color: #fff; border-radius: 5px; font-size: 12px; }
.lib-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 8px 10px 0; font-size: 13px; font-weight: 500; line-height: 1.45; }
.lib-card small { display: block; padding: 4px 10px 9px; color: var(--soft); font-size: 12px; }
.library-open { overflow: hidden; }
#rules-dialog { width: min(920px, calc(100vw - 48px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); }
#rules-dialog::backdrop { background: #0009; }
#rules-dialog .lib-detail-header { position: sticky; top: 0; background: #fff; z-index: 1; }
.rules-content { padding: 8px 28px 28px; line-height: 1.8; }
.rule-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule-group summary { cursor: pointer; font-weight: 600; }
.rule-group article { margin: 18px 0 0; }
.rule-group h3 { font-size: 16px; margin: 0; }
.rule-group p { margin: 6px 0; }
#library-dialog { width: min(1320px, calc(100vw - 48px)); height: min(960px, calc(100vh - 48px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--ink); overflow: hidden; }
#library-dialog::backdrop { background: #0009; }
.lib-detail-header { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.lib-original-link { text-decoration: none; color: var(--accent-dark); }
.lib-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: calc(100% - 64px); }
.lib-gallery { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f6f6f6; }
.lib-media-stage { position: relative; flex: 1; min-height: 0; }
#lib-main-media, .lib-image-open { width: 100%; height: 100%; }
.lib-image-open { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
#lib-main-media img, #lib-main-media video { display: block; width: 100%; height: 100%; object-fit: contain; }
.lib-page-count { position: absolute; top: 16px; right: 18px; color: #fff; background: #0009; border-radius: 18px; padding: 3px 12px; pointer-events: none; }
.lib-page-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: #fffe; box-shadow: 0 2px 12px #0002; font-size: 30px; line-height: 1; }
#lib-prev { left: 14px; }
#lib-next { right: 14px; }
.lib-gallery-footer { flex: none; padding: 8px 16px 12px; text-align: center; }
#lib-thumbnails { display: flex; gap: 8px; padding: 8px 0 2px; overflow-x: auto; overscroll-behavior: contain; }
#lib-thumbnails button { flex: none; width: 52px; height: 62px; border: 2px solid transparent; padding: 2px; border-radius: 7px; background: #fff; }
#lib-thumbnails button.on { border-color: var(--accent); }
#lib-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.lib-post-panel { min-width: 0; padding: 24px; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); }
.lib-post-author { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.lib-avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--soft); background: #f0eeea; font-size: 16px; }
.lib-post-author b { font-size: 16px; }
.lib-post-panel h1 { font-size: 21px; line-height: 1.5; margin-bottom: 14px; overflow-wrap: anywhere; }
.lib-post-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.9; }
.lib-post-metrics { display: flex; flex-wrap: wrap; gap: 20px; color: var(--soft); font-size: 14px; margin: 22px 0; }
.lib-comments { border-top: 1px solid var(--line); padding-top: 20px; }
.lib-comment-scope { margin: 6px 0 18px; }
.lib-comment { display: flex; gap: 10px; margin: 18px 0; }
.lib-comment.is-reply { margin-left: 44px; }
.lib-comment.is-reply .lib-avatar { width: 28px; height: 28px; font-size: 13px; }
.lib-comment-main { flex: 1; min-width: 0; }
.lib-comment-name { color: var(--soft); font-size: 13px; margin-bottom: 4px; }
.lib-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.8; }
.lib-comment-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; color: var(--faint); font-size: 12px; }
.lib-author-badge { margin-left: 6px; color: var(--accent-dark); background: #fdf1ed; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.lib-reply-to { color: var(--soft); font-size: 12px; }
.lib-analysis { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.lib-analysis summary { cursor: pointer; color: var(--soft); }
.lib-analysis h3 { margin-top: 16px; }
#lib-image-zoom { position: absolute; inset: 0; background: #181818; color: #fff; display: flex; flex-direction: column; }
#lib-image-zoom header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #ffffff26; }
#lib-image-zoom header a { color: #fff; }
.lib-zoom-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
#lib-zoom-image { display: block; width: auto; height: auto; max-width: none; margin: 0 auto; }
@media (max-width: 1000px) { .lib-detail-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 760px) {
  #library-dialog { width: calc(100vw - 20px); height: calc(100vh - 20px); overflow-y: auto; }
  .lib-detail-header { position: sticky; top: 0; z-index: 2; background: #fff; padding: 8px 12px; }
  .lib-detail-header > span { display: none; }
  .lib-detail-header .row { width: 100%; justify-content: space-between; }
  .lib-detail-layout { display: flex; flex-direction: column; height: auto; }
  .lib-gallery { height: 70vh; flex: none; }
  .lib-post-panel { overflow: visible; border-left: 0; padding: 20px; }
  #lib-image-zoom { position: fixed; inset: 10px; z-index: 3; }
}

/* 我的主页：整页宽，不要右侧栏 */
#shell.wide { grid-template-columns: 220px minmax(0, 1fr); }
#shell.wide #inspector { display: none; }
#shell.wide .stage-wrap { max-width: 1240px; }
.rail-link.on { background: var(--ink-2); color: #fff; font-weight: 600; }
.rail-admin:has(.rail-link:not([hidden])) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--ink-3); }
.home-card { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.home-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--paper); display: grid; place-items: center; }
.home-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.home-avatar span { font-size: 44px; font-weight: 700; color: var(--soft); }
.home-who h1 { font-size: 26px; margin: 0 0 4px; }
.home-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.home-tags span { padding: 3px 10px; border-radius: 99px; background: #fdf1ed; color: var(--accent-dark); font-size: 13px; }
.home-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 12px 0 6px; font-size: 14px; }
.home-facts dt { color: var(--soft); } .home-facts dd { margin: 0; }
.home-card .progress { max-width: 260px; margin: 10px 0 4px; }
.home-actions { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.home-tabs button small { margin-left: 5px; color: var(--faint); font-size: 12px; }
.composer textarea { margin: 12px 0 0; min-height: 96px; resize: vertical; }
.composer-foot { margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.composer-foot .row { align-items: center; flex-wrap: wrap; }
.post-kind { font-size: 13px; font-weight: 600; color: var(--accent-dark); }
.post-text { white-space: pre-wrap; margin: 10px 0 0; font-size: 15px; line-height: 1.7; }
.post-media { display: grid; gap: 6px; margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-media.n1 { grid-template-columns: minmax(0, 420px); }
.post-media.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.post-media img, .post-media video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #000; }
.post-media.n1 img, .post-media.n1 video { aspect-ratio: auto; max-height: 520px; object-fit: contain; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.work-card { display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: left; }
.work-card:hover { border-color: var(--ink-3); }
.work-card b { padding: 0 10px; font-size: 14px; line-height: 1.4; }
.work-card small { padding: 0 10px; color: var(--soft); font-size: 12px; }
.work-cover { position: relative; aspect-ratio: 3 / 4; background: var(--paper); margin-bottom: 6px; }
.work-cover img, .work-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-cover .play { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 34px; color: #fff; text-shadow: 0 2px 8px #0008; }
.work-text { padding: 14px; font-size: 14px; line-height: 1.6; color: var(--ink-3); overflow: hidden; height: 100%; }
@media (max-width: 900px) { .home-card { grid-template-columns: 80px minmax(0, 1fr); } .home-avatar { width: 80px; height: 80px; } .home-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 1180px) { #shell.wide { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 760px) { #shell.wide { grid-template-columns: minmax(0, 1fr); } }
.progress { height: 6px; border-radius: 6px; background: #e0dcd3; overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; background: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.table td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 40; max-width: 80vw; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; }

@media (max-width: 1180px) {
  #shell { grid-template-columns: 220px minmax(0, 1fr); height: auto; min-height: 100%; }
  #rail { position: sticky; top: 0; height: 100vh; }
  #inspector { grid-column: 2; border-left: 0; border-top: 1px solid var(--line); }
  #stage { overflow: visible; }
}
@media (max-width: 760px) {
  #shell { grid-template-columns: minmax(0, 1fr); }
  #rail { position: static; height: auto; }
  #works { max-height: 180px; }
  #inspector { grid-column: 1; }
  #stage { padding: 22px 16px 40px; }
  .options, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .shot { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* 素材库人工审核 */
.lib-review { margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.lib-review h2 { font-size: 16px; }
.lib-review .chips { margin: 8px 0; }
.lib-review textarea, .lib-review input { width: 100%; margin-top: 6px; }
.lib-review .chip:disabled { opacity: .45; }
.lib-tag.review-pending { background: var(--surface); border: 1px dashed var(--line); color: var(--soft); }
.lib-tag.review-keep { background: var(--ok); color: #fff; }
.lib-tag.review-discard { background: var(--ink-3); color: #fff; }

/* 左侧作品分组 */
.work-group { margin-bottom: 6px; }
.work-group-head { display: flex; align-items: center; gap: 4px; padding: 2px 2px 2px 0; }
.work-group-toggle { flex: 1; display: flex; align-items: center; gap: 6px; padding: 7px 8px; background: none; border: 0; border-radius: 8px; color: #c9cbce; font-size: 13px; font-weight: 600; text-align: left; }
.work-group-toggle:hover, .work-group-add:hover { background: var(--ink-2); color: #fff; }
.work-group-toggle i { width: 12px; font-style: normal; color: #85878b; }
.work-group-toggle span { margin-left: auto; color: #85878b; font-weight: 400; }
.work-group-add { width: 28px; height: 28px; background: none; border: 0; border-radius: 7px; color: #c9cbce; font-size: 16px; }
.work-group .work { padding-left: 26px; }
.work-group .rail-empty { padding: 2px 8px 6px 26px; font-size: 12px; }

/* 语音输入 */
.voice-raw { margin-left: 6px; }
.voice-fill { border: 1px dashed var(--accent); }
.just-filled { background: #fff6d6 !important; }
.chip.just-filled { border-color: #e0b400; }

/* 审核两个按钮 */
.lib-review-buttons { display: flex; gap: 10px; }
.lib-review-buttons .btn { flex: 1; padding: 10px; font-size: 15px; }

/* 素材库：一排分类 + 一行次要筛选，卡片只留关键信息 */
.lib-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.lib-head h1 { font-size: 24px; margin-right: 6px; }
.lib-head .plain { flex: 1; max-width: 360px; margin: 0; }
.lib-head .link { color: var(--soft); font-size: 13px; }
.lib-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.lib-tabs button { padding: 9px 14px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--soft); font-size: 15px; }
.lib-tabs button i { font-style: normal; margin-left: 5px; font-size: 12px; color: var(--faint); }
.lib-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.lib-tabs button.bin { margin-left: auto; }
.lib-subbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 34px; }
.lib-subbar .chips { margin: 0; flex: 1; }
.lib-subbar .chip { padding: 4px 11px; font-size: 13px; }
.lib-selects { display: flex; gap: 8px; margin-left: auto; }
.lib-selects select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; color: var(--ink-3); }
.lib-tags { padding: 0 10px; }
.lib-tags .lib-tag { margin: 6px 4px 0 0; }
.lib-subbar .chips:not(:empty) { flex: 1 1 560px; }
.voice-big { padding: 12px 20px; font-size: 16px; font-weight: 600; background: var(--accent); color: #fff; border-color: var(--accent); white-space: nowrap; }
.voice-big.recording { background: var(--alert); color: var(--alert-ink); }
.voice-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.voice-item audio { width: 100%; margin: 8px 0; }
.chips.just-filled { outline: 2px solid #f0d36b; border-radius: 10px; }
#lib-types { flex: 0 0 auto !important; }
#lib-types .chip.on { background: var(--ink-3); border-color: var(--ink-3); }

/* 管理：所有教练 */
.admin-coach h2 { font-size: 18px; margin: 0; }
.admin-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.admin-work { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; background: none; border: 1px solid var(--line); border-radius: 8px; text-align: left; }
.admin-work:hover { border-color: var(--ink); }
.admin-work b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-work small { color: var(--soft); font-size: 12px; }
#admin-visit { margin: 0 0 8px; padding: 6px 8px; background: var(--accent); border-radius: 6px; color: #fff; font-size: 12px; }
#admin-visit button { margin-left: 6px; padding: 0; background: none; border: 0; color: #fff; text-decoration: underline; font-size: 12px; }

.rules-platform { margin: 20px 0 6px; font-size: 17px; }

/* AI配图：生成中的小转圈、每张图下的切换按钮 */
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.thumbs figcaption { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.thumbs figcaption .btn.small { padding: 2px 8px; font-size: 12px; }
/* 左右翻页箭头：固定在页面主体两侧的中间，位置由 showArrows 按主体区域算 */
.page-arrow { position: fixed; top: 50%; transform: translateY(-50%); z-index: 15; width: 40px; height: 76px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fffffff0; box-shadow: 0 2px 10px #0002; font-size: 36px; line-height: 1; color: var(--ink); }
.page-arrow:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.page-arrow:disabled { opacity: .3; cursor: default; }
.page-info { text-align: center; color: var(--soft); font-size: 13px; margin: 10px 0 0; }
@media (max-width: 760px) { #stage.paged-stage { padding-left: 46px; padding-right: 46px; } .page-arrow { width: 34px; height: 60px; font-size: 28px; } }.backend-nav {display:grid;gap:6px;margin-top:20px}
.backend-field {display:grid;grid-template-columns:190px minmax(180px,1fr);align-items:center;gap:16px;margin:16px 0}
.backend-field input,.backend-field select {width:100%;padding:9px;border:1px solid var(--line);border-radius:7px;background:white}
.backend-table {overflow:auto}.backend-table table {width:100%;border-collapse:collapse;text-align:left;font-size:13px}.backend-table td,.backend-table th {padding:12px;border-bottom:1px solid var(--line)}
#test-history p {margin:14px 0}pre {white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.backend-field{grid-template-columns:1fr;gap:4px}}

.backend .home-actions,.backend [data-act="chat-start"] {display:none}


/* ---------- 管理后台 ---------- */
.backend .backend-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; flex: 1; overflow-y: auto; min-height: 0; }
.backend .backend-nav small { color: #85878b; font-size: 11px; letter-spacing: .5px; padding: 12px 10px 4px; }
.backend .backend-nav small:first-child { padding-top: 0; }
.backend .rail-foot a { color: #b9bbbf; font-size: 13px; text-decoration: none; }
.backend .rail-foot a:hover { color: #fff; }
.backend .stage-wrap { max-width: 1240px; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 16px; }
.adm-head h1 { font-size: 24px; }
.adm-head .hint { margin-top: 2px; }
.adm-tools { display: flex; gap: 8px; flex: none; }
.adm-crumb { display: flex; gap: 14px; align-items: center; padding: 8px 12px; margin-bottom: 12px; background: var(--note); color: var(--note-ink); border-radius: 8px; font-size: 13px; }
.adm-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.adm-filter input[type=search] { flex: 1 1 240px; max-width: 360px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.adm-filter label { display: flex; flex-direction: column; font-size: 12px; color: var(--soft); }
.adm-filter select { margin-top: 3px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 130px; }
.adm-count { font-size: 12px; color: var(--soft); margin-bottom: 6px; }
.adm-table { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.adm-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { background: #faf9f6; text-align: left; font-weight: 500; font-size: 12px; color: var(--soft); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: #faf9f6; }
.adm-table .num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.adm-table .ops { white-space: nowrap; width: 1%; }
.adm-table code, .adm-code, .backend-field small { font-family: Consolas, monospace; }
.adm-table code { background: var(--paper); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.adm-ops { display: flex; gap: 12px; }
.backend .link { background: none; border: 0; padding: 0; color: var(--accent-dark); font-size: 13px; }
.backend .link:hover { text-decoration: underline; }
.backend .link.strong { color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; }
.backend .link.danger, .adm-warn b { color: #b3261e; }
.backend .link.small { font-size: 12px; }
.btn.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn.danger:hover:not(:disabled) { background: #8e1d17; border-color: #8e1d17; }
.adm-badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--paper); color: var(--ink-3); white-space: nowrap; vertical-align: 1px; }
.adm-badge.ok { background: #e3f1ea; color: var(--ok); }
.adm-badge.bad { background: var(--alert); color: var(--alert-ink); }
.adm-badge.busy { background: var(--note); color: var(--note-ink); }
.adm-badge.dark { background: var(--ink); color: #fff; }
.adm-meter { display: inline-block; width: 70px; height: 6px; background: var(--paper); border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.adm-meter i { display: block; height: 100%; background: var(--ok); }
.adm-meter + small { font-size: 12px; color: var(--soft); }
.adm-empty { padding: 40px; text-align: center; color: var(--soft); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.adm-tiles.small { grid-template-columns: repeat(3, minmax(0, 160px)); }
.adm-tile { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
button.adm-tile:hover { border-color: var(--ink); }
.adm-tile small { color: var(--soft); font-size: 12px; }
.adm-tile b { font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.adm-tile b em { font-style: normal; font-size: 13px; font-weight: 400; margin-left: 3px; color: var(--soft); }
.adm-tile span { font-size: 12px; color: var(--soft); }
.adm-tiles.small .adm-tile b { font-size: 20px; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.adm-grid .sheet h2, .backend .sheet > .spread { margin-bottom: 10px; }
.adm-bar { display: grid; grid-template-columns: 90px 1fr 32px; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.adm-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar i { height: 8px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.adm-bar em { display: block; height: 100%; background: var(--ink-3); border-radius: 99px; }
.adm-bar b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.adm-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; }
.adm-sub { font-size: 12px; color: var(--soft); font-weight: 500; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.backend .backend-field { grid-template-columns: 220px minmax(180px, 1fr); margin: 10px 0; font-size: 14px; }
.backend .backend-field > span { display: flex; flex-direction: column; }
.backend .backend-field small { font-size: 11px; color: var(--faint); }
.adm-editor { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf8; font-size: 13px; line-height: 1.7; resize: vertical; }
.adm-editor:focus, .adm-filter input:focus, .adm-filter select:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.adm-actions { display: flex; justify-content: flex-end; }
.adm-check { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 10px 0; }
.adm-thread { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 4px 0; margin: 10px 0; }
.adm-msg { max-width: 82%; padding: 8px 12px; border-radius: 10px; background: var(--paper); font-size: 14px; white-space: pre-wrap; }
.adm-msg.coach { align-self: flex-end; background: var(--ink); color: #fff; }
.adm-msg small { display: block; font-size: 11px; opacity: .65; }
.adm-test .adm-thread { min-height: 200px; }
.adm-compose { display: flex; gap: 8px; align-items: flex-end; }
.adm-compose textarea { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.adm-brief { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 10px 0; }
.adm-brief dt { color: var(--soft); }
.adm-brief dd { margin: 0; }
#admin-dialog { width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
#admin-dialog.wide { width: min(760px, calc(100vw - 32px)); }
#admin-dialog::backdrop { background: rgba(23, 25, 28, .45); }
.adm-modal { padding: 20px 22px; }
.adm-modal h2 { font-size: 18px; margin-bottom: 10px; }
.adm-modal p { margin: 6px 0; }
.adm-modal footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.adm-code { font-size: 28px; letter-spacing: 4px; font-weight: 700; text-align: center; padding: 10px; background: var(--paper); border-radius: 10px; }
.adm-warn { padding: 10px 12px; background: var(--alert); color: var(--alert-ink); border-radius: 8px; font-size: 14px; }
@media (max-width: 760px) {
  .adm-head { flex-direction: column; align-items: stretch; }
  .backend .backend-field { grid-template-columns: 1fr; }
  .adm-tiles.small { grid-template-columns: repeat(3, 1fr); }
}
/* 教练作品：对话中的创作与交付 */
#stage:has(.work-chat) {padding:0 28px}.work-chat {max-width:960px;height:100dvh;margin:auto}.work-chat .chat-head {display:flex;flex:none;gap:20px;padding:24px 0 18px;border-bottom:1px solid var(--line);margin:0}.work-eyebrow {font-size:12px;color:var(--soft)}.work-chat .chat-head h1 {font-size:23px;margin-top:6px;line-height:1.4}
.work-chat #work-messages {padding:24px 8px;gap:24px;min-height:100px}.work-turn {width:100%;max-width:100%;display:flex;flex-direction:column;align-items:flex-start}.work-turn.coach {align-items:flex-end}.turn-author {font-size:12px;color:var(--soft);margin:0 4px 7px}.work-chat .bubble {max-width:86%;line-height:1.8}.work-chat .bubble.agent {background:none;border:0;padding:0 4px}.work-chat .bubble.coach {border-radius:18px 18px 4px 18px;padding:12px 18px}.delivery {width:100%;margin-top:14px}.delivery-card {background:white;border:1px solid var(--line);border-radius:18px;overflow:hidden;padding:24px;box-shadow:0 5px 20px #263a2f06}.delivery-card header {display:flex;justify-content:space-between;gap:12px;margin-bottom:14px}.delivery-label {font-size:12px;color:var(--soft)}.delivery-card h2 {font-size:23px;line-height:1.5;margin-bottom:16px}.delivery-card h3 {font-size:17px;margin:6px 0}.delivery-prose,.delivery-pages p,.delivery-shots p {white-space:pre-wrap;line-height:1.9;overflow-wrap:anywhere}.delivery-prose {margin:16px 0;font-size:16px}.delivery-lead {font-size:21px;margin-bottom:20px}.delivery-gallery {display:flex;overflow-x:auto;gap:12px;scroll-snap-type:x mandatory;padding-bottom:10px;margin:12px 0}.delivery-gallery figure {margin:0;flex:0 0 230px;scroll-snap-align:start}.delivery-gallery img {display:block;width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:10px;background:var(--paper)}.delivery-gallery figcaption {font-size:12px;margin-top:7px;color:var(--soft)}.delivery-gallery figcaption button {margin:6px 0}.delivery-pages,.delivery-shots {display:grid;gap:14px;margin:16px 0}.delivery-pages article,.delivery-shots article {padding:18px;border-radius:10px;background:#f7f6f2}.delivery-pages article>span,.delivery-shots article>span {font-size:12px;color:var(--soft)}.delivery-shots blockquote {margin:10px 0 0;border-left:3px solid #cfdbd2;padding-left:12px;white-space:pre-wrap}.delivery-tags {color:#4e7661;margin:12px 0}.delivery-comment {background:var(--paper);padding:10px 14px;border-radius:9px;white-space:pre-wrap}.delivery-video {width:100%;max-height:540px;border-radius:12px;background:#111;display:block;margin:12px 0}.delivery-actions {display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.delivery-foot {font-size:12px;color:var(--soft);border-top:1px solid var(--line);padding-top:14px;margin-top:20px}.delivery-card details {margin:14px 0}.delivery-checks {font-size:13px;color:var(--note-ink)}.delivery-progress {padding:12px;background:var(--paper);border-radius:9px}.requirement-card {margin:12px 0;background:white;border:1px solid var(--line);border-radius:16px;padding:24px;width:100%}.requirement-card h2,.requirement-card p {margin:10px 0}.requirement-card small {display:block;color:var(--soft);margin-top:10px}
.work-compose {flex:none;margin:0 0 18px;border:1px solid #cecfc7;border-radius:18px;background:white;box-shadow:0 4px 20px #172b1f08;padding:12px}.work-input-row {display:flex;gap:12px;align-items:flex-end}.work-input-row textarea {flex:1;min-width:0;border:0;outline:0;resize:vertical;max-height:180px;padding:8px;background:none;line-height:1.6}.work-compose-foot {display:flex;gap:12px;align-items:center;justify-content:space-between;margin-top:10px;color:var(--soft);font-size:12px}.work-compose-foot .voice {font-size:13px}.work-cover img {display:block;width:100%;height:100%;object-fit:cover}
@media(max-width:760px){#stage:has(.work-chat){padding:0 12px}.work-chat .chat-head {padding:16px 0}.work-chat .chat-head h1 {font-size:19px}.delivery-card {padding:16px}.delivery-gallery figure {flex-basis:200px}.work-compose-foot span{display:none}.work-chat .bubble {max-width:95%}}
.backend .backend-field > span .adm-badge { align-self: flex-start; margin-top: 2px; }

/* ---------- 主体区域两侧统一约 50px，内容随窗口铺开 ---------- */
#stage { padding: 18px 50px 40px; }
#stage.paged-stage { padding-left: 54px; padding-right: 54px; }
.stage-wrap, #shell.wide .stage-wrap, .backend .stage-wrap { max-width: none; }
#stage:has(.work-chat) { padding: 0 50px; }
.work-chat { max-width: none; }

/* ---------- 招生助手：与作品创作对话同一套样式 ---------- */
.agent-chat .chat-head { align-items: flex-end; justify-content: space-between; }
.chat-head-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chat-status { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; font-size: 13px; }
.status-chip:hover { border-color: var(--ink); }
.status-chip i { display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--faint); border-radius: 50%; font-style: normal; font-size: 11px; color: #fff; }
.status-chip.done i { background: var(--ok); border-color: var(--ok); }
.status-chip small { color: var(--soft); }
.memory-pop { position: relative; margin-left: auto; }
.memory-pop summary { list-style: none; margin: 0; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font-size: 13px; }
.memory-pop summary::-webkit-details-marker { display: none; }
.memory-pop summary small { color: var(--soft); margin-left: 4px; }
.memory-pop[open] > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(360px, 80vw); max-height: 320px; overflow-y: auto; padding: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.agent-chat .work-turn > .plan, .agent-chat .work-turn > .bubble.asks { width: 100%; max-width: 100%; }
.agent-chat .work-turn > .quick, .agent-chat .work-turn > .saved-note { margin: 10px 4px 0; }
.agent-chat .bubble.agent.asks { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
@media (max-width: 760px) {
  #stage, #stage.paged-stage { padding-left: 16px; padding-right: 16px; }
  #stage:has(.work-chat) { padding: 0 12px; }
  .agent-chat .chat-head { flex-direction: column; align-items: stretch; }
  .chat-head-tools { justify-content: flex-start; }
  .memory-pop { margin-left: 0; }
  .memory-pop[open] > div { left: 0; right: auto; }
}
.agent-chat #messages { padding: 24px 8px; gap: 24px; }
.agent-chat .plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 5px 20px #263a2f06; }
.agent-chat .plan .btn.go { background: var(--ink); border-color: var(--ink); }
.agent-chat .plan .btn.go:hover:not(:disabled) { background: var(--ink-3); border-color: var(--ink-3); }

.required-mark{font-size:11px;color:var(--accent);font-weight:normal;margin-left:5px}.profile-optional{margin:16px 0}.profile-optional>summary{cursor:pointer;margin-bottom:12px;color:var(--soft)}

/* =====================================================================
   视觉升级：左侧导航、对话标题栏、对话区、输入卡片、附件
   ===================================================================== */
:root { --accent-soft: #fdebe4; --card-line: #e8e4dc; --shadow-soft: 0 2px 10px rgba(23, 25, 28, .04); --shadow-card: 0 12px 32px rgba(23, 25, 28, .07); }

/* ---------- 左侧导航：无滚动条，条目之间淡分割线 ---------- */
#rail { background: linear-gradient(180deg, #1b1e22 0%, #15171a 100%); padding: 20px 14px 14px; gap: 2px; }
#rail, #works, .backend-nav { scrollbar-width: none; -ms-overflow-style: none; }
#rail::-webkit-scrollbar, #works::-webkit-scrollbar, .backend-nav::-webkit-scrollbar { display: none; }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: .5px; padding: 0 6px 4px; }
.wordmark::before { content: "车"; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #f0764f, var(--accent-dark)); color: #fff; font-size: 16px; box-shadow: 0 4px 12px rgba(228, 87, 46, .35); }
.new-work { margin: 18px 0 12px; padding: 11px; border-radius: 12px; background: linear-gradient(135deg, #ee6a42, var(--accent-dark)); box-shadow: 0 6px 16px rgba(228, 87, 46, .28); letter-spacing: .5px; transition: transform .15s, box-shadow .15s; }
.new-work:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(228, 87, 46, .36); }
.rail-link, .work { position: relative; border-radius: 10px; transition: background .15s, color .15s; }
.rail-link { padding: 10px 12px; color: #c9cbce; font-size: 14px; }
.rail-link + .rail-link::before, .work + .work::before, .backend-nav .rail-link + .rail-link::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: rgba(255, 255, 255, .055); pointer-events: none; }
.rail-link:hover, .work:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.rail-link.on, .work.on { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 600; }
.rail-link.on::after, .work.on::after { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.rail-link:hover + .rail-link::before, .rail-link.on + .rail-link::before, .rail-link:hover::before, .rail-link.on::before,
.work:hover + .work::before, .work.on + .work::before, .work:hover::before, .work.on::before { opacity: 0; }
.rail-label { font-size: 11px; letter-spacing: 1px; color: #7c7f84; padding: 18px 12px 6px; margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .06); }
.work { padding: 9px 12px; }
.work b { font-size: 13.5px; color: #e6e6e3; }
.work small { font-size: 11.5px; color: #8b8e93; }
.work-group { margin-bottom: 4px; }
.work-group-toggle { color: #a9acb0; font-size: 12.5px; letter-spacing: .5px; }
.work-group-toggle span { background: rgba(255, 255, 255, .07); border-radius: 99px; padding: 0 8px; font-size: 11px; line-height: 18px; color: #a9acb0; }
.work-group .work { padding-left: 24px; }
.work-group .work.on::after { left: 10px; }
.rail-foot { border-top: 1px solid rgba(255, 255, 255, .07); padding: 14px 10px 2px; margin-top: 8px; }
.rail-foot b { display: block; font-size: 14px; color: #f1f1ef; }
.rail-foot div { gap: 6px; margin-top: 8px; }
.rail-foot button, .rail-foot a { padding: 4px 10px !important; border-radius: 99px; background: rgba(255, 255, 255, .06) !important; font-size: 12px !important; color: #b9bbbf; }
.rail-foot button:hover, .rail-foot a:hover { background: rgba(255, 255, 255, .12) !important; color: #fff; }
.backend .backend-nav small { border-top: 1px solid rgba(255, 255, 255, .06); margin-top: 8px; padding-top: 14px; }
.backend .backend-nav small:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---------- 对话页整体 ---------- */
#stage:has(.work-chat) { background: radial-gradient(1200px 380px at 50% -120px, #fff7f2 0%, rgba(255, 247, 242, 0) 70%), var(--paper); }

/* ---------- 标题栏 ---------- */
.work-chat .chat-head { position: relative; align-items: center; gap: 18px; padding: 22px 0 18px; border-bottom: 0; }
.work-chat .chat-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(23, 25, 28, .12), rgba(23, 25, 28, .04) 70%, transparent); }
.work-chat .chat-head > div:first-child { position: relative; padding-left: 62px; min-height: 48px; display: flex; flex-direction: column; justify-content: center; }
.work-chat .chat-head > div:first-child::before { content: "作"; position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #2b2f35, #15171a); color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 8px 18px rgba(23, 25, 28, .18); }
.agent-chat .chat-head > div:first-child::before { content: "招"; background: linear-gradient(135deg, #f0764f, var(--accent-dark)); box-shadow: 0 8px 18px rgba(228, 87, 46, .3); }
.work-eyebrow { align-self: flex-start; display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 500; letter-spacing: .3px; }
.work-chat .chat-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.2px; margin-top: 6px; line-height: 1.3; }
.chat-head-tools, .work-chat .chat-head > .btn { flex: none; }
.chat-head-tools { gap: 6px; padding: 4px; background: var(--surface); border: 1px solid var(--card-line); border-radius: 99px; box-shadow: var(--shadow-soft); }
.chat-head-tools .btn.small, .work-chat .chat-head > .btn.small { border: 0; border-radius: 99px; padding: 6px 14px; font-size: 13px; background: none; color: var(--ink-3); }
.chat-head-tools .btn.small:hover:not(:disabled) { background: var(--paper); color: var(--ink); }
.chat-head-tools .btn.small[data-act="new-topic"] { background: var(--ink); color: #fff; }
.chat-head-tools .btn.small[data-act="new-topic"]:hover:not(:disabled) { background: var(--ink-3); color: #fff; }
.work-chat .chat-head > .btn.small { border: 1px solid var(--card-line); background: var(--surface); box-shadow: var(--shadow-soft); }

/* 状态条 */
.chat-status { border-bottom: 0; padding: 14px 0 6px; }
.chat-status > .hint { font-size: 12px; }
.status-chip { border-color: var(--card-line); box-shadow: var(--shadow-soft); transition: border-color .15s; }
.memory-pop summary { border-color: var(--card-line); box-shadow: var(--shadow-soft); cursor: pointer; }
.memory-pop summary::before { content: "✦ "; color: var(--accent); }

/* ---------- 消息 ---------- */
.work-chat .messages { padding: 22px 4px 18px !important; gap: 22px !important; }
.work-chat .turn-author { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; color: var(--soft); }
.work-chat .turn-author::before { content: "助"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #f0764f, var(--accent-dark)); color: #fff; font-size: 12px; font-weight: 600; flex: none; }
.work-chat .work-turn.coach .turn-author { flex-direction: row-reverse; }
.work-chat .work-turn.coach .turn-author::before { content: "我"; background: linear-gradient(135deg, #3a3e45, #17191c); }
.work-chat .work-turn.agent > :not(.turn-author) { margin-left: 36px; }
.work-chat .work-turn.coach > :not(.turn-author) { margin-right: 36px; }
.work-chat .bubble { font-size: 15px; line-height: 1.8; max-width: min(78%, 760px); }
.work-chat .bubble.agent { background: var(--surface); border: 1px solid var(--card-line); border-radius: 4px 18px 18px 18px; padding: 13px 18px; box-shadow: var(--shadow-soft); }
.work-chat .bubble.coach { background: linear-gradient(135deg, #2b2f35, #17191c); border-radius: 18px 4px 18px 18px; padding: 12px 18px; box-shadow: 0 6px 16px rgba(23, 25, 28, .14); }
.work-chat .bubble.agent.asks { border-radius: 4px 18px 18px 18px; }
.work-chat .bubble.typing { color: var(--soft); }
.work-chat .bubble.typing::after { content: ""; display: inline-block; width: 18px; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } }
.work-chat .quick { gap: 8px; }
.work-chat .quick button { border: 1px solid var(--card-line); background: var(--surface); box-shadow: var(--shadow-soft); padding: 7px 14px; font-size: 13.5px; transition: all .15s; }
.work-chat .quick button:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.work-chat .quick button.start { border-color: rgba(228, 87, 46, .45); color: var(--accent-dark); }
.work-chat .saved-note { margin-top: 0; padding: 4px 10px; border-radius: 99px; background: #e8f3ed; font-size: 12px; }
.agent-chat .plan, .requirement-card, .delivery-card { border-color: var(--card-line) !important; box-shadow: var(--shadow-card) !important; border-radius: 18px !important; }
.agent-chat .plan .format { color: var(--accent-dark); }

/* ---------- 输入卡片 ---------- */
.work-compose { position: relative; margin: 6px 0 20px; border: 1px solid var(--card-line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); padding: 12px 14px 10px; transition: border-color .15s, box-shadow .15s; }
.work-compose:focus-within { border-color: rgba(228, 87, 46, .55); box-shadow: 0 0 0 4px rgba(228, 87, 46, .08), var(--shadow-card); }
.work-input-row textarea { font-size: 15px; resize: none; min-height: 52px; }
.work-input-row .btn.main { align-self: flex-end; height: 40px; padding: 0 18px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #ee6a42, var(--accent-dark)); box-shadow: 0 4px 12px rgba(228, 87, 46, .3); font-weight: 600; }
.work-input-row .btn.main:hover:not(:disabled) { background: linear-gradient(135deg, #e45a31, #b23a18); }
.work-compose-foot { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #ece8e0; }
.attach-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.attach-btn, .work-compose-foot .voice { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border: 1px solid transparent; border-radius: 99px; background: #f4f2ee; color: var(--ink-3); font-size: 12.5px; cursor: pointer; transition: all .15s; }
.attach-btn:hover, .work-compose-foot .voice:hover { background: var(--surface); border-color: var(--card-line); color: var(--ink); }
.attach-btn span { font-size: 14px; line-height: 1; color: var(--accent-dark); }
.attach-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.work-compose-foot .voice.recording { background: var(--alert); color: var(--alert-ink); border-color: var(--accent); }
.attach-drop { display: none; }
.work-compose.dragging .attach-drop { display: grid; place-items: center; position: absolute; inset: 6px; z-index: 3; border: 2px dashed var(--accent); border-radius: 16px; background: rgba(253, 235, 228, .92); color: var(--accent-dark); font-weight: 600; }

/* ---------- 附件卡片 ---------- */
.attach-tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 10px; margin-bottom: 4px; border-bottom: 1px solid #f0ece5; }
.attach-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 5px 8px 5px 5px; border: 1px solid var(--card-line); border-radius: 12px; background: #fbfaf7; color: var(--ink); text-decoration: none; text-align: left; font-size: 13px; }
a.attach-chip:hover, button.attach-chip:hover { border-color: var(--accent); background: var(--surface); }
.attach-chip img, .attach-chip > i { flex: none; width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.attach-chip > i { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-style: normal; font-size: 13px; font-weight: 600; }
.attach-chip > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.attach-chip b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip small { font-size: 11px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip > button { flex: none; width: 20px; height: 20px; margin-left: 2px; border: 0; border-radius: 50%; background: #ece8e0; color: var(--soft); font-size: 13px; line-height: 1; padding: 0; }
.attach-chip > button:hover { background: var(--accent); color: #fff; }
.attach-chip.pending { opacity: .65; }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-width: min(78%, 760px); }
.work-turn.coach .attach-list { justify-content: flex-end; }

/* ---------- 从我的主页选 ---------- */
#home-picker { width: min(780px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 40px)); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
#home-picker::backdrop { background: rgba(23, 25, 28, .45); backdrop-filter: blur(2px); }
.picker { display: flex; flex-direction: column; max-height: min(720px, calc(100vh - 40px)); }
.picker header { display: flex; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; }
.picker header h2 { font-size: 19px; }
.picker-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--paper); font-size: 18px; }
.picker nav { display: flex; gap: 6px; padding: 0 22px 12px; border-bottom: 1px solid var(--card-line); }
.picker nav button { padding: 6px 14px; border: 1px solid var(--card-line); border-radius: 99px; background: var(--surface); font-size: 13px; }
.picker nav button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.picker nav small { margin-left: 5px; opacity: .6; }
.picker-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 16px 22px; align-content: start; }
.picker-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; text-align: left; border: 1px solid var(--card-line); border-radius: 14px; background: var(--surface); transition: all .15s; }
.picker-item:hover { border-color: #cfc9be; box-shadow: var(--shadow-soft); }
.picker-item.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228, 87, 46, .12); }
.picker-item img, .picker-item > i { flex: none; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.picker-item > i { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-style: normal; font-weight: 600; }
.picker-item span { display: flex; flex-direction: column; min-width: 0; padding-right: 22px; }
.picker-item b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-item small { font-size: 12px; color: var(--soft); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.picker-item em { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #d6d1c7; font-style: normal; font-size: 12px; color: #fff; }
.picker-item.on em { background: var(--accent); border-color: var(--accent); }
.picker-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; }
.picker footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 22px 18px; border-top: 1px solid var(--card-line); }
.picker footer div { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .work-chat .chat-head > div:first-child { padding-left: 52px; }
  .work-chat .chat-head > div:first-child::before { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
  .chat-head-tools { border-radius: 14px; }
  .work-chat .work-turn.agent > :not(.turn-author) { margin-left: 0; }
  .work-chat .work-turn.coach > :not(.turn-author) { margin-right: 0; }
  .work-chat .bubble, .attach-list { max-width: 100%; }
}
.agent-chat .work-turn > .plan, .agent-chat .work-turn > .bubble.asks, .work-chat .work-turn > .delivery, .work-chat .work-turn > .requirement-card { width: auto; max-width: none; align-self: stretch; }

/* ---------- 顶部导航条：招生助手、我的主页 ---------- */
#shell:has(#topbar) { grid-template-rows: 60px minmax(0, 1fr); }
#shell:has(#topbar) #rail { grid-row: 1 / -1; }
#topbar { grid-column: 2 / -1; grid-row: 1; position: relative; z-index: 4; display: flex; align-items: stretch; justify-content: space-between; padding: 0 50px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px); border-bottom: 1px solid var(--card-line); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset; }
#shell:has(#topbar) #stage { grid-row: 2; grid-column: 2; }
#shell:has(#topbar) #inspector { grid-row: 2; grid-column: 3; }
#shell:has(#topbar) .work-chat { height: calc(100dvh - 60px); }
.top-nav { display: flex; align-items: stretch; gap: 4px; }
.top-link { position: relative; display: flex; align-items: center; gap: 9px; padding: 0 16px; border: 0; background: none; color: var(--ink-3); font-size: 15px; font-weight: 500; transition: color .15s; }
.top-link i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f1eee8; color: var(--soft); font-style: normal; font-size: 12px; font-weight: 600; transition: all .15s; }
.top-link:hover { color: var(--ink); }
.top-link:hover i { background: #ebe6dd; color: var(--ink); }
.top-link.on { color: var(--ink); font-weight: 600; }
.top-link.on i { background: linear-gradient(135deg, #f0764f, var(--accent-dark)); color: #fff; box-shadow: 0 4px 10px rgba(228, 87, 46, .3); }
.top-link.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.top-link + .top-link::before { content: ""; position: absolute; left: -2px; top: 20px; bottom: 20px; width: 1px; background: var(--card-line); }
@media (max-width: 1180px) {
  #shell:has(#topbar) #inspector { grid-row: 3; grid-column: 2; }
  #shell:has(#topbar) .work-chat { height: calc(100vh - 60px); }
}
@media (max-width: 760px) {
  #shell:has(#topbar) { grid-template-rows: auto; }
  #shell:has(#topbar) > * { grid-column: 1 !important; grid-row: auto !important; }
  #topbar { position: sticky; top: 0; height: 52px; padding: 0 12px; }
}

/* ---------- 资料弹窗 ---------- */
#profile-pop { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); overflow: hidden; }
#profile-pop::backdrop { background: rgba(23, 25, 28, .45); backdrop-filter: blur(2px); }
.pop { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.pop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px 14px; }
.pop-head h2 { font-size: 20px; margin-top: 6px; }
.pop-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 24px 16px; border-bottom: 1px solid var(--card-line); }
.pop-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; text-align: left; border: 1px solid var(--card-line); border-radius: 14px; background: var(--surface); transition: all .15s; }
.pop-tabs button:hover { border-color: #cfc9be; }
.pop-tabs button.on { border-color: var(--accent); background: #fff8f5; box-shadow: 0 0 0 3px rgba(228, 87, 46, .1); }
.pop-tabs b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pop-tabs em { font-style: normal; font-size: 11.5px; font-weight: 500; padding: 0 7px; border-radius: 99px; background: var(--paper); color: var(--soft); }
.pop-tabs button.on em { background: var(--accent-soft); color: var(--accent-dark); }
.pop-tabs small { font-size: 12px; color: var(--soft); }
.pop-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px; background: var(--paper); }
.pop-body > .btn.main { margin-top: 4px; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px 16px; border-top: 1px solid var(--card-line); background: var(--surface); }
@media (max-width: 760px) {
  .pop-tabs { grid-template-columns: minmax(0, 1fr); }
  .pop-foot { flex-direction: column; align-items: stretch; }
}
.home-card { grid-template-columns: 96px minmax(0, 1fr); }
@media (max-width: 900px) { .home-card { grid-template-columns: 80px minmax(0, 1fr); } }

/* ---------- 我的主页：精简名片 + 卡片化列表 ---------- */
.home-card { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 20px 24px; border-color: var(--card-line); border-radius: 18px; box-shadow: var(--shadow-soft); }
.home-avatar { width: 76px; height: 76px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--card-line); }
.home-avatar span { font-size: 32px; }
.home-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.home-name h1 { font-size: 24px; margin: 0 6px 0 0; }
.home-tag { padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12.5px; }
.home-line { margin-top: 4px; color: var(--soft); font-size: 14px; }
.home-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 13.5px; }
.home-facts span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.home-facts em { font-style: normal; color: var(--soft); margin-right: 6px; }
.home-ring { --p: 0; flex: none; display: grid; place-items: center; width: 84px; height: 84px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #ece8e0 0); transition: transform .15s; }
.home-ring:hover { transform: scale(1.04); }
.home-ring > span { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--surface); line-height: 1.1; }
.home-ring b { font-size: 20px; }
.home-ring b small { font-size: 11px; font-weight: 500; }
.home-ring em { font-style: normal; font-size: 11px; color: var(--soft); }
.home-tabs { margin: 18px 0 14px; }

.empty-note { text-align: center; color: var(--soft); font-size: 14px; padding: 36px 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head .hint { flex: 1 1 260px; }
.card-del { position: absolute; top: 8px; right: 8px; z-index: 2; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(23, 25, 28, .55); color: #fff; font-size: 15px; line-height: 1; opacity: 0; transition: opacity .15s; }
.card-del:hover { background: #b3261e; }
:is(.post-card, .photo-card, .student-card):hover .card-del, .card-del:focus-visible { opacity: 1; }
@media (hover: none) { .card-del { opacity: 1; } }

/* 动态 */
.composer { padding: 14px 16px; border-color: var(--card-line); border-radius: 16px; }
.composer textarea { margin: 0; min-height: 76px; border: 0; padding: 4px 2px; background: none; font-size: 15px; }
.composer textarea:focus { outline: 0; }
.composer:focus-within { border-color: rgba(228, 87, 46, .5); box-shadow: 0 0 0 4px rgba(228, 87, 46, .07); }
.composer .composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ece8e0; }
.composer-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips.seg { display: inline-flex; gap: 0; padding: 3px; margin: 0; border-radius: 99px; background: #f4f2ee; }
.chips.seg .chip { border: 0; background: none; padding: 5px 12px; font-size: 13px; color: var(--ink-3); }
.chips.seg .chip.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(23, 25, 28, .1); }
.tool-btn, .composer-tools .voice { position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 0; border-radius: 99px; background: #f4f2ee; color: var(--ink-3); font-size: 13px; cursor: pointer; }
.tool-btn:hover, .composer-tools .voice:hover { background: #ebe7df; color: var(--ink); }
.tool-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.post-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--card-line); border-radius: 16px; box-shadow: var(--shadow-soft); }
.post-cover { position: relative; aspect-ratio: 4 / 3; background: #ebe7df; }
.post-cover img, .post-cover video { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-more { position: absolute; right: 10px; bottom: 10px; padding: 2px 9px; border-radius: 99px; background: rgba(23, 25, 28, .6); color: #fff; font-size: 12px; }
.post-body { padding: 12px 14px 14px; }
.post-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--soft); }
.post-card .post-kind { font-size: 12px; }
.post-card .post-text { margin-top: 6px; font-size: 14.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* 照片 */
.upload-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upload-bar select { height: 38px; padding: 0 12px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--surface); font-size: 14px; }
.consent-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-3); }
.upload-btn { position: relative; display: inline-flex; align-items: center; height: 38px; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-card { position: relative; margin: 0; overflow: hidden; border-radius: 14px; background: #ebe7df; }
.photo-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.photo-card figcaption { position: absolute; left: 8px; bottom: 8px; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .9); font-size: 12px; color: var(--ink); }

/* 学员故事 */
.student-form { padding: 4px 16px 16px; margin-bottom: 16px; border: 1px dashed var(--card-line); border-radius: 14px; background: #fcfbf8; }
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.student-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--surface); }
.student-card header { display: flex; align-items: center; gap: 8px; padding-right: 26px; }
.student-card b { font-size: 15px; }
.student-card .badge { padding: 1px 8px; border-radius: 99px; background: #eef3ef; color: var(--ok); font-size: 12px; }
.student-card p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.student-card .consent { align-self: flex-start; font-size: 12px; color: var(--soft); }
.student-card .consent.none { color: var(--note-ink); }
.student-card .card-del { background: #ece8e0; color: var(--soft); }
.student-card .card-del:hover { background: #b3261e; color: #fff; }

@media (max-width: 760px) {
  .home-card { grid-template-columns: 60px minmax(0, 1fr); padding: 16px; }
  .home-avatar { width: 60px; height: 60px; }
  .home-ring { grid-column: 1 / -1; justify-self: start; width: 64px; height: 64px; }
  .home-ring > span { width: 52px; height: 52px; }
  .home-ring b { font-size: 16px; }
}

/* ---------- 字体：思源黑体（常用字子集，随工作台一起提供，所有电脑显示一致） ---------- */
@font-face { font-family: "Noto Sans SC Web"; src: url("/fonts/noto-sans-sc.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root { font-family: "Noto Sans SC Web", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "palt" 0; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, b, strong { font-weight: 600; }
h1 { letter-spacing: 0; }
code, pre, .adm-code, .adm-table code { font-family: "Cascadia Mono", "JetBrains Mono", Consolas, "Noto Sans SC Web", monospace; }

/* ---------- 后台通用：卡片、字段、开关 ---------- */
.backend .adm-head h1 { font-size: 26px; font-weight: 700; }
.cfg-card { background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px; padding: 20px 22px 22px; margin-bottom: 16px; box-shadow: var(--shadow-soft); }
.cfg-card > header { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #f0ece5; }
.cfg-card > header h2 { font-size: 17px; }
.cfg-card > header > div:nth-child(2) { flex: 1; min-width: 0; }
.cfg-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #2b2f35, #15171a); color: #fff; font-style: normal; font-weight: 600; }
.cfg-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.cfg-dirty { font-size: 12px; color: var(--note-ink); background: var(--note); padding: 2px 10px; border-radius: 99px; }
.cfg-sub { margin: 18px 0 10px; font-size: 12.5px; font-weight: 600; color: var(--soft); letter-spacing: .5px; }
.cfg-sub small { font-weight: 400; margin-left: 6px; color: var(--faint); }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; }
.cfg-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cfg-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--ink-3); font-weight: 500; }
.cfg-label code { font-size: 11px; color: var(--faint); background: none; padding: 0; font-weight: 400; }
.cfg-field input, .cfg-field select { height: 40px; padding: 0 12px; border: 1px solid var(--card-line); border-radius: 10px; background: #fcfbf8; font-size: 14px; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.cfg-field input:focus, .cfg-field select:focus { outline: 0; border-color: rgba(228, 87, 46, .6); background: #fff; box-shadow: 0 0 0 3px rgba(228, 87, 46, .1); }
.cfg-field input[readonly] { color: var(--soft); background: #f4f2ee; cursor: not-allowed; }
.cfg-toggle { flex-direction: row; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px; border: 1px solid var(--card-line); border-radius: 10px; background: #fcfbf8; align-self: end; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #d9d4ca; transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(228, 87, 46, .25); }
.cfg-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.cfg-pill { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--card-line); border-radius: 14px; }
.cfg-pill small { font-size: 12px; color: var(--soft); }
.cfg-pill b { font-family: "Cascadia Mono", Consolas, monospace; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backend .btn.main:disabled { background: #cfcac0; border-color: #cfcac0; color: #fff; opacity: 1; }

/* ---------- 提示词 ---------- */
.prompt-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.prompt-list { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; }
.prompt-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-align: left; background: var(--surface); border: 1px solid var(--card-line); border-radius: 14px; transition: all .15s; }
.prompt-item:hover { border-color: #cfc9be; }
.prompt-item.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228, 87, 46, .1); }
.prompt-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prompt-item b { font-size: 15px; }
.prompt-item small { font-size: 12.5px; color: var(--soft); line-height: 1.6; }
.prompt-item em { font-style: normal; font-size: 11.5px; color: var(--faint); }
.prompt-editor { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px; box-shadow: var(--shadow-soft); overflow: hidden; }
.prompt-editor > header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid #f0ece5; }
.prompt-editor > header h2 { font-size: 17px; }
.prompt-text { min-height: calc(100vh - 290px); border: 0; border-radius: 0; padding: 18px 20px; background: #fcfbf8; font-size: 14px; line-height: 1.85; resize: none; }
.prompt-text:focus { outline: 0; background: #fff; }
.prompt-foot { display: flex; justify-content: space-between; padding: 10px 20px; border-top: 1px solid #f0ece5; font-size: 12px; color: var(--soft); }

/* ---------- 规则 ---------- */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.rule-grid .cfg-card { margin: 0; }
.rule-grid .adm-editor { margin-top: 14px; min-height: 280px; }
.adm-actions { margin-top: 16px; }

/* ---------- Agent 测试 ---------- */
.test-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.test-side { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px; box-shadow: var(--shadow-soft); position: sticky; top: 0; }
.test-model { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #f6f4ef; }
.test-model small { font-size: 12px; color: var(--soft); }
.test-model b { font-family: "Cascadia Mono", Consolas, monospace; font-size: 14px; font-weight: 500; }
.test-raw summary { margin: 0; }
.test-raw pre { max-height: 300px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 10px; background: #1b1e22; color: #d9dbde; font-size: 12px; }
.test-chat { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 460px; background: var(--surface); border: 1px solid var(--card-line); border-radius: 18px; box-shadow: var(--shadow-soft); overflow: hidden; }
.test-chat .adm-thread { flex: 1; max-height: none; margin: 0; padding: 20px; gap: 14px; background: linear-gradient(180deg, #fbfaf7, #f6f4ef); }
.test-chat .adm-msg { max-width: 78%; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow-soft); font-size: 14.5px; line-height: 1.75; }
.test-chat .adm-msg.coach { border-radius: 16px 4px 16px 16px; border: 0; background: linear-gradient(135deg, #2b2f35, #17191c); }
.test-chat .adm-msg small { margin-bottom: 2px; }
.test-plan { margin: 10px 0 2px; padding: 10px 12px; border-radius: 10px; background: #fff8f5; border: 1px solid #f6d9cd; }
.test-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.test-quick .chip { padding: 4px 12px; font-size: 13px; }
.test-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--soft); text-align: center; }
.test-empty b { color: var(--ink-3); font-size: 16px; }
.test-chat .typing { color: var(--soft); }
.test-chat .adm-compose { padding: 12px 14px; border-top: 1px solid var(--card-line); background: var(--surface); }
.test-chat .adm-compose textarea { border: 1px solid var(--card-line); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; resize: none; }
.test-chat .adm-compose textarea:focus { outline: 0; border-color: rgba(228, 87, 46, .6); box-shadow: 0 0 0 3px rgba(228, 87, 46, .1); }
.test-chat .adm-compose .btn { height: 44px; }

@media (max-width: 980px) {
  .prompt-layout, .test-layout { grid-template-columns: minmax(0, 1fr); }
  .prompt-list, .test-side { position: static; }
  .prompt-text { min-height: 420px; }
  .rule-grid { grid-template-columns: minmax(0, 1fr); }
}
.cfg-field.wide { grid-column: span 2; }
.cfg-switch { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; border: 1px solid var(--card-line); border-radius: 10px; background: #fcfbf8; font-size: 13.5px; color: var(--soft); }
@media (max-width: 760px) { .cfg-field.wide { grid-column: auto; } }
.test-side .cfg-toggle { align-self: stretch; }

/* ---------- 图文按平台样式预览（小红书笔记 / 抖音图文） ---------- */
.note-phone { --brand: #ff2442; --tag: #13386c; width: 100%; max-width: 375px; overflow: hidden; background: #fff; border: 1px solid #ece8e0; border-radius: 22px; box-shadow: 0 16px 40px rgba(23, 25, 28, .10); color: #222; font-size: 14px; }
.note-phone.douyin { --brand: #fe2c55; --tag: #2b5aa6; }
.note-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.note-author { display: flex; align-items: center; gap: 9px; min-width: 0; }
.note-author i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: #f2efe9; font-style: normal; font-size: 14px; font-weight: 600; color: #888; }
.note-author img { width: 100%; height: 100%; object-fit: cover; }
.note-author b { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-follow { flex: none; height: 28px; padding: 0 16px; border: 1px solid var(--brand); border-radius: 99px; background: none; color: var(--brand); font-size: 13px; font-weight: 500; pointer-events: none; }
.douyin .note-follow { background: var(--brand); color: #fff; }
.note-media { position: relative; background: #f5f3ef; }
.note-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.note-track::-webkit-scrollbar { display: none; }
.note-slide { flex: 0 0 100%; aspect-ratio: 3 / 4; scroll-snap-align: start; overflow: hidden; }
.note-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.note-text-slide { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 26px; background: linear-gradient(180deg, #fffaf3, #f7efe2); }
.note-text-slide.cover { align-items: center; text-align: center; background: linear-gradient(160deg, #fff1ea 0%, #ffd8cb 100%); }
.note-text-slide.cover b { font-size: 26px; line-height: 1.45; font-weight: 800; color: #2a1d18; }
.note-text-slide span { align-self: flex-start; padding: 1px 10px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; }
.note-text-slide h4 { margin: 0; font-size: 19px; line-height: 1.5; color: #2a1d18; }
.note-text-slide p { margin: 0; font-size: 14.5px; line-height: 1.8; color: #4a3f39; white-space: pre-wrap; }
.note-count { position: absolute; top: 10px; right: 10px; padding: 1px 9px; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 12px; }
.note-dots { display: flex; justify-content: center; gap: 4px; padding: 8px 0 2px; background: #fff; }
.note-dots i { width: 5px; height: 5px; border-radius: 50%; background: #d9d6d0; transition: all .2s; }
.note-dots i.on { width: 6px; height: 6px; background: var(--brand); }
.note-body { padding: 8px 16px 10px; }
.note-title { margin: 4px 0 6px; font-size: 16.5px; line-height: 1.5; font-weight: 600; color: #1f1f1f; }
.note-desc { margin: 0; font-size: 14.5px; line-height: 1.75; color: #333; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-tags { margin: 6px 0 0; line-height: 1.8; }
.note-tags a { color: var(--tag); font-size: 14.5px; margin-right: 4px; }
.note-meta { margin: 8px 0 0; font-size: 12px; color: #a3a3a3; }
.note-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px 12px; border-top: 1px solid #f2f0ec; font-size: 13px; color: #555; }
.note-say { flex: 1; min-width: 0; padding: 7px 14px; border-radius: 99px; background: #f4f3f1; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-bar > span:not(.note-say) { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.note-bar svg { width: 19px; height: 19px; fill: none; stroke: #444; stroke-width: 1.6; stroke-linejoin: round; }

/* 作品页：左边改，右边看 */
.note-edit { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.note-side { position: sticky; top: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px 20px; border-radius: 22px; background: linear-gradient(180deg, #efece6, #e8e4dc); }
.note-side-label { align-self: stretch; text-align: center; font-size: 12.5px; color: var(--soft); }
/* 创作对话里：居中展示一部“手机” */
.note-wrap { display: flex; justify-content: center; padding: 18px 12px; margin: 4px 0 8px; border-radius: 16px; background: linear-gradient(180deg, #f6f3ee, #efebe4); }
@media (max-width: 1100px) {
  .note-edit { grid-template-columns: minmax(0, 1fr); }
  .note-side { position: static; order: -1; }
}
.note-text-slide.cover b, .note-text-slide h4 { white-space: pre-line; }

/* 管理员前台与后台互相切换的入口 */
.switch-link { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.switch-link[hidden] { display: none; }
#topbar .switch-link { background: #fff4ef; color: var(--accent-dark); border: 1px solid #f6d3c4; }
#topbar .switch-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
#rail .switch-link { align-self: stretch; justify-content: center; margin-top: 12px; background: rgba(228, 87, 46, .16); color: #ffb79c; border: 1px solid rgba(228, 87, 46, .35); }
#rail .switch-link:hover { background: var(--accent); color: #fff; }

/* 后台·教练详情（不套教练端主页样式） */
.cd-head { align-items: center; }
.cd-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cd-avatar { flex: none; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 22px; font-weight: 700; }
.cd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cd-head code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--paper); }
.cd-head .adm-tools { flex-wrap: wrap; justify-content: flex-end; }
.cd-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cd-tiles .adm-tile b { font-size: 22px; }
.cd-tiles .adm-tile.on { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.cd-tabs { display: flex; gap: 2px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cd-tabs button { position: relative; flex: none; padding: 10px 14px; border: 0; background: none; color: var(--soft); font-size: 14px; font-weight: 500; white-space: nowrap; }
.cd-tabs button small { margin-left: 5px; padding: 0 6px; border-radius: 99px; background: var(--paper); font-size: 11px; color: var(--soft); }
.cd-tabs button:hover { color: var(--ink); }
.cd-tabs button.on { color: var(--ink); font-weight: 600; }
.cd-tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.cd-grid { margin-bottom: 12px; }
.cd-h2 { margin-top: 18px; }
.cd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cd-sample { padding: 8px 0; border-top: 1px solid var(--line); }
.cd-sample:first-of-type { border-top: 0; }
.cd-sample small { display: block; color: var(--soft); font-size: 12px; }
.cd-sample p { margin: 2px 0 0; font-size: 13px; }
.cd-none { color: #b5b0a6; font-size: 13px; }
.cd-count { font-size: 12px; font-weight: 500; color: var(--soft); margin-left: 4px; }
.cd-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
.cd-group h2 { font-size: 15px; }
.cd-fields { display: grid; grid-template-columns: minmax(90px, max-content) 1fr; gap: 0; margin: 0; font-size: 13px; }
.cd-fields dt, .cd-fields dd { margin: 0; padding: 7px 0; border-top: 1px solid var(--line); }
.cd-fields dt { padding-right: 14px; color: var(--soft); }
.cd-fields dt i { color: var(--accent); font-style: normal; margin-left: 2px; }
.cd-fields dt:first-of-type, .cd-fields dt:first-of-type + dd { border-top: 0; }
.cd-fields dd { white-space: pre-wrap; word-break: break-word; }
.cd-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.cd-form .field:has(textarea), .cd-form .field:has(.cd-checks) { grid-column: 1 / -1; }
.cd-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-weight: 400; }
.cd-checks label { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.cd-thumb { display: block; width: 54px; height: 72px; border-radius: 6px; object-fit: cover; background: var(--paper); }
.cd-clip { margin: 3px 0 0; font-size: 12px; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 460px; }
.cd-clip.wide { color: var(--ink); font-size: 13px; -webkit-line-clamp: 3; max-width: 640px; margin: 0; white-space: pre-wrap; }
.cd-raw summary { cursor: pointer; font-size: 12px; color: var(--soft); margin-top: 4px; }
.cd-raw p { font-size: 12px; color: var(--soft); white-space: pre-wrap; margin: 4px 0 0; }
.cd-files { display: flex; gap: 4px; }
.cd-file { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: var(--paper); color: var(--soft); font-size: 12px; text-decoration: none; }
.cd-file img { width: 100%; height: 100%; object-fit: cover; }
.cd-file.video { background: var(--ink); color: #fff; }
.adm-table audio { height: 32px; width: 220px; }
.cd-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cd-photo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cd-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper); }
.cd-photo figcaption { display: grid; gap: 4px; padding: 8px 10px 10px; font-size: 12px; }
.cd-photo figcaption small { color: var(--soft); }
.cd-photo figcaption .link { justify-self: start; }
.cd-sources { margin-top: 12px; }
@media (max-width: 1100px) { .cd-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cd-groups, .cd-form { grid-template-columns: 1fr; } .cd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 图文：创作角度与发布建议 */
.angle-block p { margin-top: 6px; font-size: 14px; }
.angle-block details { margin-top: 6px; }
.angle-block summary { cursor: pointer; font-size: 13px; color: var(--soft); }
.angle-kind { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; vertical-align: 1px; background: var(--paper); color: var(--ink-3); }
.angle-kind.original { background: #fff0e9; color: var(--accent-dark); }
.angle-kind.combo { background: #eef2fb; color: #3f5aa8; }
.angle-kind.stable { background: #e9f4ee; color: var(--ok); }
.angle-sub { margin: 14px 0 4px; font-size: 13px; color: var(--soft); font-weight: 600; }
.angle-alt { padding: 10px 0; border-top: 1px solid var(--line); }
.angle-alt b { display: block; font-size: 14px; }
.angle-alt .btn { margin-top: 6px; }
.tips { display: grid; gap: 2px; margin: 6px 0 0; font-size: 13px; }
.tips dt { color: var(--soft); margin-top: 6px; }
.tips dd { margin: 0; }
.note-side-extra .block { margin-top: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.note-side-extra .block h2 { font-size: 15px; }

/* 后台·素材分析 */
.rf-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.rf-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.rf-plan > div { background: var(--paper); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.rf-plan small, .rf-plan span { color: var(--ink-3); font-size: 12px; }
.rf-change { margin: 6px 0; }
.rf-change summary { cursor: pointer; }
.rf-change ul, .rf-list { margin: 6px 0 0; padding-left: 18px; max-height: 240px; overflow: auto; font-size: 13px; line-height: 1.8; }
.rf-running { background: var(--note); color: var(--note-ink); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
@media (max-width: 900px) { .rf-grid { grid-template-columns: 1fr; } }

/* ================= 手机端（≤760px）：左栏收成抽屉、顶栏一行、输入框贴底、弹窗全屏 ================= */
.rail-toggle, #rail-mask, #mobile-bar { display: none; }
@media (max-width: 760px) {
  html, body { height: auto; }
  body { -webkit-text-size-adjust: 100%; }
  #shell, #shell.wide, #shell:has(#topbar) { display: block; min-height: 100dvh; height: auto; }
  #rail, #shell:has(#topbar) #rail { position: fixed !important; top: 0; bottom: 0; left: 0; width: min(84vw, 300px); height: 100dvh !important; z-index: 60;
    transform: translateX(-105%); transition: transform .22s ease; overflow-y: auto; box-shadow: 8px 0 30px rgba(0, 0, 0, .25); }
  body.rail-open #rail, body.rail-open #shell:has(#topbar) #rail { transform: none; }
  body.rail-open #rail-mask { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(23, 25, 28, .45); }
  body.rail-open { overflow: hidden; }
  #works { max-height: none; }
  .rail-toggle { display: grid; place-items: center; flex: none; width: 40px; height: 40px; align-self: center; border: 0; border-radius: 10px; background: none; font-size: 20px; color: var(--ink); }
  .rail-toggle:active { background: #ece8e0; }
  #topbar { position: sticky; top: 0; z-index: 20; height: 52px; padding: 0 6px; gap: 2px; justify-content: flex-start; }
  .top-nav { flex: 1; min-width: 0; gap: 0; }
  .top-link { padding: 0 9px; gap: 6px; font-size: 14px; white-space: nowrap; }
  .top-link i { width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }
  .top-link + .top-link::before { display: none; }
  #to-backend { align-self: center; flex: none; font-size: 12px; padding: 5px 9px; white-space: nowrap; }
  #mobile-bar { display: flex; position: sticky; top: 0; z-index: 20; height: 52px; align-items: center; gap: 6px; padding: 0 6px; background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  #mobile-bar b { font-size: 16px; }
  #stage, #shell:has(#topbar) #stage, #stage.paged-stage { padding: 14px 14px 32px; overflow: visible; }
  #inspector, #shell:has(#topbar) #inspector { border-left: 0; border-top: 1px solid var(--line); padding: 14px; }
  #shell.wide #inspector { display: none; }
  h1 { font-size: 22px; }
  /* 对话页：整屏高，消息区滚动，输入框贴在底部 */
  .work-chat, #shell:has(#topbar) .work-chat { height: calc(100dvh - 52px); }
  #stage:has(.work-chat) { padding: 0 10px; }
  .work-chat .chat-head { gap: 10px; padding: 12px 0; flex-wrap: wrap; }
  .work-chat .chat-head h1 { font-size: 18px; margin-top: 0; }
  .work-chat .chat-head { flex-wrap: nowrap; align-items: center; justify-content: space-between; }
  .work-chat .chat-head > div:first-child { padding-left: 0 !important; min-width: 0; min-height: 0; }
  .work-chat .chat-head > div:first-child::before, .work-chat .chat-head .work-eyebrow { display: none; }
  .chat-head-tools { flex-wrap: nowrap; }
  .chat-head-tools .btn.small, .work-chat .chat-head > .btn.small { padding: 6px 10px; white-space: nowrap; }
  .chat-status { padding: 8px 0; gap: 6px; font-size: 12px; }
  .work-chat #work-messages { padding: 14px 2px; gap: 18px; }
  .work-chat .bubble { max-width: 96%; }
  .work-compose { margin: 0 0 10px; padding: 8px 10px; border-radius: 14px; }
  .work-compose-foot { flex-wrap: wrap; gap: 6px; }
  .delivery-card { padding: 14px; border-radius: 14px; }
  .delivery-card h2 { font-size: 19px; }
  /* 输入框字号 16px，iPhone 聚焦时不会自动放大页面 */
  input, select, textarea { font-size: 16px; }
  /* 弹窗占满屏幕 */
  dialog#admin-dialog, dialog#admin-dialog.wide, #profile-pop, #home-picker, #rules-dialog, #library-dialog {
    width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .pop, .picker { max-height: 100dvh; height: 100dvh; }
  /* 表格左右滑，不撑破页面 */
  .adm-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .adm-table table { min-width: 560px; }
  .adm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .adm-tile b { font-size: 22px; }
  .adm-grid, .rf-grid { grid-template-columns: 1fr; }
  .adm-filter { flex-wrap: wrap; }
  .adm-filter input, .adm-filter select { min-width: 0; flex: 1 1 140px; }
  /* 翻页箭头挪到屏幕下方两角 */
  .page-arrow { top: auto !important; bottom: 18px !important; width: 44px !important; height: 44px !important; border-radius: 50%; font-size: 26px; z-index: 30; }
  #page-prev { left: 12px !important; right: auto !important; }
  #page-next { right: 12px !important; left: auto !important; }
  #toast { bottom: 80px; max-width: calc(100vw - 32px); }
}

/* 朋友圈：另外两版、挑好的配图 */
.moment-alts { margin-top: 14px; display: grid; gap: 10px; }
.moment-alts h3 { font-size: 14px; color: var(--soft); }
.moment-alt { background: var(--paper); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.moment-alt b { font-size: 12px; color: var(--accent-dark); }
.moment-alt p { white-space: pre-wrap; margin: 4px 0 8px; line-height: 1.75; }
.moment-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 10px 0 6px; }
.moment-photos a { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--paper); }
.moment-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moment-photos span { position: absolute; left: 4px; top: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; display: grid; place-items: center; }

/* 手机上“按住说话”：麦克风图标切换，按住长条录音 */
.hold-switch, .hold-talk { display: none; }
@media (max-width: 760px) {
  .work-compose .hold-switch { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%;
    background: var(--surface); color: var(--ink-3); font-size: 18px; padding: 0; }
  .hold-switch svg { width: 20px; height: 20px; fill: currentColor; }
  .work-compose.hold-mode .hold-talk { display: block; flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #f6f4ef;
    font-size: 16px; font-weight: 600; color: var(--ink); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
  .work-compose.hold-mode .hold-talk.holding { background: #e9e5dc; }
  .work-compose.hold-mode textarea, .work-compose.hold-mode [data-act="send"], .work-compose.hold-mode [data-act="work-say"] { display: none; }
  .work-input-row { align-items: center; }
  /* 手机上文字的“用语音说”按钮由麦克风图标代替 */
  .work-compose .voice[data-send] { display: none; }
}
#hold-overlay { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 70; width: 168px; padding: 16px 12px 12px; border-radius: 16px;
  background: rgba(23, 25, 28, .82); color: #fff; text-align: center; display: grid; justify-items: center; gap: 6px; pointer-events: none; }
#hold-overlay[hidden] { display: none; }
#hold-overlay i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); font-style: normal; font-size: 22px; }
#hold-overlay i svg { width: 26px; height: 26px; fill: #fff; }
#hold-overlay i.pulse { animation: hold-pulse 1.2s ease-in-out infinite; }
#hold-overlay.cancel i { background: #d33; }
#hold-overlay b { font-size: 13px; font-weight: 500; }
#hold-overlay small { font-size: 12px; color: #c9cbcf; }
@keyframes hold-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(228, 87, 46, .6); } 50% { box-shadow: 0 0 0 12px rgba(228, 87, 46, 0); } }

/* ===== 手机端（教练端）仿 Claude 手机 App：顶栏 ☰ ＋ 新对话，左侧抽屉是聊天记录，整屏对话 ===== */
#m-bar { display: none; }
.m-only { display: none; }
@media (max-width: 760px) {
  #shell:has(#topbar) #topbar { display: none !important; }
  #shell:has(#topbar) #m-bar { display: flex; position: sticky; top: 0; z-index: 20; height: 50px; align-items: center; gap: 4px; padding: 0 6px; background: var(--paper); }
  #m-title { flex: 1; min-width: 0; text-align: center; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: none; color: var(--ink); }
  .m-icon:active { background: #ebe7df; }
  .m-icon svg { width: 22px; height: 22px; fill: currentColor; }
  /* 抽屉：浅色，像 Claude 的聊天记录 */
  #shell:has(#topbar) #rail { background: #f7f5f0 !important; color: var(--ink); padding: 14px 10px calc(10px + env(safe-area-inset-bottom)); }
  #shell:has(#topbar) .m-only { display: block; }
  #shell:has(#topbar) #rail .wordmark { color: var(--ink); font-size: 17px; padding: 4px 8px 10px; }
  #shell:has(#topbar) #rail .new-work, #shell:has(#topbar) #rail .rail-label:not(.m-label), #shell:has(#topbar) #rail .rail-foot { display: none; }
  .m-newchat { width: 100%; text-align: left; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; }
  #rail .m-label { color: var(--soft); font-size: 12px; padding: 16px 8px 6px; }
  .m-agent { width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 10px; color: var(--ink); }
  .m-agent b { display: block; font-size: 14.5px; font-weight: 600; }
  .m-agent small { color: var(--soft); font-size: 12px; }
  .m-agent.on { background: #ebe7df; }
  #shell:has(#topbar) #rail .work { color: var(--ink); padding: 9px 10px; border-radius: 10px; }
  #shell:has(#topbar) #rail .work b { color: var(--ink); font-size: 14.5px; font-weight: 500; }
  #shell:has(#topbar) #rail .work small { color: var(--soft); }
  #shell:has(#topbar) #rail .work:hover { background: none; color: var(--ink); }
  #shell:has(#topbar) #rail .work.on { background: #ebe7df; color: var(--ink); font-weight: 500; }
  #shell:has(#topbar) #rail .work::before, #shell:has(#topbar) #rail .work::after { display: none; }
  #shell:has(#topbar) #rail .work-group-toggle { color: var(--soft); font-size: 12px; }
  #shell:has(#topbar) #rail .work-group-toggle span { color: var(--faint); }
  #shell:has(#topbar) #rail .rail-empty { color: var(--faint); }
  #shell:has(#topbar) .m-me { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 12px 8px 4px; border: 0; border-top: 1px solid var(--line);
    background: none; text-align: left; color: var(--ink); }
  .m-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
  .m-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .m-me b { display: block; font-size: 15px; }
  .m-me small { color: var(--soft); font-size: 12px; }
  /* 对话页：不显示“招生助手”标题和“聊新的”，整屏都是对话 */
  #shell:has(#topbar) .work-chat .chat-head, #shell:has(#topbar) .chat-status, #shell:has(#topbar) .attach-tools,
  #shell:has(#topbar) .work-compose-foot { display: none !important; }
  #shell:has(#topbar) .work-chat { height: calc(100dvh - 50px); }
  /* 我的：作品和资料、学员故事、说话习惯、照片、动态都在一页，页签可左右滑 */
  #shell:has(#topbar) .m-exit { display: block; margin: 24px 0 8px; text-align: center; }
  .m-exit .btn { min-width: 140px; color: var(--soft); }
  .home-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .home-tabs button { flex: none; }
  /* 作品页（从旧链接进来时） */
  .m-works h1 { font-size: 22px; }
  .m-works .spread { margin-bottom: 12px; }
  #stage .m-works .work, #stage .m-works .work:hover, #stage .m-works .work.on { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; color: var(--ink); }
  #stage .m-works .work b { color: var(--ink); }
  #stage .m-works .work small { color: var(--soft); }
  #stage .m-works .work::before, #stage .m-works .work::after { display: none; }
}

/* 手机输入框右边的“＋”：发图片、视频 */
.m-attach { display: none; }
@media (max-width: 760px) {
  .work-compose .m-attach { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%;
    background: var(--surface); color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer; }
  .work-compose .m-attach input { display: none; }
  .work-compose:not(.hold-mode) .m-attach { order: 3; }
}
