:root {
  --paper: #f5f0e7;
  --paper-deep: #e9e0d1;
  --ink: #181512;
  --muted: #6d655c;
  --line: #cfc4b5;
  --spark: #c84a22;
  --white: #fffdf9;
  --radius: 2px;
  --sans: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --serif: "Libre Bodoni", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); font-family: var(--sans); line-height: 1.65; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--spark); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; background: var(--ink); color: white; padding: 12px 18px; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.public-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; text-decoration: none; letter-spacing: .03em; }
.brand-mark { width: 17px; height: 27px; display: inline-block; background: var(--spark); clip-path: polygon(50% 0, 92% 38%, 74% 100%, 20% 85%, 0 44%); }
.public-nav { display: flex; align-items: center; gap: clamp(14px, 2.3vw, 34px); }
.public-nav a { text-decoration: none; font-size: 14px; }
.public-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-footer { min-height: 96px; display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 24px clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; }
h1 { font-family: var(--serif); font-weight: 700; }
.eyebrow { color: var(--spark); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--spark); border-radius: var(--radius); padding: 10px 20px; background: var(--spark); color: white; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: #aa3918; border-color: #aa3918; }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-small { min-height: 40px; padding: 7px 15px; }
.text-link { color: var(--spark); font-weight: 700; }
.hero-actions, .form-actions, .card-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.welcome-hero { min-height: 660px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: 7vw; align-items: center; padding: 70px 0; }
.welcome-copy h1 { max-width: 760px; font-size: clamp(48px, 7.2vw, 100px); letter-spacing: -.055em; }
.welcome-copy h1 em { color: var(--spark); font-style: normal; }
.welcome-lead { max-width: 620px; margin-bottom: 30px; color: var(--muted); font-size: 18px; }
.welcome-note { border-top: 4px solid var(--ink); padding-top: 20px; }
.note-number { display: block; font-family: var(--serif); font-size: 110px; line-height: .8; }
.welcome-note ol { padding-left: 20px; }
.section-block { padding: 64px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--ink); margin-bottom: 26px; }
.section-heading h2 { font-family: var(--serif); font-size: 34px; }

.library-hero { padding: 80px 0 52px; border-bottom: 1px solid var(--line); }
.library-hero h1 { font-size: clamp(58px, 8vw, 104px); margin-bottom: 20px; }
.library-hero > p:not(.eyebrow) { max-width: 650px; color: var(--muted); font-size: 18px; }
.compact-hero { padding-top: 54px; }
.compact-hero h1 { font-size: clamp(48px, 6vw, 76px); }
.search-form { display: flex; gap: 8px; flex: 1 1 340px; max-width: 520px; }
.search-form input { flex: 1; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.book-card { min-width: 0; border-top: 1px solid var(--ink); padding-top: 14px; }
.book-card a { display: block; text-decoration: none; }
.book-cover { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; margin-bottom: 18px; background: var(--paper-deep); color: var(--spark); font-family: var(--serif); font-size: 70px; }
.book-meta { color: var(--muted); font-size: 12px; }
.book-card h3 { margin: 7px 0; font-family: var(--serif); font-size: 24px; }
.book-card p { color: var(--muted); }
.book-detail { padding: 72px 0; }
.book-detail-header { display: grid; grid-template-columns: minmax(240px, 390px) 1fr; gap: clamp(34px, 7vw, 100px); align-items: center; padding-bottom: 72px; }
.large-cover { aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 120px; }
.book-detail-header h1 { font-size: clamp(48px, 6vw, 86px); letter-spacing: -.04em; }
.book-subtitle, .book-description { max-width: 650px; color: var(--muted); }
.book-toc ol { padding: 0; list-style: none; }
.book-toc li a { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--line); text-decoration: none; }
.book-toc li a span, .book-toc li a small { color: var(--muted); }
.comments-section { max-width: 860px; padding: 72px 0; }
.comment-form { display: grid; gap: 12px; margin-bottom: 34px; }
.comment-form .button { justify-self: start; }
.comment-list article { padding: 22px 0; border-bottom: 1px solid var(--line); }
.comment-list time { margin-left: 12px; color: var(--muted); font-size: 12px; }
.text-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 8px 14px; cursor: pointer; font: inherit; font-weight: 700; }
.author-header { min-height: 430px; display: grid; grid-template-columns: 180px 1fr; gap: 42px; align-items: center; border-bottom: 1px solid var(--ink); }
.author-monogram { width: 180px; height: 180px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 80px; }
.author-header h1 { font-size: clamp(54px, 7vw, 92px); }
.reader-layout { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: clamp(28px, 6vw, 90px); justify-content: center; padding: 54px 0 90px; }
.reader-toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; }
.reader-toc nav { display: grid; }
.reader-toc a { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.reader-toc a.active { color: var(--spark); font-weight: 700; }
.reader-tools { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 60px; }
.reader-tools button { min-width: 48px; min-height: 44px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.reader-book { color: var(--muted); }
.reader-article h1 { margin: 18px 0 44px; font-size: clamp(42px, 5vw, 68px); }
.chapter-copy { white-space: pre-wrap; font-family: var(--serif); font-size: 20px; line-height: 2; }
.reader-pagination { display: flex; justify-content: space-between; gap: 24px; margin-top: 70px; padding-top: 24px; border-top: 1px solid var(--line); }

.auth-layout { min-height: 660px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 8vw; align-items: center; padding: 64px 0; }
.auth-intro h1 { max-width: 680px; font-size: clamp(44px, 6vw, 82px); letter-spacing: -.045em; }
.auth-intro > p:last-child { max-width: 560px; color: var(--muted); }
.paper-form { display: grid; gap: 22px; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--ink); background: rgba(255, 253, 249, .4); }
.paper-form h2 { font-family: var(--serif); font-size: 34px; }
.paper-form label { display: grid; gap: 8px; font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]),
select {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  padding: 11px 36px 10px 2px;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23181512' stroke-width='1.5' stroke-linecap='square'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
}
textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 253, 249, .38);
  color: var(--ink);
  padding: 12px 14px;
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  flex: 0 0 20px;
  margin: 2px 0 0;
  accent-color: var(--spark);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]):focus,
select:focus {
  border-bottom-color: var(--spark);
  box-shadow: inset 0 -1px var(--spark);
}
textarea:focus { border-color: var(--spark); }
input::placeholder,
textarea::placeholder { color: var(--muted); opacity: .85; }
input:disabled,
select:disabled,
textarea:disabled { cursor: not-allowed; opacity: .55; }
input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--paper) inset;
}
.consent-row {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  line-height: 1.55;
  cursor: pointer;
}
.form-footnote { margin: 0; color: var(--muted); font-size: 13px; }
.narrow-form { max-width: 620px; }

