



@font-face {
  font-family:"Pretendard Variable";
  src:url("/assets/fonts/PretendardVariable.woff2") format("woff2");
  font-weight:45 920;
  font-style:normal;
  font-display:swap;
}
:root {
  --font-ui:"Pretendard Variable","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
  --bg:#f5f4ef;
  --paper:#fffefb;
  --ink:#29372f;
  --muted:#5b665e;
  --line:#e5e6dd;
  --green:#315743;
  --soft:#eaf0e8;
  --amber:#f6ecd6}
* {
  box-sizing:border-box}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-ui);
  font-size:1rem}
button,input,textarea,select {
  font:inherit}
button {
  cursor:pointer;
  border:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  border-radius:8px;
  padding:9px 13px}
button:hover {
  background:var(--soft)}
button:disabled {
  opacity:.5;
  cursor:default}
button:focus-visible,a:focus-visible {
  outline:2px solid #5c876b;
  outline-offset:3px}
input,textarea,select {
  border:1px solid #d9ddd4;
  background:white;
  color:var(--ink);
  border-radius:8px;
  padding:11px;
  max-width:100%}
textarea {
  resize:vertical;
  line-height:1.7}
label {
  display:grid;
  gap:8px;
  color:#58645a;
  font-size:.875rem}
small {
  font-size:.875rem}
.primary {
  background:var(--green);
  color:#fff;
  border-color:var(--green)}
