:root {
  --bg: #faf8f4; --fg: #22201c; --muted: #6b665c; --line: #e4dfd5;
  --card: #ffffff; --accent: #8a4b2a; --accent-bg: #f4e9e1; --ok: #2f6b3a; --warn: #9a5b00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18; --fg: #ece8e1; --muted: #a39d92; --line: #36332e;
    --card: #242320; --accent: #e0a07a; --accent-bg: #3a2c23; --ok: #7fc28c; --warn: #e3b05c;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.75 "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
a { color: var(--accent); }
header {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  border-bottom: 1px solid var(--line); padding: 10px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
header .brand { font-weight: 700; text-decoration: none; color: var(--fg); letter-spacing: .05em; }
header nav { display: flex; gap: 14px; font-size: 15px; }
header nav a { text-decoration: none; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 80px; }
h1 { font-size: 1.45rem; line-height: 1.4; margin: .4em 0; }
h2 { font-size: 1.15rem; margin: 1.6em 0 .5em; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); font-size: .9rem; }
.flash { background: var(--accent-bg); padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.list a.title { font-weight: 600; text-decoration: none; color: var(--fg); display: block; line-height: 1.45; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 12.5px; padding: 1px 8px; border-radius: 99px; background: var(--accent-bg); color: var(--accent); }
.tag.ok { color: var(--ok); } .tag.warn { color: var(--warn); }
.meta { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: .95rem; }
.meta div { margin: 2px 0; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 18px; font-size: 16px; text-decoration: none; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.card { overflow-wrap: anywhere; }
.card table { border-collapse: collapse; width: 100%; font-size: .92rem; display: block; overflow-x: auto; }
.card th, .card td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.card blockquote { margin: .6em 0; padding: 4px 12px; border-left: 3px solid var(--accent); color: var(--muted); }
textarea, input[type=text], input[type=password] {
  width: 100%; font: inherit; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px;
}
textarea { min-height: 84px; }
label { display: block; font-weight: 600; margin: 14px 0 4px; }
.notes { background: var(--card); border: 2px solid var(--accent); border-radius: 12px; padding: 4px 14px 14px; margin-top: 24px; }
.notes h2 { border: 0; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.card hr { border: 0; border-top: 1px dashed var(--line); margin: 1.4em 0; }
.filter { margin: 8px 0; }
.filter input[name=q] { flex: 1; min-width: 160px; padding: 8px 10px; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); }
.seg a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--muted); font-size: .9rem; margin-left: 2px; white-space: nowrap; }
.seg a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.toc { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 4px; font-size: .92rem; }
.toc a { text-decoration: none; color: var(--accent); }
details.topic { margin: 14px 0; }
details.topic summary { cursor: pointer; font-size: 1.08rem; padding: 6px 0; border-bottom: 1px solid var(--line); }
.list li.seed { border-left: 4px solid var(--accent); }
.star { color: var(--accent); font-size: .85rem; white-space: nowrap; }
.marks { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 10px 0; }
.marks .row { margin: 4px 0; }
.seg button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--muted); font-size: .9rem; cursor: pointer; margin-left: 2px; }
.seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .85rem; }
.tag.imp3 { background: var(--accent); color: #fff; }
.tag.imp2 { font-weight: 600; }

/* 審稿室：句子為主體，窄螢幕保留完整論點與觸控空間。 */
.room-entry { display:flex; flex-wrap:wrap; gap:8px 20px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--card); margin:16px 0; }
.room { overflow-wrap:anywhere; min-width:0; }
.room-back { font-size:.87rem; text-decoration:none; }
.room-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:20px; }
.room-eyebrow { color:var(--accent); letter-spacing:.08em; font-size:.8rem; margin:0; }
.room-heading h1 { font-size:1.9rem; margin:3px 0; }
.room-round { font-size:.8rem; background:var(--accent-bg); color:var(--accent); border-radius:30px; padding:6px 12px; }
.room-intro { margin:8px 0 22px; }
.room-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); list-style:none; padding:0; margin:20px 0; font-size:.77rem; color:var(--muted); gap:6px; }
.room-steps li { border-top:2px solid var(--line); padding:10px 0; display:flex; align-items:center; gap:6px; }
.room-steps span { border:1px solid var(--line); border-radius:50%; width:23px; height:23px; flex-shrink:0; text-align:center; line-height:21px; }
.room-steps .current { border-color:var(--accent); color:var(--accent); font-weight:700; }
.room-steps .current span { background:var(--accent); color:var(--bg); border-color:var(--accent); }
.room h2 { font-size:1.2rem; border:0; margin:0 0 12px; padding:0; }
.room h3 { font-size:1rem; line-height:1.65; margin:0 0 10px; }
.room-profile { margin:8px 0 26px; padding:12px 16px; }
.room-profile summary .muted { display:inline-block; font-size:.78rem; font-weight:400; margin-left:8px; }
.room-profile dl { display:grid; grid-template-columns:auto 1fr; gap:5px 16px; font-size:.9rem; }
.room-profile dt { color:var(--muted); }.room-profile dd { margin:0; }
.room-profile ul { padding-left:22px; font-size:.88rem; }
.room-previous { border-bottom:1px solid var(--line); margin-bottom:30px; padding-bottom:14px; }
.room-previous ul { padding-left:22px; font-size:.9rem; }
.room-section-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.room-legend { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:.74rem; color:var(--muted); margin-bottom:22px; }
.room-legend span { border-left:3px solid transparent; padding-left:7px; }
.room-legend .legend-new { border-color:#4c9462; }.room-legend .legend-changed { border-color:#528cc3; }.room-legend .legend-todo { border-color:#d38d3e; }
.room fieldset { border:0; padding:0; margin:0; min-width:0; }
.room-logic-section { margin:0 0 26px; }
.room-logic-section > h3 { font-size:.83rem; letter-spacing:.02em; color:var(--muted); margin:0 0 12px; }
.room-sentence { background:var(--card); border:1px solid var(--line); border-left:4px solid transparent; border-radius:0 9px 9px 0; margin:10px 0; padding:14px 15px; scroll-margin-top:100px; }
.room-sentence.status-new { border-left-color:#4c9462; }.room-sentence.status-changed { border-left-color:#528cc3; }.room-sentence.status-todo { border-left-color:#d38d3e; }
.room-sentence-line { display:flex; gap:10px; align-items:flex-start; }
.room-sentence-line p { margin:0; flex:1; min-width:0; line-height:1.85; }
.room-sid { color:var(--muted); font-size:.7rem; white-space:nowrap; margin-left:6px; }
.room-plus { flex-shrink:0; border:1px solid var(--line); border-radius:50%; background:var(--bg); color:var(--accent); width:44px; height:44px; font-size:22px; cursor:pointer; }
.room-plus:hover, .room-plus[aria-expanded=true] { background:var(--accent-bg); border-color:var(--accent); }
.room .room-change-note { font-size:.76rem; color:var(--muted); margin:8px 0 0; line-height:1.6; }
.room-note label { font-size:.85rem; }.room textarea { resize:vertical; min-height:96px; max-width:100%; }
.room-advice { background:var(--bg); margin:12px 0 0; padding:9px 12px; font-size:.88rem; }
.room-advice summary { color:var(--accent); font-size:.8rem; }
.room-count { display:inline-block; min-width:21px; text-align:center; background:var(--accent-bg); border-radius:20px; margin-left:6px; }
.room-advice-item { border-top:1px solid var(--line); padding:12px 0 4px; margin-top:10px; }
.room-check { display:flex; align-items:flex-start; gap:10px; font-weight:400; margin:0; cursor:pointer; }
.room input[type=checkbox] { width:22px; height:22px; flex-shrink:0; margin:3px 0 0; accent-color:var(--accent); }
.room-check > span { min-width:0; }
.room-badges { display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:.76rem; margin-bottom:6px; color:var(--muted); }
.room-badges b { color:var(--fg); }.room-badges .severity-高 { color:#bd4939; font-weight:bold; }
.room-reject { background:none; border:0; padding:0; margin:8px 0 0 32px; }
.room-reject summary { color:var(--muted); font-size:.74rem; font-weight:400; }
.room-reject textarea { margin-top:8px; font-size:.86rem; }
.room-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 0 24px; }
.room-actions p { flex-basis:100%; margin:0; }.room .btn { min-height:44px; }.room button:disabled { opacity:.5; cursor:wait; }
.room-job { border:1px solid var(--line); background:var(--accent-bg); border-radius:10px; padding:14px; display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:20px 0; font-size:.86rem; }
.room-job > span:last-child { flex-basis:100%; color:var(--muted); font-size:.8rem; }
.room-pulse { width:10px; height:10px; border-radius:50%; background:var(--accent); animation:room-pulse 1.8s infinite; }
@keyframes room-pulse { 50% { opacity:.3; } }
@media (prefers-reduced-motion:reduce) { .room-pulse { animation:none; } }
.room-error { border-left:4px solid var(--warn); background:var(--accent-bg); padding:12px 16px; font-size:.85rem; margin:20px 0; }
.room-discussion, .room-proposals { border-top:1px solid var(--line); margin-top:32px; padding-top:26px; }
.room-discussion-item, .room-proposal { border:1px solid var(--line); border-radius:10px; background:var(--card); padding:18px; margin:16px 0; }
.room-discussion-item h3 { font-weight:500; }.room-turn { border-left:2px solid var(--line); padding-left:12px; margin:16px 0; }.room-turn p { margin:0; white-space:pre-wrap; font-size:.92rem; }
.room-stance { color:var(--accent); background:var(--accent-bg); padding:1px 8px; border-radius:20px; }.room-turn.author-turn { border-color:var(--accent); }
.room-before, .room-after { border-left:3px solid var(--line); padding:6px 12px; margin-top:14px; }.room-after { border-color:#4c9462; background:var(--bg); }.room-before small, .room-after small { color:var(--muted); }.room-before p, .room-after p { margin:3px 0; }
.room-proposal > p { font-size:.9rem; }.room-applied { margin-top:24px; background:var(--accent-bg); border-radius:10px; padding:20px; }
.room-author-note { color:var(--accent); font-size:.85rem; }.room-local-status:empty { display:none; }
.room-discussion-toolbar { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:6px 14px; margin-bottom:14px; }
.room-discussion-toolbar p { margin:0; }.room-discussion-toolbar button { min-height:44px; padding:6px; }
details.room-discussion-item { padding:14px 16px; }
.room-discussion-item > summary { font-size:.93rem; font-weight:500; }
.room-discussion-head { display:inline; }.room-discussion-title { line-height:1.65; }
.room-discussion-head .room-sid { margin:0 5px 0 0; font-weight:600; color:var(--accent); }
.room-discussion-head .room-badges { margin:8px 0 0 16px; font-weight:400; }
.room-discussion-body { padding-top:18px; }
.room .room-quick-replies { margin-top:18px; }.room-quick-replies legend { font-size:.87rem; font-weight:600; margin-bottom:8px; }
.room-quick-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.room-quick-choice { margin:0; position:relative; font-size:.85rem; font-weight:500; cursor:pointer; }
.room-quick-choice input { position:absolute; opacity:0; width:1px; height:1px; }
.room-quick-choice span { display:flex; align-items:center; justify-content:center; min-height:44px; padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.room-quick-choice input:checked + span { border-color:var(--accent); background:var(--accent-bg); color:var(--accent); font-weight:700; }
.room-quick-choice input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
.room-quick-choice input:disabled + span { opacity:.65; cursor:default; }
.room-quick-replies .linkish { min-height:40px; margin-top:2px; }
@media (max-width:480px) { .room-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:480px) { .room-heading h1 { font-size:1.65rem; }.room-sentence { padding:12px 10px; }.room-sentence-line { gap:7px; }.room-plus { width:40px; height:44px; }.room-steps li { flex-direction:column; align-items:flex-start; }.room-profile summary .muted { display:block; margin:0; }.room-actions > button { width:100%; }.room-discussion-item, .room-proposal { padding:14px; } }
