:root {
  color-scheme: light;
  --ink: #172b31;
  --muted: #53676c;
  --line: #dce3e3;
  --teal: #155c56;
  --pale: #e9f3ef;
  --paper-bg: #e8eeed;
  --paper-width: 760px;
  font: 14px/1.55 "Inter", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
.proposal-text { width: var(--paper-width); max-width: 100%; margin: 0 auto; padding: clamp(20px,5vw,58px); background: white; color: var(--ink); }
.proposal-text p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 1em 0; }
.proposal-text section + section { border-top: 1px solid var(--line); margin-top: 1.5em; }
.proposal-material {
  font-size: clamp(15px, 1.6vw, 17px); line-height: 1.8; overflow-wrap: anywhere;
  -webkit-touch-callout: none;
}
.proposal-material > h2 { font-size: clamp(20px, 3vw, 27px); line-height: 1.45; }
.proposal-material :is(h3, h4) { margin: 1.5em 0 .45em; line-height: 1.55; }
.proposal-material :is(ul, ol) { margin: .6em 0 1.15em; padding-inline-start: 1.6em; }
.proposal-material li + li { margin-top: .35em; }
.proposal-material ul.material-checklist { list-style: none; padding: 0; }
.material-checklist li { position: relative; padding-inline-start: 1.6em; }
.material-check { position: absolute; inset-inline-start: 0; color: var(--teal); }
body[data-asset="slides"] #sheets img:not([height]) { aspect-ratio: auto 16 / 9; }
.bundle-files { margin: 0 0 16px; padding-left: 1.3em; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f6f8f7; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .36; cursor: default; }
button:hover:not(:disabled), .outline a:hover, .edition:hover { background-color: var(--pale); }
:focus-visible { outline: 2px solid #327f75; outline-offset: 2px; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
.version {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; border: 1px solid #c9d6d3;
  border-radius: 5px; padding: 5px 9px; font-size: 13px; background: white; white-space: nowrap;
}
.edition-picker { position: relative; display: flex; align-items: center; gap: 7px; min-width: 0; }
.draft-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; max-width: 12em; }
.edition-picker .version::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.edition-menu {
  position: absolute; inset: calc(100% + 6px) auto auto 0; z-index: 4; width: min(250px, 85vw);
  max-height: min(48dvh, 360px); overflow: auto; padding: 10px; border: 1px solid #bdccc8;
  border-radius: 6px; background: white; box-shadow: 0 5px 16px #16392b22;
}
.edition-menu h2 { font-size: 15px; padding: 2px 6px 6px; }
.edition-menu .edition { margin: 0; border: 0; justify-content: space-between; padding: 7px 8px; }
.edition-menu .edition[aria-current] { background: var(--pale); color: var(--teal); font-weight: 650; }
.edition-menu .edition small { font-size: 12px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 7px; background: var(--teal); color: white; font-weight: 600; padding: 9px 14px; text-decoration: none; white-space: nowrap; }
.primary:hover:not(:disabled) { background: #0c4945; }
.review-workspace-page { height: 100dvh; display: flex; flex-direction: column; }
.review-workspace-page > .writing-nav { flex-shrink: 0; }
.workspace, .original-workspace {
  display: grid; grid-template-columns: clamp(150px,15vw,224px) minmax(0,1fr) clamp(210px,21vw,312px);
  gap: 12px; padding: 14px 12px 0; background: #e7efee;
}
.workspace { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0,1fr); }
.chapters, .proof { min-width: 0; min-height: 0; border-radius: 8px 8px 0 0; }
.chapters { overflow: auto; padding: 20px 9px; background: #f4f8f7; }
.chapters h2, .rail-card h2 {
  display: flex; align-items: center; gap: 9px; font-size: 17px; line-height: 1.4; font-weight: 650;
}
.chapters h2 { margin: 0 8px 15px; }
.chapters .outline-picker { display: none; }
.bundle-download { width: 100%; min-height: 44px; padding-inline: 5px; gap: 6px; }
.outline { display: grid; gap: 3px; }
.outline a {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 4px; border-left: 3px solid transparent;
  color: #35534f; text-decoration: none; font-size: 14px; overflow-wrap: anywhere;
}
.outline svg { width: 16px; height: 16px; }
.outline a small { margin-left: auto; color: var(--muted); font-size: 12px; }
.outline a[aria-current] { color: #104f49; font-weight: 650; background: #dcece8; border-left-color: #23776b; }
.outline a.outline-subheading { padding-inline-start: 2em; }
.proof { display: flex; flex-direction: column; padding: 10px 0 0; background: #f4f8f7; }
.toolbar {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-height: 47px; margin: 0 10px;
  padding: 4px 10px; border-radius: 6px; background: #fff;
}
.proof-title {
  flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 13px; font-weight: 550; color: var(--muted);
}
.pager, .zoom { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: 0 0 auto; }
#counter { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.zoom { padding: 0 6px; border-inline: 1px solid var(--line); }
#fit { padding: 5px 6px; font-size: 13px; border-radius: 4px; }
.icon-btn, .zoom > button:not(#fit) { width: 27px; height: 28px; padding: 0; display: inline-grid; place-items: center; border-radius: 4px; }
.inspector { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.inspector[aria-label="稿件工具"] { padding-inline: 14px; background: #f7faf9; border-radius: 8px 8px 0 0; }
.inspector-title { margin: 16px 0 8px; font: 700 20px/1.5 "Songti SC",SimSun,serif; }
.inspector-title ~ .rail-card { padding: 14px 0; margin: 0; border-radius: 0; border-top: 1px solid var(--line); }
.file-tools p { margin: 0 0 8px; overflow-wrap: anywhere; }
.latest-feedback { display: inline-block; margin-top: 8px; color: var(--teal); }
.rail-card { padding: 16px; margin-bottom: 10px; border-radius: 7px; background: #f7faf9; }
.rail-card h2 { margin-bottom: 12px; }
.rail-card h2 svg { color: var(--teal); }
.feedback-entry {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 38px;
  padding: 6px 9px; border: 1px solid #aebfba; border-radius: 6px; background: white;
  color: var(--teal); font-weight: 600; line-height: 1.4;
}
.feedback-entry svg { width: 15px; height: 15px; }
.feedback-card [hidden] { display: none; }
.feedback-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; margin-top: 6px; }
.feedback-shortcuts button { padding: 4px 2px; color: var(--teal); font-size: 13px; border-radius: 3px; }
.review-hint p, .review-files p { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.review-hint [hidden] { display: none; }
.project-continue { margin-top: 8px; }
.project-continue summary { padding: 6px 0; color: var(--teal); cursor: pointer; font-weight: 600; }
.project-continue textarea { box-sizing: border-box; width: 100%; }
.project-continue [role="status"] { display: block; font-size: 13px; }
.review-actions { display: grid; gap: 2px; }
.review-actions:not(:empty) + .review-actions { margin-top: 2px; }
.review-actions form, .rail-card form { margin: 0; }
.rail-link, .review-actions button, .review-actions a, .rail-card form button {
  display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%;
  border: 0; border-radius: 4px; padding: 8px 10px; background: #fff; color: #1d4943;
  text-align: left; text-decoration: none; font: inherit; line-height: 1.5;
}
.rail-link svg:last-child, .review-actions svg, .rail-card form svg { width: 14px; height: 14px; margin-left: auto; }
.review-actions [data-resume-imports] { gap: 0; justify-content: flex-start; }
.rail-link:hover, .review-actions a:hover { background: #e4efec; }
.save-project { margin: 10px 0 0; padding: 3px 0; color: var(--muted); font-size: 12px; text-decoration: underline; }
.stage-status:not(:empty) { display: block; padding: 5px 0; font-size: 12px; }
#scroll { position: relative; flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; background: transparent; }
#sheets { padding: 14px 20px 32px; width: max(100%, calc(var(--paper-width) + 40px)); }
figure { margin: 0 auto 18px; width: var(--paper-width); box-shadow: 0 2px 8px #233d331a,0 0 0 1px #bbc8c6; background: #fff; }
figure img { width: 100%; height: auto; display: block; }
figure { position: relative; }
.page-check { position: absolute; top: .5em; right: .6em; color: var(--teal); border: 0; background: white; padding: .3em .5em; border-radius: 4px; cursor: pointer; }
.passage-check { position: absolute; background: transparent; border: 0; border-bottom: 1px dotted var(--teal); cursor: pointer; }
.passage-check:hover, .passage-check:focus-visible { background: #368b811c; }
#host-checkout #offer { margin-bottom: 14px; line-height: 1.75; }
#host-checkout #actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#host-checkout select { min-height: 38px; padding: 5px 12px; border: 1px solid #aebdbb; border-radius: 6px; color: var(--ink); background: white; font: inherit; }
#host-checkout #merchant { display: block; color: var(--muted); margin: 14px 0; }
#host-checkout #payment img { display: block; max-width: 100%; height: auto; margin: 12px auto; }
.paper-storage { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); }
.paper-storage summary { cursor: pointer; }
#erase-paper { border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.metric { width: 100%; display: flex; align-items: center; gap: 9px; padding: 18px 5px; border-bottom: 1px solid var(--line); text-align: left; }
.metric-icon { color: var(--teal); align-self: flex-start; padding-top: 1px; }
.metric-copy { flex: 1 1 auto; min-width: 0; }
.metric-title { display: block; color: var(--ink); font-weight: 600; }
.metric-copy small { margin-top: 2px; display: block; color: var(--muted); font-size: 11.5px; }
.metric strong { font-size: 13px; color: #254c47; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric > svg { width: 12px; color: #7a8c88; }
dialog { padding: 0; width: min(640px, calc(100% - 28px)); max-height: min(78dvh,780px); color: var(--ink); background: white; border: 1px solid #b9c9c4; border-radius: 12px; box-shadow: 0 14px 70px #0e242540; }
dialog::backdrop { background: #10282b60; }
.dialog-head { position: sticky; z-index: 1; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: white; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; }
.dialog-body { padding: 17px 20px 22px; overflow-wrap: anywhere; }
.dialog-body h3 { font-size: 14px; margin-bottom: 6px; }
.dialog-body p, .dialog-body small { line-height: 1.7; }
.dialog-body small { color: var(--muted); }
.dialog-body section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.dialog-body section:last-child { border: 0; padding-bottom: 0; }
.dialog-body section:first-child { padding-top: 0; }
.dialog-body blockquote { margin: 5px 0 4px; padding: 8px 12px; border-left: 3px solid #84ada1; background: #f2f7f5; white-space: pre-wrap; }
.dialog-body .pair p { margin: 2px 0 9px; white-space: pre-wrap; }
.formula { margin-top: 8px; color: var(--teal); }
.before, .after { padding: 8px 12px; margin-top: 6px; border-radius: 4px; white-space: pre-wrap; }
.before { background: #faf0ee; } .after { background: #edf6f1; }
.table-wrap { overflow-x: auto; }
.table-wrap table { border-collapse: collapse; width: 100%; }
.table-wrap td { padding: 3px 6px; border: 1px solid #bac8c4; }
.export-status { margin: 8px 0 14px; color: var(--teal); }
.download, .edition { color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 10px; display: flex; align-items: center; gap: 12px; text-decoration: none; margin: 6px 0; }
.download:hover { background: var(--pale); }
.download small { display: block; }
.download > svg:last-child { margin-left: auto; color: var(--teal); }
.original-reader { --original-nav-height: 55px; background: #e7efee; }
.original-heading { position: sticky; top: 0; z-index: 2; }
.original-workspace { align-items: start; min-height: calc(100dvh - var(--original-nav-height)); }
.original-workspace > aside { position: sticky; top: calc(var(--original-nav-height) + 10px); max-height: calc(100dvh - var(--original-nav-height) - 16px); }
.original-workspace > .chapters { min-height: calc(100dvh - var(--original-nav-height) - 16px); }
.original-proof { min-width: 0; padding: 10px; background: #f4f8f7; border-radius: 8px; }
.original-proof .toolbar { position: sticky; top: var(--original-nav-height); z-index: 1; margin: 0; }
.original-proof .toolbar span { color: var(--muted); white-space: nowrap; font-size: 13px; }
.back-to-final { white-space: nowrap; color: var(--teal); font-weight: 600; }
.original-proof figure { width: min(100%,850px); scroll-margin-top: calc(var(--original-nav-height) + 60px); margin: 14px auto; }
.original-proof figcaption { padding: 6px 12px; color: var(--muted); font-size: 12px; }
@media (min-width: 861px) {
  .workspace, .original-workspace { padding-top: clamp(12px, 1.45vw, 22px); }
  .proof, .original-proof { padding-top: clamp(10px, 1.45vw, 22px); }
  .toolbar { min-height: clamp(42px, 3.8vw, 57px); }
  #sheets { padding-top: clamp(12px, 1.8vw, 27px); }
  .chapters { padding-top: clamp(21px, 2.1vw, 32px); }
  .chapters h2, .rail-card h2 { font: 700 clamp(17px, 1.55vw, 23px)/1.4 "Songti SC", SimSun, serif; }
  .rail-card { padding: clamp(14px, 1.36vw, 20px); }
  .outline a, .rail-link, .review-actions button, .review-actions a, .rail-card form button {
    font-size: clamp(14px, 1.23vw, 18px); padding-block: clamp(8px, .75vw, 12px);
  }
}
@media (min-width: 1000px) {
  .original-reader { --original-nav-height: calc(clamp(50px, 4.7vw, 70px) + 1px); }
}
@media (min-width: 1060px) {
  .proof .toolbar { display: grid; grid-template-columns: minmax(80px,max-content) minmax(0,1fr) auto auto; }
  .proof .toolbar .zoom { justify-self: end; }
}
@media (min-width: 1200px) {
  .workbench-nav ~ .workspace, .original-heading:has(.workbench-nav) + .original-workspace {
    grid-template-columns: minmax(0,18.3fr) minmax(0,59.9fr) minmax(0,20.8fr);
  }
  .workbench-nav ~ .workspace { padding-top: 13px; }
  .workbench-nav ~ .workspace .proof { padding-top: 8px; }
  .workbench-nav ~ .workspace #sheets { padding-top: 12px; }
  .workbench-nav ~ .workspace .chapters { padding: 16px 14px; }
  .workbench-nav ~ .workspace .edition-picker { gap: 14px; }
  .workbench-nav ~ .workspace .draft-name { font-size: 17px; }
  .workbench-nav ~ .workspace .version { border-color: #448d7d; font-size: 15px; }
  .inspector-title { font-size: 24px; }
  .inspector-title ~ .rail-card { padding-block: 20px; }
  .inspector .feedback-entry { min-height: 44px; color: white; border-color: var(--teal); background: var(--teal); }
  .inspector .feedback-entry:hover { background: #0c4945; }
  .inspector .file-tools .bundle-download { border: 1px solid #428b7b; color: var(--teal); background: #f5faf8; }
  .inspector .file-tools .bundle-download:hover { background: #deeee9; }
}
@media (max-width: 1050px) and (min-width: 861px) {
  .workspace, .original-workspace { grid-template-columns: 144px minmax(0,1fr) 205px; gap: 8px; padding-inline: 8px; }
  .rail-card { padding: 12px; }
  .toolbar { gap: 5px; padding-inline: 6px; }
}
@media (max-width: 860px) {
  .workspace, .original-workspace { grid-template-columns: minmax(0,1fr); gap: 6px; padding: 6px 6px 0; }
  .workspace { grid-template-rows: auto minmax(0,1fr) auto; }
  .original-workspace > .chapters { display: none; }
  .workspace > .chapters { display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow: visible; padding: 4px 8px; }
  .workspace > .chapters h2, .workspace > .chapters .outline { display: none; }
  .chapters .outline-picker { display: inline-flex; min-height: 44px; }
  .bundle-download { width: auto; margin: 0; padding-inline: 14px; }
  .proof { padding-top: 0; }
  .toolbar { margin: 0; }
  .inspector { display: flex; align-items: stretch; gap: 6px; max-height: min(30dvh,155px); padding-bottom: 6px; }
  .inspector[aria-label="稿件工具"] { display: grid; padding: 2px 6px 6px; gap: 5px 10px; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; overscroll-behavior: contain; }
  .inspector-title { display: none; }
  .inspector-title ~ .rail-card { padding: 4px; }
  .inspector .feedback-card, .inspector .file-tools { grid-row: 1; }
  .inspector .file-tools .bundle-download { width: 100%; white-space: normal; }
  .rail-card { flex: 1 1 0; min-width: 0; padding: 8px; margin: 0; }
  .rail-card h2 { font-size: 13px; gap: 5px; margin-bottom: 5px; }
  .rail-card h2 svg { height: 15px; width: 15px; }
  .feedback-entry { min-height: 30px; padding: 3px 4px; font-size: 12px; }
  .feedback-shortcuts { gap: 0 8px; margin-top: 3px; }
  .feedback-shortcuts button { padding: 2px 0; min-height: 24px; font-size: 12px; }
  .rail-link, .review-actions button, .review-actions a, .rail-card form button { padding: 4px; font-size: 12px; }
  .review-hint { flex: 2 1 0; }
  .review-hint p, .review-files p { font-size: 12px; margin-bottom: 4px; }
  .save-project { margin-top: 4px; }
  .original-workspace > aside { position: static; max-height: none; }
  .original-proof { padding: 0; }
}
@media (max-width: 600px) {
  .toolbar { gap: 3px; min-height: 40px; padding: 2px 4px; }
  .toolbar .proof-title { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
  .version { font-size: 12px; padding: 4px; }
  .draft-name { max-width: 6em; }
  .pager { margin-inline: auto; gap: 0; }
  .zoom { gap: 0; padding: 0 2px; }
  .zoom svg { width: 14px; height: 14px; }
  #fit { padding: 3px; }
  .icon-btn, .zoom > button:not(#fit) { width: 22px; }
  #counter { min-width: 35px; font-size: 12px; }
  #scroll { scrollbar-gutter: auto; }
  #sheets { padding: 9px 6px 24px; width: max(100%, calc(var(--paper-width) + 12px)); }
  .rail-link svg { display: none; }
  .original-reader { --original-nav-height: 69px; }
  .original-proof .toolbar { justify-content: space-between; }
}
.secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 11px; border: 1px solid #b8c8c2; border-radius: 7px;
  color: #244d46; background: white; cursor: pointer; white-space: nowrap;
}
.text-action { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
#feedback { width: min(568px, calc(100% - 24px)); max-height: min(86dvh, 780px); }
#feedback .dialog-head { padding: 15px 20px; }
#feedback .dialog-head h2 { display: flex; align-items: baseline; gap: 10px; }
.feedback-edition { font-size: 13px; font-weight: 500; color: var(--muted); }
#feedback .dialog-body { padding: 0 20px 20px; }
#feedback-panel { overflow-wrap: anywhere; }
#feedback-panel [hidden] { display: none; }
#feedback-panel button:disabled { cursor: default; }
#feedback-panel h4 { margin: 0; font-size: 14px; }
.feedback-modes { display: flex; align-items: end; gap: 4px 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.feedback-modes button {
  min-height: 42px; margin-bottom: -1px; border-bottom: 2px solid transparent;
  padding: 7px 3px; color: var(--muted); font-size: 14px;
}
.feedback-modes button[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); font-weight: 650; }
#feedback-status:not(:empty), .feedback-notice {
  margin: 10px 0 14px; padding: 7px 10px; border-radius: 5px; background: #f0f5f3; color: #35534f; font-size: 13px;
}
#feedback-handoff { margin: 0 0 16px; padding: 12px; border-radius: 6px; background: var(--pale); }
#feedback-handoff p, [data-import-guidance] { color: var(--muted); font-size: 13px; }
#feedback-panel #feedback-imports { margin: 16px 0 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
#feedback-import-list section + section { margin-top: 12px; }
.feedback-command, .feedback-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feedback-command { margin-top: 8px; }
.feedback-command input { flex: 1 1 12em; min-width: 0; }
#feedback-panel fieldset { min-width: 0; padding: 0; border: 0; margin: 0; }
#feedback-panel .feedback-item { padding: 0; border: none; }
#feedback-panel .feedback-item + .feedback-item { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.feedback-row-head { justify-content: space-between; }
.feedback-row-head .text-action { margin-left: auto; font-size: 13px; }
.feedback-pick { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.feedback-pick input { width: 17px; height: 17px; accent-color: var(--teal); }
.feedback-label { display: grid; gap: 5px; margin: 8px 0 0; }
.feedback-label > span { font-weight: 600; }
#feedback-panel textarea, #feedback-panel select, .feedback-command input {
  font: inherit; color: var(--ink); border: 1px solid #a9bcb7; border-radius: 6px; background: white; padding: 8px 10px;
}
#feedback-panel textarea { width: 100%; min-height: 3em; resize: vertical; }
#feedback-panel .feedback-opinion { min-height: 94px; }
#feedback-panel select { width: fit-content; max-width: 100%; }
.feedback-item details { margin: 8px 0 0; }
.feedback-item summary { width: fit-content; min-height: 27px; padding-block: 3px; color: var(--teal); cursor: pointer; font-size: 13px; }
.feedback-item details[open] { background: #f5f8f7; border-radius: 6px; padding: 6px 10px 10px; }
.feedback-file-box { display: grid; justify-items: start; gap: 8px; padding: 16px; background: #f4f8f7; border-radius: 7px; }
.file-picker { position: relative; }
.file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-picker:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.feedback-hint, .feedback-file-note { font-size: 13px; color: var(--muted); }
.feedback-file-note { margin: 9px 0 0; }
#feedback-comments { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.feedback-submit-row {
  position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 14px 0 0; padding: 12px 0 2px; background: white; border-top: 1px solid var(--line);
}
#feedback-add { display: inline-flex; align-items: center; gap: 4px; padding: 6px 4px; border-radius: 4px; color: var(--teal); }
#feedback-add svg { width: 15px; height: 15px; }
#feedback-selection { font-size: 13px; color: var(--muted); }
.feedback-record-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.feedback-record-heading h3 { margin: 0; }
.feedback-record-heading button { font-size: 13px; }
#feedback-saved { margin-top: 8px; }
#feedback-saved section { padding: 8px 0; }
#feedback-saved p { white-space: pre-wrap; }
#feedback-saved small, #feedback-saved a { display: block; }
#feedback-panel a { color: var(--teal); }
@media (max-width: 600px) {
  #feedback .dialog-head { padding: 12px 14px; }
  #feedback .dialog-head .icon-btn { width: 32px; height: 32px; }
  #feedback .dialog-body { padding: 0 14px 14px; }
  #feedback-panel textarea, #feedback-panel select, .feedback-command input { font-size: 16px; }
  .feedback-modes { gap: 10px; margin-bottom: 12px; }
  .inspector .feedback-card { flex: 1.3 1 0; }
  .inspector .review-hint { flex: 1.5 1 0; }
  .feedback-entry { min-height: 36px; }
  .feedback-shortcuts button { min-height: 30px; }
}

.writing-nav, #writing-panel {
  --writing-ink: #172b31;
  --writing-teal: #155c56;
  --writing-line: #dce3e3;
  color: var(--writing-ink);
  font: 14px/1.5 "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}
.writing-nav {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex: none;
  gap: clamp(14px, 2.8vw, 46px);
  width: 100%;
  min-width: 0;
  padding: 0 clamp(12px, 2vw, 32px);
  border-bottom: 1px solid var(--writing-line);
  background: white;
}
.writing-brand, .writing-scenes { display: flex; align-items: center; }
.writing-brand {
  gap: 9px;
  flex: none;
  color: #143b39;
  white-space: nowrap;
  font: 700 clamp(18px, 1.6vw, 24px)/1.35 "Songti SC", "Noto Serif CJK SC", SimSun, serif;
}
.writing-brand svg { width: 28px; height: 28px; color: var(--writing-teal); }
.writing-scenes { gap: clamp(5px, 1.2vw, 18px); }
.writing-nav .writing-entry, #writing-panel button {
  box-sizing: border-box;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.writing-nav .writing-entry {
  position: relative;
  height: 54px;
  padding: 0 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}
.writing-nav .writing-entry[aria-current="true"] { color: var(--writing-teal); font-weight: 700; }
.writing-nav .writing-entry[aria-current="true"]::after {
  content: "";
  position: absolute;
  inset: auto 7px 0;
  height: 3px;
  background: var(--writing-teal);
}
.writing-nav .writing-entry:hover, #writing-panel .writing-choice:hover { background: #edf5f2; color: #124e48; }
.writing-nav > .writing-entry { margin-left: auto; font-size: 13px; font-weight: 600; }
.writing-nav .writing-short { display: none; }
.writing-nav button:focus-visible, #writing-panel :is(button,a,textarea):focus-visible {
  outline: 2px solid #327f75;
  outline-offset: -2px;
}
#writing-panel {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(520px, calc(100% - 24px));
  height: fit-content;
  max-height: min(82dvh, 700px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #bdccc8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 70px #102b2933;
}
#writing-panel:not([open]), #writing-panel [hidden] { display: none; }
#writing-panel::backdrop { background: #10282b60; }
#writing-panel .writing-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--writing-line);
  background: #fff;
}
#writing-panel h2 { margin: 0; color: var(--writing-ink); font-size: 20px; font-weight: 700; outline: none; }
#writing-panel h3 { margin: 0 0 8px; color: var(--writing-ink); font-size: 15px; }
#writing-panel .writing-close {
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--writing-line);
  border-radius: 5px;
  background: white;
}
.writing-dialog-body { padding: 19px 22px 22px; }
#writing-panel section { margin: 0; }
#writing-panel .writing-help section + section, #writing-panel .writing-group + .writing-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--writing-line);
}
#writing-panel .writing-help section > div { color: #465e61; line-height: 1.8; }
#writing-panel .writing-help .writing-entry, #writing-panel .writing-link {
  display: inline-block;
  margin: 2px 6px 0 0;
  padding: 3px 6px;
  border: 0;
  border-radius: 4px;
  background: #edf5f2;
  color: var(--writing-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.writing-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
#writing-panel .writing-choice {
  min-height: 39px;
  padding: 5px 10px;
  border: 1px solid var(--writing-line);
  border-radius: 5px;
  background: white;
  text-align: left;
}
.writing-description { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px; margin-bottom: 12px; line-height: 1.7; }
.writing-description strong { font-weight: 600; color: #465e61; }
.writing-intents { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--writing-line); }
#writing-panel .writing-intent, #writing-panel .writing-copy {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #b1c8c2;
  border-radius: 5px;
  background: #fff;
  color: var(--writing-teal);
}
#writing-panel .writing-intent[aria-pressed="true"], #writing-panel .writing-copy { background: var(--writing-teal); color: white; }
.writing-handoff p { margin: 14px 0 8px; color: #465e61; }
.writing-command {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 76px;
  margin: 0 0 10px;
  padding: 10px;
  resize: vertical;
  border: 1px solid var(--writing-line);
  border-radius: 5px;
  color: var(--writing-ink);
  background: #f4f8f6;
  font: inherit;
}
.writing-status:empty { display: none; }
@media (min-width: 1000px) {
  .writing-nav { gap: clamp(24px, 2.7vw, 42px); padding-inline: clamp(24px, 3vw, 48px); }
  .writing-brand {
    gap: clamp(9px, 1.15vw, 17px);
    padding-right: clamp(18px, 2.2vw, 34px);
    border-right: 1px solid #cfdbd9;
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1.2;
  }
  .writing-brand svg { width: clamp(30px, 3vw, 45px); height: clamp(30px, 3vw, 45px); }
  .writing-scenes { gap: clamp(14px, 2.75vw, 42px); }
  .writing-scenes .writing-entry {
    height: clamp(50px, 4.7vw, 70px);
    font-size: clamp(16px, 1.5vw, 22px);
  }
  .writing-nav > .writing-entry {
    height: 32px;
    padding: 0 12px;
    border: 1px solid #c5d6d1;
    border-radius: 5px;
    color: var(--writing-teal);
    font-weight: 600;
  }
}
@media (max-width: 760px) {
  .writing-nav { gap: 10px; padding: 0 10px; }
  .writing-brand { font-size: 17px; gap: 6px; }
  .writing-brand svg { width: 22px; height: 22px; }
  .writing-scenes { gap: 1px; }
  .writing-nav .writing-entry { height: 42px; padding: 0 6px; }
  .writing-nav .writing-long { display: none; }
  .writing-nav .writing-short { display: inline; }
}
@media (max-width: 540px) {
  .writing-nav { display: grid; grid-template-columns: 1fr auto; gap: 0 4px; padding: 2px 10px 0; }
  .writing-brand { grid-column: 1; grid-row: 1; }
  .writing-nav > .writing-entry { grid-column: 2; grid-row: 1; height: 32px; }
  .writing-scenes { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; }
  .writing-scenes .writing-entry { height: 34px; padding: 0 7px; }
  .writing-dialog-body { padding: 16px; }
}
@media print {
  .writing-nav, #writing-panel { display: none !important; }
}

.writing-nav.workbench-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  padding: 0;
}
.workbench-nav .writing-brand {
  padding: 8px clamp(14px, 2.6vw, 40px);
  border: none;
  font-size: clamp(18px, 1.65vw, 25px);
}
.workbench-nav .writing-brand svg { width: 30px; height: 30px; }
.work-actions { display: flex; padding-right: clamp(10px, 2vw, 30px); gap: 6px; }
.work-actions .writing-entry { height: 35px; padding: 0 9px; color: var(--writing-teal); }
.work-levels {
  position: relative;
  z-index: 4;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(0,.8fr) minmax(0,1.4fr) minmax(0,.9fr);
  gap: clamp(18px, 3.2vw, 50px);
  padding: 7px clamp(14px, 2.6vw, 40px) 9px;
  background: #edf5f2;
  border-top: 1px solid #e6eeeb;
}
.work-level { position: relative; min-width: 0; margin: 0; }
.work-level:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 61%;
  left: calc(100% + clamp(5px, 1.2vw, 20px));
  width: 6px;
  height: 6px;
  border: solid #46716a;
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.work-level > summary { cursor: pointer; list-style: none; }
.work-level > summary::-webkit-details-marker { display: none; }
.work-level > summary:focus-visible { outline: 2px solid #327f75; outline-offset: 2px; }
.work-label { display: block; color: #35544f; font-size: 12px; }
.work-value {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 3px 11px;
  border: 1px solid #b8cbc5;
  border-radius: 5px;
  background: white;
  font-weight: 600;
}
.work-level[open] .work-value { border-color: var(--writing-teal); }
.work-value > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-value > i { flex: none; width: 7px; height: 7px; border: solid #46655e; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.work-level[open] .work-value > i { transform: translateY(2px) rotate(225deg); }
.work-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1;
  display: grid;
  gap: 2px;
  width: max-content;
  min-width: min(100%, 360px);
  max-width: min(360px, calc(100vw - 28px));
  max-height: min(56dvh, 390px);
  overflow: auto;
  padding: 6px;
  border: 1px solid #c9d8d2;
  border-radius: 7px;
  box-shadow: 0 7px 20px #173a3020;
  background: #fff;
  overflow-wrap: anywhere;
}
.work-level:nth-last-child(-n+2) .work-menu { left: auto; right: 0; }
.work-level:not([open]) .work-menu { display: none; }
.work-menu-title, .work-menu p { margin: 0; padding: 6px 9px; }
.work-menu p { color: #49615d; font-size: 13px; }
.work-menu button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: none;
  background: white;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--writing-ink);
}
.work-menu button[aria-current="true"], .work-menu button:hover { color: #104f49; background: #e5f1ed; }
.work-menu button[aria-current="true"] { font-weight: 650; }
.work-menu button small { flex: none; color: #4b6660; font-size: 12px; }
.work-level[data-level="project"] .work-option { display: grid; gap: 1px; }
.work-menu .work-create { border-top: 1px solid var(--writing-line); color: var(--writing-teal); }
.work-menu .work-recover { color: var(--writing-teal); font-size: 13px; }
.work-draft-label { display: grid; gap: 5px; margin-top: 12px; }
.work-draft-label input { min-width: 0; padding: 8px; border: 1px solid #b1c8c2; border-radius: 5px; font: inherit; }
@media (min-width: 1200px) and (min-height: 720px) {
  .workbench-nav .writing-brand { min-height: 62px; font-size: 27px; }
  .work-levels { grid-template-columns: 1.18fr .75fr 1.3fr 1fr; gap: 5.5vw; padding: 10px 3.5vw 14px; }
  .work-label { font-size: 15px; margin-bottom: 3px; }
  .work-value { min-height: 43px; padding-inline: 14px; font-size: 17px; }
  .work-level:not(:last-child)::after { left: calc(100% + 2.6vw); }
}
@media (max-width: 700px) {
  .workbench-nav .writing-brand { padding: 4px 10px; }
  .workbench-nav .writing-brand svg { width: 23px; height: 23px; }
  .work-actions .writing-entry { height: 33px; padding: 0 5px; font-size: 13px; }
  .work-levels { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 15px; padding: 4px 10px 6px; }
  .work-level { position: static; }
  .work-level::after { display: none; }
  .work-label { font-size: 11px; }
  .work-value { min-height: 28px; padding: 2px 6px; font-size: 13px; }
  .work-level .work-menu, .work-level:nth-last-child(-n+2) .work-menu { inset: 100% 10px auto; width: auto; max-width: none; }
}


.access-page {max-width:38rem; margin:clamp(2rem,12vh,8rem) auto; padding:0 20px}
.access-page h1 {font-size:clamp(1.45rem,5vw,2rem); margin-bottom:.65rem}
.access-page p, .author-access p {margin:.75rem 0; color:var(--muted)}
.access-command {width:100%; min-height:5rem; resize:vertical; margin:4px 0 10px;
  padding:10px 12px; border:1px solid #adbfba; border-radius:6px; background:white;
  color:var(--ink); font:inherit}
.access-status {min-height:1.55em}