.product-layout { width: min(1500px, 100%); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.product-sidebar { border-right: 1px solid var(--line); padding: 34px 20px; }
.sidebar-heading { margin-bottom: 20px; padding: 0 12px; font-weight: 800; }
.product-sidebar nav { display: grid; gap: 4px; }
.product-sidebar a { min-height: 46px; display: flex; align-items: center; padding: 9px 12px; text-decoration: none; color: var(--muted); }
.product-sidebar a:hover, .product-sidebar a.active { color: var(--ink); background: var(--paper-deep); }
.product-sidebar a.active { font-weight: 700; }
.product-main { min-width: 0; padding: clamp(28px, 4vw, 64px); }
.drawer-button, .drawer-scrim { display: none; }
.page-heading, .workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.page-heading h1, .workspace-header h1 { margin-bottom: 10px; font-size: clamp(42px, 5vw, 72px); }
.page-heading p:last-child, .workspace-header p:last-child { color: var(--muted); }
.dashboard-books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dashboard-book, .empty-panel { border: 1px solid var(--line); padding: 26px; background: rgba(255,253,249,.35); }
.dashboard-book h2 { margin: 18px 0 8px; font-family: var(--serif); font-size: 30px; }
.status-pill { display: inline-flex; padding: 4px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.book-progress { height: 4px; margin: 24px 0; background: var(--paper-deep); }
.book-progress span { display: block; height: 100%; background: var(--spark); }
.writing-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); gap: 24px; }
.writing-column, .ai-column { min-width: 0; border: 1px solid var(--line); background: rgba(255,253,249,.36); }
.writing-column { padding: clamp(20px, 3vw, 34px); }
.ai-column { align-self: start; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.panel-heading h2 { font-family: var(--serif); font-size: 30px; }
.editor-label { display: block; margin: 20px 0 8px; font-weight: 700; }
.writing-editor { min-height: 280px; line-height: 1.9; }
.final-editor { min-height: 360px; }
.editor-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.final-draft { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.tabs button { min-height: 50px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; }
.tabs button.active { color: var(--spark); box-shadow: inset 0 -3px var(--spark); }
.ai-result { display: none; padding: 28px; }
.ai-result.active { display: block; }
.result-label { color: var(--muted); font-size: 13px; }
.result-copy { min-height: 210px; margin-bottom: 24px; white-space: pre-wrap; line-height: 1.85; }
.progress-details { max-width: 360px; }
.progress-details summary { cursor: pointer; font-weight: 700; }
.progress-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 12px 0 0; list-style: none; font-size: 11px; }
.progress-grid li { padding: 5px; border: 1px solid var(--line); text-align: center; }
.progress-grid li.completed { background: var(--ink); color: white; }
.site-message { position: fixed; right: 20px; bottom: 20px; z-index: 200; max-width: 390px; padding: 14px 18px; background: var(--ink); color: white; opacity: 0; visibility: hidden; transform: translateY(140%); transition: transform .2s ease, opacity .2s ease; pointer-events: none; }
.site-message.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.site-message[data-kind="error"] { background: #7d1e12; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.memory-grid { grid-template-columns: 1fr; }
.memory-grid .paper-form,
.memory-grid .empty-panel,
.memory-grid .account-details { width: 100%; }
.settings-panel { display: grid; align-content: start; justify-items: start; gap: 16px; border-top: 1px solid var(--ink); padding: 22px 0; }
.settings-panel h2 { font-family: var(--serif); font-size: 28px; }
.account-details { width: 100%; margin: 0; }
.account-details div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.account-details dt { color: var(--muted); }
.account-details dd { margin: 0; }
.muted-note { color: var(--muted); font-size: 13px; }
.danger-button { border-color: #7d1e12; background: #7d1e12; }
.field-display { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.field-display > span, .field-display small { color: var(--muted); }
.danger-zone { max-width: 760px; margin-top: 60px; padding: 28px; border: 1px solid #7d1e12; }
.framework-grid, .export-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.chapter-list { padding: 0; list-style: none; width: 100%; }
.chapter-list li { padding: 0; border-bottom: 1px solid var(--line); }
.chapter-list li > a { min-height: 56px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; color: inherit; text-decoration: none; }
.chapter-list li > a:hover strong, .chapter-list li > a:focus-visible strong { color: var(--spark); }
.chapter-list li > a:focus-visible { outline: 2px solid var(--spark); outline-offset: 4px; }
.chapter-list li small { color: var(--muted); font-weight: 400; }
.chapter-list .muted-note { padding: 18px 0; }
.chapter-list span { color: var(--spark); }
.publish-list, .version-list, .material-list { display: grid; gap: 14px; }
.publish-list article, .version-list article, .material-list article { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.publish-list h2, .version-list h2 { margin: 10px 0 6px; font-family: var(--serif); }
.privacy-notice { margin-bottom: 28px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--spark); background: var(--paper-deep); }
.privacy-notice p { margin-bottom: 0; }
.export-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.export-card { display: grid; align-content: start; gap: 14px; min-height: 310px; padding: 24px; border: 1px solid var(--line); }
.cover-upload-preview { display: block; width: min(100%, 220px); aspect-ratio: 2 / 3; border: 1px solid var(--line); object-fit: cover; background: var(--paper-deep); }
.export-card h2 { font-family: var(--serif); font-size: 30px; }
.is-disabled { pointer-events: none; opacity: .45; }
.completion-stage { min-height: 640px; display: grid; place-items: center; align-content: center; text-align: center; }
.completion-stage h1 { margin: 12px 0; font-size: clamp(60px, 9vw, 116px); }
.completion-book { color: var(--spark); font-family: var(--serif); font-size: 28px; }
.completion-checks { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.completion-checks span { padding: 8px 13px; border: 1px solid var(--line); }
.completion-checks span.done { background: var(--ink); color: white; }
.compact-editor { min-height: 140px; }
.admin-layout { width: min(1500px, 100%); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.admin-sidebar { padding: 34px 24px; border-right: 1px solid var(--line); background: var(--ink); color: var(--paper); }
.admin-sidebar h2 { font-family: var(--serif); font-size: 32px; }
.admin-sidebar nav { display: grid; margin-top: 30px; }
.admin-sidebar a { min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid #4b4640; color: var(--paper); text-decoration: none; }
.filter-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.filter-tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--line); text-decoration: none; }
.admin-table { border-top: 1px solid var(--ink); }
.admin-table > a, .admin-table > div { min-height: 64px; display: grid; grid-template-columns: 90px minmax(180px, 1fr) 120px 170px; gap: 16px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); text-decoration: none; }
.admin-table > .empty-panel { grid-template-columns: 1fr; }
.admin-table time { color: var(--muted); font-size: 12px; }
.governance-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.governance-actions button { min-height: 48px; padding: 10px 18px; border: 1px solid var(--ink); background: transparent; cursor: pointer; }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 50px; padding: 50px 0 90px; }
.legal-grid section { min-height: 210px; padding: 26px 0; border-top: 1px solid var(--ink); }
.legal-grid h2 { font-family: var(--serif); font-size: 32px; }
.status-page { min-height: 650px; display: grid; justify-items: start; align-content: center; }
.status-page h1 { max-width: 850px; font-size: clamp(58px, 8vw, 108px); }

@media (max-width: 900px) {
  .public-nav > a:not(.button) { display: none; }
  .welcome-hero, .auth-layout, .writing-grid { grid-template-columns: 1fr; }
  .book-detail-header, .reader-layout { grid-template-columns: 1fr; }
  .reader-toc { position: static; max-height: none; }
  .welcome-hero { min-height: 0; }
  .welcome-note { max-width: 520px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-layout { display: block; }
  .product-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 120; width: min(320px, 86vw); background: var(--paper); transform: translateX(-105%); transition: transform .2s ease; }
  .drawer-button { min-height: 46px; display: inline-flex; align-items: center; gap: 8px; position: sticky; top: 10px; z-index: 100; margin: 10px 20px 0; border: 1px solid var(--ink); background: var(--paper); padding: 8px 14px; }
  .drawer-scrim { position: fixed; inset: 0; z-index: 110; background: rgba(24,21,18,.45); }
  .drawer-open .product-sidebar { transform: translateX(0); }
  .drawer-open .drawer-scrim { display: block; }
  .dashboard-books { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .framework-grid, .export-grid { grid-template-columns: 1fr; }
  .publish-list article, .version-list article, .material-list article { align-items: flex-start; flex-direction: column; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: 0; }
  .admin-sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-sidebar a { justify-content: center; padding: 8px; text-align: center; }
  .admin-table > a, .admin-table > div { grid-template-columns: 70px minmax(0, 1fr); }
  .legal-grid { grid-template-columns: 1fr; }
  .page-heading, .workspace-header { align-items: flex-start; flex-direction: column; }
  .progress-details { max-width: 100%; }
}

@media (max-width: 560px) {
  .public-header { min-height: 64px; padding: 10px 16px; }
  .brand { font-size: 14px; }
  .public-main { width: min(100% - 30px, 1180px); }
  .welcome-hero, .auth-layout { padding: 44px 0; }
  .welcome-copy h1, .auth-intro h1 { font-size: 44px; }
  .book-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .book-detail { padding-top: 38px; }
  .book-detail-header { padding-bottom: 44px; }
  .large-cover { max-width: 280px; }
  .author-header { grid-template-columns: 1fr; padding: 54px 0; }
  .author-monogram { width: 120px; height: 120px; font-size: 52px; }
  .product-main { padding: 26px 16px 60px; }
  .paper-form { padding: 20px; }
  .search-form, .hero-actions .button { width: 100%; }
  .search-form { flex-direction: column; }
  .form-actions > * { width: 100%; }
  .tabs { overflow-x: auto; }
  .tabs button { min-width: 108px; }
  .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 版本化书籍模板工作台 */
.template-page-heading { align-items: end; }
.template-summary { display: flex; flex-wrap: wrap; gap: 22px; padding-bottom: 8px; }
.template-summary span { display: grid; color: var(--muted); font-size: 12px; }
.template-summary strong { color: var(--ink); font-family: var(--serif); font-size: 28px; line-height: 1; }
.workbench-tabs { display: flex; gap: 0; margin-bottom: 34px; border-bottom: 1px solid var(--ink); overflow-x: auto; }
.workbench-tabs button { min-height: 50px; padding: 0 22px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); white-space: nowrap; cursor: pointer; }
.workbench-tabs button.active { border-bottom-color: var(--spark); color: var(--ink); font-weight: 700; }
.workbench-tabs button:focus-visible { outline: 2px solid var(--spark); outline-offset: -3px; }
.workbench-tabs span { color: var(--spark); }
.template-ledger { border-top: 1px solid var(--ink); }
.template-ledger-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 22px; align-items: center; min-height: 116px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.template-index, .sequence-number { color: var(--spark); font-family: var(--serif); font-size: 20px; }
.template-title-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.template-title-line h2 { margin: 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); }
.template-ledger-row p { max-width: 68ch; margin: 8px 0; color: var(--muted); }
.template-ledger-row small { color: var(--muted); }
.template-row-actions { min-width: 150px; text-align: right; }
.text-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; }
.text-button:hover, .text-button:focus-visible { background: var(--ink); color: var(--paper); }
.text-button:disabled { border-color: var(--line); background: transparent; color: var(--muted); cursor: not-allowed; }
.template-create-panel { margin-top: 42px; }
.template-builder { margin-top: 54px; border-top: 2px solid var(--ink); }
.builder-heading, .section-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 28px 0 22px; border-bottom: 1px solid var(--line); }
.builder-heading h2, .section-intro h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 38px; }
.builder-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--ink); }
.builder-rules label, .day-editor-heading label, .sequence-row label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.builder-rules input { max-width: 130px; color: var(--ink); font-size: 24px; }
.template-builder-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr) 220px; min-height: 520px; }
.builder-day-nav { border-right: 1px solid var(--line); }
.builder-day-nav button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 14px 14px 14px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.builder-day-nav button.active { color: var(--spark); }
.builder-day-nav span { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-day-nav small { color: var(--muted); }
.builder-canvas { min-width: 0; padding: 28px clamp(20px, 3vw, 42px); }
.builder-canvas > section + section { margin-top: 38px; }
.builder-canvas h3, .builder-help h3, .review-columns h3 { margin-bottom: 18px; font-family: var(--serif); font-size: 24px; }
.chapter-editor-row { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.chapter-editor-row span { color: var(--muted); font-size: 12px; }
.chapter-editor-row input { border: 0; }
.builder-help { padding: 28px 0 28px 22px; border-left: 1px solid var(--line); }
.builder-help ul { padding-left: 18px; color: var(--muted); line-height: 1.8; }
.builder-help .button { width: 100%; margin-top: 12px; }
.day-editor-heading { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(240px, 1.3fr); gap: 22px; margin-bottom: 22px; }
.sequence-row { display: grid; grid-template-columns: 34px minmax(170px, 1fr) minmax(140px, .8fr) auto auto; gap: 12px; align-items: end; padding: 14px 0; border-top: 1px solid var(--line); }
.sequence-row select { width: 100%; }
.sequence-actions { display: flex; gap: 4px; }
.sequence-actions button { min-width: 36px; min-height: 36px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.day-editor-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 20px; }
.step-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; width: min(100%, 980px); }
.step-editor-grid .span-2 { grid-column: 1 / -1; }

/* 全宽后台创建工作台 */
.creation-workbench { width: 100%; margin-top: 46px; border-block: 2px solid var(--ink); }
.creation-workbench > summary { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; cursor: pointer; list-style: none; }
.creation-workbench > summary::-webkit-details-marker { display: none; }
.creation-workbench > summary span { font-family: var(--serif); font-size: clamp(27px, 3vw, 40px); }
.creation-workbench > summary small { color: var(--muted); }
.creation-workbench[open] > summary { border-bottom: 1px solid var(--ink); }
.creation-workbench-grid { width: 100%; max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; padding: 32px 0 44px; }
.creation-workbench-grid .span-2 { grid-column: span 2; }
.creation-workbench-grid .span-all, .creation-workbench-grid > .button { grid-column: 1 / -1; }
.creation-workbench-grid > .button { width: min(100%, 360px); }
.workbench-section-title { grid-column: 1 / -1; margin: 12px 0 -4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 27px; }
.template-shell-grid .field textarea { min-height: 180px; }

/* 个人主页与找人 */
.profile-heading { align-items: end; }
.profile-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: clamp(32px, 5vw, 76px); border-top: 1px solid var(--ink); padding-top: 34px; }
.profile-public-editor { display: grid; gap: 32px; }
.profile-preview { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.profile-preview h2, .private-account-ledger h2 { margin: 6px 0 10px; font-family: var(--serif); font-size: clamp(32px, 4vw, 48px); }
.profile-avatar-large, .identity-avatar { overflow: hidden; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--serif); }
.profile-avatar-large { width: 132px; aspect-ratio: 1; font-size: 58px; }
.profile-avatar-large img, .identity-avatar img, .author-monogram img { width: 100%; height: 100%; object-fit: cover; }
.profile-form, .avatar-form { display: grid; gap: 20px; }
.profile-form textarea { min-height: 150px; }
.private-account-ledger { align-self: start; padding: 28px; border: 1px solid var(--ink); background: var(--paper-deep); }
.private-account-ledger .button { margin-top: 24px; }
.side-footer > a { color: inherit; text-decoration: none; }
.side-footer > a:hover { color: var(--spark); }
.people-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr); gap: 70px; align-items: end; padding: 72px 0 42px; border-bottom: 2px solid var(--ink); }
.people-hero h1 { max-width: 10ch; margin: 8px 0 18px; font-size: clamp(52px, 7vw, 92px); }
.people-search, .people-search > div { display: grid; gap: 12px; }
.people-search > div { grid-template-columns: minmax(0, 1fr) auto; }
.people-ledger { border-bottom: 1px solid var(--ink); }
.person-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(160px, auto) 24px; gap: 22px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.person-row:hover strong { color: var(--spark); }
.person-row small { display: block; margin-top: 5px; color: var(--muted); }
.identity-avatar { width: 58px; aspect-ratio: 1; font-size: 24px; }
.pagination { display: flex; justify-content: center; gap: 28px; padding: 34px 0; }

