.chapter-main { --rail: light-dark(#65596b, #baaac8); --muted-border: light-dark(#bbb3c1,#71667b); --film: light-dark(#f5f2f5, #302c32); --action: light-dark(#593454, #edafda); --action-text: light-dark(#fff, #262028); max-width:68rem; margin:auto; padding:1.8rem 1rem 4rem; }
.chapter-main h1 { font-size:1.85rem; line-height:1.15; margin:0 0 1.55rem; }
.chapter-workbench { display:grid; gap:1.75rem; }
.chapter-workbench section { min-width:0; }
.chapter-workbench h2 { font-size:1.17rem; margin:0 0 .7rem; }
.chapter-top { display:flex; align-items:start; justify-content:space-between; gap:.5rem; }
.chapter-workbench .chapter-file { background:var(--film); padding:.72rem; border:1px solid var(--muted-border); border-radius:.35rem; }
.chapter-workbench input[type=file] { display:block; width:100%; margin-top:.44rem; }
.chapter-workbench label { display:block; font-weight:660; margin:.8rem 0 .35rem; }
.chapter-workbench small { padding-left:.25rem; color:var(--rail); font-weight:500; }
.chapter-workbench textarea, .chapter-workbench input[type=text] { font: .96rem ui-monospace,monospace; color:inherit; background:transparent; width:100%; padding:.65rem; border:1px solid var(--muted-border); border-radius:.35rem; box-sizing:border-box; }
.chapter-workbench textarea { resize:vertical; min-height:7rem; }
.chapter-workbench button { font:inherit; color:inherit; background:transparent; min-height:2.5rem; padding:.45rem .65rem; border:1px solid var(--muted-border); border-radius:.35rem; cursor:pointer; }
.chapter-workbench button.chapter-action { background:var(--action); color:var(--action-text); font-weight:700; border-color:transparent; margin-top:.9rem; }
.chapter-workbench p { margin:.6rem 0; font-size:.9rem; }
.chapter-workbench [role=alert] { color:light-dark(#9c2520,#ffb5b0); }
.chapter-workbench ol { list-style:none; margin:1rem 0; padding:0; border-top:2px solid var(--rail); }
.chapter-workbench li { display:grid; gap:.25rem; padding:.5rem .65rem; border-bottom:1px solid var(--muted-border); overflow-wrap:anywhere; }
.chapter-workbench li time { font: .84rem ui-monospace,monospace; color:var(--rail); }
.chapter-workbench details { margin-top:1rem; }
.chapter-workbench pre { font-size:.84rem; white-space:pre-wrap; overflow-wrap:anywhere; padding:.7rem; background:var(--film); }
.chapter-workbench [hidden] { display:none; }
@media (min-width:800px) {
  .chapter-workbench { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .chapter-workbench section + section { padding-left:1.75rem; border-left:1px solid var(--muted-border); }
}
@media (max-width:480px) {
  .chapter-main { padding-top:1.18rem; }
  .chapter-main h1 { font-size:1.4rem; }
}