.primary:hover {
  background:#244533}
.muted {
  color:var(--muted);
  line-height:1.8}
.eyebrow {
  font-size:.875rem;
  font-weight:700;
  letter-spacing:2px;
  color:#536158}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  text-decoration:none;
  color:var(--ink);
  font-family:var(--font-ui);
  font-size:2.875rem;
  line-height:1}
.shell {
  display:grid;
  grid-template-columns:252px minmax(0,1fr);
  min-height:100vh}
.sidebar {
  border-right:1px solid var(--line);
  background:#eeefe8;
  padding:26px 18px;
  display:flex;
  flex-direction:column;
  gap:22px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto}
.role-label {
  font-size:.875rem;
  letter-spacing:1px;
  color:#536158;
  margin:10px 12px -8px}
nav {
  display:grid;
  gap:4px}
.nav {
  display:flex;
  align-items:center;
  gap:13px;
  text-align:left;
  border:0;
  background:transparent;
  font-size:1.125rem;
  padding:12px 14px}
.nav span {
  font-size:.875rem}
.nav.active {
  background:#dfe8da;
  color:#31543c;
  font-weight:700}
.side-heading {
  font-size:.875rem;
  color:#536158;
  padding:0 10px;
  display:flex;
  justify-content:space-between}
.book-list {
  display:grid;
  gap:8px}
.book {
  display:flex;
  gap:12px;
  border:1px solid transparent;
  background:transparent;
  text-align:left;
  padding:12px 8px;
  align-items:center;
  width:100%}
.book.selected {
  background:#fafbf7;
  border-color:#d7dfcf}
.book b {
  font-size:.875rem;
  line-height:1.8;
  display:block;
  word-break:keep-all}
.book small {
  display:block;
  color:#536158;
  font-size:.875rem;
  margin-top:5px}
.new-book {
  border:1px dashed #bdc9b6;
  background:transparent;
  font-size:.875rem}
.side-bottom {
  margin-top:auto;
  border-top:1px solid var(--line);
  padding-top:22px;
  display:flex;
  gap:10px;
  align-items:center}
.side-bottom b {
  font-size:.875rem}
.side-bottom small {
  display:block;
  color:var(--muted);
  margin-top:4px}
.side-bottom button {
  margin-left:auto;
  background:transparent;
  border:0}
.avatar {
  width:34px;
  height:34px;
  background:#d9e0d0;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex-shrink:0;
  color:#557044;
  font-size:.875rem}
.avatar.soft {
  background:#f0e8d7;
  color:#536158}
.global-header {
  height:65px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 36px;
  font-size:.875rem;
  color:#536158;
  gap:12px}
.header-right {
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
  font-size:.875rem;
  color:#536158}
.header-right button {
  margin-left:15px;
  padding:6px 9px;
  font-size:.875rem}
.mobile-menu {
  display:none}
.work-header {
  padding:38px 40px 30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px}
.work-header h1 {
  font-family:var(--font-ui);
  font-size:1.75rem;
  line-height:1.5;
  font-weight:600;
  margin:10px 0;
  color:#334735;
  letter-spacing:-1px}
.work-header p {
  font-size:.875rem;
  color:var(--muted);
  margin:0;
  line-height:1.8}
.work-actions {
  display:flex;
  gap:8px}
.work-actions button {
  font-size:.875rem;
  white-space:nowrap}
.workspace {
  padding:0 32px 40px 40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:24px;
  align-items:start}
.writing {
  min-width:0;
  border:1px solid var(--line);
  background:var(--paper);
  border-radius:12px;
  overflow:hidden}
.chapter-bar {
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px 20px;
  border-bottom:1px solid var(--line);
  font-size:.875rem}
.chapter-bar>button {
  border:0;
  padding:4px;
  background:transparent;
  font-size:.875rem}
.chapter-bar button span {
  margin-left:12px;
  color:#536158}
#outline-btn .outline-chevron {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:4px;
  color:inherit;
}
#outline-btn .outline-chevron .ui-icon { width:16px; height:16px; transition:transform .15s ease; }
#outline-btn[aria-expanded="true"] .outline-chevron .ui-icon { transform:rotate(180deg); }
#save-status {
  margin-left:auto;
  color:#536158;
  cursor:pointer}
.badge {
  display:inline-block;
  border-radius:4px;
  background:var(--soft);
  color:#536158;
  padding:4px 7px;
  font-size:.875rem;
  white-space:nowrap}
.badge.amber {
  background:var(--amber);
  color:#536158}
.toolbar {
  display:flex;
  gap:3px;
  align-items:center;
  padding:9px 14px;
  border-bottom:1px solid var(--line);
  background:#fcfcf8;
  overflow:auto}
.toolbar button {
  border:0;
  background:transparent;
  padding:7px 10px;
  font-size:.875rem;
  white-space:nowrap}
.toolbar button:hover {
  background:var(--soft)}
.toolbar .attach-tool {
  margin-left:auto;
  color:#536158}
.separator {
  height:16px;
  width:1px;
  background:var(--line);
  margin:0 6px}
.paper {
  padding:48px clamp(24px,4vw,68px) 30px;
  max-width:960px;
  margin:auto}
.paper>.eyebrow {
  font-size:.875rem;
  letter-spacing:1px}
.paper h2 {
  font-family:var(--font-ui);
  font-weight:400;
  font-size:2rem;
  line-height:1.5;
  margin:13px 0 34px;
  color:#293d2d}
.manuscript {
  font-family:var(--font-ui);
  font-size:1rem;
  line-height:2.05;
  color:#485344;
  min-height:300px;
  outline:none;
  overflow-wrap:anywhere}
.manuscript:focus {
  box-shadow:-3px 0 #edf0e7}
.manuscript p {
  margin:0 0 1.4em}
.manuscript blockquote {
  margin:1.4em 0;
  border-left:2px solid #b7c6ab;
  padding:5px 18px;
  background:#f4f6ee}
.manuscript h2 {
  font-size:1.4375rem}
.manuscript a {
  color:var(--green)}
.paper-footer {
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:40px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:.875rem;
  color:#536158}
.chapter-files {
  border-top:1px solid var(--line);
  margin-top:30px;
  padding-top:8px}
.section-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:20px 0 14px}
.section-title h3,.section-title h2 {
  font-size:.875rem;
  margin:0}
.section-title span,.section-title small {
  color:var(--muted);
  font-size:.875rem}
.chapter-files>.muted {
  font-size:.875rem}
.file-row {
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid var(--line);
  border-radius:7px;
  padding:11px;
  margin-top:8px;
  min-width:0}
.file-icon {
  font-size:.875rem;
  background:#eaf0e4;
  padding:10px 7px;
  border-radius:4px;
  min-width:38px;
  text-align:center}
.file-row>span:nth-child(2) {
  flex:1;
  min-width:0}
.file-row b {
  font-size:.875rem;
  display:block;
  overflow-wrap:anywhere}
.file-row small {
  font-size:.875rem;
  color:var(--muted);
  display:block;
  margin-top:5px}
.file-row button {
  font-size:.875rem;
  border:0;
  padding:5px}
.collaboration {
  min-width:0;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfcf8;
  overflow:hidden;
  position:sticky;
  top:18px}
.panel-title {
  display:flex;
  gap:10px;
  padding:19px 16px;
  align-items:center}
.panel-title b {
  font-size:.875rem}
.panel-title small {
  font-size:.875rem;
  display:block;
  margin-top:5px;
  color:#536158}
.panel-title button {
  display:none}
.tabs {
  display:flex;
  border-bottom:1px solid var(--line);
  padding:0 12px;
  gap:12px}
.tabs button {
  flex:1;
  border:0;
  background:transparent;
  border-radius:0;
  font-size:.875rem;
  padding:14px 6px}
.tabs button.active {
  border-bottom:2px solid #658054;
  color:#4b693e;
  font-weight:700}
.tabs span {
  font-size:.875rem;
  margin-left:3px}
.context-label {
  font-size:.875rem;
  color:#536158;
  padding:13px 18px;
  border-bottom:1px solid var(--line)}
.thread {
  padding:18px;
  max-height:390px;
  overflow:auto;
  min-height:175px}
.message {
  margin-bottom:18px}
.message>small {
  font-size:.875rem;
  color:#536158}
.message p {
  white-space:pre-wrap;
  background:#fff;
  border:1px solid var(--line);
  padding:12px;
  font-size:.875rem;
  line-height:1.9;
  border-radius:0 10px 10px;
  margin:7px 0}
.message.mine p {
  background:#eaf0e4}
.message blockquote {
  font-size:.875rem;
  margin:7px 0;
  padding:10px 12px;
  border-left:2px solid #c9b581;
  color:#536158;
  background:#fbf5e7}
.resolve {
  font-size:.875rem;
  padding:4px 7px;
  border:0;
  color:#536158;
  background:transparent}
.thread-empty {
  text-align:center;
  padding:15px 0;
  color:#536158}
.thread-empty p {
  font-size:.875rem}
.thread-empty small {
  font-size:.875rem}
.composer {
  border-top:1px solid var(--line);
  padding:14px}
.composer textarea {
  width:100%;
  font-size:.875rem;
  min-height:85px;
  border-color:#e4e8dd}
.composer>div:last-child {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:9px}
.composer small {
  font-size:.875rem;
  color:#536158}
.composer button {
  font-size:.875rem;
  padding:7px 12px}
.composer label {
  font-size:.875rem;
  margin-bottom:10px}
.composer select {
  font-size:.875rem;
  padding:5px}
#quote-preview {
  font-size:.875rem;
  line-height:1.7;
  color:#536158;
  margin-bottom:6px;
  max-height:60px;
  overflow:auto}
.panel-hint,.reader-note {
  font-size:.875rem;
  line-height:1.8;
  color:#536158;
  padding:14px 18px;
  border-bottom:1px solid var(--line)}
.outline {
  padding:10px 18px;
  background:#f4f6ef;
  border-bottom:1px solid var(--line)}
.outline[hidden],.outline button[hidden] {
  display:none}
.outline button {
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  font-size:.875rem}
.outline .selected {
  background:#e4ebdc}
.outline small {
  font-size:.875rem;
  color:#536158}
.outline button small:last-child {
  margin-left:auto}
.mobile-bottom {
  display:none}
.page-content {
  max-width:1200px;
  margin:auto;
  padding:44px 40px}
.page-content h1 {
  font-family:var(--font-ui);
  font-size:1.875rem;
  line-height:1.5;
  font-weight:600;
  line-height:1.6;
  letter-spacing:-1px}
.card {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  padding:24px;
  margin:18px 0}
.brief {
  max-width:750px}
.brief p {
  line-height:2;
  white-space:pre-wrap}
.brief hr {
  border:0;
  border-top:1px solid var(--line);
  margin:25px 0}
.stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
  margin:30px 0}
.stat {
  padding:22px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper)}
.stat>small {
  color:var(--muted);
  font-size:.875rem}
.stat strong {
  display:block;
  font-family:var(--font-ui);
  font-size:2.25rem;
  line-height:1.5;
  font-weight:400;
  margin-top:15px}
.stat strong span {
  font-family:var(--font-ui);
  font-size:0.875rem;
  line-height:1.5;
  font-weight:400;
  color:var(--muted);
  margin-left:8px}
.assignment {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  margin:8px 0;
  padding:20px 24px}
.assignment h3 {
  font-size:1rem;
  margin:12px 0 7px}
.assignment p {
  color:var(--muted);
  font-size:.875rem}
.assignment form {
  display:flex;
  gap:8px;
  flex-shrink:0}
.assignment select,.assignment button {
  font-size:.875rem}
.editor-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px}
.editor-grid .card {
  margin:0}
.person {
  display:flex;
  gap:12px;
  align-items:center}
.person h3 {
  font-size:.875rem;
  margin:0 0 6px}
.person small {
  font-size:.875rem;
  color:var(--muted)}
.load-label {
  display:flex;
  justify-content:space-between;
  font-size:.875rem;
  margin:24px 0 10px;
  color:var(--muted)}
.progress {
  height:5px;
  background:#e9ece3;
  border-radius:8px;
  overflow:hidden}
.progress i {
  display:block;
  background:#8da47a;
  height:100%}
.audit p {
  font-size:.875rem;
  line-height:1.9}
.audit span {
  color:#536158;
  margin-right:10px}
.welcome {
  max-width:1150px;
  margin:auto;
  padding:55px 40px}
.welcome h1 {
  font-family:var(--font-ui);
  font-size:3rem;
  line-height:1.5;
  font-weight:600;
  letter-spacing:-2px;
  margin:24px 0}
.welcome>p {
  line-height:2;
  color:var(--muted)}
.login-cards {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:40px}
.login-cards button {
  text-align:left;
  padding:26px;
  background:var(--paper);
  border-radius:14px}
.login-cards small {
  color:#536158}
.login-cards h2 {
  font-size:1.125rem;
  font-weight:500}
.login-cards span {
  color:#536158;
  font-size:.875rem}
.welcome footer {
  font-size:.875rem;
  color:#536158;
  margin-top:36px}
dialog {
  border:1px solid var(--line);
  border-radius:16px;
  padding:36px;
  width:min(720px,calc(100% - 28px));
  max-height:88vh;
  color:var(--ink);
  background:var(--paper)}
dialog::backdrop {
  background:#20312470;
  backdrop-filter:blur(3px)}
dialog h2 {
  font-family:var(--font-ui);
  font-size:1.625rem;
  line-height:1.5;
  font-weight:600}
dialog form {
  display:grid;
  gap:20px}
.close {
  position:absolute;
  right:15px;
  top:12px;
  border:0;
  font-size:1.5rem;
  background:transparent}
dialog .import-zone {
  padding:20px;
  border:1px dashed #cbd6c1;
  border-radius:10px;
  background:#f5f7ef}
.import-zone p {
  font-size:.875rem;
  color:var(--muted)}
.import-zone small {
  display:block;
  font-size:.875rem;
  color:#536158}
.import-zone input {
  margin-top:15px;
  width:100%;
  font-size:.875rem}
.import-summary {
  background:var(--soft);
  padding:18px;
  font-size:.875rem;
  border-radius:8px;
  margin-bottom:20px;
  line-height:1.8}
.import-summary small {
  color:#536158}
.import-item {
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:10px}
.import-item input {
  flex:1;
  min-width:0;
  font-size:.875rem}
.import-item select {
  font-size:.875rem}
.import-body {
  white-space:pre-wrap;
  font-size:.875rem;
  line-height:1.9;
  max-height:220px;
  overflow:auto}
details summary {
  font-size:.875rem;
  color:#536158;
  cursor:pointer;
  margin:8px 0}
.preview-chapter {
  margin:30px 0;
  border-top:1px solid var(--line);
  padding-top:24px}
.preview-chapter .manuscript {
  min-height:0;
  font-size:1rem}
#toast {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translate(-50%,20px);
  background:#2c4231;
  color:#fff;
  font-size:.875rem;
  padding:14px 22px;
  border-radius:10px;
  box-shadow:0 8px 30px #20312420;
  opacity:0;
  pointer-events:none;
  transition:.2s;
  z-index:100;
  max-width:90vw;
  line-height:1.7}
#toast.show {
  opacity:1;
  transform:translate(-50%,0)}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0)}
.empty {
  padding:50px}
.empty h1 {
  font-family:var(--font-ui);
  font-size:1.75rem;
  line-height:1.5;
  font-weight:600}

.plan-field {
  border-top:1px solid var(--line);
  padding-top:22px;
  margin-top:22px}
.plan-field>small {
  color:#536158;
  letter-spacing:.5px}
.plan-field p {
  font-size:1rem;
  margin:10px 0}
.chapter-bar .history-button {
  font-size:.875rem;
  color:#536158;
  margin-left:auto;
  border:1px solid var(--line);
  padding:5px 8px}
.chapter-bar #save-status {
  margin-left:0;
  white-space:nowrap}
.outline-actions {
  display:flex;
  gap:10px;
  border-top:1px solid var(--line);
  margin-top:8px;
  padding-top:8px}
.outline-actions button {
  font-size:.875rem;
  width:auto}
.outline-edit-row {
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid var(--line);
  padding:18px;
  border-radius:10px;
  margin:12px 0;
  background:#f6f8f1}
.outline-edit-row>div:first-of-type {
  flex:1;
  min-width:0;
  display:grid;
  gap:12px}
.outline-edit-row label {
  font-size:.875rem}
.outline-edit-row input {
  font-size:.875rem;
  min-width:0;
  width:100%}
.outline-edit-row label small {
  color:var(--muted)}
.outline-number {
  font-size:.875rem;
  color:#536158;
  margin-top:24px}
.reorder-buttons {
  display:grid;
  gap:8px;
  margin-top:24px}
.reorder-buttons button {
  padding:6px 10px}
.revision-layout {
  display:grid;
  grid-template-columns:155px minmax(0,1fr);
  gap:20px}
.revision-list {
  max-height:55vh;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px}
.revision-list button {
  flex:0 0 auto;
  text-align:left;
  padding:12px}
.revision-list button.selected {
  background:var(--soft);
  border-color:#b9c9aa}
.revision-list b {
  font-size:.875rem;
  display:block;
  margin-bottom:5px}
.revision-list small {
  display:block;
  font-size:.875rem;
  color:#536158;
  line-height:1.8}
.revision-preview {
  min-width:0}
.revision-preview .section-title {
  margin-top:0;
  flex-wrap:wrap}
.revision-preview .section-title b {
  font-size:.875rem}
.revision-preview button {
  font-size:.875rem}
.revision-preview .manuscript {
  font-size:1rem;
  max-height:55vh;
  overflow:auto;
  min-height:150px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px}
.composer textarea:disabled {
  background:#f1f3ec}
.draft-label {
  color:#536158}
.progress-card {
  font-size:.875rem}

@media(min-width:1600px) {
  .workspace {
  grid-template-columns:minmax(0,1fr) 330px;
  max-width:1500px}
.work-header {
  max-width:1500px}
}

@media(max-width:1200px) {
  .shell {
  grid-template-columns:210px minmax(0,1fr)}
.sidebar {
  padding:24px 12px}
.workspace {
  padding:0 22px 30px;
  gap:16px;
  grid-template-columns:minmax(0,1fr) 270px}
.work-header {
  padding:30px 24px;
  align-items:flex-start;
  flex-direction:column}
.paper {
  padding:35px 28px}
.global-header {
  padding:0 24px}
.assignment {
  align-items:flex-start;
  flex-direction:column}
.stat {
  padding:17px}
.stat>small {
  font-size:.875rem}
}

@media(max-width:980px) {
  .shell {
  grid-template-columns:185px minmax(0,1fr)}
.workspace {
  display:block}
.collaboration {
  position:fixed;
  inset:70px 18px 70px auto;
  width:340px;
  z-index:20;
  display:none;
  box-shadow:0 8px 60px #243a2930;
  overflow:auto}
.collaboration.open {
  display:block}
.panel-title button {
  display:block;
  margin-left:auto;
  border:0;
  background:transparent}
.mobile-bottom {
  display:flex;
  position:fixed;
  bottom:0;
  left:185px;
  right:0;
  z-index:15;
  background:#fafbf5;
  border-top:1px solid var(--line);
  justify-content:space-around;
  padding:12px}
.mobile-bottom button {
  border:0;
  font-size:.875rem;
  background:transparent}
.workspace {
  padding-bottom:90px}
.header-right {
  font-size:.875rem}
.stats {
  grid-template-columns:repeat(2,1fr)}
}

@media(max-width:680px) {
  .revision-layout {
  grid-template-columns:1fr}
.revision-list {
  max-height:150px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr))}
.revision-preview .manuscript {
  max-height:35vh}
.outline-edit-row {
  padding:12px;
  gap:8px}
.outline-actions {
  flex-direction:column;
  gap:2px}
.chapter-bar {
  gap:7px}
.chapter-bar .badge {
  font-size:.875rem}
.chapter-bar .history-button {
  font-size:.875rem}
.chapter-bar #save-status {
  font-size:.875rem}
.brief .section-title button {
  font-size:.875rem}
}

@media(max-width:680px) {
  .shell {
  display:block}
.sidebar {
  position:fixed;
  left:0;
  top:0;
  width:260px;
  z-index:40;
  display:none;
  box-shadow:15px 0 50px #2d422f33}
.sidebar.open {
  display:flex}
.global-header {
  padding:0 16px;
  height:58px;
  font-size:.875rem}
.global-header>span:first-of-type {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap}
.header-right button {
  font-size:.875rem;
  margin:0}
.mobile-menu {
  display:block;
  border:0;
  background:transparent;
  padding:5px}
.work-header {
  padding:26px 20px 24px;
  gap:20px}
.work-header h1 {
  font-size:1.5625rem}
.work-header p {
  font-size:.875rem}
.work-actions {
  width:100%}
.work-actions button {
  flex:1;
  font-size:.875rem;
  padding:10px 8px}
.workspace {
  padding:0 12px 85px}
.chapter-bar {
  padding:12px}
.toolbar {
  padding:6px;
  gap:0}
.toolbar button {
  padding:8px;
  font-size:.875rem}
.separator {
  display:none}
.paper {
  padding:32px 24px 25px}
.paper h2 {
  font-size:1.75rem;
  margin-bottom:25px}
.manuscript {
  font-size:1rem;
  line-height:2.1}

.collaboration {
  inset:60px 10px 72px;
  width:auto}
.mobile-bottom {
  left:0;
  padding:11px 5px;
  padding-bottom:max(11px,env(safe-area-inset-bottom))}
.thread {
  max-height:42vh}
.page-content {
  padding:28px 20px}
.page-content h1 {
  font-size:1.5625rem}
.stats {
  gap:8px;
  margin:20px 0}
.stat {
  padding:18px 15px}
.stat strong {
  font-size:1.875rem}
.assignment {
  padding:20px}
.assignment form {
  width:100%;
  flex-shrink:1}
.assignment select {
  min-width:0;
  flex:1}
.editor-grid {
  grid-template-columns:1fr}
.section-title small {
  display:none}
.audit span {
  display:block}
.welcome {
  padding:28px 24px}
.welcome h1 {
  font-size:2.1875rem}
.login-cards {
  grid-template-columns:1fr;
  gap:12px;
  margin-top:28px}
.login-cards button {
  padding:20px}
.login-cards h2 {
  margin:10px 0}
.welcome footer {
  line-height:1.8}
.welcome>p {
  font-size:.875rem}
dialog {
  padding:30px 20px}
.import-item {
  flex-wrap:wrap}
.import-item .badge {
  margin-left:auto}
.file-row {
  gap:8px}
.file-row button {
  font-size:.875rem;
  padding:2px}
.file-row b {
  font-size:.875rem}
.file-icon {
  min-width:32px;
  font-size:.875rem;
  padding:9px 4px}
}


/* Typography: controls and metadata 14px+, content 16px+, manuscript 18px. */
body { font-size:1rem; line-height:1.6; }
button { font-size:.875rem; line-height:1.5; min-height:40px; }
input, textarea, select { font-size:1rem; line-height:1.6; min-height:44px; }
input::placeholder, textarea::placeholder { color:var(--muted); opacity:1; }
label, small { font-size:.875rem; line-height:1.6; }
h1, h2, h3 { overflow-wrap:anywhere; letter-spacing:normal; }
.brand { font-size:1.375rem; font-weight:700; letter-spacing:normal; line-height:1.5; }
.main-area { min-width:0; }
.shell { grid-template-columns:280px minmax(0,1fr); }
.sidebar { padding:24px 18px; gap:18px; }
.role-label { letter-spacing:normal; margin:0 10px; color:var(--muted); }
.nav { font-size:1rem; }
.nav span { font-size:1rem; }
.book b { font-size:.9375rem; line-height:1.6; }
.book small { font-size:.875rem; color:var(--muted); }
.book { padding:12px; }
.side-heading, .side-bottom small, .global-header, .header-right { font-size:.875rem; color:var(--muted); }
.global-header { min-height:68px; height:auto; padding:12px 28px; }
.global-header>span:first-of-type { min-width:0; overflow-wrap:anywhere; }
.header-right button { margin-left:8px; }
.work-header { padding:24px 32px; }
.work-header h1, .page-content h1 { font-family:var(--font-ui); font-size:1.5rem; font-weight:700; line-height:1.5; letter-spacing:normal; margin:0; }
.work-header p { font-size:.875rem; margin:8px 0 0; }
.work-actions { flex-wrap:wrap; }
.work-actions button { font-size:.875rem; }
.workspace { padding:0 32px 32px; grid-template-columns:minmax(0,1fr) 340px; gap:20px; }
.chapter-bar { flex-wrap:wrap; gap:10px; font-size:.875rem; padding:12px 16px; }
.chapter-bar>button, .chapter-bar .history-button { font-size:.875rem; padding:8px 10px; min-height:40px; }
.chapter-bar #save-status { font-size:.875rem; color:var(--muted); }
.badge, .badge.amber, .eyebrow { font-size:.875rem; font-weight:500; letter-spacing:normal; color:#405b45; }
.badge.amber { color:#755719; }
.toolbar { flex-wrap:wrap; overflow:visible; gap:4px; padding:8px 12px; }
.toolbar button { font-size:.875rem; padding:8px 10px; min-width:40px; }
.toolbar .attach-tool { margin-left:0; color:var(--green); }
.paper { padding:32px clamp(24px,3vw,48px) 28px; }
.paper>.eyebrow { font-size:.875rem; color:var(--muted); letter-spacing:normal; }
.paper h2 { font-family:var(--font-ui); font-size:1.75rem; line-height:1.5; font-weight:600; margin:12px 0 28px; }
.manuscript { font-family:var(--font-ui); font-size:1.125rem; line-height:1.85; color:var(--ink); }
.manuscript p { margin:0 0 1em; }
.manuscript h2 { font-size:1.375rem; }
.paper-footer { font-size:.875rem; color:var(--muted); margin-top:28px; }
.chapter-navigation { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin:20px 0 28px; }
.chapter-step { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; min-height:72px; padding:14px 16px; text-align:left; background:var(--paper,#fffdf8); }
.chapter-step.next { align-items:flex-end; text-align:right; }
.chapter-step span { font-weight:600; }
.chapter-step small { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.875rem; color:var(--muted); }
.chapter-step:disabled { opacity:.55; cursor:default; }
.manuscript::highlight(soya-feedback) { background-color:#f6df82; color:inherit; }
.manuscript img,.preview-chapter img { display:block; max-width:100%; height:auto; margin:20px auto; border-radius:6px; }
.manuscript img[data-image-error] { min-height:80px; border:1px dashed var(--line); }
#manuscript-image-form { display:grid; gap:16px; }
#manuscript-image-form label { display:grid; gap:8px; }
#image-insert-status { color:var(--muted); font-size:.9375rem; }
.landing-publications { margin:0; padding:88px 0; }
.publications-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:36px; }
.publications-heading h2 { font-size:clamp(1.8rem,3vw,2.6rem); line-height:1.4; letter-spacing:-.04em; margin:12px 0 16px; }
.publications-heading p { color:var(--muted); font-size:1rem; line-height:1.8; }
.publications-heading>a { flex-shrink:0; font-size:.9375rem; font-weight:500; color:var(--green); text-decoration:none; text-underline-offset:5px; }
.publications-heading>a:visited { color:var(--green); }
.publications-heading>a:hover { text-decoration:underline; }
.published-book { min-width:0; }
.published-cover { background:#f0ece4; border-radius:12px; overflow:hidden; aspect-ratio:4/3; display:grid; place-items:center; }
.published-cover img { display:block; width:100%; height:100%; object-fit:contain; }
.published-copy { padding:22px 0 0; }
.publication-eyebrow { display:block; color:var(--green,#315b46); font-size:.875rem; font-weight:600; margin-bottom:18px; }
.publication-category { display:block; color:var(--muted); font-size:.8125rem; line-height:1.7; }
.published-copy h3 { font-size:1.375rem; line-height:1.5; letter-spacing:-.025em; margin:8px 0 10px; }
.published-copy h3 a { color:inherit; text-decoration:none; }
.published-copy h3 a:hover { text-decoration:underline; text-underline-offset:5px; }
.publication-author { color:var(--muted); font-size:.875rem; line-height:1.7; margin:0 0 14px; }
.publication-description { white-space:pre-line; line-height:1.9; font-size:1rem; margin:0 0 22px; overflow-wrap:anywhere; }
.publication-links { display:flex; align-items:center; flex-wrap:wrap; gap:18px; font-size:.875rem; }
.publication-links a,.publication-links a:visited { color:var(--green); text-decoration:none; text-underline-offset:4px; }
.publication-links a:hover { text-decoration:underline; }
.publications-heading>a:focus-visible,.publication-links a:focus-visible,.published-copy h3 a:focus-visible { outline:2px solid var(--green); outline-offset:5px; border-radius:3px; }
.publication-buy { font-weight:600; }
.publication-links .primary,.publication-links .primary:visited { padding:12px 18px; border-radius:8px; background:var(--green); color:#fff; text-decoration:none; }
.publication-links .primary:hover { background:#264936; text-decoration:none; }
.published-book-featured { display:grid; grid-template-columns:1.05fr 1fr; align-items:center; gap:42px; padding:28px; background:#f2f1e9; border:1px solid #e6e7dc; border-radius:18px; }
.published-book-featured .published-copy { padding:0 12px 0 0; }
.published-book-featured h3 { font-size:clamp(1.6rem,2.8vw,2.2rem); margin:12px 0; }
.published-book-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px; margin-top:40px; }
.publication-admin-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; }
.publication-admin-heading p { font-size:.9375rem; color:var(--muted); }
#erp-publication-form { display:grid; gap:16px; }
#erp-publication-form label:not(.checkbox-label) { display:grid; gap:8px; font-size:.9375rem; }
#erp-publication-form .checkbox-label { display:flex; align-items:center; gap:10px; }
#erp-publication-form [type=checkbox] { width:18px; height:18px; flex:0 0 18px; margin:0; }
#erp-publication-form textarea { min-height:130px; }
#publication-preview .published-book-featured { display:block; padding:18px; }
#publication-preview .published-copy { padding-top:20px; }
#publication-status { color:var(--muted); white-space:pre-line; }
@media(max-width:900px){.landing-publications{padding:64px 0;}.published-book-featured{gap:24px;padding:22px;}.published-book-grid{gap:20px;}.publications-heading{align-items:flex-start;}}
@media(max-width:640px){.landing-publications{padding:52px 0;}.publications-heading{display:block;}.publications-heading>a{display:inline-block;margin-top:8px;}.published-book-featured{grid-template-columns:1fr;padding:18px;gap:22px;}.published-book-featured .published-copy{padding:0;}.published-book-grid{grid-template-columns:1fr;gap:34px;margin-top:32px;}.publication-admin-heading{align-items:flex-start;flex-direction:column;}}
.message.highlight-target { outline:2px solid #c9a845; outline-offset:2px; }
.quote-jump { display:block; margin-top:8px; padding:4px 8px; font-size:.8125rem; color:var(--green); background:transparent; }
@media(max-width:600px){.chapter-navigation{gap:8px;}.chapter-step{padding:12px 10px;}}
.section-title { flex-wrap:wrap; }
.section-title h2, .section-title h3, .person h3 { font-size:1rem; }
.section-title span, .section-title small, .chapter-files>.muted { font-size:.875rem; }
.file-row { flex-wrap:wrap; }
.file-row>span:nth-child(2) { flex-basis:140px; }
.file-row b { font-size:.9375rem; }
.file-row small, .file-row button, .file-icon { font-size:.875rem; }
.file-icon { min-width:44px; }
.panel-title b { font-size:1rem; }
.tabs button { font-size:.875rem; }
.context-label { font-size:.875rem; color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
.message>small, .resolve { font-size:.875rem; color:var(--muted); }
.message p { font-size:1rem; line-height:1.7; overflow-wrap:anywhere; }
.message blockquote { font-size:.9375rem; color:#6b531b; line-height:1.7; overflow-wrap:anywhere; }
.thread-empty p { font-size:.875rem; color:var(--muted); }
.composer textarea { font-size:1rem; min-height:120px; }
.composer label, .composer select, .composer button, .composer small { font-size:.875rem; }
.composer select { font-size:1rem; }
.composer>div:last-child { gap:12px; flex-wrap:wrap; }
.composer small { flex:1; min-width:130px; color:var(--muted); }
#quote-preview, .panel-hint, .reader-note { font-size:.875rem; line-height:1.7; color:var(--muted); }
.outline button { gap:10px; flex-wrap:wrap; font-size:.9375rem; }
.outline small { font-size:.875rem; color:var(--muted); }
.page-content { padding:28px 32px; }
.page-content>p { font-size:1rem; }
.card h2 { font-size:1.375rem; line-height:1.6; }
.plan-field>small, .plan-field p { font-size:1rem; letter-spacing:normal; }
.brief p { line-height:1.7; }
.stat>small, .stat strong span, .assignment p, .assignment select, .assignment button, .person small, .load-label, .audit p { font-size:.875rem; }
.stat strong { font-family:var(--font-ui); font-weight:600; font-variant-numeric:tabular-nums; }
.assignment h3 { font-size:1rem; line-height:1.6; }
.audit p { overflow-wrap:anywhere; }
.welcome h1 { font-family:var(--font-ui); font-size:2rem; font-weight:700; line-height:1.5; letter-spacing:normal; margin:32px 0; }
.login-cards h2 { font-size:1.25rem; font-weight:600; }
.login-cards span, .welcome footer { font-size:.875rem; color:var(--muted); line-height:1.7; }
dialog h2 { font-family:var(--font-ui); font-size:1.5rem; font-weight:600; line-height:1.5; margin:0 24px 20px 0; }
.import-zone p, .import-zone small, .import-summary, .import-summary small, details summary, .import-body { font-size:.875rem; color:var(--muted); }
.import-zone input, .import-item input, .import-item select, .outline-edit-row input { font-size:1rem; }
.import-item { flex-wrap:wrap; }
.import-item input { flex-basis:200px; }
.outline-edit-row label, .outline-number, .revision-list b, .revision-list small, .revision-preview .section-title b, .revision-preview button { font-size:.875rem; }
.revision-layout { grid-template-columns:180px minmax(0,1fr); gap:16px; }
.revision-list { max-height:52vh; }
.revision-preview .manuscript, .preview-chapter .manuscript { font-size:1.125rem; }
.close { min-width:44px; min-height:44px; }
#toast { font-size:.875rem; line-height:1.7; }
@media (max-width:1200px) {
  .shell { grid-template-columns:240px minmax(0,1fr); }
  .workspace { padding:0 24px 32px; grid-template-columns:minmax(0,1fr) 320px; }
  .work-header { padding:24px; }
}
@media (max-width:1280px) {
  .shell { grid-template-columns:240px minmax(0,1fr); }
  .workspace { display:block; padding-bottom:96px; }
  .collaboration { display:none; position:fixed; inset:76px 16px 82px auto; width:min(420px,calc(100vw - 32px)); z-index:20; overflow:auto; box-shadow:0 8px 60px #243a2930; }
  .collaboration.open { display:block; }
  .panel-title button { display:block; margin-left:auto; border:0; background:transparent; }
  .mobile-bottom { display:flex; position:fixed; bottom:0; left:240px; right:0; z-index:15; background:var(--paper); border-top:1px solid var(--line); justify-content:space-around; padding:10px 6px; gap:4px; }
  .mobile-bottom button { font-size:.875rem; border:0; background:transparent; min-height:44px; }
}
@media (max-width:680px) {
  .shell { display:block; }
  .sidebar { width:min(310px,calc(100vw - 40px)); }
  .global-header { padding:10px 12px; gap:8px; min-height:64px; }
  .environment-label { display:none; }
  .header-right { font-size:.875rem; }
  .header-right button { font-size:.875rem; padding:8px; margin:0; }
  .mobile-menu { min-width:44px; min-height:44px; }
  .work-header { padding:20px 16px; }
  .work-header h1, .page-content h1 { font-size:1.375rem; }
  .work-actions { width:100%; }
  .work-actions button { white-space:normal; flex:1; font-size:.875rem; padding:10px; }
  .workspace { padding:0 10px 100px; }
  .chapter-bar { padding:10px; gap:8px; }
  .chapter-bar .badge, .chapter-bar .history-button, .chapter-bar #save-status { font-size:.875rem; }
  .chapter-bar .history-button { margin-left:0; }
  .chapter-bar #save-status { margin-left:auto; }
  .toolbar { padding:8px; }
  .toolbar button { font-size:.875rem; padding:8px; }
  .paper { padding:24px 20px; }
  .paper h2 { font-size:1.5rem; }
  .manuscript { font-size:1.125rem; line-height:1.85; }
  .collaboration { inset:70px 8px 82px; width:auto; }
  .mobile-bottom { left:0; padding-bottom:max(10px,env(safe-area-inset-bottom)); }
  .thread { max-height:40vh; }
  .page-content { padding:24px 16px 96px; }
  .section-title small { display:block; }
  .assignment form { flex-wrap:wrap; }
  .assignment select { flex-basis:170px; }
  .file-row b { font-size:.9375rem; }
  .file-row button, .file-icon { font-size:.875rem; }
  .file-row button { padding:8px; }
  dialog { padding:28px 20px; max-height:90vh; }
  .revision-layout { grid-template-columns:1fr; }
  .revision-list { max-height:190px; }
  .revision-list small { overflow-wrap:anywhere; }
  .revision-preview .manuscript { max-height:35vh; }
  .outline-actions button, .brief .section-title button { font-size:.875rem; }
  .welcome { padding:28px 20px; }
  .welcome h1 { font-size:1.75rem; }
  #toast { bottom:82px; }
}

button:disabled { opacity:1; color:var(--muted); background:#edf0ea; border-color:#d6dbd2; cursor:default; }
.resolve:disabled { background:transparent; }
.book b { overflow-wrap:anywhere; }

/* Brand accents and a quiet writing desk; readable sizes stay unchanged. */
body { letter-spacing:-.012em; }
.main-area { background:radial-gradient(ellipse at 35% 0%,#f5eee1 0,transparent 60%),#f4f3ee; }
.brand { gap:11px; font-weight:650; letter-spacing:-.035em; }
.brand-mark { width:40px; height:40px; flex:none; box-shadow:0 3px 8px #31574312; }
.ui-icon { width:18px; height:18px; flex:none; vertical-align:middle; }
button:has(>.ui-icon) { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.nav:has(>.ui-icon) { justify-content:flex-start; gap:12px; }
.nav .ui-icon { width:21px; height:21px; color:#607567; }
.nav.active { background:#e3ecdf; color:#284d38; font-weight:600; box-shadow:inset 3px 0 #456b4f; }
.nav.active .ui-icon { color:#315743; }
.sidebar { background:#f6f5ef; }
.book { position:relative; padding-left:14px; }
.book.selected { background:#fffdf7; border-color:#dce1d4; box-shadow:0 2px 6px #3f493505; }
.book.selected::before { content:""; position:absolute; left:0; top:16px; bottom:16px; width:3px; border-radius:0 3px 3px 0; background:#8a9b72; }
.book b { font-weight:550; }
.new-book { border-style:solid; background:#eeefe6; color:#315743; }
.global-header { background:#fffdf980; }
.work-header h1 { display:flex; align-items:center; gap:11px; font-weight:600; letter-spacing:-.025em; }
.heading-icon { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; background:#e7ecde; color:#416247; border:1px solid #dce3d2; border-radius:12px; }
.heading-icon .ui-icon { width:22px; height:22px; }
.writing { background:#fffdf8; border-color:#deded2; box-shadow:0 5px 20px #4e493b07,0 1px 3px #4e493b05; }
.chapter-bar { background:#f7f7f0; border-bottom-color:#e4e5d9; }
.toolbar { background:#fbfaf4; border-bottom-color:#eae7dc; }
.toolbar button { font-weight:500; }
.paper { max-width:820px; padding-top:40px; }
.paper>.eyebrow { font-weight:500; color:#65705e; letter-spacing:.02em; }
.paper h2 { letter-spacing:-.025em; font-weight:600; }
.manuscript { letter-spacing:-.012em; font-weight:400; }
.manuscript:focus { box-shadow:-3px 0 #dce5d5; }
.paper-footer { border-top-color:#e9e4d9; }
.collaboration { background:#fffefa; border-color:#e1e1d6; box-shadow:0 3px 14px #4e493b04; }
.tabs button:has(>.ui-icon) { gap:6px; }
.tabs .ui-icon { width:16px; height:16px; }
.primary { font-weight:550; }
.welcome .brand { justify-content:center; }
@media (min-width:681px) {
  .mobile-menu:has(>.ui-icon) { display:none; }
}
@media (max-width:680px) {
  .paper { padding-top:28px; }
  .heading-icon { width:34px; height:34px; border-radius:10px; }
  .work-header h1 { gap:9px; }
  .work-actions button:has(>.ui-icon) { gap:5px; }
  .work-actions .ui-icon { width:16px; height:16px; }
  .mobile-bottom button:has(>.ui-icon) { flex-direction:column; gap:3px; }
  .mobile-bottom .ui-icon { width:20px; height:20px; }
  .writing { box-shadow:0 2px 10px #4e493b06; }
}

/* Rich manuscript tools share the same readable typography. */
.toolbar { gap:6px 10px; overflow:visible; align-items:center; padding:10px 14px; position:relative; }
.tool-group { display:flex; flex-wrap:wrap; align-items:center; gap:2px; }
.tool-group+.tool-group { border-left:1px solid var(--line); padding-left:8px; }
.toolbar button { min-height:36px; padding:6px 8px; }
.toolbar button[aria-pressed="true"] { background:#e3ebdc; color:#284d38; box-shadow:inset 0 -2px #6e8465; }
.extra-tools { position:relative; font-size:.875rem; }
.extra-tools summary { cursor:pointer; padding:8px; border-radius:6px; }
.extra-tools[open] summary { background:var(--soft); }
.extra-tools-menu { position:absolute; top:100%; left:0; width:260px; z-index:8; padding:12px; border:1px solid var(--line); background:var(--paper); border-radius:10px; box-shadow:0 8px 24px #243a2918; }
.extra-tools-menu .tool-group { border:0; padding:0; }
.extra-tools-menu .tool-group+.tool-group { border-top:1px solid var(--line); margin-top:8px; padding-top:8px; }
.writing:has(.extra-tools[open]) { overflow:visible; }
.table-tools { display:flex; align-items:center; flex-wrap:wrap; padding:10px 16px; gap:8px; background:#f1f3e9; border-bottom:1px solid var(--line); font-size:.875rem; }
.table-tools[hidden],.voice-panel[hidden] { display:none; }
.table-tools>span { font-weight:600; color:var(--green); }
.table-tools button { font-size:.875rem; padding:6px 8px; }
.table-size-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.checkbox-label { display:flex; align-items:center; font-size:1rem; }
.voice-panel { background:#f3f5ea; padding:16px 20px; border-bottom:1px solid #dce3d2; }
.voice-heading { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.voice-heading b { display:flex; align-items:center; gap:8px; margin-right:auto; font-size:1rem; }
.voice-panel button,.voice-panel small,.voice-panel p { font-size:.875rem; line-height:1.7; }
.voice-panel p { margin:12px 0 8px; }
.voice-panel small { display:block; color:var(--muted); }
.voice-interim { color:var(--ink); min-height:0; background:#fff; border:1px solid var(--line); border-radius:8px; padding:12px 14px; overflow-wrap:anywhere; }
.voice-pending-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
.voice-pending-actions[hidden] { display:none; }
.voice-continuous { margin-top:12px; font-size:.875rem; }
#admin-manual-outline[hidden],#admin-import-clear[hidden] { display:none; }
.erp-book-create-modal .import-zone { margin:16px 0; }
.erp-book-create-modal .import-body { max-height:280px; overflow:auto; }
.voice-interim:empty { display:none; }
.voice-panel.listening { border-left:3px solid #4d754f; }
.manuscript ul,.manuscript ol { padding-left:1.7em; margin:1em 0; }
.manuscript li { margin:.35em 0; padding-left:.15em; }
.manuscript li>ul,.manuscript li>ol { margin:.4em 0; }
.manuscript ol { list-style-type:decimal; }
.manuscript ol ol { list-style-type:lower-alpha; }
.manuscript ol ol ol { list-style-type:lower-roman; }
.manuscript li p { margin:0; }
.manuscript [data-indent="1"] { margin-left:1.5em; }
.manuscript [data-indent="2"] { margin-left:3em; }
.manuscript [data-indent="3"] { margin-left:4.5em; }
.manuscript [data-indent="4"] { margin-left:6em; }
.manuscript [data-indent="5"] { margin-left:7.5em; }
.manuscript [data-indent="6"] { margin-left:9em; }
.manuscript [data-align="left"] { text-align:left; }
.manuscript [data-align="center"] { text-align:center; }
.manuscript [data-align="right"] { text-align:right; }
.manuscript [data-align="justify"] { text-align:justify; }
.manuscript [data-table-wrap] { max-width:100%; overflow-x:auto; margin:1.4em 0; }
.manuscript table { width:100%; min-width:280px; border-collapse:collapse; table-layout:fixed; font-size:1rem; line-height:1.7; }
.manuscript td,.manuscript th { border:1px solid #cbd2c0; padding:10px 12px; min-width:80px; height:46px; vertical-align:top; overflow-wrap:anywhere; }
.manuscript th { background:#edf0e4; font-weight:600; text-align:left; }
.manuscript caption { text-align:left; padding:0 0 8px; font-weight:600; }
.manuscript td:focus-within,.manuscript th:focus-within { background:#f4f7ef; }
.manuscript hr { border:0; border-top:1px solid var(--line); margin:1.5em 0; }
@media (max-width:680px) {
  .toolbar { padding:8px; gap:6px; }
  .toolbar button { min-height:40px; padding:7px; }
  .tool-group+.tool-group { border:0; padding-left:0; }
  .extra-tools-menu { left:auto; right:0; width:min(260px,calc(100vw - 48px)); }
  .voice-panel { padding:14px 16px; }
  .voice-heading b { width:100%; }
  .manuscript td,.manuscript th { padding:8px; }
}

.manuscript table:has(tr>:nth-child(4)) { min-width:480px; }
.manuscript table:has(tr>:nth-child(5)) { min-width:600px; }
.manuscript table:has(tr>:nth-child(6)) { min-width:720px; }
.manuscript table:has(tr>:nth-child(7)) { min-width:840px; }
.manuscript table:has(tr>:nth-child(8)) { min-width:960px; }

/* Form hints use the same legible size as values, including on mobile. */
input:not([type="checkbox"]):not([type="radio"]),textarea,select { font-family:var(--font-ui); font-size:1rem; font-weight:400; letter-spacing:-.01em; line-height:1.6; }
input::placeholder,textarea::placeholder { font-family:inherit; font-size:1em; font-weight:400; letter-spacing:inherit; line-height:inherit; color:#626c63; opacity:1; }
input:focus-visible,textarea:focus-visible,select:focus-visible { outline:2px solid #67866a; outline-offset:2px; }
.toc-open { color:var(--green); font-weight:600; }
.outline-chapter-label { flex:1; }
.outline-chapter-label small { display:block; }
dialog.toc-modal { width:min(1180px,calc(100vw - 48px)); max-width:none; padding:0; max-height:92dvh; border-radius:16px; }
dialog.toc-modal[open] { display:flex; flex-direction:column; height:min(840px,92dvh); }
.toc-modal .close { top:20px; right:20px; z-index:2; }
.toc-header { padding:26px 72px 18px 28px; display:flex; justify-content:space-between; gap:16px; align-items:center; }
.toc-header h2 { margin:0 0 8px; }
.toc-header p { margin:0; font-size:.875rem; color:var(--muted); }
#toc-count { font-size:.875rem; white-space:nowrap; color:var(--green); }
.toc-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:14px 28px; background:#f3f4ec; border-block:1px solid var(--line); }
.toc-toolbar span { margin-left:auto; font-size:.875rem; color:var(--muted); }
.toc-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; min-height:0; flex:1; }
.toc-main { padding:20px 24px; overflow:auto; min-width:0; overscroll-behavior:contain; }
#toc-list { display:grid; gap:10px; }
.toc-row { position:relative; display:flex; align-items:center; gap:10px; padding:12px; margin-left:calc(var(--toc-depth)*24px); background:#fffefb; border:1px solid #dfe3d6; border-radius:10px; }
.toc-row.selected { border-color:#8b9e7d; box-shadow:0 0 0 1px #8b9e7d; }
.toc-row.toc-part { background:#edf1e5; }
.toc-row input { min-width:0; flex:1; border-color:transparent; background:transparent; }
.toc-row input:focus { background:#fff; border-color:#becbb4; }
.toc-number { width:28px; flex:none; font-size:.875rem; color:var(--muted); font-variant-numeric:tabular-nums; }
.toc-drag { width:30px; min-height:44px; display:flex; align-items:center; justify-content:center; font-size:24px; color:#61735c; cursor:grab; touch-action:none; user-select:none; flex:none; }
.toc-drag:focus-visible { outline:2px solid #67866a; border-radius:6px; }
.toc-row.dragging { opacity:.6; }
.toc-row[data-drop="before"]::before,.toc-row[data-drop="after"]::after { content:""; position:absolute; left:0; right:0; height:3px; background:#456b4f; }
.toc-row[data-drop="before"]::before { top:-7px; }
.toc-row[data-drop="after"]::after { bottom:-7px; }
.toc-row[data-drop="inside"] { background:#e0ead6; border:2px dashed #456b4f; }
.toc-detail { padding:22px; border-left:1px solid var(--line); background:#fafbf6; overflow:auto; }
.toc-detail h3 { font-size:1.125rem; margin:12px 0 20px; }
.toc-detail label { margin-bottom:18px; }
.toc-controls { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.toc-detail>button { width:100%; margin-bottom:8px; }
.toc-detail select { width:100%; }
.toc-preserve,.toc-detail small { font-size:.875rem; line-height:1.7; color:var(--muted); }
.toc-danger { color:#8a4135; background:#fffaf7; }
.toc-detail hr { border:0; border-top:1px solid var(--line); margin:20px 0; }
.toc-footer { padding:16px 28px; border-top:1px solid var(--line); display:flex; align-items:center; gap:10px; background:#fffefb; }
.toc-footer p { flex:1; margin:0; font-size:.875rem; color:var(--muted); }
.toc-archive { margin-top:22px; font-size:.875rem; color:var(--muted); }
.toc-archive summary { cursor:pointer; padding:12px 0; }
#toc-archive-list>div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border-bottom:1px solid var(--line); }
#toc-archive-list small { display:block; font-size:.875rem; }
.toc-empty { padding:36px 20px; text-align:center; color:var(--muted); }
@media (max-width:760px) {
  dialog.toc-modal { width:calc(100vw - 16px); max-height:96dvh; }
  dialog.toc-modal[open] { height:96dvh; }
  .toc-header { padding:20px 56px 16px 18px; display:block; }
  #toc-count { display:block; margin-top:10px; }
  .toc-toolbar { padding:12px 16px; }
  .toc-toolbar span { width:100%; margin:0; }
  .toc-layout { display:block; overflow:auto; }
  .toc-main { padding:16px 12px; overflow:visible; }
  .toc-detail { border-left:0; border-top:1px solid var(--line); padding:20px; overflow:visible; }
  .toc-row { padding:8px; gap:4px; margin-left:calc(var(--toc-depth)*12px); }
  .toc-drag { width:24px; }
  .toc-number { width:22px; }
  .toc-row input { padding:8px 4px; }
  .toc-select { padding:8px; }
  .toc-footer { padding:12px 16px; flex-wrap:wrap; }
  .toc-footer p { flex-basis:100%; }
  .toc-footer button { flex:1; }
}

.quick-part { padding:12px 14px; background:#f0f3e9; color:var(--green); font-size:.9375rem; font-weight:600; }
.erp-loading { padding:48px; font-size:16px; }
.admin-shell { background:#f3f5f4; }
.admin-shell .sidebar { background:#fafbf9; }
.admin-shell .sidebar nav { display:grid; gap:4px; margin-top:22px; }
.admin-shell .main-area { min-width:0; background:#f3f5f4; }
.admin-shell .global-header { background:#fff; justify-content:space-between; }
.erp-content { padding:28px 30px; max-width:1800px; margin:auto; }
.erp-page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.erp-page-heading h1 { font-size:25px; margin:0 0 8px; letter-spacing:-.5px; }
.erp-page-heading p,.erp-muted { color:#637168; font-size:14px; line-height:1.6; margin:0; }
.erp-page-heading button { display:flex; gap:8px; align-items:center; flex-shrink:0; }
.erp-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.erp-toolbar form { display:flex; gap:6px; }
.erp-toolbar input { width:260px; font-size:15px; }
.erp-toolbar select { font-size:15px; }
.erp-result-count { font-size:14px; color:#637168; margin-right:auto; }
.erp-master-detail { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:18px; align-items:start; }
.erp-grid-panel,.erp-detail,.erp-panel { border:1px solid #dce3de; border-radius:10px; background:#fff; overflow:hidden; }
.erp-table-scroll { overflow:auto; max-height:calc(100vh - 320px); min-height:260px; }
.erp-table { border-collapse:collapse; width:100%; font-size:14px; text-align:left; white-space:nowrap; }
.erp-table th { position:sticky; top:0; z-index:1; background:#f5f7f5; border-bottom:1px solid #dce3de; }
.erp-table th button { border:0; background:transparent; border-radius:0; width:100%; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px 16px; font-weight:600; font-size:14px; color:#49584f; }
.erp-table th button span { color:#8a968e; }
.erp-table td { padding:12px 16px; border-bottom:1px solid #eef1ee; max-width:290px; overflow:hidden; text-overflow:ellipsis; }
.erp-table tr:hover td { background:#f8faf8; }
.erp-table tr.selected td { background:#eaf2eb; }
.erp-row-link { border:0; background:transparent; padding:0; color:#315743; text-align:left; font-weight:600; font-size:14px; max-width:280px; overflow:hidden; text-overflow:ellipsis; }
.erp-row-link:hover { text-decoration:underline; }
.erp-pagination { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:12px 16px; font-size:13px; }
.erp-pagination>span:first-child { margin-right:auto; }
.erp-detail { padding:22px; max-height:calc(100vh - 235px); overflow:auto; position:sticky; top:18px; }
.erp-detail h2 { font-size:20px; line-height:1.45; margin:0 0 12px; overflow-wrap:anywhere; }
.erp-detail h3 { font-size:16px; margin:24px 0 12px; }
.erp-detail p { font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
.erp-detail-empty { min-height:230px; display:grid; place-content:center; text-align:center; line-height:1.8; color:#708076; font-size:15px; }
.erp-detail form { display:grid; gap:14px; margin-top:20px; }
.erp-detail form label { display:grid; gap:7px; font-size:14px; font-weight:600; }
.erp-detail input,.erp-detail select,.erp-detail textarea { width:100%; font-size:15px; font-weight:400; }
.erp-detail #erp-form-status { color:#a23d30; margin:0; }
.erp-detail dl { margin:0; }
.erp-field { display:grid; grid-template-columns:95px minmax(0,1fr); gap:12px; margin-bottom:12px; font-size:14px; line-height:1.7; }
.erp-field dt { color:#708076; }
.erp-field dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.erp-badge { display:inline-block; color:#315743; background:#edf3ee; border-radius:5px; padding:3px 8px; font-size:12px; font-weight:600; white-space:nowrap; }
.erp-badge.warning { color:#8a5724; background:#faf0df; }
.erp-related { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; text-align:left; width:100%; border:0; border-bottom:1px solid #edf1ed; border-radius:0; padding:12px 0; background:transparent; font-size:14px; }
.erp-related small { width:100%; color:#708076; font-weight:400; }
.erp-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:24px; }
.erp-metrics button { display:grid; gap:10px; padding:22px; text-align:left; background:#fff; border-color:#dce3de; border-radius:10px; }
.erp-metrics span { color:#59695e; font-size:14px; }
.erp-metrics strong { font-size:32px; color:#315743; font-weight:650; }
.erp-metrics small { color:#75847a; font-size:12px; }
.erp-dashboard-panels { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:20px; }
.erp-panel { padding:22px; }
.erp-panel h2 { font-size:18px; margin:0 0 14px; }
.erp-section-heading { display:flex; align-items:center; justify-content:space-between; }
.erp-summary-row { border:0; border-bottom:1px solid #edf1ed; border-radius:0; padding:14px 0; width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; background:transparent; text-align:left; font-size:14px; }
.erp-summary-row:last-child { border-bottom:0; }
.erp-summary-row small { display:block; color:#708076; font-size:13px; margin-top:5px; }
.erp-summary-row b { font-weight:550; }
.erp-warning { color:#a15a23; }
.erp-audit-json { white-space:pre-wrap; overflow-wrap:anywhere; background:#f5f7f5; padding:14px; font-size:13px; line-height:1.7; }
.erp-manuscript { font-size:16px; background:#fafaf7; padding:18px; border:1px solid #e8ece6; border-radius:8px; margin-top:14px; overflow:auto; }
.erp-message { border-bottom:1px solid #edf1ed; padding:12px 0; }
.erp-message small { font-size:12px; color:#708076; }
.erp-message blockquote { margin:10px 0; padding-left:12px; border-left:3px solid #c8d6ca; font-size:14px; }
.erp-revision { font-size:13px; padding:10px 0; border-bottom:1px solid #edf1ed; }
.erp-revision summary { cursor:pointer; line-height:1.7; }
.erp-revision article { margin-top:14px; font-size:15px; overflow:auto; }
.erp-document { font-size:15px; line-height:1.85; }
.erp-document h2 { font-size:22px; margin:22px 0 14px; }
.erp-document h3 { font-size:17px; margin-top:24px; }
.erp-detail .erp-document p { font-size:15px; }
.erp-doc-item { padding-left:14px; }
.erp-document pre { white-space:pre-wrap; font-size:13px; background:#f5f7f5; padding:10px; }
.erp-reader-dialog { width:min(1000px,94vw); max-width:1000px; padding:36px; }
.erp-reader-dialog .manuscript { padding:20px; }
.admin-shell:has(.erp-document) .erp-master-detail { grid-template-columns:minmax(250px,.7fr) minmax(450px,1.3fr); }
@media(min-width:1600px){ .erp-master-detail { grid-template-columns:minmax(0,1fr) 440px; } }
@media(max-width:1100px){ .erp-content { padding:22px 18px; }.erp-master-detail { grid-template-columns:minmax(0,1fr); }.erp-detail { max-height:none; position:static; }.admin-shell:has(.erp-document) .erp-master-detail { grid-template-columns:1fr; }.erp-table-scroll { max-height:420px; } }
@media(max-width:600px){ .erp-content { padding:20px 14px; }.erp-page-heading { align-items:flex-start; }.erp-page-heading h1 { font-size:22px; }.erp-page-heading p { font-size:13px; }.erp-page-heading button { font-size:0; padding:10px; }.erp-metrics { grid-template-columns:repeat(2,1fr); gap:10px; }.erp-metrics button { padding:16px; }.erp-dashboard-panels { grid-template-columns:1fr; }.erp-toolbar form { width:100%; }.erp-toolbar input { width:100%; min-width:0; }.erp-toolbar form input { flex:1; }.erp-detail { padding:18px; }.erp-pagination { gap:8px; }.erp-pagination>span:first-child { font-size:12px; }.erp-panel { padding:18px; }.erp-summary-row { gap:10px; }.erp-summary-row>span:last-child { flex-shrink:0; }.erp-reader-dialog { padding:22px; } }
.erp-doc-table { overflow:auto; margin:16px 0; }
.erp-doc-table table { border-collapse:collapse; font-size:14px; min-width:520px; width:100%; }
.erp-doc-table th,.erp-doc-table td { padding:10px 12px; border:1px solid #dce3de; text-align:left; }
.erp-doc-table th { background:#f3f6f3; }
.erp-document ul,.erp-document ol { padding-left:24px; }
.erp-document li { margin:10px 0; }
.erp-document code { background:#f2f5f1; padding:2px 5px; border-radius:4px; font-size:13px; }
.erp-confirm { width:min(440px,90vw); padding:28px; }
.erp-confirm h2 { font-size:20px; }
.erp-confirm p { font-size:15px; }
.erp-confirm>div { display:flex; gap:10px; justify-content:flex-end; margin-top:24px; }
/* Author entry and account screens */
.public-header { max-width:1240px; margin:auto; padding:25px 32px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.public-header .brand { text-decoration:none; color:var(--green); }
.public-header nav { display:flex; gap:10px; }
.public-button { display:inline-flex; justify-content:center; align-items:center; padding:12px 20px; border-radius:9px; font-size:15px; font-weight:600; color:var(--ink); text-decoration:none; border:1px solid transparent; }
.public-button.primary { color:white; }
.public-button:hover { background:var(--soft); }
.public-button.primary:hover { background:#244533; }
.landing-main { max-width:1240px; margin:auto; padding:0 32px; }
.landing-hero { display:grid; grid-template-columns:1fr 1.08fr; gap:48px; align-items:center; padding:78px 0 95px; }
.landing-kicker { display:block; color:#627766; font-size:14px; font-weight:550; margin-bottom:22px; }
.landing-copy h1,.auth-intro h1 { margin:0; font-size:52px; line-height:1.3; letter-spacing:-1.8px; font-weight:650; }
.landing-copy>p,.auth-intro>p { color:#637168; font-size:18px; line-height:1.85; margin:24px 0 30px; }
.landing-actions { display:flex; flex-wrap:wrap; gap:20px; align-items:center; }
.landing-actions .public-button { padding:16px 26px; font-size:16px; }
.landing-text-link { color:#566a5c; text-decoration:none; font-size:14px; }
.landing-text-link:hover { text-decoration:underline; }
.landing-note { font-size:13px; color:#718074; margin-top:22px; line-height:1.6; }
.landing-desk { position:relative; display:grid; grid-template-columns:170px 1fr; background:#eceee5; border:1px solid #dbe0d2; border-radius:16px; padding:22px 18px 28px; gap:14px; box-shadow:0 24px 50px -25px #65795738; transform:rotate(-1deg); }
.desk-outline { font-size:13px; padding-top:14px; }
.desk-outline>span { display:flex; align-items:center; gap:8px; font-weight:600; margin-bottom:30px; }
.desk-outline>b { display:block; padding:0 10px; margin-bottom:20px; font-size:14px; }
.desk-part { padding:10px; font-size:12px; color:#73806e; }
.desk-chapter { padding:12px 10px; margin:5px 0; border-radius:6px; display:flex; gap:8px; font-size:12px; }
.desk-chapter span { color:#84917c; }
.desk-chapter.active { background:#dce5d7; color:#315743; font-weight:600; }
.desk-paper { position:relative; background:#fffefa; border-radius:7px; padding:22px 25px; min-height:330px; box-shadow:0 4px 10px #5261410c; }
.desk-paper-top { display:flex; justify-content:space-between; align-items:center; font-size:11px; color:#73816b; padding-bottom:28px; gap:14px; }
.desk-paper-top>span:last-child { display:flex; gap:4px; align-items:center; }
.desk-paper-top .ui-icon { width:13px; height:13px; }
.desk-paper>small { font-size:11px; color:#81866f; }
.desk-paper h2 { font-size:22px; font-weight:600; margin:12px 0 26px; letter-spacing:-.5px; }
.desk-paper p { font-size:13px; line-height:2; color:#68705f; }
.desk-paper-footer { border-top:1px solid #e7e7db; padding-top:12px; margin-top:30px; color:#8b907c; font-size:10px; }
.desk-bookmark { position:absolute; width:22px; height:50px; top:14px; right:44px; background:#c8a46c; clip-path:polygon(0 0,100% 0,100% 100%,50% 80%,0 100%); opacity:.75; }
.landing-features { padding:54px 0 64px; border-top:1px solid #dee2d5; }
.landing-section-heading>span { font-size:14px; color:#718074; }
.landing-section-heading h2 { font-size:29px; letter-spacing:-.7px; font-weight:600; margin:14px 0 36px; }
.landing-feature-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:40px; }
.feature-icon { display:grid; place-items:center; width:44px; height:44px; background:#e9eee3; border-radius:12px; color:var(--green); }
.feature-icon .ui-icon { width:24px; height:24px; }
.landing-feature-grid h3 { font-size:19px; font-weight:600; margin:20px 0 12px; }
.landing-feature-grid p { font-size:16px; line-height:1.85; color:#637168; margin:0; }
.landing-final { display:flex; align-items:center; justify-content:space-between; gap:24px; background:#e9eee3; padding:32px 36px; border-radius:14px; margin:20px 0 48px; }
.landing-final h2 { font-size:26px; font-weight:600; margin:0 0 12px; }
.landing-final p { font-size:16px; color:#637168; margin:0; line-height:1.7; }
.public-footer { max-width:1240px; margin:auto; display:flex; justify-content:space-between; gap:20px; padding:25px 32px 35px; font-size:13px; color:#718074; }
.public-footer a { color:#637168; text-decoration:none; }
.public-footer a:hover { text-decoration:underline; }
.auth-main { max-width:1000px; margin:40px auto 60px; padding:32px; display:grid; grid-template-columns:1fr 430px; gap:70px; align-items:center; min-height:550px; }
.auth-intro h1 { font-size:40px; letter-spacing:-1px; }
.auth-intro-mark { width:90px; height:90px; display:grid; place-items:center; border:1px solid #d9e0d0; border-radius:28px; color:#769067; margin-top:50px; transform:rotate(-6deg); }
.auth-intro-mark .ui-icon { width:48px; height:48px; stroke-width:1; }
.auth-card { background:#fffefa; border:1px solid #e0e4d7; border-radius:16px; padding:34px; box-shadow:0 14px 40px -26px #4a654440; }
.auth-card h2 { font-size:26px; margin:0 0 12px; font-weight:600; }
.auth-subtitle { font-size:15px; color:#637168; margin:0 0 28px; line-height:1.7; }
.auth-card form { display:flex; flex-direction:column; }
.auth-card label { margin:0 0 9px; font-size:14px; color:#49584f; font-weight:550; }
.auth-card input { width:100%; font-size:16px; padding:13px 14px; margin-bottom:22px; }
.auth-card input[aria-invalid=true] { border-color:#b65d47; }
.password-field { position:relative; }
.password-field input { padding-right:49px; margin-bottom:0; }
.password-field button { position:absolute; right:5px; top:5px; border:0; background:transparent; padding:9px; color:#728171; }
.auth-card .auth-hint { font-size:13px; line-height:1.6; margin:9px 0 0; color:#718074; }
.auth-error { font-size:14px; color:#a14935; line-height:1.6; margin:14px 0 0; }
.auth-error:empty { display:none; }
.auth-submit { margin-top:24px; font-size:16px; padding:14px; font-weight:600; }
.auth-alternate { text-align:center; font-size:14px; color:#637168; margin:24px 0 18px; }
.auth-alternate a { color:#315743; font-weight:600; margin-left:8px; }
.auth-home { display:block; text-align:center; font-size:13px; color:#718074; text-decoration:none; }
.member-empty { padding:80px 28px; text-align:center; max-width:680px; margin:30px auto; }
.member-empty .heading-icon { width:56px; height:56px; margin:0 auto 24px; }
.member-empty h1 { font-size:30px; letter-spacing:-.7px; font-weight:600; }
.member-empty p { font-size:16px; color:#637168; line-height:1.8; }
.member-empty button { margin-top:20px; font-size:16px; padding:14px 24px; }
@media(max-width:1000px){.landing-hero { gap:28px; }.landing-copy h1 { font-size:42px; }.landing-desk { grid-template-columns:135px 1fr; padding:16px 12px; }.desk-paper { padding:18px; }.auth-main { gap:40px; grid-template-columns:1fr 410px; }}
@media(max-width:760px){.public-header { padding:20px; }.public-header .brand { font-size:20px; }.public-header .brand-mark { width:34px; height:34px; }.public-header nav { gap:2px; }.public-header .public-button { padding:10px 12px; font-size:14px; }.landing-main { padding:0 22px; }.landing-hero { grid-template-columns:1fr; padding:48px 0 55px; gap:40px; }.landing-copy h1 { font-size:40px; letter-spacing:-1.2px; }.landing-copy>p { font-size:17px; }.landing-desk { max-width:560px; width:100%; margin:auto; grid-template-columns:135px 1fr; transform:none; }.landing-feature-grid { grid-template-columns:1fr; gap:32px; }.landing-section-heading h2 { font-size:25px; line-height:1.5; }.landing-features { padding:40px 0; }.landing-feature-grid article { display:grid; grid-template-columns:44px 1fr; column-gap:16px; }.feature-icon { grid-row:1/3; }.landing-feature-grid h3 { margin:0 0 10px; }.landing-feature-grid p { grid-column:2; }.landing-final { flex-direction:column; align-items:flex-start; padding:28px; }.landing-final h2 { font-size:23px; }.public-footer { padding:22px; font-size:12px; }.auth-main { grid-template-columns:1fr; margin:0 auto 25px; padding:28px 22px; gap:30px; max-width:500px; min-height:0; }.auth-intro h1 { font-size:30px; }.auth-intro h1 br { display:none; }.auth-intro .landing-kicker { margin-bottom:12px; }.auth-intro p { font-size:16px; margin:16px 0 0; }.auth-intro-mark { display:none; }.auth-card { padding:26px; }.auth-card h2 { font-size:24px; }.member-empty { padding:50px 22px; }.member-empty h1 { font-size:25px; }}
@media(max-width:420px){.landing-desk { grid-template-columns:100px 1fr; gap:8px; }.desk-outline { font-size:12px; }.desk-outline>span { gap:4px; }.desk-chapter { font-size:11px; padding:10px 4px; gap:4px; }.desk-part { padding:8px 4px; font-size:11px; }.desk-paper { padding:18px 14px; }.desk-paper h2 { font-size:19px; }.desk-paper p { font-size:12px; }.desk-bookmark { right:32px; }.landing-copy h1 { font-size:36px; }.desktop-break { display:none; }.landing-actions { gap:16px; }}
#erp-editor-fields { display:grid; gap:14px; }
#erp-editor-fields[hidden] { display:none; }

/* Admin forms: consistent readable controls, native keyboard behavior, clear focus. */
.admin-shell input,.admin-shell select,.admin-shell textarea {
  font:400 16px/1.5 var(--font-ui);
  color:var(--ink); background-color:#fff;
  border:1px solid #bfcac2; border-radius:7px;
  padding:10px 12px; min-height:44px; min-width:0;
}
.admin-shell input::placeholder,.admin-shell textarea::placeholder { font-size:16px; color:#6c786f; opacity:1; }
.admin-shell select { appearance:none; padding-right:40px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23536158' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; }
.admin-shell textarea { resize:vertical; min-height:110px; }
.admin-shell input:focus-visible,.admin-shell select:focus-visible,.admin-shell textarea:focus-visible,.admin-shell button:focus-visible { outline:2px solid #315743; outline-offset:2px; }
.admin-shell input[aria-invalid="true"],.admin-shell select[aria-invalid="true"],.admin-auth input[aria-invalid="true"] { border-color:#a23d30; }
.admin-shell input:user-invalid,.admin-shell select:user-invalid,.admin-shell textarea:user-invalid { border-color:#a23d30; }
.admin-auth .auth-home { margin-top:24px; }
.admin-shell input:disabled,.admin-shell select:disabled,.admin-shell textarea:disabled { background-color:#edf0ea; color:#6c786f; cursor:not-allowed; }
.erp-toolbar button,.erp-detail form button,.erp-pagination button { min-height:44px; font-size:14px; }
.erp-toolbar form { flex:1; min-width:220px; }
.erp-toolbar input { width:100%; flex:1; }
.erp-toolbar select { min-width:150px; max-width:100%; }
.erp-detail form label { line-height:1.5; }
.erp-detail form button[type="submit"],.erp-detail form>.primary { justify-self:start; min-width:120px; }
@media(max-width:600px) {
  .erp-toolbar form { min-width:0; flex-basis:100%; }
  .erp-toolbar select { flex:1; }
  .erp-detail form>.primary { width:100%; }
}

/* Keep revision cards at their natural height; scroll each pane independently. */
dialog.history-modal {
  width:min(1000px,calc(100vw - 32px));
  height: min(800px,88dvh);
  max-height:88dvh;
  padding:28px;
  overflow:hidden;
}
dialog.history-modal[open] { display:flex; flex-direction:column; }
.history-modal h2 { flex:none; margin-bottom:12px; overflow-wrap:anywhere; }
.history-modal>p { flex:none; margin:0 0 20px; line-height:1.7; }
.history-modal .revision-layout { flex:1; min-height:0; grid-template-columns:220px minmax(0,1fr); gap:24px; }
.history-modal .revision-list { min-height:0; max-height:none; overflow:auto; scrollbar-gutter:stable; padding-right:4px; }
.history-modal .revision-list button { display:grid; gap:4px; padding:14px; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.history-modal .revision-list b { margin:0; }
.history-modal .revision-list small { line-height:1.6; }
.history-modal .revision-preview { min-height:0; display:flex; flex-direction:column; gap:12px; }
.history-modal .revision-preview .section-title { flex:none; gap:12px; margin:0; min-height:44px; }
.history-modal .revision-preview .manuscript { flex:1; min-height:0; max-height:none; margin:0; padding:24px; overscroll-behavior:contain; }
.history-modal .revision-preview .manuscript:focus-visible { outline:2px solid var(--green); outline-offset:-2px; }
@media(max-width:680px) {
  dialog.history-modal { width:calc(100vw - 20px); height:90dvh; max-height:90dvh; padding:24px 16px 16px; }
  .history-modal h2 { font-size:1.25rem; padding-right:20px; }
  .history-modal>p { font-size:.875rem; margin-bottom:16px; }
  .history-modal .revision-layout { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(100px,25%) minmax(0,1fr); gap:16px; }
  .history-modal .revision-list { grid-auto-rows:max-content; align-content:start; }
  .history-modal .revision-preview .manuscript { padding:16px; }
}
@media(max-width:420px) {
  .history-modal .revision-list { grid-template-columns:minmax(0,1fr); }
}
/* Shared account settings. */
.profile-modal { width:min(560px,calc(100vw - 32px)); max-height:90dvh; overflow-y:auto; }
.profile-modal h2 { margin:0; }
.profile-role { color:#667369; margin:8px 0 24px; font-size:16px; }
.profile-section + .profile-section { margin-top:28px; padding-top:24px; border-top:1px solid #dfe5dc; }
.profile-section h3 { font-size:18px; margin:0 0 16px; }
.profile-section form { display:flex; flex-direction:column; gap:10px; }
.profile-section label { font-size:16px; font-weight:600; }
.profile-section input { width:100%; min-height:46px; font-size:16px; }
.profile-section input[readonly] { background:#f2f4f0; color:#526156; }
.profile-note { font-size:15px; line-height:1.6; color:#667369; margin:0 0 8px; }
.profile-status { font-size:15px; line-height:1.6; color:#315743; margin:0; }
.profile-status.error { color:#a14935; }
.profile-show { display:flex; align-items:center; gap:8px; font-weight:400!important; }
.profile-show input { width:18px; min-height:18px; height:18px; }
.profile-section button { align-self:flex-start; min-height:44px; }

/* Manuscript navigation stays separate from the writing surface. */
dialog.chapter-picker-modal { width:min(860px,calc(100vw - 32px)); max-width:none; padding:28px; max-height:88dvh; }
dialog.chapter-picker-modal[open] { display:flex; flex-direction:column; }
.chapter-picker-heading h2 { margin-bottom:8px; }
.chapter-picker-heading p { color:var(--muted); margin:0 0 20px; font-size:1rem; }
.chapter-picker-search { display:grid; gap:8px; font-size:.9375rem; }
.chapter-picker-search input { width:100%; font-size:1rem; }
.chapter-picker-list { overflow:auto; min-height:100px; max-height:56dvh; margin-top:16px; border:1px solid var(--line); border-radius:10px; }
.chapter-picker-list button { width:100%; min-height:56px; text-align:left; }
.chapter-picker-list .quick-part { padding:16px; font-weight:600; background:var(--sage); }
.chapter-picker-footer { display:flex; gap:12px; justify-content:flex-end; padding-top:20px; }
dialog.book-import-modal { width:min(960px,calc(100vw - 32px)); max-width:none; }
.book-import-modal .import-body { white-space:pre-wrap; max-height:300px; overflow:auto; font-size:1rem; line-height:1.8; padding:16px; background:var(--bg); border:1px solid var(--line); border-radius:8px; }
.book-import-modal details { margin:0 0 20px; }
.book-import-modal summary { cursor:pointer; font-size:.9375rem; padding:10px 0; }
@media(max-width:600px){dialog.chapter-picker-modal { padding:24px 16px; }.chapter-picker-list button { align-items:flex-start; }.chapter-picker-list button small:last-child { width:auto; }.chapter-picker-footer button { flex:1; }}

.conversation-state { display:block; padding:8px 20px 0; color:var(--muted); font-size:.875rem; line-height:1.5; }

.feedback-request-quote { margin:16px 0 24px; padding:16px 20px; border-left:3px solid var(--green); background:var(--sage); white-space:pre-wrap; overflow:auto; max-height:35vh; font-size:1rem; line-height:1.8; }

/* Selected manuscript assistance: an explicitly offline UI preview. */
.ai-help-button { color:var(--green); }
dialog.ai-assist-modal { width:min(1040px,calc(100vw - 32px)); max-width:none; max-height:90dvh; padding:28px; overflow:auto; }
.ai-heading { display:flex; align-items:center; gap:14px; padding-right:24px; }
.ai-heading h2 { margin:0 0 6px; font-size:1.5rem; }
.ai-heading p { margin:0; color:var(--muted); font-size:1rem; }
.ai-symbol { display:grid; place-items:center; flex:none; width:48px; height:48px; border-radius:14px; background:var(--sage); color:var(--green); }
.ai-symbol svg { width:24px; height:24px; }
.ai-preview-notice { display:grid; gap:4px; margin:22px 0; padding:14px 16px; background:#f6f3e9; border:1px solid #e5dfcf; border-radius:10px; font-size:.9375rem; line-height:1.6; }
.ai-assist-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; }
.ai-assist-modal h3 { margin:0 0 12px; font-size:1rem; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ai-assist-modal h3 small { color:var(--muted); font-weight:400; }
.ai-request .feedback-request-quote { margin:0 0 22px; max-height:180px; }
.ai-task-options { border:0; padding:0; margin:0 0 20px; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ai-task-options legend { padding:0; margin-bottom:12px; font-size:1rem; font-weight:600; }
.ai-task { display:flex; align-items:flex-start; gap:8px; padding:12px; margin:0; border:1px solid var(--line); border-radius:10px; cursor:pointer; }
.ai-task:has(input:checked) { background:var(--sage); border-color:var(--green); }
.ai-task input { width:16px; height:16px; min-height:0; margin:4px 0 0; flex:none; accent-color:var(--green); }
.ai-task span { display:grid; gap:4px; }
.ai-task b { font-size:.9375rem; font-weight:600; }
.ai-task small { font-size:.875rem; line-height:1.5; color:var(--muted); }
.ai-field { display:grid; gap:8px; margin:0 0 16px; font-size:1rem; }
.ai-field small { font-size:.875rem; color:var(--muted); }
.ai-field select,.ai-field textarea { width:100%; font-size:1rem; }
.ai-field textarea { min-height:94px; }
.ai-request-actions,.ai-result-actions { display:flex; flex-wrap:wrap; gap:10px; }
.ai-request-actions button { flex:1; min-height:44px; font-size:.9375rem; }
.ai-result { display:flex; flex-direction:column; min-width:0; padding:20px; border:1px solid var(--line); border-radius:12px; background:#fcfcf9; }
.ai-result-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:20px; }
.ai-result-heading h3 { margin:0; }
#ai-result-body { flex:1; min-height:240px; }
.ai-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:240px; text-align:center; gap:14px; color:var(--muted); }
.ai-empty svg { width:28px; height:28px; color:var(--green); }
.ai-empty b { font-size:1rem; font-weight:500; }
.ai-empty p { margin:0; font-size:.9375rem; line-height:1.8; }
.ai-sample-label { font-size:.875rem; line-height:1.6; color:var(--muted); margin:0 0 18px; }
.ai-sample-context { display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:.9375rem; }
.ai-sample-context span { color:var(--muted); }
.ai-sample h4 { font-size:.9375rem; margin:22px 0 10px; }
.ai-sample p { line-height:1.8; }
.ai-sample-text { padding:16px; background:white; border:1px solid var(--line); border-radius:8px; white-space:pre-wrap; font-size:1rem; }
.ai-explanation { white-space:pre-wrap; overflow-wrap:anywhere; }
.ai-result-actions { margin-top:24px; }
.ai-result-actions button { flex:1; min-height:44px; font-size:.9375rem; }
.ai-result-note { color:var(--muted); margin:12px 0 0; font-size:.875rem; line-height:1.6; }
@media(max-width:760px){
  dialog.ai-assist-modal { padding:24px 16px; width:calc(100vw - 20px); }
  .ai-assist-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
  .ai-heading h2 { font-size:1.25rem; }
  .ai-heading p { font-size:.9375rem; }
  .ai-result { padding:16px; }
}
@media(max-width:420px){.ai-task-options { grid-template-columns:1fr; }.ai-request-actions { flex-direction:column; }}
.book-settings { max-width:1000px; }
.book-delete-card { border:1px solid #d8aca4; margin-top:28px; }
.book-delete-card p,.book-delete-form p { line-height:1.7; overflow-wrap:anywhere; }
.book-settings button.danger,.book-delete-form button.danger { background:#a4382c; border-color:#a4382c; color:white; min-height:44px; }
.book-delete-form button.danger:disabled { background:#eee8e5; border-color:#ded5d0; color:#8a7d76; cursor:not-allowed; }
dialog.book-delete-modal { width:min(720px,calc(100vw - 32px)); padding:28px; }
dialog form.book-delete-form { max-width:620px; display:block; }
.book-delete-form h2 { padding-right:28px; margin:0 0 16px; }
.book-delete-form>label { display:block; margin-top:24px; font-weight:600; }
.delete-title-reference { padding:12px 14px; margin:12px 0; background:var(--bg); border-radius:8px; overflow-wrap:anywhere; user-select:all; }
.book-delete-form>input { width:100%; box-sizing:border-box; font-size:1rem; min-height:48px; }
.book-delete-form label.delete-acknowledgement { display:grid; grid-template-columns:20px minmax(0,1fr); gap:12px; align-items:start; font-size:1rem; line-height:1.5; font-weight:400; margin:24px 0 0; cursor:pointer; }
.delete-acknowledgement input { box-sizing:border-box; width:20px; height:20px; min-width:20px; min-height:20px; padding:0; margin:2px 0 0; accent-color:#a4382c; cursor:pointer; }
.delete-acknowledgement span { min-width:0; }
#delete-book-error { color:#a4382c; margin:16px 0 0; }
#delete-book-error:empty { display:none; }
.delete-book-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:24px; }
@media(max-width:600px){dialog.book-delete-modal { width:calc(100vw - 24px); padding:24px 16px; }.delete-book-actions button { flex:1; }.book-settings .card { padding:20px; }}
.landing-company { display:grid; grid-template-columns:1fr 1.1fr; gap:64px; padding:64px 0; border-top:1px solid var(--line); }
.landing-company h2 { font-size:1.75rem; line-height:1.5; margin:12px 0; letter-spacing:-.035em; }
.landing-company p { margin:0 0 20px; line-height:1.85; font-size:1rem; color:var(--muted); }
.landing-company-link { display:inline-flex; align-items:center; gap:10px; color:var(--green); font-weight:600; }
.hero-publishing { min-width:0; }
.hero-book-scene { position:relative; min-height:450px; padding-top:30px; }
.hero-book-label { position:absolute; top:0; right:12px; color:var(--green); font-size:.875rem; font-weight:600; }
.hero-book-stack { position:relative; height:370px; }
.hero-book { position:absolute; display:block; padding:0; overflow:hidden; border:1px solid #e0dfd3; border-radius:10px; background:var(--paper); box-shadow:0 16px 36px #29372f18; transition:translate .2s; text-align:left; }
.hero-book img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:contain; }
.hero-book>span { display:block; padding:10px 12px; color:var(--ink); font-size:.875rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hero-book-1 { width:62%; left:0; top:20px; transform:rotate(-7deg); z-index:2; }
.hero-book-2 { width:53%; right:0; top:8px; transform:rotate(7deg); z-index:1; }
.hero-book-3 { width:54%; right:2%; bottom:0; transform:rotate(-2deg); z-index:3; }
.hero-book:hover,.hero-book:focus-visible { translate:0 -6px; z-index:4; }
.hero-book:focus-visible,.hero-shelf-link:focus-visible,[data-scroll-books]:focus-visible { outline:2px solid var(--green); outline-offset:5px; }
.hero-shelf-link { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:24px 0 0 auto; border:0; border-bottom:1px solid #b9c6b6; border-radius:0; background:transparent; color:var(--green); padding:10px 0; font-size:.9375rem; }
.landing-actions button.landing-text-link { border:0; background:transparent; padding:10px 0; font-size:.9375rem; color:var(--green); }
.hero-books-loading { min-height:450px; display:grid; grid-template-columns:repeat(3,1fr); align-items:center; gap:12px; }
.hero-books-loading span { aspect-ratio:3/4; border-radius:10px; background:#e8e9df; }
.hero-books-loading span:nth-child(2) { translate:0 -20px; }
.hero-catalogue-fallback { display:grid; place-items:center; min-height:300px; background:var(--soft); color:var(--green); border-radius:18px; }
#landing-publications-slot .landing-publications { padding-top:28px; padding-bottom:64px; scroll-margin-top:28px; }
#landing-publications-slot .published-book-grid { gap:28px; margin-top:32px; }
#landing-publications-slot .published-book:not(.published-book-featured) .publication-description { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.publication-display-modal { width:min(760px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; }
#publication-display-form { display:grid; gap:18px; }
#publication-display-form fieldset { border:1px solid var(--line); border-radius:10px; padding:14px; display:grid; gap:12px; }
#publication-display-form .checkbox-label { display:flex; align-items:center; gap:10px; }
#publication-display-form [type=radio],#publication-display-form [type=checkbox] { width:18px; height:18px; flex:0 0 18px; margin:0; }
.publication-selection-row { display:flex; align-items:center; gap:8px; padding:12px 0; border-bottom:1px solid var(--line); }
.publication-selection-row label { flex:1; min-width:0; }
.publication-selection-row label span { overflow-wrap:anywhere; }
.publication-selection-row small { white-space:nowrap; color:var(--muted); }
.publication-selection-row button { padding:6px 10px; }
#publication-display-error { color:#a04332; }
@media(max-width:760px){.hero-book-scene{min-height:380px;padding-top:24px;}.hero-book-stack{height:310px;}.hero-publishing{width:100%;max-width:540px;margin:0 auto;}.hero-shelf-link{margin-top:16px;font-size:.875rem;}#landing-publications-slot .landing-publications{padding-top:0;padding-bottom:48px;}.hero-books-loading{min-height:350px;}}
@media(prefers-reduced-motion:reduce){.hero-book{transition:none;}.hero-book:hover,.hero-book:focus-visible{translate:none;}}
.landing-footer { border-top:1px solid var(--line); padding:40px max(28px,calc((100vw - 1200px)/2)); background:#f3f4ef; color:var(--muted); }
.landing-footer-top { display:flex; justify-content:space-between; gap:40px; }
.landing-footer .brand { font-size:1.25rem; color:var(--ink); }
.landing-footer .brand-mark { width:32px; height:32px; }
.landing-footer p { font-size:.9375rem; margin:16px 0 8px; }
.landing-footer address { font-style:normal; font-size:.9375rem; line-height:1.8; }
.landing-footer address a { color:var(--green); text-underline-offset:3px; }
.landing-footer nav { display:flex; flex-wrap:wrap; gap:4px 20px; align-content:flex-start; max-width:450px; }
.landing-footer nav a,.landing-footer nav button { display:inline-flex; align-items:center; min-height:44px; font-size:.9375rem; color:var(--muted); border:0; padding:0; background:transparent; }
.landing-footer nav [data-policy="privacy"] { font-weight:650; color:var(--ink); }
.landing-footer-bottom { margin-top:32px; padding-top:24px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:16px; font-size:.875rem; }
dialog.policy-modal { width:min(840px,calc(100vw - 32px)); height:min(800px,88dvh); max-height:88dvh; padding:32px; overflow:hidden; }
dialog.policy-modal[open] { display:flex; flex-direction:column; }
.policy-content { min-height:0; overflow:auto; padding-right:8px; overscroll-behavior:contain; }
.policy-modal>h2 { padding-right:24px; }
.policy-date { margin:0 0 28px; color:var(--muted); font-size:.9375rem; }
.policy-body { font-size:1rem; line-height:1.85; overflow-wrap:anywhere; word-break:keep-all; }
.policy-body h2,.policy-body h3 { font-family:var(--font-ui); font-size:1.125rem; line-height:1.6; margin:28px 0 12px; font-weight:650; }
.policy-body p { margin:0 0 18px; }.policy-body ul { padding-left:24px; margin:0 0 20px; }.policy-body li { margin-bottom:8px; }
.policy-admin-notice { font-size:.9375rem; line-height:1.7; padding:14px; background:#f4f3ea; border-radius:8px; }
.erp-master-detail:has(#erp-policy-form) { grid-template-columns:minmax(260px,.7fr) minmax(0,1.7fr); }
#erp-policy-form { display:grid; gap:12px; }
#erp-policy-form label { display:grid; gap:8px; font-size:1rem; font-weight:600; }
#erp-policy-form input { width:100%; font-size:1rem; }
.policy-editor-toolbar,.policy-save-actions { display:flex; flex-wrap:wrap; gap:8px; }
.policy-editor-toolbar button { min-height:40px; font-size:.9375rem; }
#policy-body-editor { width:100%; min-height:440px; resize:vertical; font-family:var(--font-ui); font-size:1rem; line-height:1.85; tab-size:2; }
#policy-admin-preview { border:1px solid var(--line); border-radius:8px; padding:20px; background:var(--paper); }
.policy-save-actions { margin-top:12px; }.policy-save-actions button { min-height:44px; }
@media(max-width:760px){.landing-company { grid-template-columns:1fr; gap:16px; padding:40px 0; }.landing-company h2 { font-size:1.5rem; }.landing-footer { padding:32px 20px; }.landing-footer-top,.landing-footer-bottom { flex-direction:column; gap:24px; }.landing-footer nav { gap:4px 18px; }.landing-footer-bottom { gap:8px; }.erp-master-detail:has(#erp-policy-form) { grid-template-columns:1fr; }dialog.policy-modal { width:calc(100vw - 20px); padding:24px 16px; }.policy-save-actions button { flex:1; }#policy-body-editor { min-height:360px; }}
.paper .chapter-title-button {
  display:flex;align-items:baseline;justify-content:flex-start;gap:12px;width:100%;padding:0;min-height:0;
  border:0;border-radius:4px;background:transparent;box-shadow:none;
  color:inherit;font:inherit;letter-spacing:inherit;line-height:inherit;text-align:left;
}
.chapter-title-button span {min-width:0;overflow-wrap:anywhere;}
.chapter-title-button svg {flex:none;width:18px;height:18px;opacity:.45;}
.chapter-title-button:hover {background:transparent;color:var(--green);}
.chapter-title-button:hover svg,.chapter-title-button:focus-visible svg {opacity:1;}
.chapter-title-button:focus-visible {outline:2px solid var(--green);outline-offset:6px;}
.chapter-title-form {margin:12px 0 28px;}
.chapter-title-form input {width:100%;font-size:1.75rem;font-weight:600;line-height:1.5;padding:10px 12px;}
.chapter-title-actions {display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px;}
.chapter-title-actions small {margin-right:auto;color:var(--muted);font-size:13px;}
.chapter-title-error {color:#a03d32;font-size:14px;margin:8px 0 0;}
.chapter-title-error:empty {display:none;}
@media(max-width:600px){.chapter-title-form input {font-size:1.5rem;}.chapter-title-actions {flex-wrap:wrap;}.chapter-title-actions small {flex-basis:100%;}}
.paragraph-style-tool {flex-shrink:0;}
.toolbar #paragraph-style {width:110px;min-height:36px;padding-top:6px;padding-bottom:6px;font-size:.9375rem;font-weight:500;margin:0;}
.manuscript :is(h2,h3,h4,h5) {font-family:var(--font-ui);font-weight:600;line-height:1.5;letter-spacing:-.025em;margin:1.5em 0 .65em;overflow-wrap:anywhere;}
.manuscript h2 {font-size:1.75rem;}
.manuscript h3 {font-size:1.5rem;}
.manuscript h4 {font-size:1.3125rem;}
.manuscript h5 {font-size:1.1875rem;}
.manuscript>:is(h2,h3,h4,h5):first-child {margin-top:0;}
@media(max-width:600px){.manuscript h2 {font-size:1.5rem;}.manuscript h3 {font-size:1.375rem;}}
.sidebar:has(.author-account) {overflow:hidden;gap:12px;height:100dvh;}
.sidebar:has(.author-account) .nav {padding-top:8px;padding-bottom:8px;min-height:44px;}
.sidebar:has(.author-account) .book-list {display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;}
.sidebar:has(.author-account) .book-list .book,.sidebar:has(.author-account) .new-book {flex-shrink:0;}
.side-bottom.author-account {flex-direction:column;align-items:stretch;gap:8px;padding-top:14px;flex-shrink:0;margin-top:0;}
.side-bottom.author-account>span {min-width:0;overflow-wrap:anywhere;}
.side-account-actions {display:flex;align-items:center;gap:8px;flex-shrink:0;}
.author-account .side-account-actions {justify-content:space-between;}
.side-account-actions #switch-role {margin-left:auto;}
.side-bottom .account-settings {width:36px;height:36px;min-height:36px;margin-left:0;padding:8px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);border:1px solid transparent;border-radius:8px;}
.side-bottom .account-settings .ui-icon {width:18px;height:18px;}
.side-bottom .account-settings:hover,.side-bottom .account-settings.active {background:var(--soft);color:var(--green);border-color:var(--line);}
.side-bottom .account-settings:focus-visible {outline:2px solid var(--green);outline-offset:3px;}
@media(max-width:760px){.side-bottom .account-settings {width:44px;height:44px;min-height:44px;}}
@media(max-height:620px){.sidebar:has(.author-account) {overflow-y:auto;}.sidebar:has(.author-account) .book-list {flex:none;max-height:180px;}}
.workspace-switch {display:flex;align-items:center;gap:9px;color:var(--green);background:var(--soft);font-weight:500;}
.workspace-switch .ui-icon {width:18px;height:18px;flex-shrink:0;}
.account-capabilities {border:1px solid var(--line);border-radius:10px;padding:14px;display:grid;gap:12px;margin:16px 0;}
.erp-detail .account-capabilities label {display:flex;align-items:flex-start;gap:10px;margin:0;line-height:1.5;font-size:15px;}
.erp-detail .account-capabilities input[type=checkbox] {width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:3px 0 0;padding:0;accent-color:var(--green);}
.admin-shell #admin-editor-workspace {width:100%;justify-content:flex-start;padding:10px 12px;font-size:.9375rem;}
.erp-book-create-modal {width:min(850px,calc(100vw - 32px));max-height:92dvh;overflow:auto;}
.admin-book-fields {display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.admin-book-fields .full {grid-column:1 / -1;}
.admin-book-fields label {display:grid;gap:8px;font-size:15px;}
.admin-book-fields input,.admin-book-fields select,.admin-book-fields textarea {width:100%;font-size:16px;}
.admin-book-actions {display:flex;justify-content:flex-end;gap:10px;margin-top:20px;}
.erp-author-book {margin:8px 0 16px;}
#admin-book-create-error {color:#a33f38;}
.coauthor-setting {display:flex!important;align-items:flex-start;gap:10px;line-height:1.5;}
.coauthor-setting input[type=checkbox] {width:18px;min-height:18px;height:18px;flex:0 0 18px;margin-top:3px;accent-color:var(--green);}
.toolbar .tool-group[hidden] {display:none;}
@media(max-width:600px){.admin-book-fields{grid-template-columns:1fr;}.erp-book-create-modal{padding:24px 20px;}.admin-book-actions{flex-wrap:wrap;}}
.admin-shell #admin-author-workspace {width:100%;justify-content:flex-start;padding:10px 12px;font-size:.9375rem;}