/* 作品优先的公共书库 */
.library-discovery-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 50px; align-items: end; padding: 64px 0 34px; border-bottom: 2px solid var(--ink); }
.library-discovery-hero h1 { max-width: 11ch; margin: 8px 0 18px; font-size: clamp(52px, 7vw, 90px); }
.library-discovery-hero p:last-child { max-width: 650px; color: var(--muted); }
.discovery-entry-switch { display: flex; border: 1px solid var(--ink); }
.discovery-entry-switch a { min-width: 112px; padding: 15px 20px; color: inherit; text-align: center; text-decoration: none; }
.discovery-entry-switch .active { background: var(--ink); color: var(--paper); }
.library-creator-entry { display: block; margin-top: 13px; color: var(--spark); text-align: right; text-decoration: none; }
.library-filter-bar { display: grid; grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(130px, .7fr)) auto; gap: 18px; align-items: end; padding: 25px 0; border-bottom: 1px solid var(--ink); }
.library-filter-bar input, .library-filter-bar select { width: 100%; }
.featured-book { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 34px; align-items: end; padding: 54px 0; border-bottom: 1px solid var(--ink); }
.featured-number { align-self: start; color: var(--spark); font-family: var(--serif); font-size: 62px; }
.featured-book h2 { margin: 8px 0 14px; font-family: var(--serif); font-size: clamp(42px, 5vw, 68px); }
.featured-book h2 a, .discovery-book h3 a { color: inherit; text-decoration: none; }
.discovery-section { padding: 48px 0 16px; }
.discovery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.discovery-book { min-width: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-cover-link { display: block; color: inherit; text-decoration: none; }
.book-cover-image, .typographic-cover { width: 112px; aspect-ratio: .72; }
.book-cover-image { display: block; object-fit: cover; }
.typographic-cover { display: flex; flex-direction: column; justify-content: space-between; padding: 14px 11px; background: var(--spark); color: var(--paper); }
.typographic-cover strong { font-family: var(--serif); font-size: 22px; line-height: 1.08; }
.discovery-book-copy { min-width: 0; }
.discovery-book h3 { margin: 12px 0 8px; font-family: var(--serif); font-size: 27px; }
.discovery-book p { display: -webkit-box; overflow: hidden; color: var(--muted); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.discovery-book small { color: var(--muted); }
.identity-link { color: var(--spark); text-decoration: none; }
.library-empty { grid-column: 1 / -1; min-height: 300px; display: grid; place-content: center; gap: 14px; padding: 48px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.library-empty h2 { font-family: var(--serif); font-size: clamp(34px, 4vw, 52px); }
.author-monogram { overflow: hidden; border-radius: 0; }
.author-public-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); }
.author-stats { display: flex; gap: 34px; margin-top: 24px; }
.author-stats div { display: grid; gap: 4px; }
.author-stats dt { color: var(--muted); }
.author-stats dd { margin: 0; font-family: var(--serif); font-size: 34px; }
.community-message__author { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.community-message__author img { width: 28px; height: 28px; object-fit: cover; }
.community-reply-context a { color: inherit; }

@media (max-width: 1100px) {
  .creation-workbench-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creation-workbench-grid .span-2, .creation-workbench-grid .span-all, .creation-workbench-grid > .button, .workbench-section-title { grid-column: 1 / -1; }
  .library-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-filter-bar .filter-keyword { grid-column: 1 / -1; }
  .discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .creation-workbench > summary { align-items: flex-start; flex-direction: column; }
  .creation-workbench-grid, .profile-workspace, .people-hero, .library-discovery-hero, .library-filter-bar { grid-template-columns: 1fr; }
  .creation-workbench-grid .span-2 { grid-column: auto; }
  .profile-preview { grid-template-columns: 88px minmax(0, 1fr); }
  .profile-avatar-large { width: 88px; font-size: 38px; }
  .private-account-ledger { padding: 20px; }
  .people-hero { gap: 28px; padding-top: 44px; }
  .person-row { grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 14px; }
  .person-row > span:nth-child(3) { grid-column: 2; }
  .identity-avatar { width: 48px; }
  .library-discovery-hero { gap: 24px; }
  .discovery-entry-switch { width: 100%; }
  .discovery-entry-switch a { flex: 1; }
  .library-filter-bar .filter-keyword { grid-column: auto; }
  .featured-book { grid-template-columns: 48px minmax(0, 1fr); }
  .featured-book > .text-link { grid-column: 2; }
  .featured-number { font-size: 42px; }
  .discovery-grid { grid-template-columns: 1fr; }
  .discovery-book { grid-template-columns: 92px minmax(0, 1fr); padding: 18px; }
  .book-cover-image, .typographic-cover { width: 92px; }
  .author-stats { gap: 22px; }
}
.check-line { display: flex !important; align-items: center; gap: 8px !important; color: var(--ink) !important; }
.check-line input { width: auto; }
.input-source-picker { padding: 14px 0; border: 0; border-top: 1px solid var(--line); }
.input-source-picker legend { margin-bottom: 10px; font-weight: 700; }
.step-ledger { margin-top: 34px; border-top: 1px solid var(--ink); }
.step-ledger > div { display: grid; grid-template-columns: minmax(150px, 1fr) 110px 150px 100px 100px auto; gap: 14px; align-items: center; min-height: 62px; border-bottom: 1px solid var(--line); }
.review-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 34px; }
.review-row { display: grid; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.review-row div { display: flex; justify-content: space-between; gap: 18px; }
.review-row form { display: grid; grid-template-columns: 1fr auto; gap: 12px; }

@media (max-width: 1100px) {
  .template-builder-grid { grid-template-columns: 140px minmax(0, 1fr); }
  .builder-help { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px; align-items: start; padding: 22px 0; border-top: 1px solid var(--ink); border-left: 0; }
  .builder-help .button { width: auto; }
  .sequence-row { grid-template-columns: 30px minmax(150px, 1fr) minmax(130px, .8fr); }
  .sequence-row .check-line, .sequence-actions { grid-column: auto; }
  .step-ledger > div { grid-template-columns: minmax(140px, 1fr) 100px 130px; padding: 12px 0; }
}

@media (max-width: 720px) {
  .template-ledger-row { grid-template-columns: 36px minmax(0, 1fr); }
  .template-row-actions { grid-column: 2; min-width: 0; text-align: left; }
  .builder-rules, .step-editor-grid, .review-columns, .day-editor-heading { grid-template-columns: 1fr; }
  .step-editor-grid .span-2 { grid-column: auto; }
  .template-builder-grid { grid-template-columns: 1fr; }
  .builder-day-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--ink); }
  .builder-day-nav button { min-width: 126px; padding: 12px; border-right: 1px solid var(--line); }
  .builder-canvas { padding: 24px 0; }
  .builder-help { grid-template-columns: 1fr; }
  .sequence-row { grid-template-columns: 28px minmax(0, 1fr); align-items: start; }
  .sequence-row > *:not(.sequence-number) { grid-column: 2; }
  .step-ledger > div { grid-template-columns: 1fr 1fr; gap: 7px 14px; padding: 16px 0; }
  .workbench-tabs { margin-inline: -16px; padding-inline: 16px; }
}

