/* The publishing list keeps draft status and sponsor settings visible together. */
.chapter-studio{min-width:0}.chapter-studio-heading{align-items:flex-start;margin-top:0}.chapter-studio-heading p{margin:0;max-width:650px}.chapter-studio-heading>.button{flex-shrink:0}.chapter-studio-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:24px 0 18px}.chapter-count{padding:15px;border:1px solid var(--line);border-radius:12px;background:var(--panel);border-top:3px solid #60768e;min-width:0}.chapter-count span{font-size:12px;color:var(--muted)}.chapter-count strong{display:block;font-size:26px;line-height:1.6;margin-top:4px;font-variant-numeric:tabular-nums}.chapter-count-published{border-top-color:#68d7a1}.chapter-count-draft{border-top-color:#ffb650}.chapter-count-ads{border-top-color:#c3a1ff}.chapter-studio-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:8px;padding:20px}.chapter-studio-filters label,.chapter-studio-filters select{width:100%;min-width:0}.chapter-studio-search{grid-column:span 2}.chapter-filter-actions{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;grid-column:span 2}.chapter-filter-actions button{flex:1}.chapter-summary-note{font-size:11px;margin:8px 0 20px}.chapter-results-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0 12px}.chapter-results-heading h2{font-size:20px;margin:0}.chapter-results-heading p{font-size:12px;margin:0}.chapter-studio-results{display:grid;gap:12px;min-width:0}.chapter-studio-results:focus{outline:none}.chapter-studio-results[aria-busy=true]{opacity:.7}.chapter-studio-card{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,.7fr) minmax(140px,.65fr) minmax(150px,.65fr);align-items:center;gap:18px;padding:19px 20px;border:1px solid var(--line);border-radius:13px;background:var(--panel);min-width:0}.chapter-studio-info{min-width:0}.chapter-studio-series{color:var(--cyan);font-size:12px;font-weight:700;margin:0 0 3px;overflow-wrap:anywhere}.chapter-studio-info h3{font-size:19px;margin:0 0 3px}.chapter-studio-title{font-size:12px;margin:0;overflow-wrap:anywhere}.chapter-page-count{font-size:11px;margin:9px 0 0;color:var(--muted)}.chapter-studio-badges{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap;min-width:0}.chapter-studio-card>.chapter-studio-badges{flex-direction:column}.chapter-status,.chapter-ad-badge{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 10px;border:1px solid #43536c;border-radius:7px;font-size:11px;font-weight:700;line-height:1.8}.chapter-status-published{color:#b0f0ce;background:#173429;border-color:#356b52}.chapter-status-draft{color:#ffd89f;background:#34291c;border-color:#735832}.chapter-has-ads{color:#dfceff;background:#282039;border-color:#5c477b}.chapter-no-ads{color:#d0dceb;background:#1a2738;border-color:#34465f}.chapter-studio-ad-editor{display:grid;gap:8px;align-self:center}.chapter-studio-ad-editor label{font-size:11px}.chapter-studio-ad-editor select{width:100%;font-size:12px}.chapter-studio-ad-editor button{justify-self:start}.chapter-studio-actions{display:grid;gap:7px}.chapter-studio-actions button{width:100%;font-size:11px;min-height:36px;padding:6px 10px}.chapter-studio-pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;margin-top:24px}.chapter-studio-pagination button{min-width:38px}.chapter-studio-pagination .chapter-page-active{background:var(--accent);color:#171309;border-color:var(--accent)}.chapter-studio #chapter-studio-error{margin-bottom:15px}.chapter-preview-open{overflow:hidden}.chapter-preview-dialog{color:var(--text);background:var(--bg);border:1px solid #40536e;border-radius:14px;padding:0;width:min(1040px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;box-shadow:0 20px 100px #0009;scrollbar-width:thin}.chapter-preview-dialog::backdrop{background:#02060cda}.chapter-preview-dialog[open]{display:block}.chapter-preview-shell{min-width:0}.chapter-preview-heading{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;gap:16px;min-height:0;padding:17px 22px;background:#111c2bf7;border-bottom:1px solid var(--line)}.chapter-preview-heading>div{min-width:0}.chapter-preview-heading p{margin:0 0 3px;font-size:11px}.chapter-preview-heading h2{font-size:18px;margin:0 0 10px;overflow-wrap:anywhere}.chapter-preview-heading>button{flex-shrink:0}.chapter-preview-tools{padding:18px 22px}.chapter-preview-tools p{font-size:12px;margin:0 0 12px}.chapter-preview-tools p:last-child{margin-bottom:0}.chapter-preview-tools label{display:flex;align-items:center;gap:10px;margin-bottom:12px;font-size:12px}.chapter-preview-tools select{max-width:190px;min-width:110px;font-size:12px}.chapter-preview-tools .notice{margin-top:14px}.chapter-preview-loading{padding:25px;text-align:center}.chapter-preview-images{max-width:850px;margin:0 auto;background:#fff;font-size:0;line-height:0}.chapter-preview-page{margin:0;padding:0;scroll-margin-top:160px}.chapter-preview-page img{display:block;width:100%;height:auto;margin:0;padding:0;color:#14202c;font-size:14px;line-height:1.8;min-height:1px}.chapter-preview-footer{position:sticky;bottom:0;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:15px 22px;background:#111c2bf7;border-top:1px solid var(--line);z-index:2}.chapter-preview-dialog:not(:modal){position:fixed;inset:16px;z-index:100}
@media(max-width:1200px){.chapter-studio-card{grid-template-columns:minmax(180px,1fr) minmax(160px,.8fr) minmax(145px,.65fr);gap:14px}.chapter-studio-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;padding-top:13px;border-top:1px solid var(--line)}.chapter-studio-actions button{width:auto;flex:1}.chapter-studio-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.chapter-filter-actions{grid-column:span 1}}
@media(max-width:700px){.chapter-studio-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.chapter-count{padding:11px}.chapter-count strong{font-size:23px}.chapter-count span{font-size:10px}.chapter-studio-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:12px}.chapter-studio-search,.chapter-filter-actions{grid-column:1/-1}.chapter-studio-card{grid-template-columns:minmax(0,1fr) minmax(140px,.75fr);padding:16px;gap:14px}.chapter-studio-card>.chapter-studio-badges{align-self:start}.chapter-studio-ad-editor{grid-column:1/-1;grid-template-columns:minmax(0,1fr) auto;align-items:end;padding-top:12px;border-top:1px solid var(--line)}.chapter-studio-ad-editor button{min-height:44px}.chapter-studio-actions{padding-top:0;border-top:0}.chapter-studio-heading>.button{font-size:12px;padding:9px 12px}.chapter-preview-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:10px}.chapter-preview-heading{padding:12px;gap:10px}.chapter-preview-heading h2{font-size:15px}.chapter-preview-heading .chapter-status,.chapter-preview-heading .chapter-ad-badge{font-size:10px;padding:3px 7px;min-height:28px}.chapter-preview-tools{padding:15px}.chapter-preview-footer{padding:12px;gap:8px}.chapter-preview-footer button{flex:1;font-size:11px;padding:9px}.chapter-preview-page{scroll-margin-top:175px}}
@media(max-width:420px){.chapter-studio-card{grid-template-columns:1fr}.chapter-studio-card>.chapter-studio-badges{flex-direction:row}.chapter-studio-heading{flex-wrap:wrap}.chapter-studio-filters{grid-template-columns:1fr}.chapter-studio-filters>*{grid-column:1}.chapter-preview-heading{flex-wrap:wrap}.chapter-preview-heading>button{margin-inline-start:auto}.chapter-preview-tools label{flex-wrap:wrap}.chapter-status,.chapter-ad-badge{font-size:10px}.chapter-studio-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}

.chapter-sequence-warning{font-size:11px;color:#ffb7be;font-weight:700;margin:6px 0 0}.chapter-studio #chapter-studio-error{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}.chapter-studio #chapter-studio-error>button{flex-shrink:0}

.chapter-studio-pagination-top{margin:0 0 15px}

/* Reserve space while a lazy image waits for its intrinsic dimensions. */
.chapter-preview-page img:not(.chapter-preview-loaded){min-height:320px;background:#e7ebef}
.chapter-preview-tools .chapter-preview-title-field{display:grid;max-width:480px}
.chapter-preview-title-field input{min-width:0;width:100%}
