.bw40-studio,.bw40-chapters{--bw40-ink:#6b6a9e;--bw40-line:#dfdfe7;--bw40-bg:#f6f5f8}
.bw40-novel{display:grid;grid-template-columns:74px minmax(0,1fr);gap:14px;padding:17px 0;border-top:1px solid var(--bw40-line);align-items:start}.bw40-cover img{width:74px;height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:7px}.bw40-novel-main h3{margin:5px 0;font-size:1.2rem}.bw40-novel-main p{margin:5px 0 11px;color:#686976;font-size:.88rem}.bw40-status{display:inline-block;font-size:.72rem;font-weight:650;color:#535462;background:#e9e8f2;padding:3px 8px;border-radius:12px}.bw40-future{background:#f3e8d5;color:#795a2f}.bw40-draft{background:#e9e8f2;color:#686976}.bw40-links{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.bw40-links .bw-button{margin:0}.bw40-chapters{margin:20px 0 24px}.bw40-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.bw40-metrics>div{background:var(--bw40-bg);border:1px solid var(--bw40-line);border-radius:9px;padding:11px 9px;min-width:0}.bw40-metrics strong{display:block;color:var(--bw40-ink);font-size:1.2rem;overflow-wrap:anywhere}.bw40-metrics small{font-size:.72rem;color:#686976}.bw40-chapter{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:center;border-bottom:1px solid var(--bw40-line);padding:12px 0}.bw40-position{font-size:.85rem;color:#686976;text-align:center}.bw40-chapter-main{min-width:0;overflow-wrap:anywhere}.bw40-chapter-main strong,.bw40-chapter-main small{display:block;margin:4px 0}.bw40-chapter-main small{color:#686976;font-size:.76rem}.bw40-move,.bw40-toolbar button,.bw40-recovery button{background:#f6f5f8;color:#6b6a9e;border:1px solid #dfdfe7;border-radius:7px;padding:7px 10px;cursor:pointer;font:inherit;font-size:.85rem}.bw40-move:disabled,[data-bw40-save-order]:disabled{opacity:.42;cursor:default}.bw40-chapters form>.bw40-links{margin-top:12px}.bw40-settings{border:1px solid #dfdfe7;border-radius:12px;padding:12px;margin:16px 0}.bw40-settings summary{font-weight:650;color:#6b6a9e;cursor:pointer;padding:5px}.bw40-settings form{margin-top:16px}.bw40-toolbar{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 10px}.bw40-toolbar[hidden],.bw40-preview[hidden],.bw40-recovery[hidden],.bw40-preview [hidden],textarea[data-bw40-text][hidden]{display:none!important}.bw40-editor{white-space:pre-wrap;min-height:320px}.bw40-preview{margin:12px 0;padding:20px;overflow-wrap:anywhere}.bw40-preview .bw6-reader-content{font-family:Georgia,serif;line-height:1.8}.bw40-preview-note{white-space:pre-wrap}.bw40-recovery{border:1px solid #d3b88a;background:#fbf6eb;border-radius:8px;padding:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.88rem}.bw40-schedule{min-width:0;border:1px solid #dfdfe7;border-radius:10px;padding:12px;display:grid;gap:9px}.bw40-schedule legend{font-weight:650;color:#6b6a9e;padding:0 5px}.bw40-schedule small{color:#686976;font-size:.8rem}.bw40-schedule button{justify-self:start}.bw40-schedule input{max-width:100%;min-width:0}.bw40-editor img{max-width:100%}
@media(max-width:600px){.bw40-chapter{grid-template-columns:22px minmax(0,1fr)}.bw40-chapter>.bw40-links{grid-column:2}.bw40-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.bw40-novel{grid-template-columns:58px minmax(0,1fr);gap:10px}.bw40-cover img{width:58px}.bw40-move{min-width:38px;min-height:38px}.bw40-editor{min-height:300px;padding:12px}.bw40-preview{padding:12px}}
/* 0.40.1 – manuscript workflow and focused writing. */
.bw401-import,.bw401-revisions{color:#30323f;min-width:0}.bw401-import>p,.bw401-revisions>p{font-size:.9rem;line-height:1.55}.bw401-import-row{border-bottom:1px solid #dfdfe7;padding:12px 0;overflow-wrap:anywhere}.bw401-import-row label{display:flex;align-items:flex-start;gap:8px}.bw401-import-row input[type=checkbox]{flex:none;width:auto;margin-top:3px}.bw401-import-row p{margin:4px 0 0;font-size:.85rem;color:#686976}.bw401-import-row small{color:#686976}.bw401-revision-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #dfdfe7;flex-wrap:wrap;font-size:.86rem}.bw401-revision-row span{min-width:0;overflow-wrap:anywhere}.bw401-writing-open{overflow:hidden!important}.bw401-writing-dialog{position:fixed;inset:0;box-sizing:border-box;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;padding:16px;background:#e9e8f2;color:#30323f;overflow:auto;overscroll-behavior:contain;z-index:2147483640}.bw401-writing-dialog::backdrop{background:#e9e8f2}.bw401-writing-dialog:not([open]){display:none}.bw401-writing-dialog .bw401-focus-form{max-width:850px;margin:0 auto;width:100%;box-sizing:border-box;display:grid;gap:12px}.bw401-focus-form .bw40-toolbar{position:sticky;top:0;z-index:2;margin:0;background:#e9e8f2;padding:8px 0;box-shadow:0 6px 8px #e9e8f2}.bw401-focus-form [data-bw401-focus]{background:#6b6a9e;color:#fff;margin-left:auto}.bw401-focus-form .bw40-editor{min-height:clamp(300px,62vh,850px);padding:24px;font:18px/1.85 Georgia,serif;background:white}.bw401-focus-form .bw-form-pair{grid-template-columns:1fr}.bw401-focus-form .bw-form-pair>label:nth-child(2){display:none}.bw401-focus-form .bw401-revisions{display:none}.bw401-focus-form .bw-form-actions{padding-bottom:20px}.bw401-focus-form [data-bw40-backup]{overflow-wrap:anywhere}.bw401-dialog-fallback{display:block!important}@media(max-width:600px){.bw401-writing-dialog{padding:10px}.bw401-focus-form .bw40-editor{padding:12px;font-size:17px;min-height:58vh}.bw401-focus-form .bw40-toolbar{gap:4px}.bw401-focus-form .bw40-toolbar button{font-size:.78rem;padding:7px}.bw401-focus-form [data-bw401-focus]{margin-left:0}.bw401-revision-row{align-items:flex-start}}

/* 0.40.2 – private author analytics, responsive without horizontal scrolling. */
.bw402-stats{margin:24px 0 8px;padding:16px;border:1px solid #dfdfe7;border-radius:12px;background:#fff;min-width:0;color:#30323f;overflow-wrap:anywhere;scroll-margin-top:24px}.bw402-stats h3{margin:5px 0 12px}.bw402-stats h4{font-size:1rem;margin:20px 0 8px}.bw402-settings{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.85rem}.bw402-settings label{display:flex;align-items:center;gap:7px;flex:1 1 190px}.bw402-settings input[type=checkbox]{width:auto;flex:none;accent-color:#6b6a9e}.bw402-stats .bw-muted{font-size:.82rem;line-height:1.55}.bw402-period{display:flex;gap:6px;flex-wrap:wrap;margin:15px 0}.bw402-period a{font-size:.82rem;border:1px solid #dfdfe7;border-radius:20px;padding:7px 12px;text-decoration:none;color:#6b6a9e}.bw402-period a[aria-current=page]{background:#6b6a9e;color:#fff;border-color:#6b6a9e}.bw402-chart{display:flex;align-items:flex-end;gap:2px;height:85px;background:#f6f5f8;border-bottom:1px solid #dfdfe7;padding:7px 5px 0;box-sizing:border-box}.bw402-chart span{flex:1 1 0;min-width:0;height:var(--bw402-h);background:#8888b2;border-radius:2px 2px 0 0}.bw402-chart-dates{display:flex;justify-content:space-between;font-size:.7rem;color:#686976;margin-top:3px}.bw402-days{margin:8px 0;font-size:.8rem}.bw402-days summary{cursor:pointer;color:#6b6a9e}.bw402-days table{width:100%;margin-top:8px;border-collapse:collapse}.bw402-days td,.bw402-days th{padding:5px;border-bottom:1px solid #dfdfe7;text-align:left}.bw402-chapter{padding:11px 0;border-bottom:1px solid #dfdfe7}.bw402-chapter-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;font-size:.9rem}.bw402-chapter-heading span,.bw402-detail{font-size:.76rem;color:#686976}.bw402-bar{height:8px;background:#e9e8f2;border-radius:8px;overflow:hidden;margin:6px 0}.bw402-bar span{display:block;height:100%;background:#8888b2;border-radius:8px}.bw402-detail{display:flex;gap:6px 12px;flex-wrap:wrap}.bw402-stats a:focus-visible,.bw402-stats button:focus-visible{outline:2px solid #6b6a9e;outline-offset:3px}@media(max-width:600px){.bw402-stats{padding:10px}.bw402-chart{gap:1px}.bw402-settings{align-items:flex-start}.bw402-chapter-heading span{flex-shrink:0}}

.bw402-long-chart{overflow-x:auto;scrollbar-width:thin}.bw402-long-chart span{min-width:2px}.bw402-long-chart:focus-visible{outline:2px solid #6b6a9e;outline-offset:2px}

/* RC5.7 – one novel page, then chapters. */
.bw57-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;list-style:none;padding:0;margin:18px 0}.bw57-steps li{padding:14px;background:#f6f5f8;border:1px solid #dfdfe7;border-radius:12px;color:#535462;min-width:0}.bw57-steps li[aria-current=step]{background:#e9e8f2;border-color:#aaa8cb;color:#53547e}.bw57-steps strong,.bw57-steps small{display:block}.bw57-steps small{margin-top:5px;font-size:.8rem}.bw57-novel-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0}.bw57-draft-notice,.bw57-chapter-ready{background:#f6f5f8;border:1px solid #dfdfe7;border-radius:10px;padding:14px;margin:12px 0;color:#535462}.bw57-draft-notice p{margin:8px 0}.bw57-chapter-ready{font-size:.88rem}.bw57-chapter-ready a{color:#53547e;text-decoration:underline}#bw57-scheda{scroll-margin-top:24px}@media(max-width:520px){.bw57-steps{gap:6px}.bw57-steps li{padding:10px}.bw57-novel-actions .bw-button{width:100%;text-align:center}}

/* RC5.8 — chapter-only formatting, identical in preview and reader. */
.bw58-toolgroup{display:inline-flex;gap:3px;align-items:center;flex-wrap:nowrap}.bw58-toolgroup button{min-width:36px;display:inline-flex;align-items:center;justify-content:center;min-height:36px}.bw40-toolbar button:disabled{opacity:.55;cursor:wait}.bw40-toolbar [data-bw58-file][hidden]{display:none!important}.bw58-image-status:empty{display:none}.bw58-image-status{display:block;overflow-wrap:anywhere;margin:0 0 6px}.bw40-editor,.bw6-reader-content{--bw58-normal:17px}.bw6-reader-content{--bw58-normal:clamp(17px,2vw,20px)}.bw401-focus-form .bw40-editor{--bw58-normal:18px}
:is(.bw40-editor,.bw6-reader-content) .bw58-align-left{text-align:left}:is(.bw40-editor,.bw6-reader-content) .bw58-align-center{text-align:center}:is(.bw40-editor,.bw6-reader-content) .bw58-align-right{text-align:right}:is(.bw40-editor,.bw6-reader-content) .bw58-indent{text-indent:1.35em}:is(.bw40-editor,.bw6-reader-content) :is(.bw58-small,small,font[size="2"]){font-size:.85em}:is(.bw40-editor,.bw6-reader-content) :is(.bw58-normal,font[size="3"]){font-size:var(--bw58-normal)}:is(.bw40-editor,.bw6-reader-content) img{max-width:100%;height:auto;vertical-align:middle}:is(.bw40-editor,.bw6-reader-content) figure{max-width:100%;margin:1em 0}:is(.bw40-editor,.bw6-reader-content) figcaption{font-size:.85em;color:#686976}
@media(max-width:600px){.bw40-editor{--bw58-normal:16px}.bw401-focus-form .bw40-editor{--bw58-normal:17px}.bw58-toolgroup button{min-width:38px;min-height:38px}.bw40-toolbar button[data-bw58-indent],.bw40-toolbar button[data-bw58-image]{min-height:38px}}

/* RC5.12 — editorial typography, self-hosted Garamond when installed. */
.bw6-reader,.bw40-preview,.bw6-chapter-form{
  --bw510-book-font:"BW EB Garamond","EB Garamond",Garamond,"Adobe Garamond Pro","Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
  --bw510-book-size:clamp(17px,calc(16px + .23vw),19px);
  --bw510-book-ink:#36332f;
}
.bwa-main .bw6-reader,.bw6-reader{
  max-width:790px;background:#fffffd;border-color:#e5e0d9;border-radius:10px;
  padding:clamp(24px,3.8vw,52px)!important;margin:15px auto 30px;
}
.bw6-reader>.bw6-reader-breadcrumb{margin-bottom:clamp(24px,4vw,40px);font-size:12px;line-height:1.5}
.bw6-reader>.bw-kicker{display:block;text-align:center;letter-spacing:.13em;font-weight:600;font-size:10px;color:#68647b}
.bw6-reader>h1,.bw40-preview>[data-bw40-preview-title]{
  font-family:var(--bw510-book-font);font-weight:400;font-style:normal;
  font-size:clamp(29px,3.4vw,43px);line-height:1.14;letter-spacing:-.025em;
  color:var(--bw510-book-ink);text-align:center;margin:10px 0 8px;overflow-wrap:anywhere;
}
.bw6-reader>.bw6-reader-content::before{content:"";display:block;width:42px;height:1px;background:#d9d1c7;margin:0 auto 30px}
.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor{
  --bw58-normal:var(--bw510-book-size);
  font-family:var(--bw510-book-font);font-size:var(--bw510-book-size);
  font-weight:400;font-style:normal;line-height:1.52;letter-spacing:normal;
  color:var(--bw510-book-ink);text-align:justify;text-align-last:left;
  -webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;
  font-kerning:normal;font-variant-ligatures:common-ligatures;
}
.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content{
  max-width:66ch;width:100%;margin:30px auto 34px;
}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) p{margin:0 0 .45em}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(h1,h2,h3,h4,h5,h6){font-family:var(--bw510-book-font);line-height:1.25;letter-spacing:-.015em;margin:1.15em 0 .55em}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(blockquote){margin:1em 0;padding-left:1em;border-left:2px solid #d9d1c7}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(hr){border:0;border-top:1px solid #ded7cf;max-width:5em;margin:1.8em auto}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(img){max-width:100%;height:auto}
.bw6-reader .bw6-reader-content :where(pre),.bw40-preview .bw6-reader-content :where(pre){white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
.bw6-reader .bw6-reader-content :where(table),.bw40-preview .bw6-reader-content :where(table){max-width:100%;display:block;overflow-x:auto}
.bw6-reader>.bw6-reader-actions{border-top:1px solid #e5e0d9;padding-top:20px}
@media(max-width:650px){
  .bw6-reader,.bw40-preview,.bw6-chapter-form{--bw510-book-size:18px}
  .bwa-main .bw6-reader,.bw6-reader{padding:22px clamp(14px,4vw,24px)!important;border-radius:8px}
  .bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content{margin:24px auto 28px;line-height:1.52}
  .bw6-reader>.bw6-reader-content::before{margin-bottom:24px}
}

/* Respect explicit alignments (including imported HTML and editor classes).
   Do not force justification on headings, captions or preformatted material. */
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where([style*="text-align"],[align],.bw58-align-left,.bw58-align-center,.bw58-align-right,.alignleft,.aligncenter,.alignright,.has-text-align-left,.has-text-align-center,.has-text-align-right,h1,h2,h3,h4,h5,h6,figcaption,pre){text-align-last:auto}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(h1,h2,h3,h4,h5,h6,figcaption,pre){text-align:left;-webkit-hyphens:manual;hyphens:manual}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(.bw58-align-center,.has-text-align-center,[align="center"]){text-align:center;text-align-last:auto}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(.bw58-align-right,.has-text-align-right,[align="right"]){text-align:right;text-align-last:auto}
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :where(.bw58-align-left,.has-text-align-left,[align="left"]){text-align:left;text-align-last:auto}

/* RC5.15 — chapter-only reading controls. */
.bwa-main .bw6-reader > .bw6-reader-actions,
.bw6-reader > .bw6-reader-actions{gap:10px;align-items:center}
.bw6-reader > .bw6-reader-actions .bw6-vote,
.bw6-reader > .bw6-reader-nav .bw-button{
  box-sizing:border-box;min-height:48px;padding:12px 18px;
  font-size:14px;line-height:1.35;font-weight:700;text-align:center;
  border-radius:9px;text-decoration:none!important;white-space:normal;
}
.bw6-reader > .bw6-reader-actions .bw6-vote,
.bw6-reader > .bw6-reader-nav .bw6-next-chapter{
  color:#fff!important;background:#53547e;border:1px solid #53547e;
}
.bw6-reader > .bw6-reader-actions .bw6-vote[aria-pressed="true"]{background:#e8e6f1;color:#48476f!important;border-color:#aaa7c3}
.bw6-reader > .bw6-reader-nav .bw6-prev-chapter{background:#fff;color:#53547e!important;border:1px solid #aaa7c3}
.bw6-reader > .bw6-reader-actions .bw6-vote:hover,
.bw6-reader > .bw6-reader-nav .bw-button:hover{filter:brightness(.94)}
.bw6-reader > .bw6-reader-actions .bw6-vote:focus-visible,
.bw6-reader > .bw6-reader-nav .bw-button:focus-visible{outline:2px solid #53547e;outline-offset:3px}
.bw6-reader > .bw6-reader-actions [data-bw33-status]{order:10;flex-basis:100%}
.bw6-reader > .bw6-reader-actions [data-bw33-status]:empty{display:none}
.bw6-reader > .bw6-reader-nav{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px;padding-top:18px}
.bw6-reader > .bw6-reader-nav .bw-button{flex:1 1 0;min-width:0}
@media(max-width:520px){
 .bw6-reader > .bw6-reader-actions > form:first-child{flex:1 1 100%}
 .bw6-reader > .bw6-reader-actions > form:first-child .bw6-vote{width:100%}
 .bw6-reader > .bw6-reader-nav{flex-direction:column}
 .bw6-reader > .bw6-reader-nav .bw-button{flex:auto;width:100%}
}

/* RC5.16 — lighter editorial emphasis; retain semantic bold and italic. */
:is(.bw6-reader .bw6-reader-content,.bw40-preview .bw6-reader-content,.bw6-chapter-form .bw40-editor) :is(strong,b){font-weight:550}
