:root {
  --ink: #1b1b1a;
  --muted: #6d6b66;
  --paper: #f4f1ea;
  --surface: #fffdf8;
  --line: #ded9cf;
  --accent: #9f2e23;
  --accent-dark: #742017;
  --success: #2d6a4f;
  --danger: #a32620;
  --shadow: 0 18px 60px rgba(52, 42, 31, .09);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 4%, rgba(159,46,35,.055), transparent 24%), radial-gradient(circle at 92% 36%, rgba(141,112,73,.07), transparent 27%), var(--paper); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; }
button, input, select { font: inherit; }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(244, 241, 234, .92); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.topbar-inner { width: min(1180px, calc(100% - 40px)); min-height: 72px; margin: auto; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--accent); border-radius: 10px; }
.version { padding: 2px 7px; color: var(--accent); background: #f0d8d2; border-radius: 99px; font-size: 11px; }
.nav { display: flex; gap: 20px; }
.nav a { position: relative; padding: 25px 0 23px; color: var(--muted); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 700; }
.nav a.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.account { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.account form { margin: 0; }
.link-button { border: 0; padding: 0; color: var(--accent); background: transparent; cursor: pointer; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 88px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-family: "Songti SC", "STSong", serif; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.03em; }
h2 { margin-bottom: 10px; font-size: 24px; }
p { color: var(--muted); line-height: 1.75; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); text-decoration: none; cursor: pointer; }
.button.primary { border-color: var(--accent); color: white; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.wide { width: 100%; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 38px; }
.page-heading > div { max-width: 760px; }
.action-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.action-row.left { justify-content: flex-start; }
.action-row form { margin: 0; }
.page-heading.compact h1 { font-size: clamp(32px, 4vw, 48px); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card, .panel { border: 1px solid var(--line); background: rgba(255,253,248,.92); box-shadow: var(--shadow); }
.stat-card { padding: 24px; border-radius: 16px; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin: 12px 0; font-family: "Songti SC", serif; font-size: 44px; }
.panel { padding: 28px; border-radius: 18px; }
.upload-panel { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.2fr) auto; align-items: end; gap: 24px; margin-bottom: 24px; }
.upload-panel h2 { margin-bottom: 6px; }
.upload-panel p { margin-bottom: 0; font-size: 13px; }
.upload-panel button:disabled { opacity: .48; cursor: not-allowed; }
.upload-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-fields.single-column { grid-template-columns: 1fr; }
.upload-fields label, .file-picker { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.upload-fields input, .upload-fields select, .file-picker input { min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.file-picker { min-width: 300px; }
.confirm-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin: 20px 0; color: var(--muted); line-height: 1.6; }
.confirm-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.cancel-import { margin-top: 18px; }
.form-note { margin-top: 8px !important; }
.login-stage { min-height: calc(100vh - 188px); display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: 0 28px 90px rgba(52,42,31,.14); }
.login-visual { position: relative; min-height: 650px; overflow: hidden; background: #2b2420; }
.login-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,12,10,.04) 24%, rgba(18,12,10,.78) 100%); }
.login-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-visual-copy { position: absolute; z-index: 1; right: 50px; bottom: 48px; left: 50px; color: white; }
.login-kicker { display: block; margin-bottom: 15px; color: #eacdc4; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.login-visual-copy h1 { margin-bottom: 18px; font-size: clamp(42px, 5vw, 68px); line-height: 1.05; }
.login-visual-copy p { max-width: 440px; margin-bottom: 0; color: rgba(255,255,255,.78); }
.login-form-side { display: flex; flex-direction: column; justify-content: center; padding: 70px clamp(38px, 6vw, 88px); }
.login-form-intro h2 { margin-bottom: 8px; font-family: "Songti SC", "STSong", serif; font-size: 38px; }
.login-form-intro p:last-child { margin-bottom: 26px; font-size: 13px; }
.login-card { display: grid; gap: 18px; }
.login-card label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.login-card input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: white; outline: none; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(159, 46, 35, .12); }
.login-footnote { margin: 20px 0 0; color: #8b877f; font-size: 11px; }
.flash-stack { display: grid; gap: 10px; margin-bottom: 24px; }
.flash { padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.flash.error { color: var(--danger); border-color: #e6aaa5; background: #fff2f0; }
.flash.success { color: var(--success); border-color: #acd2be; background: #effaf4; }
.import-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.import-summary span, .count-badge, .pill { padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--surface); font-size: 12px; }
.success { color: var(--success) !important; }
.danger { color: var(--danger) !important; }
.panel + .panel { margin-top: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; }
.panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.panel-actions form { margin: 0; }
.issue-list { display: grid; gap: 10px; }
.issue-list article { display: grid; grid-template-columns: minmax(180px, .7fr) 170px 1.3fr; align-items: start; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.issue-list p { margin: 0; font-size: 13px; }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
th, td { padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { min-width: 320px; }
td small { display: block; max-width: 520px; margin-top: 7px; color: var(--muted); line-height: 1.55; }
.pill.nowrap { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-library-table { table-layout: fixed; }
.topic-library-table th:nth-child(2) { width: 136px; }
.topic-library-table th:nth-child(3) { width: 112px; }
.topic-library-table th:nth-child(4) { width: 116px; }
.topic-library-table td:first-child { min-width: 0; }
.topic-mobile-meta { display: none; }
.short-id { display: inline-block; white-space: nowrap; }
.empty-inline, .empty-panel { padding: 44px 0; text-align: center; }
.empty-panel { min-height: 55vh; display: grid; place-content: center; justify-items: center; }
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.client-card { display: flex; flex-direction: column; min-height: 330px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.client-card h2 { margin: 20px 0 8px; font-family: "Songti SC", serif; font-size: 30px; }
.client-card p { flex: 1; }
.client-card-top, .client-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.client-card-meta { margin: 18px 0; color: var(--muted); font-size: 11px; }
.status-dot { color: var(--success); font-size: 11px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-row span { padding: 5px 8px; border-radius: 7px; color: var(--muted); background: #eee9df; font-size: 11px; }
.tag-row.positive span { color: var(--success); background: #e7f3ec; }
.tag-row.warning span { color: #8a5c00; background: #fff1c9; }
.profile-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.spaced-panel { margin-top: 18px; }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 20px 0; }
.profile-facts div { padding: 12px 0; border-top: 1px solid var(--line); }
.profile-facts dt { color: var(--muted); font-size: 11px; }
.profile-facts dd { margin: 5px 0 0; font-weight: 700; }
.boundary-panel h2 { margin-top: 22px; font-size: 15px; }
.plain-list { margin: 8px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.danger-list { color: var(--danger); }
.profile-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.profile-columns h3 { font-size: 14px; }
.record-list { display: grid; }
.record-list a { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.record-list a:last-child { border-bottom: 0; }
.record-list span, .record-list small { color: var(--muted); font-size: 12px; }
.boundary-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #e4bbb5; border-radius: 12px; background: #fff6f4; }
.boundary-strip strong { color: var(--accent); margin-right: 8px; }
.boundary-strip span { padding: 4px 8px; border-radius: 99px; background: white; color: var(--muted); font-size: 12px; }
.history-filter-note { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; padding: 13px 16px; border: 1px solid #b9d5c5; border-radius: 12px; color: var(--muted); background: #eff8f3; font-size: 12px; }
.history-filter-note strong { color: var(--success); }
.history-filter-note a { flex: none; color: var(--success); font-weight: 700; }
.workflow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: -12px 0 24px; }
.workflow-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; min-height: 88px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.62); opacity: .48; }
.workflow-step[href] { text-decoration: none; transition: border-color .16s ease, transform .16s ease, opacity .16s ease; }
.workflow-step[href]:hover { border-color: #b9aea0; opacity: 1; transform: translateY(-2px); }
.workflow-step > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; color: var(--muted); background: #ebe6dd; font-size: 10px; font-weight: 800; }
.workflow-step strong, .workflow-step small { display: block; }
.workflow-step small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.workflow-step strong em { margin-left: 4px; padding: 2px 6px; border-radius: 99px; color: #8a5c00; background: #fff1c9; font-size: 9px; font-style: normal; }
.workflow-step.active { border-color: var(--accent); background: #fff6f4; opacity: 1; box-shadow: 0 8px 24px rgba(52,42,31,.06); }
.workflow-step.active > span { color: white; background: var(--accent); }
.workflow-step.done { opacity: 1; }
.workflow-step.done > span { color: var(--success); background: #e7f3ec; }
.history-anchor { scroll-margin-top: 104px; }
.history-panel { margin-bottom: 18px; }
.history-panel .panel-heading { margin-bottom: 14px; }
.batch-control-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.batch-control-strip > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.batch-control-strip > div span { padding-left: 9px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.batch-management { position: relative; flex: none; }
.batch-management summary { color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 700; }
.batch-management-menu { position: absolute; right: 0; z-index: 6; display: grid; gap: 9px; width: 270px; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.batch-management-menu form, .batch-management-menu .button { width: 100%; }
.batch-management-menu small { color: var(--muted); line-height: 1.55; }
.danger-button { border-color: #e6aaa5; color: var(--danger); background: #fff2f0; }
.batch-overview { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.batch-overview span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--surface); font-size: 12px; }
.filter-bar.batch-filters { grid-template-columns: minmax(220px, 1fr) 220px auto; }
.batch-bulk-toolbar { position: sticky; top: 82px; z-index: 5; display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,248,.96); box-shadow: 0 8px 24px rgba(52,42,31,.08); }
.batch-bulk-toolbar label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.batch-bulk-toolbar input, .batch-select input { width: 18px; height: 18px; accent-color: var(--accent); }
.batch-bulk-toolbar span { margin-left: auto; color: var(--muted); font-size: 12px; }
.batch-bulk-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.batch-list { display: grid; gap: 12px; }
.batch-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.batch-card.detailed { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 22px 24px; }
.batch-card.detailed.has-selection { grid-template-columns: auto 1fr auto; }
.batch-select { align-self: start; padding-top: 4px; cursor: pointer; }
.batch-card-main h2 { margin-bottom: 6px; }
.batch-card-main p { margin-bottom: 12px; font-size: 12px; }
.batch-card-actions { display: grid; justify-items: end; gap: 16px; min-width: 150px; }
.batch-metrics { display: flex; flex-wrap: wrap; gap: 7px; }
.batch-metrics span { padding: 5px 8px; border-radius: 7px; color: var(--muted); background: #eee9df; font-size: 11px; }
.protected-note { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }
.batch-progress { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 99px; color: #8a5c00; background: #fff1c9; font-size: 11px; font-weight: 700; }
.batch-progress.complete { color: var(--success); background: #e7f3ec; }
.batch-progress.archived { color: var(--muted); background: #ebe7df; }
.batch-progress.writing { color: var(--accent); background: #f0d8d2; }
.batch-list.compact { margin-bottom: 8px; }
.batch-list.compact .batch-card { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; padding: 15px 16px; text-decoration: none; box-shadow: none; }
.batch-list.compact .batch-card span:first-child strong, .batch-list.compact .batch-card span:first-child small { display: block; }
.batch-list.compact .batch-card span:first-child small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.batch-arrow { color: var(--accent); font-size: 12px; font-weight: 700; }
.batch-resume-panel { margin-bottom: 18px; }
.writing-batch-list { display: grid; gap: 18px; }
.writing-batch + .writing-batch { margin-top: 0; }
.client-tabs { display: flex; gap: 9px; margin-bottom: 16px; padding-bottom: 4px; overflow-x: auto; }
.client-tab { flex: none; min-width: 150px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,248,.62); text-decoration: none; }
.client-tab strong, .client-tab small { display: block; }
.client-tab small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.client-tab.active { border-color: var(--accent); background: #fff6f4; box-shadow: 0 8px 24px rgba(52,42,31,.06); }
.download-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.download-toolbar.sticky-download-toolbar { position: sticky; top: 82px; z-index: 5; box-shadow: 0 8px 24px rgba(52,42,31,.08); }
.download-toolbar label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.download-toolbar label input, .download-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.download-toolbar > span { margin-left: auto; color: var(--muted); font-size: 12px; }
.download-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.writing-action-toolbar { flex-wrap: wrap; border-color: #d8b9b1; background: linear-gradient(100deg, #fff8f5, #fffdf8); }
.selection-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.selection-presets .button { min-height: 38px; padding: 0 13px; font-size: 12px; }
.download-record-list { display: grid; }
.download-record { display: grid; grid-template-columns: 28px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.download-record:last-child { border-bottom: 0; }
.download-check { display: grid; place-items: center; padding: 16px 0; }
.download-check input:disabled { opacity: .3; }
.download-record > a { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; min-width: 0; padding: 16px 4px; text-decoration: none; }
.download-record span, .download-record small { color: var(--muted); font-size: 12px; }
.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; }
.managed-record-list { display: grid; }
.managed-record { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.managed-record:last-child { border-bottom: 0; }
.managed-record > a { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 16px 4px; text-decoration: none; }
.managed-record span, .managed-record small { color: var(--muted); font-size: 12px; }
.managed-record form { margin: 0; }
.ai-match-panel { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; margin-bottom: 18px; padding: 18px; border: 1px solid #d5c8a9; border-radius: 13px; background: #fff9e9; }
.ai-match-panel span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.ai-match-panel label { color: var(--muted); font-size: 12px; }
.ai-match-panel input { width: 72px; min-height: 40px; margin-left: 7px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; }
.ai-match-panel button:disabled { opacity: .48; cursor: not-allowed; }
.subsection-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 30px 0 14px; }
.subsection-heading h2 { margin-bottom: 5px; }
.subsection-heading p:last-child { margin-bottom: 0; font-size: 13px; }
.filter-bar { display: grid; grid-template-columns: 1fr 230px auto; gap: 10px; margin-bottom: 18px; }
.filter-bar.four-filters { grid-template-columns: minmax(240px, 1fr) 210px 210px auto; }
.filter-bar input, .filter-bar select { min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.selection-toolbar { position: sticky; top: 86px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,248,.96); box-shadow: 0 8px 24px rgba(52,42,31,.08); }
.selection-toolbar span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.topic-card-list { display: grid; gap: 9px; }
.topic-choice { display: grid; grid-template-columns: 22px 1fr; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; }
.topic-choice:hover { border-color: #c7beb0; }
.topic-choice.blocked { opacity: .58; cursor: not-allowed; }
.topic-choice input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.topic-index { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; color: var(--accent); background: #f0d8d2; font-size: 11px; font-weight: 800; }
.topic-choice-main, .topic-choice-head, .topic-summary, .topic-meta { display: block; }
.topic-choice-head { display: flex; justify-content: space-between; gap: 16px; }
.topic-choice-head > span { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.topic-choice-head a { text-decoration: none; }
.topic-summary { margin-top: 7px; color: var(--muted); line-height: 1.6; }
.topic-meta { margin-top: 9px; color: #8b877f; font-size: 11px; }
.fit-badge { flex: none; height: fit-content; padding: 4px 8px; border-radius: 99px; font-size: 10px; font-style: normal; }
.fit-badge.recommended { color: var(--success); background: #e7f3ec; }
.fit-badge.review { color: #8a5c00; background: #fff1c9; }
.fit-badge.blocked { color: var(--danger); background: #f9dedb; }
.copy-result { max-width: 860px; margin: auto; }
.copy-result > h3 { margin-top: 30px; color: var(--accent); }
.copy-segment { padding: 18px 0; border-top: 1px solid var(--line); }
.copy-segment > strong { color: var(--accent); }
.copy-segment p { margin: 10px 0 0; color: var(--ink); font-family: "FangSong", "STFangsong", serif; font-size: 18px; line-height: 1.85; }
.copy-result blockquote { margin: 0; padding: 18px 22px; border-left: 4px solid var(--accent); background: #f6ece9; font-family: "Songti SC", serif; font-size: 20px; }
.decision-panel { display: grid; grid-template-columns: .8fr 1.4fr auto; align-items: center; gap: 28px; margin-bottom: 22px; }
.decision-panel h2 { margin-bottom: 6px; }
.decision-panel p { margin-bottom: 0; font-size: 13px; }
.decision-options { display: grid; gap: 9px; }
.decision-option { display: grid; grid-template-columns: 22px 1fr; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.decision-option:has(input:checked) { border-color: var(--accent); background: #fff6f4; }
.decision-option input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--accent); }
.decision-option strong, .decision-option small { display: block; }
.decision-option small { margin-top: 4px; color: var(--muted); line-height: 1.5; }
.link-panel label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.link-copy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.link-copy-row input { min-width: 0; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.customer-review-page { min-height: 100vh; background: #f4f1ea; }
.customer-review-shell { width: min(760px, calc(100% - 28px)); margin: auto; padding: 54px 0 110px; }
.customer-review-head { display: grid; grid-template-columns: 44px 1fr; gap: 18px; margin-bottom: 30px; }
.customer-review-head .brand-mark { width: 44px; height: 44px; }
.customer-review-head h1 { font-size: clamp(32px, 7vw, 52px); }
.customer-submit-bar { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.96); box-shadow: var(--shadow); }
.customer-submit-bar span { color: var(--muted); font-size: 11px; }
.member-create-panel { display: grid; grid-template-columns: .65fr 1.35fr; align-items: end; gap: 42px; }
.member-create-panel p { margin-bottom: 0; font-size: 13px; }
.member-create-form { display: grid; grid-template-columns: 1fr 150px 1fr 1fr auto; align-items: end; gap: 10px; }
.member-create-form label, .member-action-menu label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.member-create-form input, .member-create-form select, .member-action-menu input, .member-action-menu select { min-width: 0; height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.member-list { display: grid; }
.member-row { display: grid; grid-template-columns: 1fr 220px auto; align-items: center; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row.inactive { opacity: .56; }
.member-identity { display: flex; align-items: center; gap: 13px; }
.member-identity strong, .member-identity small, .member-time small, .member-time span { display: block; }
.member-identity small, .member-time small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.member-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--accent); background: #f0d8d2; font-family: "Songti SC", serif; font-size: 19px; font-weight: 800; }
.member-time span { margin-top: 4px; font-size: 12px; }
.member-actions { position: relative; }
.member-actions summary { min-width: 76px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; text-align: center; cursor: pointer; list-style: none; }
.member-actions summary::-webkit-details-marker { display: none; }
.member-action-menu { position: absolute; z-index: 7; right: 0; display: grid; gap: 14px; width: 330px; margin-top: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.member-action-menu form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 9px; margin: 0; }
.member-action-menu form:nth-child(2) { grid-template-columns: 1fr 1fr auto; }
.member-action-menu form:last-child { grid-template-columns: 1fr; }

@media (max-width: 760px) {
  .topbar-inner { width: min(100% - 24px, 1180px); flex-wrap: wrap; gap: 12px 16px; padding: 10px 0; }
  .nav { order: 3; display: flex; width: 100%; gap: 18px; padding: 2px 0 3px; overflow-x: auto; }
  .nav a { flex: none; padding: 4px 0 7px; white-space: nowrap; }
  .account { margin-right: 6px; }
  .account span { display: none; }
  .page-shell { width: min(100% - 24px, 1180px); padding-top: 34px; }
  .page-heading { display: grid; gap: 24px; }
  .stats-grid, .client-grid, .profile-layout, .profile-columns, .decision-panel, .workflow-steps, .upload-panel, .upload-fields { grid-template-columns: 1fr; }
  .file-picker { min-width: 0; }
  .workflow-step { min-height: auto; }
  .filter-bar, .filter-bar.four-filters { grid-template-columns: 1fr; }
  .ai-match-panel { grid-template-columns: 1fr; }
  .selection-toolbar { top: 112px; align-items: flex-start; }
  .record-list a { grid-template-columns: 1fr; gap: 6px; }
  .issue-list article { grid-template-columns: 1fr; gap: 5px; }
  .link-copy-row { grid-template-columns: 1fr; }
  .customer-submit-bar { align-items: stretch; flex-direction: column; }
  .topic-library-table { table-layout: auto; }
  .topic-library-table thead { display: none; }
  .topic-library-table tr { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .topic-library-table td { display: none; padding: 0; border: 0; }
  .topic-library-table td:first-child { display: block; }
  .topic-mobile-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
  .history-filter-note, .batch-control-strip { align-items: flex-start; flex-direction: column; }
  .batch-management { width: 100%; }
  .batch-management-menu { position: static; width: 100%; }
  .filter-bar.batch-filters { grid-template-columns: 1fr; }
  .batch-card.detailed, .batch-card.detailed.has-selection, .batch-list.compact .batch-card { grid-template-columns: 1fr; align-items: start; }
  .batch-bulk-toolbar { top: 112px; flex-wrap: wrap; }
  .batch-bulk-toolbar span { margin-left: 0; }
  .download-toolbar, .download-record > a { align-items: flex-start; grid-template-columns: 1fr; }
  .download-toolbar { flex-wrap: wrap; }
  .download-toolbar.sticky-download-toolbar { top: 112px; }
  .download-toolbar > span { width: 100%; margin-left: 26px; }
  .download-record { align-items: start; }
  .download-record > a { gap: 7px; }
  .managed-record, .managed-record > a { grid-template-columns: 1fr; gap: 7px; }
  .managed-record { padding: 14px 0; }
  .managed-record > a { padding: 0; }
  .batch-card-actions { display: flex; width: 100%; justify-content: space-between; align-items: center; }
  .batch-list.compact .batch-arrow { display: none; }
  .panel-heading { flex-wrap: wrap; align-items: flex-start; }
  .panel-actions { width: 100%; justify-content: flex-start; }
  .login-stage { grid-template-columns: 1fr; border-radius: 20px; }
  .login-visual { min-height: 390px; }
  .login-visual-copy { right: 26px; bottom: 26px; left: 26px; }
  .login-visual-copy h1 { font-size: 40px; }
  .login-form-side { padding: 40px 26px 46px; }
  .writing-action-toolbar { align-items: stretch; }
  .writing-action-toolbar .selection-presets { width: 100%; }
  .writing-action-toolbar .selection-presets .button { flex: 1; }
  .member-create-panel, .member-create-form, .member-row { grid-template-columns: 1fr; }
  .member-time { display: none; }
  .member-actions { width: 100%; }
  .member-actions summary { width: 100%; }
  .member-action-menu { position: static; width: 100%; }
  .member-action-menu form, .member-action-menu form:nth-child(2) { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
}