/* 后续书籍按天创作 */
.workflow-day-strip { display: flex; gap: 0; margin: -12px 0 34px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow-x: auto; }
.workflow-day-strip a { min-width: 130px; display: grid; gap: 4px; padding: 13px 16px; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.workflow-day-strip a.active { color: var(--spark); }
.workflow-day-strip a.locked { color: var(--muted); pointer-events: none; }
.workflow-day-strip strong { font-family: var(--serif); font-size: 22px; }
.workflow-day-strip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-day-strip small { color: inherit; font-size: 11px; }
.workflow-author-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
.workflow-step-list { border-top: 1px solid var(--ink); }
.workflow-step-list > p { padding: 16px 0 10px; }
.workflow-step-list button { width: 100%; display: grid; grid-template-columns: 30px 1fr; gap: 3px 10px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.workflow-step-list button.active { color: var(--ink); }
.workflow-step-list button > span { grid-row: 1 / 3; color: var(--spark); font-family: var(--serif); font-size: 20px; }
.workflow-step-list button small { color: inherit; }
.workflow-step-stage { min-width: 0; }
.workflow-step-panel { border-top: 2px solid var(--ink); padding-top: 26px; }

/* 书籍模板独立子目录与详情工作台 */
.side-nav-cluster { margin: 2px 0 8px; }
.side-nav-parent { display: flex; align-items: center; gap: 14px; padding: 11px 14px; color: var(--paper); font-weight: 700; }
.side-nav-children { display: grid; margin-left: 42px; border-left: 1px solid rgba(245, 240, 231, .2); }
.side-nav-children a { padding: 9px 12px; font-size: 13px; }
.side-nav-children a.active { border-left: 2px solid var(--spark); color: var(--paper); }
.template-ledger-copy, .step-ledger-main, .step-definition-editor, .step-version-panel, .workflow-step-stage { min-width: 0; }
.admin-breadcrumb { max-width: 100%; margin-bottom: 28px; overflow-x: auto; scrollbar-width: thin; }
.admin-breadcrumb-list { width: max-content; min-width: max-content; display: flex; margin: 0; padding: 0; border: 1px solid var(--ink); list-style: none; }
.admin-breadcrumb-list li { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; padding: 0 14px; border-right: 1px solid var(--ink); color: var(--muted); font-size: 13px; white-space: nowrap; }
.admin-breadcrumb-list li:last-child { border-right: 0; }
.admin-breadcrumb-list a { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.admin-breadcrumb-list li > span, .admin-breadcrumb-list a > span { color: var(--spark); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.admin-breadcrumb-list li[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.admin-breadcrumb-list li[aria-current="page"] > span { color: #f47a50; }
.step-ledger-links > article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; min-height: 66px; border-bottom: 1px solid var(--line); }
.step-ledger-main { display: grid; grid-template-columns: minmax(160px, 1fr) 110px minmax(130px, .8fr) 100px 90px; gap: 14px; align-items: center; padding: 15px 0; color: var(--ink); text-decoration: none; }
.step-ledger-main strong, .step-ledger-main code, .version-history p { overflow-wrap: anywhere; }
.step-ledger-main:hover strong, .step-ledger-main:focus-visible strong { color: var(--spark); }
.step-detail-heading { align-items: end; }
.detail-status-ledger { display: grid; grid-template-columns: repeat(3, minmax(100px, auto)); gap: 24px; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.detail-status-ledger span { display: grid; gap: 5px; }
.detail-status-ledger small { color: var(--muted); }
.governance-notice { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; margin: 0 0 34px; padding: 16px 0; border-top: 1px solid var(--spark); border-bottom: 1px solid var(--line); }
.governance-notice p { margin: 0; color: var(--muted); }
.step-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: clamp(32px, 5vw, 72px); }
.step-definition-editor { border-top: 2px solid var(--ink); }
.step-definition-editor > header { padding: 22px 0 16px; border-bottom: 1px solid var(--line); }
.step-definition-editor > header h2, .step-version-panel h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 30px; }
.step-definition-editor form { display: grid; gap: 20px; padding-top: 24px; }
.detail-prompt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step-policy-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.step-policy-grid fieldset { border: 0; padding: 0; }
.step-policy-grid legend { margin-bottom: 12px; font-weight: 700; }
.input-source-picker legend, .step-policy-grid legend { display: flex; align-items: center; gap: 10px; }
.field-help-button { border: 1px solid var(--line); background: transparent; color: var(--spark); padding: 3px 9px; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.field-help-button:hover { border-color: var(--spark); }
.field-help-button:focus-visible { outline: 2px solid var(--spark); outline-offset: 3px; }
.input-source-help-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); overflow: auto; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 28px; }
.input-source-help-dialog::backdrop { background: rgba(20, 18, 15, .68); }
.help-dialog-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.help-dialog-heading h2 { margin: 4px 0 0; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.dialog-close-button { border: 0; background: transparent; color: var(--ink); font-size: 2rem; line-height: 1; cursor: pointer; }
.help-dialog-intro { margin: 20px 0; color: var(--muted); }
.input-source-guide-list { margin: 0; }
.input-source-guide-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.input-source-guide-list dt { font-weight: 800; }
.input-source-guide-list dd { margin: 0; color: var(--muted); }
.help-dialog-example, .help-dialog-note { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.help-dialog-example p, .help-dialog-note { line-height: 1.75; }
.help-dialog-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.configured-field-ledger { margin: 4px 0; border-block: 1px solid var(--line); }
.configured-field-ledger > div:first-child { padding: 18px 0 12px; }
.configured-field-ledger h3, .configured-field-ledger p { margin: 0; }
.configured-field-ledger > div:first-child p { margin-top: 6px; color: var(--muted); }
.configured-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(92px, auto) 52px; gap: 18px; align-items: baseline; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.configured-field-row span, .configured-field-row small { color: var(--muted); }
.step-version-panel { border-top: 2px solid var(--ink); padding-top: 22px; }
.step-version-panel > form { display: grid; gap: 12px; margin-top: 18px; }
.current-draft-summary { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.current-draft-summary span { color: var(--spark); }
.current-draft-summary small { color: var(--muted); }
.direct-publish-action { color: var(--spark); }
.version-history { margin-top: 34px; }
.version-history details { padding: 12px 0; border-top: 1px solid var(--line); }
.version-history summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 700; }
.lifecycle-actions { display: grid; gap: 12px; margin: 26px 0; padding: 20px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.lifecycle-actions h2, .lifecycle-actions h3, .lifecycle-actions p { margin: 0; }
.lifecycle-actions form, .lifecycle-actions .button { width: 100%; }
.lifecycle-actions--horizontal { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px 32px; margin: 0 0 34px; }
.lifecycle-actions--horizontal .lifecycle-blocker { grid-column: 1 / -1; }
.lifecycle-action-buttons, .lifecycle-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lifecycle-action-buttons form, .lifecycle-inline-actions form { margin: 0; }
.lifecycle-danger-button { border-color: #7d1e12; background: transparent; color: #7d1e12; }
.lifecycle-danger-button:hover, .lifecycle-danger-button:focus-visible { background: #7d1e12; color: var(--paper); }
.lifecycle-danger-button:disabled { border-color: var(--line); background: transparent; color: var(--muted); }
.lifecycle-blocker { color: var(--muted); font-size: 13px; line-height: 1.6; }
.action-matrix { width: var(--action-matrix-width); max-width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 0; justify-self: end; }
.action-matrix--step { --action-matrix-width: 320px; }
.action-matrix--template { --action-matrix-width: 196px; }
.action-matrix__primary { grid-column: 1 / -1; width: 100%; margin: 0; }
.action-matrix__governance { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.action-matrix__governance form, .action-matrix__governance .text-button { width: 100%; }
.step-ledger-actions { min-width: 0; }
.template-builder-page { margin-top: 0; }
.template-builder-page .builder-help h2, .template-builder-page .builder-canvas h2 { font-family: var(--serif); }
.direct-publish-field { margin-top: 22px; }
.preview-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin-bottom: 34px; padding: 0 0 26px; border-bottom: 2px solid var(--ink); }
.preview-banner h1 { margin: 12px 0 8px; font-family: var(--serif); font-size: clamp(34px, 5vw, 58px); }
.preview-banner p { max-width: 70ch; margin: 0; color: var(--muted); }
.preview-banner > div:last-child { display: grid; gap: 5px; text-align: right; }
.preview-version-picker { display: grid; gap: 4px; margin-top: 10px; }
.preview-version-picker label { color: var(--muted); font-size: 12px; }
.preview-day-heading { margin-bottom: 26px; }
.preview-day-heading h2 { margin: 6px 0; font-family: var(--serif); font-size: 34px; }
.preview-private-placeholder { margin: 18px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.preview-private-placeholder p { color: var(--muted); }

@media (max-width: 1100px) {
  .step-ledger-main { grid-template-columns: minmax(160px, 1fr) 100px 120px; }
  .step-ledger-main span:nth-of-type(n+2) { display: none; }
  .step-detail-layout { grid-template-columns: minmax(0, 1fr) 240px; }
  .detail-prompt-grid { grid-template-columns: 1fr; }
}
.workflow-step-panel > header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.workflow-step-panel h2 { margin: 12px 0 0; font-family: var(--serif); font-size: clamp(34px, 5vw, 58px); }
.workflow-guidance { max-width: 70ch; margin: 22px 0 32px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.workflow-answer textarea { min-height: 280px; font-family: var(--serif); font-size: 18px; line-height: 1.9; }
.workflow-checkpoint { min-height: 260px; display: grid; align-content: center; justify-items: start; gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prompt-preview, .private-use { margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prompt-preview summary, .private-use summary { padding: 16px 0; cursor: pointer; font-weight: 700; }
.prompt-preview-body { padding: 0 0 20px; }
.prompt-preview pre { max-height: 320px; overflow: auto; padding: 18px; background: var(--paper-deep); white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-preview .text-button { margin-right: 18px; }
.private-use label { padding: 9px 0; }
.workflow-ai-result { min-height: 240px; margin-top: 22px; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); white-space: pre-wrap; line-height: 1.85; }

@media (max-width: 760px) {
  .workflow-author-layout { grid-template-columns: 1fr; }
  .workflow-step-list { display: flex; overflow-x: auto; }
  .workflow-step-list > p { display: none; }
  .workflow-step-list button { min-width: 150px; padding: 13px 10px; border-right: 1px solid var(--line); }
  .workflow-header { margin-bottom: 28px; }
  .workflow-day-strip { margin-inline: -16px; padding-left: 16px; }
    .workflow-answer textarea { min-height: 220px; }
    .side-nav-children { margin-left: 30px; }
    .step-ledger-links > article, .step-ledger-main, .step-detail-layout, .detail-status-ledger, .governance-notice, .step-policy-grid, .preview-banner { grid-template-columns: 1fr; }
    .step-detail-heading { align-items: stretch; text-align: left; }
    .step-detail-heading > div { width: 100%; }
    .step-detail-heading h1 { font-size: clamp(38px, 12vw, 54px); overflow-wrap: anywhere; }
    .detail-status-ledger { gap: 0; padding: 0; }
    .detail-status-ledger span { grid-template-columns: minmax(82px, auto) minmax(0, 1fr); align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .detail-status-ledger span:last-child { border-bottom: 0; }
    .detail-status-ledger code, .detail-status-ledger strong { min-width: 0; overflow-wrap: anywhere; }
    .configured-field-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
    .configured-field-row small { grid-column: 1 / -1; }
    .input-source-help-dialog { padding: 20px; }
    .input-source-guide-list > div { grid-template-columns: 1fr; gap: 5px; }
    .help-dialog-actions .button { width: 100%; }
    .step-ledger-links > article { gap: 0; padding: 12px 0; }
    .step-ledger-main { gap: 7px; padding: 0 0 8px; }
    .step-ledger-main span { display: block !important; }
    .step-version-panel { margin-top: 12px; }
    .preview-banner > div:last-child { text-align: left; }
    .preview-day-strip { margin-inline: -16px; padding-left: 16px; }
    .lifecycle-actions--horizontal { grid-template-columns: 1fr; }
    .lifecycle-action-buttons, .lifecycle-action-buttons form, .lifecycle-action-buttons .button { width: 100%; }
    .action-matrix { width: 100%; justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Approved prototype parity: shared public, product and authentication shells. */
.site-header {
  position: relative;
  z-index: 10;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 240, 231, .96);
}

.brand-lockup {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
}

.brand-lockup strong {
  font-size: 20px;
  letter-spacing: -.04em;
}

.brand-lockup span {
  color: var(--spark);
  font-family: var(--serif);
  font-size: 17px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--spark);
}

.launcher-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .65fr);
  gap: 60px;
  align-items: end;
  padding: clamp(56px, 8vw, 118px) 0 72px;
}

.launcher-kicker {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: -38px;
}

.launcher-kicker .eyebrow,
.launcher-kicker .launch-status {
  margin: 0;
}

.launch-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.launch-status::before {
  width: 18px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--spark);
  content: "";
}

.launcher-intro h1 {
  max-width: 940px;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(56px, 5.8vw, 90px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.04em;
}

.hero-title__line {
  display: block;
}

.hero-title__line--outcome {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 20px);
  margin-top: clamp(22px, 2.6vw, 38px);
  font-size: clamp(30px, 3.15vw, 48px);
  font-weight: 650;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.hero-title__line--outcome::before {
  width: clamp(36px, 4vw, 64px);
  height: 3px;
  flex: 0 0 auto;
  background: var(--spark);
  content: "";
}

.launcher-intro .hero-summary {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  max-width: 34rem;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.organization-plate {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 20px 0 16px;
}

.organization-plate__index {
  margin: 0 0 18px;
  color: var(--spark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.organization-plate h2 {
  max-width: 14ch;
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(28px, 2.4vw, 38px);
  font-weight: 500;
  line-height: 1.04;
}

.organization-plate > p:not(.organization-plate__index) {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.organization-plate__action {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.organization-plate__action:hover,
.organization-plate__action:focus-visible,
.organization-plate__links a:hover,
.organization-plate__links a:focus-visible {
  color: var(--spark);
}

.organization-plate__links {
  display: grid;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.organization-plate__links a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  font-weight: 750;
  text-decoration: none;
}

.organization-plate__links a + a {
  border-top: 1px solid var(--line);
}

.organization-plate--member {
  padding-top: 14px;
}

.organization-plate--member h2 {
  margin-bottom: 6px;
  font-size: 25px;
}

.organization-plate__group {
  border-top: 1px solid var(--line);
}

.organization-plate__group a {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.organization-plate__group a:hover strong,
.organization-plate__group a:focus-visible strong {
  color: var(--spark);
}

.organization-plate__group small,
.organization-plate__group strong,
.organization-plate__metrics {
  display: block;
}

.organization-plate__group small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
}

.organization-plate__group strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-plate__metrics {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.organization-page-heading {
  align-items: end;
}

.organization-directory,
.organization-detail-section {
  margin-top: clamp(44px, 6vw, 76px);
}

.organization-section-heading {
  min-height: 62px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.organization-section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.organization-section-heading span {
  font-family: var(--serif);
  font-size: 14px;
}

.organization-section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 500;
}

.organization-section-heading > p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.organization-list {
  border-bottom: 1px solid var(--ink);
}

.organization-list-row {
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(360px, 1fr) 24px;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  padding: 22px 14px 22px 0;
  color: inherit;
  text-decoration: none;
}

.organization-list-row + .organization-list-row {
  border-top: 1px solid var(--line);
}

.organization-list-row:hover,
.organization-list-row:focus-visible {
  background: #eee8dc;
}

.organization-list-row > div > strong {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.organization-list-row > div > p {
  max-width: 48ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.organization-list-row dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 12px;
  margin: 0;
}

.organization-list-row dt,
.organization-facts dt,
.organization-member-row dt {
  color: var(--muted);
  font-size: 11px;
}

.organization-list-row dd,
.organization-facts dd,
.organization-member-row dd {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 750;
}

.organization-empty {
  min-height: 160px;
  display: grid;
  align-content: center;
  gap: 6px;
  color: var(--muted);
}

.organization-empty p {
  margin: 0;
}

.organization-breadcrumb {
  min-height: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 12px;
}

.organization-breadcrumb a {
  color: inherit;
}

.organization-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: end;
  padding-bottom: clamp(38px, 5vw, 62px);
  border-bottom: 1px solid var(--ink);
}

.organization-detail-hero h1 {
  max-width: 16ch;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.04em;
}

.organization-detail-hero > div > p:last-child {
  max-width: 60ch;
  color: var(--muted);
}

.organization-facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.organization-facts > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.organization-facts dd a {
  color: inherit;
}

.organization-stat-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  border-bottom: 1px solid var(--ink);
}

.organization-stat-strip > div {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}

.organization-stat-strip > div + div {
  border-left: 1px solid var(--line);
}

.organization-stat-strip strong {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.organization-stat-strip span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.organization-member-list {
  border-bottom: 1px solid var(--ink);
}

.organization-member-row {
  padding: 24px 0;
}

.organization-member-row + .organization-member-row {
  border-top: 1px solid var(--line);
}

.organization-member-row > header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, .75fr);
  gap: 32px;
  align-items: center;
}

.organization-member-row > header > div strong,
.organization-member-row > header > div span {
  display: block;
}

.organization-member-row > header > div strong {
  font-size: 17px;
}

.organization-member-row > header > div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.organization-member-row dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0;
}

.organization-progress {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.organization-progress-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .65fr) minmax(180px, .8fr);
  gap: 28px;
  padding: 17px 0;
}

.organization-progress-row + .organization-progress-row {
  border-top: 1px solid var(--line);
}

.organization-progress-row strong,
.organization-progress-row span,
.organization-progress-row time {
  display: block;
}

.organization-progress-row span,
.organization-progress-row time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.organization-progress-locked,
.organization-muted {
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.organization-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.organization-timeline li {
  min-height: 66px;
  display: grid;
  grid-template-columns: 110px minmax(180px, .8fr) 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.organization-timeline time,
.organization-timeline span {
  color: var(--muted);
  font-size: 12px;
}

.organization-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  font-size: 12px;
}

.organization-pagination a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ink);
}

.path-card {
  min-height: 330px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px;
  color: inherit;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.path-card + .path-card {
  border-left: 1px solid var(--ink);
}

.path-card:hover,
.path-card:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.path-card:hover .eyebrow,
.path-card:focus-visible .eyebrow {
  color: #f17850;
}

.path-number {
  font-family: var(--serif);
  font-size: 17px;
}

.path-card h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 500;
  line-height: 1.05;
}

.path-card p {
  max-width: 500px;
}

.path-action {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid currentColor;
  font-weight: 700;
}

.product-body {
  background: #f7f4ed;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 120;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  overflow-y: auto;
  background: var(--ink);
  color: var(--paper);
}

.app-sidebar .brand-lockup {
  margin-bottom: 34px;
  padding: 0 8px;
  color: var(--paper);
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 0;
  color: #d7d0c5;
  font-size: 14px;
  text-decoration: none;
}

.side-nav a:hover {
  background: #292520;
  color: #fff;
}

.side-nav a.active,
.side-nav a[aria-current="page"] {
  background: #3a342e;
  color: #fff;
  font-weight: 700;
}

.side-nav a.active::before,
.side-nav a[aria-current="page"]::before {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  background: var(--spark);
  content: "";
}

.side-nav a.active .nav-icon,
.side-nav a[aria-current="page"] .nav-icon {
  color: var(--spark);
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid #403a34;
  color: #bcb4aa;
  font-size: 12px;
}

.ghost-button {
  width: 100%;
  border-color: #777066;
  background: transparent;
  color: var(--paper);
}

.ghost-button:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.app-main {
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 237, .96);
}

.app-topbar-title {
  margin: 0;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  text-decoration: none;
}

.menu-button {
  display: none;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.app-content {
  width: min(100%, 1288px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 62px) clamp(18px, 4vw, 54px) 90px;
}

.mobile-backdrop {
  display: none;
}

.auth-body {
  min-height: 100vh;
  background: var(--paper);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(440px, 1.1fr);
}

.auth-story {
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 7vw, 90px);
  background: var(--ink);
  color: var(--paper);
}

.auth-story .brand-lockup {
  align-self: flex-start;
  color: var(--paper);
}

.auth-story h1 {
  max-width: 900px;
  margin: auto 0 24px;
  font-family: var(--serif);
  font-size: clamp(52px, 6.4vw, 96px);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.auth-story > p {
  max-width: 500px;
  color: #cfc7bc;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(470px, 100%);
}

.auth-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
}

.auth-card > p {
  color: var(--muted);
}

.form-grid {
  width: 100%;
  max-width: 720px;
  display: grid;
  gap: 18px;
  margin: 28px 0 24px;
}

.field {
  width: 100%;
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-nav {
    gap: 12px;
  }

  .site-nav a:not(.always) {
    display: none;
  }

  .launcher-intro {
    display: block;
    padding: 52px 0 42px;
  }

  .launcher-kicker {
    margin-bottom: 16px;
  }

  .launcher-intro h1 {
    font-size: clamp(48px, 9vw, 72px);
  }

  .hero-title__line--outcome {
    gap: 10px;
    margin-top: 24px;
    font-size: clamp(24px, 7vw, 32px);
  }

  .hero-title__line--outcome::before {
    width: clamp(24px, 8vw, 38px);
    height: 2px;
  }

  .launcher-intro .hero-summary {
    margin-top: 26px;
  }

  .organization-plate {
    margin-top: 34px;
  }

  .organization-plate--member h2 {
    font-size: 25px;
  }

  .organization-detail-hero {
    grid-template-columns: 1fr;
  }

  .organization-stat-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .organization-stat-strip > div:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .organization-stat-strip > div:nth-child(5),
  .organization-stat-strip > div:nth-child(6) {
    border-top: 1px solid var(--line);
  }

  .organization-list-row {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .organization-list-row dl {
    grid-column: 1;
    grid-template-columns: repeat(4, 1fr);
  }

  .organization-list-row > span {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .path-grid {
    grid-template-columns: 1fr;
  }

  .path-card {
    min-height: 280px;
  }

  .path-card + .path-card {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .app-layout {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(310px, 86vw);
    transform: translateX(-105%);
    transition: transform .2s cubic-bezier(.16, 1, .3, 1);
  }

  .drawer-open .app-sidebar {
    transform: none;
  }

  .drawer-open {
    overflow: hidden;
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    border: 0;
    background: rgba(24, 21, 18, .55);
  }

  .drawer-open .mobile-backdrop {
    display: block;
  }

  .menu-button {
    display: inline-flex;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 330px;
  }

  .auth-story h1 {
    margin: 55px 0 18px;
  }
}

@media (max-width: 600px) {
  .site-header {
    min-height: 66px;
    padding: 0 16px;
  }

  .brand-lockup strong {
    font-size: 18px;
  }

  .site-nav a:not(.always) {
    display: none;
  }

  .launcher-intro h1 {
    font-size: 44px;
  }

  .hero-title__line--outcome {
    font-size: clamp(23px, 6.8vw, 29px);
  }

  .organization-plate__group a {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 12px 0;
  }

  .organization-section-heading {
    align-items: start;
  }

  .organization-section-heading > p {
    max-width: 170px;
  }

  .organization-list-row {
    gap: 16px;
    padding: 20px 4px 20px 0;
  }

  .organization-list-row dl {
    grid-template-columns: 1fr 1fr;
  }

  .organization-detail-hero h1 {
    font-size: 50px;
  }

  .organization-stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .organization-stat-strip > div {
    min-height: 96px;
    padding: 14px;
    border-top: 1px solid var(--line);
  }

  .organization-stat-strip > div:nth-child(odd) {
    border-left: 0;
  }

  .organization-stat-strip > div:nth-child(-n+2) {
    border-top: 0;
  }

  .organization-member-row > header,
  .organization-progress-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .organization-timeline li {
    grid-template-columns: 92px 1fr;
    gap: 10px 18px;
    padding: 14px 0;
  }

  .organization-timeline li > span {
    grid-column: 2;
  }

  .path-card h2 {
    font-size: 30px;
  }

  .app-topbar {
    padding: 0 14px;
  }

  .app-topbar > a {
    display: none;
  }

  .app-content {
    padding: 28px 16px 70px;
  }

  .auth-story {
    min-height: 300px;
    padding: 24px;
  }

  .auth-story h1 {
    font-size: 48px;
  }

  .auth-panel {
    padding: 34px 20px 54px;
  }
}

/* 治理后台：分组导航、数据账簿与响应式明细 */
.side-nav-label {
  margin: 18px 12px 5px;
  color: #8f877c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.side-nav-label:first-child {
  margin-top: 0;
}

.admin-heading {
  gap: 24px;
}

.range-switcher,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

/* 用户、席位与组织容量工作台 */
.admin-compact-heading {
  margin-bottom: 26px;
}

.admin-summary-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 44px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.admin-summary-ledger > div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.admin-summary-ledger > div:last-child {
  border-right: 0;
}

.admin-summary-ledger span,
.seat-ledger-heading span,
.capacity-line span {
  color: var(--muted);
  font-size: 12px;
}

.admin-summary-ledger strong {
  font-family: var(--serif);
  font-size: clamp(25px, 2.7vw, 36px);
  font-variant-numeric: tabular-nums;
}

.seat-ledger {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
  gap: 40px;
  margin-bottom: 52px;
}

.seat-ledger-section,
.role-workspace-panel,
.transfer-panel {
  border-top: 1px solid var(--ink);
}

.seat-ledger-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0 10px;
}

.seat-ledger-heading h2,
.role-workspace-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
}

.seat-ledger-row {
  display: grid;
  grid-template-columns: 64px 80px minmax(120px, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.seat-ledger-row > * {
  min-width: 0;
}

.seat-ledger-row small {
  color: var(--muted);
}

.seat-action-panel summary,
.transfer-panel summary {
  cursor: pointer;
  color: var(--spark);
  font-weight: 700;
  list-style-position: inside;
}

.compact-admin-form {
  gap: 14px;
  margin: 16px 0 20px;
}

.role-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px 40px;
  margin-bottom: 52px;
}

.role-workspace-panel {
  min-width: 0;
  padding-top: 16px;
}

.role-workspace-panel-wide {
  grid-column: 1 / -1;
}

.admin-change-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.admin-change-columns h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.admin-change-row {
  display: grid;
  gap: 7px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.admin-change-row span,
.admin-change-row small {
  color: var(--muted);
}

.admin-change-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.admin-change-actions form {
  margin: 0;
}

.admin-change-actions .button {
  min-height: 44px;
}

.leader-class-list,
.active-role-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
}

.active-role-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leader-class-list article,
.active-role-list article {
  min-width: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.active-role-list article {
  padding-right: 20px;
}

.capacity-line {
  display: grid;
  gap: 3px;
  margin: 8px 0 0;
  font-variant-numeric: tabular-nums;
}

.organization-leader-class {
  color: var(--spark);
  font-weight: 700;
}

.organization-facts dd small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.transfer-panel {
  margin-top: 18px;
  padding-top: 12px;
}

.range-switcher a,
.pagination a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.range-switcher a.selected {
  border-color: var(--spark);
  color: var(--ink);
  font-weight: 700;
}

.overview-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.overview-ledger section {
  min-width: 0;
  padding: 26px 30px 30px 0;
  border-bottom: 1px solid var(--line);
}

.overview-ledger section:nth-child(even) {
  padding-right: 0;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.ledger-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ledger-heading h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
}

.ledger-heading a {
  color: var(--spark);
  font-size: 13px;
  text-underline-offset: 4px;
}

.overview-ledger dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 12px;
  margin: 0;
}

.overview-ledger dl div {
  min-width: 0;
}

.overview-ledger dt {
  color: var(--muted);
  font-size: 12px;
}

.overview-ledger dd {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 32px);
  font-variant-numeric: tabular-nums;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 18px;
  align-items: end;
  margin: 0 0 34px;
  padding: 22px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.filter-bar .field {
  min-width: 0;
}

.filter-bar .button {
  min-width: 112px;
}

.data-table {
  width: 100%;
  border-top: 1px solid var(--ink);
}

.data-table-head,
.data-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(5, minmax(110px, 1fr));
  gap: 18px;
  align-items: center;
}

.data-table-head {
  min-height: 48px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.data-table-row {
  min-height: 88px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.data-table-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.data-table-row strong,
.data-table-row small {
  display: block;
}

.data-table-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 30px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.budget-summary > div {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-left: 1px solid var(--line);
}

.budget-summary > div:first-child {
  border-left: 0;
}

.budget-summary span {
  color: var(--muted);
  font-size: 12px;
}

.budget-summary strong {
  font-family: var(--serif);
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

.pagination {
  justify-content: flex-end;
  min-height: 58px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .admin-summary-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary-ledger > div:nth-child(2) {
    border-right: 0;
  }

  .admin-summary-ledger > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .seat-ledger {
    grid-template-columns: 1fr;
  }

  .active-role-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-table-head {
    display: none;
  }

  .data-table-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 760px) {
  .role-workspace {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .role-workspace-panel-wide {
    grid-column: auto;
  }

  .admin-change-columns {
    grid-template-columns: 1fr;
  }

  .seat-ledger-row {
    grid-template-columns: 54px 70px minmax(0, 1fr);
    padding: 10px 0;
  }

  .seat-ledger-row .seat-action-panel {
    grid-column: 1 / -1;
  }

  .active-role-list {
    grid-template-columns: 1fr;
  }

  .overview-ledger {
    grid-template-columns: 1fr;
  }

  .overview-ledger section,
  .overview-ledger section:nth-child(even) {
    padding: 24px 0;
    border-left: 0;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .filter-bar .button {
    width: 100%;
  }

  .data-table-row {
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
  }
}

@media (max-width: 480px) {
  .admin-summary-ledger {
    grid-template-columns: 1fr;
  }

  .admin-summary-ledger > div,
  .admin-summary-ledger > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-summary-ledger > div:last-child {
    border-bottom: 0;
  }

  .seat-ledger-heading {
    display: grid;
  }

  .seat-ledger-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .seat-ledger-row > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .overview-ledger dl,
  .budget-summary {
    grid-template-columns: 1fr 1fr;
  }

  .budget-summary > div:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .data-table-row {
    grid-template-columns: 1fr;
  }
}

/* 私密灵感工作区：快速对话、我的笔记与独立步骤预览。 */
.inspiration-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.chat-history {
  min-width: 0;
  padding: clamp(28px, 4vw, 58px);
  border-right: 1px solid var(--line);
}

.chat-history h1,
.notes-heading h1 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 500;
}

.chat-history > p,
.notes-heading p {
  color: var(--muted);
  line-height: 1.75;
}

.chat-history > .button {
  width: 100%;
  margin: 24px 0;
}

.chat-history nav {
  display: grid;
  border-top: 1px solid var(--ink);
}

.chat-history nav button {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.chat-history nav button:hover,
.chat-history nav button.active {
  color: var(--spark);
}

.chat-history nav button small {
  color: var(--muted);
}

.chat-stage {
  min-width: 0;
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  padding: clamp(24px, 4vw, 60px);
}

.chat-stage > header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

.chat-stage > header > div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.chat-transcript {
  min-width: 0;
  overflow-y: auto;
  padding: 28px 0;
}

.chat-welcome {
  min-height: 280px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.chat-welcome strong {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 500;
}

.chat-welcome p {
  color: var(--muted);
}

.chat-message {
  max-width: 760px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.chat-message--user {
  margin-left: auto;
}

.chat-message label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--spark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.chat-message p {
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.85;
}

.chat-composer {
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.chat-composer > label {
  font-weight: 800;
}

.chat-composer textarea {
  width: 100%;
  min-height: 110px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  resize: vertical;
  font: inherit;
  line-height: 1.7;
}

.chat-composer > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 14px;
}

.chat-composer > div span {
  color: var(--muted);
  font-size: 12px;
}

.notes-workspace {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 100px) 0;
}

.notes-heading {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--ink);
}

.notes-export,
.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.note-ledger > article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.note-ledger > article > span,
.single-step-preview > aside > span {
  color: var(--spark);
  font-family: var(--serif);
  font-size: 28px;
}

.note-ledger h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 500;
}

.note-ledger h2 a {
  text-decoration: none;
}

.note-ledger p {
  max-width: 78ch;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.notes-trash {
  margin-top: 42px;
  border-top: 1px solid var(--ink);
}

.notes-trash summary,
.notes-trash > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.notes-trash > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.note-preview-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 30px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.note-preview-dialog::backdrop {
  background: rgba(20, 18, 15, .68);
}

.note-preview-dialog form {
  display: grid;
  gap: 20px;
}

.note-preview-dialog label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.note-preview-dialog input,
.note-preview-dialog textarea {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: inherit;
  font: inherit;
}

.dialog-close {
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 32px;
  cursor: pointer;
}

.single-step-preview {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.single-step-preview > aside {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 34px 34px 34px 0;
  border-right: 1px solid var(--line);
}

.single-step-preview > aside strong {
  font-family: var(--serif);
  font-size: 30px;
}

.single-step-preview > aside small {
  color: var(--muted);
}

.single-step-preview > article {
  min-width: 0;
  padding: 34px 0 42px 42px;
}

.preview-private-placeholder {
  padding: 18px 0;
}

.workflow-note-action {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 6px 18px;
    padding-block: 10px;
  }

  .site-nav {
    width: 100%;
    order: 2;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .site-nav a:not(.always) {
    display: inline-flex;
  }

  .inspiration-shell {
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  }

  .chat-history,
  .chat-stage {
    padding: 28px;
  }

  .single-step-preview {
    grid-template-columns: 1fr;
  }

  .single-step-preview > aside {
    grid-template-columns: auto minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
  }

  .single-step-preview > aside .eyebrow,
  .single-step-preview > aside small {
    grid-column: 1 / -1;
  }

  .single-step-preview > article {
    padding-left: 0;
  }
}

@media (max-width: 680px) {
  .inspiration-shell {
    display: block;
  }

  .chat-history {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-history nav {
    max-height: 210px;
    overflow-y: auto;
  }

  .chat-stage {
    min-height: 720px;
    padding: 24px 18px;
  }

  .chat-stage > header,
  .chat-composer > div,
  .notes-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-stage > header > div {
    justify-content: flex-start;
  }

  .chat-composer .button,
  .notes-export .button {
    width: 100%;
  }

  .notes-workspace {
    width: min(100% - 32px, 1500px);
  }

  .note-ledger > article {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
  }

  .note-editor-actions { flex-direction: column; align-items: stretch; }
  .note-editor-actions__group { width: 100%; }
  .note-editor-actions__group .button { width: 100%; }
  .note-ledger > article > .button { grid-column: 2; justify-self: start; }

  .note-preview-dialog {
    padding: 20px;
  }
}

/* 出版账本式步骤操作与统一的作者预览闭环 */
.ledger-actions--numbered {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 0;
  border: 1px solid var(--ink);
}

.ledger-actions--numbered a {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  background: transparent;
}

.ledger-actions--numbered a + a { border-left: 1px solid var(--ink); }
.ledger-actions--numbered span { color: var(--spark); font: 700 12px/1 var(--sans); letter-spacing: .08em; }
.ledger-actions--numbered strong { font-size: 14px; }
.ledger-actions--numbered a:hover,
.ledger-actions--numbered a:focus-visible { background: var(--ink); color: var(--paper); }

.preview-step-tabs {
  display: flex;
  overflow-x: auto;
  margin: 26px 0 0;
  border-block: 1px solid var(--line);
}

.preview-step-tabs button {
  min-width: 190px;
  min-height: 68px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.preview-step-tabs button.active { background: var(--ink); color: var(--paper); }
.preview-step-tabs button span { color: var(--spark); font-weight: 700; }
.preview-step-tabs button small { grid-column: 2; }

.preview-creation-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  grid-template-areas: "input companion" "result companion" "actions companion";
  border-block: 1px solid var(--ink);
}

.preview-input-zone { grid-area: input; padding: 42px 48px 34px 0; }
.preview-companion-zone {
  grid-area: companion;
  min-width: 0;
  padding: 42px 34px;
  border-left: 1px solid var(--line);
  background: var(--sand);
}
.preview-result-zone { grid-area: result; padding: 30px 48px 30px 0; border-top: 1px solid var(--line); }
.preview-operation-zone { grid-area: actions; display: flex; flex-wrap: wrap; gap: 12px; padding: 0 48px 42px 0; }
.preview-input-zone h2,
.preview-companion-zone h2 { margin: 8px 0 18px; font: 500 clamp(30px, 4vw, 56px)/1.08 var(--serif); }
.preview-result-zone h3 { margin: 6px 0 16px; font: 500 28px/1.2 var(--serif); }
.preview-simulated-input { padding-top: 14px; border-top: 1px solid var(--spark); }

.editable-prompt-panel { display: grid; gap: 10px; margin: 22px 0; }
.editable-prompt-panel > span:first-child { font-weight: 700; }
.editable-prompt-panel textarea {
  width: 100%;
  min-height: 168px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
}
.editable-prompt-panel small { color: var(--muted); line-height: 1.55; }
.prompt-editor-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.prompt-editor-actions button { min-height: 44px; }
.preview-flow-map { margin: 28px 0 0; border-top: 1px solid var(--ink); }
.preview-flow-map div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.preview-flow-map dt { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.preview-flow-map dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.preview-completion-standard { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ink); }

@media (max-width: 900px) {
  .preview-creation-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "input" "companion" "result" "actions";
  }
  .preview-input-zone,
  .preview-result-zone,
  .preview-operation-zone { padding-right: 0; }
  .preview-companion-zone { padding-inline: 0; border-left: 0; border-top: 1px solid var(--line); background: transparent; }
}

@media (max-width: 680px) {
  .ledger-actions--numbered { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-actions--numbered a { min-width: 0; grid-template-columns: 24px 1fr; padding-inline: 9px; }
  .preview-input-zone { padding-top: 30px; }
}

/* 记忆素材导入 */
.import-upload-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.import-file-button { cursor: pointer; user-select: none; }
.import-wechat-form { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.import-wechat-form input[type="url"] { flex: 1 1 260px; min-width: 0; }
.import-preview-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; background: var(--white); }
.import-preview-text { color: var(--muted); white-space: pre-wrap; margin: 6px 0; }
.import-list-heading { margin: 16px 0 8px; }
.import-list { list-style: none; margin: 0 0 8px; padding: 0; }
.import-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.import-item .import-title { flex: 1 1 auto; font-weight: 600; min-width: 0; }
.import-meta { color: var(--muted); font-size: 0.85em; white-space: nowrap; }
.import-badge { border: 1px solid var(--line); border-radius: var(--radius); padding: 1px 6px; font-size: 0.78em; color: var(--muted); white-space: nowrap; }

/* 笔记 UI 优化 + 另存为口播稿 */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); padding: 20px 0; }
.breadcrumb a { color: var(--spark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.note-editor { padding-bottom: 72px; }
.note-editor .page-heading h1 { font-size: clamp(30px, 4vw, 48px); }
.note-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.note-meta__time { color: var(--muted); }
.note-type-badge { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.note-type-badge--script { border-color: #7d1e12; color: #7d1e12; background: rgba(125, 30, 18, .08); }
.note-editor-actions { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.note-editor-actions__group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.script-panel { margin-top: 28px; padding: 22px; border: 1px solid var(--ink); background: rgba(255, 253, 249, .4); }
.script-panel h2 { font-family: var(--serif); font-size: 28px; margin-bottom: 10px; }
.script-panel label { display: grid; gap: 8px; font-weight: 700; margin: 12px 0; }
.script-panel__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.script-panel__actions[hidden] { display: none; }
.script-panel__actions[data-script-confirm] { margin-top: 10px; }
.script-preview { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 0; padding: 16px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-family: var(--sans); line-height: 1.75; max-height: 420px; overflow: auto; }

/* 作者工作台：出版式统一首页、分组导航与每日步骤 */
.section-kicker {
  margin: 0 0 14px;
  color: var(--spark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.creator-product-layout .side-nav {
  align-content: start;
  gap: 8px;
}

.creator-product-layout .side-nav-cluster {
  margin: 0;
  border-bottom: 1px solid rgba(245, 240, 231, .12);
}

.creator-product-layout .side-nav-parent {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #aaa196;
  text-align: left;
  cursor: pointer;
}

.creator-product-layout .side-nav-parent > span:first-child {
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.creator-product-layout .side-nav-parent small {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  color: #8f877d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-product-layout .side-nav-parent > span:last-child {
  grid-column: 2;
  grid-row: 1 / 3;
  transition: transform .18s ease-out;
}

.creator-product-layout .side-nav-cluster.is-open .side-nav-parent > span:last-child {
  transform: rotate(180deg);
}

.creator-product-layout .side-nav-children {
  margin: 0 0 9px 12px;
  padding-left: 8px;
  border-left: 1px solid rgba(245, 240, 231, .17);
}

.creator-product-layout .side-nav-children[hidden] {
  display: none;
}

.creator-product-layout .side-nav-children a {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
}

.creator-home-hero {
  min-height: 450px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: clamp(42px, 7vw, 110px);
  align-items: center;
  padding: clamp(28px, 5vw, 70px) 0 62px;
}

.creator-home-intro h1 {
  max-width: 850px;
  margin-bottom: 30px;
  font-size: clamp(52px, 6.4vw, 92px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.creator-home-intro h1 em {
  color: var(--spark);
  font-style: normal;
}

.creator-home-intro > p:last-child {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
}

.today-assignment {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(28px, 4vw, 46px);
  background: var(--ink);
  color: var(--paper);
}

.today-assignment > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.today-assignment > strong {
  margin: 26px 0 10px;
  color: #f0643b;
  font-family: var(--serif);
  font-size: clamp(68px, 7vw, 100px);
  font-weight: 500;
  line-height: .82;
}

.today-assignment h2 {
  margin: 18px 0 12px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}

.today-assignment p {
  color: #cfc6ba;
}

.today-assignment .button {
  margin-top: auto;
}

.current-book-ledger {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(320px, 1fr) minmax(260px, .72fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.book-jacket {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--spark);
  color: var(--paper);
}

.book-jacket small {
  font-weight: 800;
  letter-spacing: .12em;
}

.book-jacket strong {
  margin: auto 0;
  font-family: var(--serif);
  font-size: clamp(35px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.05;
}

.book-jacket span {
  padding-top: 16px;
  border-top: 1px solid rgba(245, 240, 231, .55);
}

.current-book-copy,
.release-ledger {
  min-width: 0;
  padding: clamp(30px, 4vw, 48px);
}

.current-book-copy h2,
.release-ledger h2,
.other-books h2 {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
}

.current-book-copy > p:not(.section-kicker),
.release-ledger > p {
  color: var(--muted);
}

.book-ledger-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 34px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.book-ledger-stats > div {
  padding: 18px 12px 18px 0;
}

.book-ledger-stats dt {
  color: var(--muted);
  font-size: 11px;
}

.book-ledger-stats dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 30px;
}

.current-book-copy .book-progress {
  margin: 24px 0 8px;
}

.progress-caption {
  font-size: 12px;
}

.release-ledger {
  border-left: 1px solid var(--line);
  background: var(--paper-deep);
}

.release-ledger ul {
  display: grid;
  gap: 9px;
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
}

.release-ledger li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  color: var(--muted);
}

.release-ledger li.done {
  color: #2f684a;
}

.home-framework {
  scroll-margin-top: 24px;
  padding: clamp(64px, 8vw, 104px) 0 18px;
}

.home-framework > header {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(320px, 1fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.home-framework > header h2,
.home-framework-grid h3 {
  font-family: var(--serif);
  font-weight: 500;
}

.home-framework > header h2 {
  font-size: clamp(42px, 5vw, 68px);
}

.home-framework > header > p {
  max-width: 62ch;
  color: var(--muted);
}

.home-framework-grid {
  display: grid;
  grid-template-columns: minmax(300px, .86fr) minmax(420px, 1.14fr);
  gap: clamp(34px, 5vw, 72px);
  padding-top: 34px;
}

.home-framework-grid h3 {
  margin-bottom: 24px;
  font-size: clamp(30px, 3vw, 42px);
}

.framework-positioning .account-details > div {
  grid-template-columns: minmax(80px, .32fr) minmax(0, 1fr);
}

.creator-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 13px;
}

.creator-breadcrumb a { color: inherit; }

.chapter-preview {
  max-width: 1040px;
  margin: 0 auto;
}

.chapter-preview > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--ink);
}

.chapter-preview h1 {
  max-width: 14ch;
  margin: 8px 0 18px;
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.035em;
}

.chapter-preview > header p:last-child { color: var(--muted); }

.chapter-preview-copy {
  max-width: 72ch;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 88px) 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 2;
}

.chapter-preview-empty {
  min-height: 380px;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.chapter-preview-empty h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
}

/* —— 章节预览：AI 学习总结 / 本章分析 —— */
.chapter-ai-actions {
  max-width: 72ch;
  margin: 0 auto;
  padding-bottom: clamp(44px, 7vw, 88px);
  display: grid;
  gap: 34px;
}

.chapter-ai-action {
  display: grid;
  gap: 16px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.chapter-ai-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.chapter-ai-head h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.chapter-ai-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  max-width: 46ch;
}

.chapter-ai-result {
  min-height: 44px;
  padding: 22px 0;
  border-top: 1px solid var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.9;
}

.other-books {
  padding: 70px 0 12px;
}

.other-books > header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

.other-book-list article {
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.other-book-list h3 {
  margin: 5px 0;
  font-family: var(--serif);
  font-size: 28px;
}

.other-book-list p,
.other-book-list article > div > span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.first-book-desk {
  min-height: calc(100dvh - 156px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: center;
  padding: clamp(46px, 7vh, 88px) 0 clamp(56px, 8vh, 96px);
}

.first-book-desk__invitation {
  min-width: 0;
}

.first-book-desk__folio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.first-book-desk__folio .section-kicker {
  margin: 0;
}

.first-book-desk__folio > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.first-book-desk h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(54px, 5.8vw, 86px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.first-book-desk__lead {
  max-width: 35rem;
  margin: clamp(28px, 3vw, 40px) 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.first-book-desk__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 32px;
}

.first-book-desk__primary {
  min-height: 48px;
  padding-inline: 28px;
}

.first-book-desk__chat {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.first-book-desk__chat:hover,
.first-book-desk__chat:focus-visible {
  color: var(--spark);
  border-color: var(--spark);
}

.first-book-desk__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.first-book-desk__trust > span {
  color: var(--spark);
  font-size: 8px;
}

.first-book-desk__trust > i {
  width: 22px;
  height: 1px;
  background: var(--line);
}

.first-book-path {
  position: relative;
  min-width: 0;
  min-height: 520px;
  padding: clamp(28px, 3vw, 42px);
  border: 1px solid var(--ink);
  background: rgba(255, 253, 249, .32);
  overflow: hidden;
}

.first-book-path::before {
  position: absolute;
  inset: 14px 14px auto auto;
  width: 42px;
  height: 42px;
  border-top: 1px solid var(--spark);
  border-right: 1px solid var(--spark);
  content: "";
}

.first-book-path__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
}

.first-book-path__header p,
.first-book-path__header h2 {
  margin: 0;
}

.first-book-path__header p {
  color: var(--spark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.first-book-path__header h2 {
  max-width: 12em;
  margin-top: 8px;
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.2;
}

.first-book-path__header > span {
  padding-right: 38px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  white-space: nowrap;
}

.first-book-path ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.first-book-path li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.first-book-path__number {
  color: var(--spark);
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1;
}

.first-book-path h3,
.first-book-path li p {
  margin: 0;
}

.first-book-path h3 {
  font-size: 18px;
}

.first-book-path li p {
  max-width: 32rem;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.first-book-path footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.first-book-path footer strong {
  color: var(--ink);
  font-size: 12px;
}

.unified-workspace-header {
  margin-bottom: 28px;
}

.unified-workspace-header h1 {
  max-width: 950px;
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 500;
  letter-spacing: -.035em;
}

.save-indicator {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  white-space: nowrap;
}

.save-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f684a;
}

.workspace-progress-details {
  margin-bottom: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workspace-progress-details > summary {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
}

.workspace-progress-details .workflow-day-strip {
  margin: 0;
  border-bottom: 0;
}

.today-path-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
}

.today-path-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.today-path-heading > p {
  color: var(--muted);
}

.daily-step-path {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  margin-bottom: 28px;
  border: 1px solid var(--line);
}

.daily-step-path__item {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 2px 10px;
  align-content: center;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.daily-step-path__item:last-child {
  border-right: 0;
}

.daily-step-path__item > span {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--serif);
}

.daily-step-path__item strong,
.daily-step-path__item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-step-path__item small {
  color: var(--muted);
  font-size: 10px;
}

.daily-step-path__item--current,
.daily-step-path__item.active,
.daily-step-path__item[aria-current="step"] {
  background: var(--ink);
  color: var(--paper);
}

.daily-step-path__item--current small,
.daily-step-path__item.active small,
.daily-step-path__item[aria-current="step"] small {
  color: #cfc6ba;
}

.daily-step-path__item--current > span,
.daily-step-path__item.active > span,
.daily-step-path__item[aria-current="step"] > span {
  border-color: var(--spark);
  background: var(--spark);
}

.daily-step-path__item--completed > span {
  border-color: #2f684a;
  color: #2f684a;
}

.daily-step-path__item--locked {
  color: #8a8177;
}

.daily-step-path__item:focus-visible {
  outline: 2px solid var(--spark);
}

.writing-grid {
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.legacy-step-workspace {
  min-width: 0;
}

.legacy-step-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
  min-height: min(620px, calc(100dvh - 300px));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.legacy-step-screen[hidden] {
  display: none !important;
}

.legacy-step-screen > .writing-column,
.legacy-step-screen > .ai-column,
.legacy-step-screen > .step-companion {
  min-width: 0;
  padding: clamp(24px, 4vw, 54px);
  border: 0;
}

.legacy-step-screen > .writing-column {
  border-right: 1px solid var(--line);
}

.legacy-step-screen > .ai-column,
.legacy-step-screen > .step-companion {
  background: var(--paper-deep);
}

.legacy-step-screen h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
}

.step-screen-intro {
  max-width: 62ch;
  margin: 14px 0 28px;
  color: var(--muted);
  line-height: 1.75;
}

.step-companion {
  display: grid;
  align-content: center;
  gap: 18px;
}

.step-companion p:last-child {
  max-width: 38ch;
  color: var(--muted);
  line-height: 1.8;
}

.ai-column--step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.ai-column--step .result-copy {
  width: 100%;
  max-height: 50vh;
  overflow-y: auto;
  padding-block: 20px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  white-space: pre-wrap;
  line-height: 1.85;
}

.source-ledger {
  max-height: 48vh;
  overflow-y: auto;
  margin-top: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  white-space: pre-wrap;
  line-height: 1.9;
}

.source-ledger--compact {
  max-height: 32vh;
}

.completed-day-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.completed-day-notice p {
  margin: 5px 0 0;
  color: var(--muted);
}

.archive-checklist {
  display: grid;
  gap: 0;
  margin: 28px 0;
  border-top: 1px solid var(--ink);
}

.archive-checklist label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.archive-rating {
  margin: 30px 0;
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.archive-rating legend {
  padding: 0 0 15px;
  font-weight: 700;
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(10, minmax(34px, 1fr));
  border: 1px solid var(--line);
}

.rating-buttons button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.rating-buttons button:last-child {
  border-right: 0;
}

.rating-buttons button.selected {
  background: var(--ink);
  color: var(--paper);
}

.ai-wait-status {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--spark);
  color: var(--spark);
}

.ai-wait-status[hidden] {
  display: none !important;
}

.ai-wait-status > span {
  height: 3px;
  background: var(--spark);
  transform-origin: left;
  animation: spark-ai-wait 1.25s ease-in-out infinite alternate;
}

.ai-wait-status small {
  color: var(--muted);
  white-space: nowrap;
}

/* —— AI 追问素材（选做）：右栏问题、左栏回答输入 —— */
.followup-panel {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  justify-items: start;
}

.followup-intro {
  max-width: 46ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.followup-thread {
  width: 100%;
  display: grid;
  gap: 14px;
}

.followup-round {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.followup-question {
  font-weight: 700;
}

.followup-open-hint {
  color: var(--muted);
  font-size: 13px;
}

.followup-answer {
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.7;
}

.followup-done,
.complete-note {
  color: var(--spark);
  font-size: 13px;
}

.followup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

[data-followup-answers] {
  width: 100%;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
}

.followup-answer-round {
  display: grid;
  gap: 8px;
}

.followup-answer-editor {
  min-height: 120px;
}

@keyframes spark-ai-wait {
  from { transform: scaleX(.18); opacity: .55; }
  to { transform: scaleX(1); opacity: 1; }
}

.writing-column,
.ai-column {
  border: 0;
  background: transparent;
}

.writing-column {
  border-right: 1px solid var(--line);
}

.ai-column .tabs {
  border-bottom: 1px solid var(--line);
}

.workflow-outline-layout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
}

.workflow-step-directory {
  border-top: 1px solid var(--ink);
}

.workflow-step-directory > p {
  padding: 18px 0 8px;
}

.workflow-step-directory button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 10px;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.workflow-step-directory button.active {
  color: var(--ink);
}

.workflow-step-directory button > span {
  grid-row: 1 / 3;
  color: var(--spark);
  font-family: var(--serif);
  font-size: 21px;
}

.workflow-step-directory small {
  color: inherit;
}

.workflow-step-panel {
  min-width: 0;
}

.workflow-locked-note {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 8px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-locked-note strong {
  font-family: var(--serif);
  font-size: 30px;
}

.workflow-locked-note p {
  max-width: 62ch;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .creator-home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    gap: 42px;
  }

  .current-book-ledger {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .home-framework > header,
  .home-framework-grid {
    grid-template-columns: 1fr;
  }

  .home-framework > header {
    align-items: start;
  }

  .release-ledger {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .release-ledger ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .creator-home-hero,
  .first-book-desk,
  .current-book-ledger,
  .home-framework > header,
  .home-framework-grid,
  .chapter-preview > header,
  .workflow-outline-layout {
    grid-template-columns: 1fr;
  }

  .legacy-step-screen {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .legacy-step-screen > .writing-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .completed-day-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .rating-buttons {
    grid-template-columns: repeat(5, minmax(40px, 1fr));
  }

  .rating-buttons button:nth-child(5) {
    border-right: 0;
  }

  .rating-buttons button:nth-child(-n + 5) {
    border-bottom: 1px solid var(--line);
  }

  .ai-wait-status {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .ai-wait-status small {
    grid-column: 2;
  }

  .creator-home-hero {
    min-height: 0;
    gap: 30px;
    padding-top: 24px;
  }

  .first-book-desk {
    min-height: 0;
    gap: 42px;
    padding: 34px 0 58px;
  }

  .first-book-desk h1 {
    max-width: 12em;
    font-size: clamp(48px, 13vw, 68px);
  }

  .first-book-desk__lead {
    margin-top: 24px;
    font-size: 16px;
  }

  .first-book-path {
    min-height: 0;
  }

  .creator-home-intro h1 {
    font-size: clamp(48px, 13vw, 72px);
  }

  .today-assignment {
    min-height: 310px;
  }

  .book-jacket {
    min-height: 280px;
  }

  .current-book-copy,
  .release-ledger {
    padding: 28px 0;
  }

  .book-ledger-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-ledger {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .release-ledger ul {
    grid-template-columns: 1fr;
  }

  .other-books > header,
  .today-path-heading,
  .workspace-progress-details > summary,
  .unified-workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .other-book-list article {
    grid-template-columns: 1fr;
  }

  .chapter-list li > a {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .chapter-list li small {
    grid-column: 2;
  }

  .chapter-preview > header .button {
    width: fit-content;
  }

  .daily-step-path {
    grid-template-columns: 1fr;
  }

  .daily-step-path__item {
    min-height: 64px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .daily-step-path__item:last-child {
    border-bottom: 0;
  }

  .writing-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-step-directory {
    max-height: 310px;
    overflow-y: auto;
  }
}

@media (max-width: 420px) {
  .app-content {
    padding-inline: 16px;
  }

  .creator-home-intro h1,
  .first-book-desk h1 {
    font-size: 44px;
  }

  .first-book-desk__folio {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .first-book-desk__actions,
  .first-book-desk__primary {
    width: 100%;
  }

  .first-book-desk__primary {
    justify-content: center;
  }

  .first-book-desk__chat {
    width: fit-content;
  }

  .first-book-path {
    padding: 26px 22px;
  }

  .first-book-path li {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .first-book-path__header > span {
    display: none;
  }

  .today-assignment {
    padding: 26px 22px;
  }

  .today-assignment > strong {
    font-size: 68px;
  }

  .book-ledger-stats dd {
    font-size: 26px;
  }
}

/* 交流广场：全视口阅读室。页面不滚动，消息流承担唯一主要滚动。 */
.community-body { height: 100dvh; overflow: hidden; background: var(--paper); }
.community-shell { height: 100dvh; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; }
.community-masthead { min-width: 0; display: grid; grid-template-columns: 240px minmax(180px, 1fr) auto; align-items: center; border-bottom: 1px solid var(--ink); background: var(--paper); }
.community-brand { height: 100%; display: flex; align-items: center; gap: 9px; padding: 0 24px; border-right: 1px solid var(--ink); color: var(--ink); text-decoration: none; }
.community-brand strong { font-size: 21px; }
.community-brand span { color: var(--spark); }
.community-masthead__channel { min-width: 0; display: flex; align-items: baseline; gap: 12px; padding: 0 28px; }
.community-masthead__channel span { color: var(--muted); font-size: 11px; }
.community-masthead__channel strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-masthead__nav { display: flex; align-items: center; height: 100%; }
.community-masthead__nav a { height: 100%; display: inline-flex; align-items: center; padding: 0 16px; border-left: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; }
.community-masthead__nav a[aria-current="page"] { color: var(--spark); }
.community-masthead__nav a:hover, .community-masthead__nav a:focus-visible { background: var(--paper-deep); }
.community-stage { min-height: 0; overflow: hidden; }
.community-workspace, .community-layout { height: 100%; min-height: 0; }
.community-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.community-channels { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; border-right: 1px solid var(--ink); background: var(--paper-deep); }
.community-channels > header { padding: 28px 22px 22px; border-bottom: 1px solid var(--line); }
.community-channels > header span { color: var(--spark); font-size: 11px; letter-spacing: .12em; }
.community-channels > header h1 { margin: 6px 0 8px; font-family: var(--serif); font-size: 30px; letter-spacing: -.03em; }
.community-channels > header p { margin: 0; color: var(--muted); font-size: 12px; }
.community-channel-tools { padding: 16px 22px 4px; }
.community-channel-tools label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.community-channel-tools input { width: 100%; min-height: 38px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); }
.community-channels nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 0; }
.community-channels nav button { position: relative; width: 100%; min-width: 0; display: grid; gap: 3px; padding: 15px 28px 15px 22px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.community-channels nav button::after { content: "→"; position: absolute; right: 14px; top: 25px; color: var(--muted); }
.community-channels nav button[aria-current="page"] { background: var(--ink); color: var(--paper); }
.community-channels nav button[aria-current="page"] span, .community-channels nav button[aria-current="page"]::after { color: #f47a50; }
.community-channels nav button span { color: var(--muted); font-size: 11px; }
.community-channels nav button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.community-channels nav button small:not(:empty) { color: var(--spark); font-size: 11px; }
.community-channels nav button[hidden], .community-empty[hidden] { display: none; }
.community-channel-note { margin: 0; padding: 16px 22px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.community-stream { min-width: 0; min-height: 0; display: grid; grid-template-rows: 76px minmax(0, 1fr) auto; overflow: hidden; background: var(--paper); }
.community-stream-header { min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 0 clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--ink); }
.community-stream-header span { color: var(--muted); font-size: 11px; }
.community-stream-header h2 { margin: 3px 0 0; font-family: var(--serif); font-size: 28px; }
.community-message-policy { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.community-stream-header > p { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.community-stream-header > p i { width: 7px; height: 7px; border-radius: 50%; background: #2f7451; }
.community-message-region { position: relative; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.community-messages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: smooth; padding: 24px clamp(20px, 4vw, 56px) 32px; }
.community-empty { min-height: 100%; display: grid; place-content: center; padding: 48px 20px; text-align: center; color: var(--muted); }
.community-empty strong { display: block; margin-bottom: 8px; color: var(--ink); font-family: var(--serif); font-size: 30px; }
.community-message { width: min(76%, 900px); display: grid; grid-template-columns: minmax(108px, 18%) minmax(0, 1fr); gap: 22px; margin-bottom: 18px; padding: 18px 20px; border: 1px solid var(--line); }
.community-message--other { justify-self: start; background: var(--white); }
.community-message--mine { justify-self: end; grid-template-columns: minmax(0, 1fr) minmax(108px, 18%); background: var(--paper-deep); }
.community-message--mine .community-message__identity { grid-column: 2; text-align: right; }
.community-message--mine .community-message__body { grid-column: 1; grid-row: 1; }
.community-message--mine .community-message__actions { justify-content: flex-end; }
.community-message--ai { width: 100%; justify-self: stretch; border-color: var(--ink); background: var(--ink); color: var(--paper); }
.community-message__identity { display: grid; align-content: start; gap: 3px; }
.community-message__identity strong { overflow-wrap: anywhere; }
.community-message__identity time, .community-message__identity small { color: var(--muted); font-size: 11px; }
.community-message--ai .community-message__identity strong { color: #f47a50; }
.community-message--ai .community-message__identity time, .community-message--ai .community-message__identity small { color: #c9c0b3; }
.community-message__body { min-width: 0; }
.community-message__body > p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.community-message--withdrawn .community-message__body > p { color: var(--muted); font-style: italic; }
.community-reply-context { margin-bottom: 13px; padding: 9px 0; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.community-message--ai .community-reply-context { color: #c9c0b3; }
.community-message__actions { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 12px; }
.community-message__actions button { min-height: 32px; border: 0; border-bottom: 1px solid transparent; padding: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.community-message__actions button:hover, .community-message__actions button:focus-visible { border-bottom-color: currentColor; color: var(--spark); }
.community-load-more { margin: 12px auto 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--muted); cursor: pointer; }
.community-new-message { position: absolute; z-index: 4; right: clamp(20px, 4vw, 56px); bottom: 18px; min-height: 42px; border: 1px solid var(--ink); border-radius: 0; padding: 0 16px; background: var(--ink); color: var(--paper); cursor: pointer; }
.community-composer { position: relative; z-index: 3; display: grid; gap: 8px; padding: 14px clamp(20px, 4vw, 56px) max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--ink); background: var(--paper-deep); }
.community-compose-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 12px; }
.community-composer textarea, .community-mention-panel input { width: 100%; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); padding: 11px 13px; }
.community-composer textarea { min-height: 54px; max-height: 150px; resize: none; overflow-y: auto; line-height: 1.55; }
.community-compose-row > .button { min-width: 92px; }
.community-composer footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--muted); font-size: 11px; }
.community-compose-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.community-compose-tools label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.community-ai-note { margin: 0; color: var(--muted); font-size: 10px; }
.community-reply-draft { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 11px; border-top: 1px solid var(--spark); border-bottom: 1px solid var(--spark); background: var(--paper); }
.community-reply-draft span { color: var(--spark); font-size: 11px; }
.community-reply-draft strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-reply-draft button { border: 0; background: transparent; cursor: pointer; }
.community-mention-panel { position: absolute; left: clamp(20px, 4vw, 56px); right: clamp(20px, 4vw, 56px); bottom: calc(100% + 8px); z-index: 8; display: grid; gap: 8px; max-height: min(320px, 45dvh); overflow-y: auto; padding: 14px; border: 1px solid var(--ink); background: var(--paper); }
.community-mention-panel [data-member-results] { display: flex; flex-wrap: wrap; gap: 8px; }
.community-mention-panel[hidden], .community-reply-draft[hidden], .community-new-message[hidden], .community-load-more[hidden] { display: none; }
.community-mention-panel [data-member-results] button, .community-selected-mentions button { border: 1px solid var(--line); border-radius: 0; background: transparent; padding: 5px 9px; cursor: pointer; }
.community-selected-mentions { display: flex; flex-wrap: wrap; gap: 7px; }
.community-selected-mentions button { color: var(--spark); }

@media (max-width: 1024px) {
  .community-masthead, .community-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .community-masthead__nav { grid-column: 2; justify-self: end; }
  .community-masthead__channel { display: none; }
  .community-message { width: min(84%, 800px); }
}

@media (max-width: 760px) {
  .community-shell { grid-template-rows: 54px minmax(0, 1fr); }
  .community-masthead { grid-template-columns: minmax(0, 1fr) auto; }
  .community-brand { padding: 0 14px; border-right: 0; }
  .community-brand strong { font-size: 18px; }
  .community-masthead__nav a { display: none; }
  .community-masthead__nav a[href="/write"], .community-masthead__nav a[href="/settings"] { display: inline-flex; padding: 0 11px; }
  .community-masthead__nav a[href="/settings"] { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .community-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .community-channels { display: block; border-right: 0; border-bottom: 1px solid var(--ink); }
  .community-channels > header, .community-channel-tools, .community-channel-note { display: none; }
  .community-channels nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; overflow: hidden; }
  .community-channels nav button { min-height: 56px; padding: 8px 5px; border-right: 1px solid var(--line); border-bottom: 0; text-align: center; }
  .community-channels nav button:nth-child(n + 4) { display: none; }
  .community-channels nav button::after { display: none; }
  .community-channels nav button strong { font-size: 12px; }
  .community-channels nav button span { font-size: 9px; }
  .community-stream { grid-template-rows: auto minmax(0, 1fr) auto; }
  .community-stream-header { min-height: 84px; display: grid; grid-template-columns: 1fr; align-content: center; gap: 7px; padding: 10px 14px; }
  .community-stream-header h2 { font-size: 22px; }
  .community-message-policy { width: 100%; margin-top: 4px; white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
  .community-stream-header > p { grid-column: 1 / -1; align-items: flex-start; white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
  .community-messages { padding: 16px 12px 24px; scrollbar-gutter: auto; }
  .community-message { width: 92%; grid-template-columns: 1fr; gap: 7px; margin-bottom: 12px; padding: 14px; }
  .community-message--mine { grid-template-columns: 1fr; }
  .community-message--mine .community-message__identity, .community-message--mine .community-message__body { grid-column: 1; grid-row: auto; }
  .community-message__identity { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
  .community-message--mine .community-message__identity { justify-content: flex-end; }
  .community-message--ai { width: 100%; }
  .community-composer { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
  .community-compose-row { grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; }
  .community-compose-row > .button { min-width: 0; padding-inline: 8px; }
  .community-composer footer > span, .community-ai-note { display: none; }
  .community-mention-panel { left: 12px; right: 12px; bottom: calc(100% + 6px); max-height: 40dvh; }
  .community-new-message { right: 12px; bottom: 12px; }
}

/* 公开身份与仅本人可见的百分比额度 */
.author-position-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.author-position-list span { min-height: 32px; display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid var(--ink); color: var(--ink); font-size: 13px; font-weight: 700; }
.account-budget-row dd { display: grid; gap: 10px; }
.account-budget-progress { width: 100%; height: 7px; display: block; border: 1px solid var(--ink); background: transparent; }
.account-budget-progress > span { height: 100%; display: block; background: var(--spark); }

@media (max-width: 420px) {
  .community-brand span { display: none; }
  .community-masthead__nav a[href="/settings"] { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .community-compose-tools { gap: 10px; }
}
