/* Writer workspace: readable surfaces, task navigation and explicit actions. */
.catalog-site main.writer-page{max-width:1560px;padding-top:32px}
.writer-shell{--bg:#141722;--paper:#202432;--ink:#f5f6fc;--muted:#bac1d4;--line:#424a60;--soft:#302749;--purple:#d0b8ff;--accent:#7540dc;--writer-hover:#2a3042;--writer-success:#9aebc4;--writer-success-bg:#183e33;--writer-warning:#ffdb93;--writer-warning-bg:#44371e;--writer-danger:#ffb4c4;--writer-danger-bg:#482938;color:var(--ink);color-scheme:dark;background:var(--bg);border:1px solid var(--line);border-radius:24px;padding:24px;gap:28px;grid-template-columns:230px minmax(0,1fr)}
.catalog-site.light .writer-shell{--bg:#f3f4fa;--paper:#fff;--ink:#20263b;--muted:#566079;--line:#c8cede;--soft:#eee7fc;--purple:#6030b1;--accent:#6e35ce;--writer-hover:#eceff8;--writer-success:#146444;--writer-success-bg:#e2f5eb;--writer-warning:#78510a;--writer-warning-bg:#fff1d2;--writer-danger:#9f2848;--writer-danger-bg:#fde8ed;color-scheme:light}
.writer-shell [hidden]{display:none!important}
.writer-shell :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--purple);outline-offset:3px}
.writer-shell :is(input,select,textarea){background:var(--bg);color:var(--ink);border:1px solid var(--line);min-height:46px;border-radius:10px;font-size:16px}
.writer-shell input::placeholder,.writer-shell textarea::placeholder{color:var(--muted);opacity:1}
.writer-shell :is(input[type=checkbox],input[type=radio]){min-height:0;accent-color:var(--accent)}
.writer-shell :is(button,.secondary){color:var(--ink);background:var(--paper);border-color:var(--line)}
.writer-shell .primary{background:var(--accent);border:1px solid #a47bea;color:#fff;min-height:44px;border-radius:10px;font-weight:600}
.writer-shell .primary:hover{background:#6530c4}
.writer-shell .secondary{color:var(--purple);background:var(--soft)}
.writer-shell .notice{background:var(--soft);border-color:var(--line);color:var(--ink);font-size:16px}
.writer-shell :is(.error,.form-error,.cover-error){color:var(--writer-danger)}
.writer-shell .error{background:var(--writer-danger-bg)}
.writer-shell .panel{background:var(--paper);border-color:var(--line)}
.writer-shell .writer-sidebar{position:sticky;top:96px;padding:0;background:transparent;border:0;border-radius:0;max-height:calc(100dvh - 120px);overflow-y:auto;scrollbar-width:thin}
.writer-shell .writer-identity{display:flex;flex-direction:row;align-items:center;gap:12px;padding:8px 4px 20px;margin:0}
.writer-avatar-mark{width:44px;height:44px;display:grid;place-items:center;flex-shrink:0;border-radius:14px;background:var(--soft);color:var(--purple);border:1px solid var(--line)}
.writer-identity>div{min-width:0}.writer-eyebrow{display:block;font-size:14px;color:var(--muted);margin-bottom:3px}.writer-identity strong{display:block;font-size:17px;overflow-wrap:anywhere}
.writer-shell .writer-sidebar>.primary{font-size:16px;margin:0 0 24px;gap:8px}
.writer-nav-group>p{font-size:14px;color:var(--muted);padding:0 12px;margin:12px 0 8px}
.writer-shell .writer-sidebar nav{gap:16px}
.writer-shell .writer-sidebar nav a{font-size:16px;line-height:1.5;padding:13px 12px;min-height:48px;border:1px solid transparent;margin-bottom:4px}
.writer-shell .writer-sidebar nav a:hover{background:var(--writer-hover)}
.writer-shell .writer-sidebar nav a.selected{color:var(--purple);background:var(--soft);border-color:var(--purple);font-weight:600}
.writer-shell .writer-public-link{font-size:15px;gap:8px;color:var(--muted);padding:20px 8px 8px}.writer-public-link>.icon:last-child{margin-left:auto}
.writer-shell .writer-menu-toggle{display:none}
.writer-content>.page-heading,.writer-content>.studio-heading{margin-bottom:24px}.writer-content .page-heading{padding-bottom:0}.writer-content .page-heading h1{font-size:28px;letter-spacing:0}.writer-content .page-heading p{font-size:16px;margin-top:6px}
.writer-content .studio-heading>.primary{font-size:16px;padding:10px 18px}
.writer-library-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:24px}
.writer-library-summary>button{display:flex;gap:12px;align-items:center;padding:16px;text-align:left;border-radius:14px;font-size:14px;transition:background .15s,border-color .15s}
.writer-library-summary>button:hover{background:var(--writer-hover)}
.writer-library-summary>button[aria-pressed=true]{background:var(--soft);border-color:var(--purple)}
.writer-summary-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:var(--purple);background:var(--soft);flex-shrink:0}
.writer-library-summary>button[data-writer-status=published] .writer-summary-icon{color:var(--writer-success);background:var(--writer-success-bg)}
.writer-library-summary>button[data-writer-status=pending] .writer-summary-icon{color:var(--writer-warning);background:var(--writer-warning-bg)}
.writer-library-summary>button[data-writer-status=changes_requested] .writer-summary-icon{color:var(--writer-danger);background:var(--writer-danger-bg)}
.writer-library-summary strong{display:block;font-size:26px;line-height:1.4;margin-top:4px;font-variant-numeric:tabular-nums}.writer-library-summary small{font-size:14px;font-weight:400;color:var(--muted)}
.writer-library-toolbar{padding:20px 20px 0;background:var(--paper);border:1px solid var(--line);border-radius:14px;margin-bottom:20px}
.writer-filters{gap:16px;grid-template-columns:2fr 1fr 1fr}.writer-filters label{margin:0;font-size:15px;font-weight:600}.writer-filters label>input,.writer-filters label>select,.writer-search-field{margin-top:7px}
.writer-search-field{position:relative}.writer-search-field>.icon{position:absolute;left:13px;top:14px;color:var(--muted);width:18px;height:18px}.writer-search-field input{padding-left:40px}
.writer-results-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;margin-top:16px;border-top:1px solid var(--line)}
.writer-results-bar p{margin:0;color:var(--muted);font-size:15px}.writer-library-options{display:flex;align-items:center;gap:12px}.writer-view-switch{display:flex;gap:4px}.writer-view-switch button{padding:8px;min-height:40px;min-width:40px;display:grid;place-items:center}.writer-view-switch button[aria-pressed=true]{color:var(--purple);background:var(--soft);border-color:var(--purple)}
#writer-reset{padding:6px 10px;font-size:14px;min-height:40px;color:var(--purple)}
.writer-content .writer-books{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.writer-content .writer-book{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;border-radius:16px;transition:border-color .15s}
.writer-content .writer-book:hover{border-color:var(--purple)}
.writer-book-main{display:flex;gap:16px;align-items:flex-start;padding:20px;flex:1;min-width:0}
.writer-book-cover{flex:0 0 92px}.writer-content .writer-book .cover{width:92px;height:123px;aspect-ratio:3/4;border-radius:8px;margin:0;box-shadow:0 6px 14px #0003}.writer-book .cover img{object-fit:cover}
.writer-book-info{min-width:0;flex:1}.writer-book-labels{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.writer-book .writer-status{display:inline-flex;gap:6px;align-items:center;width:fit-content;padding:3px 9px;border-radius:6px;font-size:13px;line-height:1.6;white-space:nowrap;background:var(--writer-hover);color:var(--muted);font-weight:600}
.writer-status i{width:6px;height:6px;border-radius:50%;background:currentColor}.writer-book .status-published{background:var(--writer-success-bg);color:var(--writer-success)}.writer-book .status-pending{background:var(--writer-warning-bg);color:var(--writer-warning)}.writer-book :is(.status-changes_requested,.status-rejected,.status-hidden){background:var(--writer-danger-bg);color:var(--writer-danger)}
.writer-book .writer-category{font-size:13px;color:var(--muted)}
.writer-content .writer-book h2{font-size:19px;line-height:1.65;font-weight:600;letter-spacing:0;margin:0 0 8px;overflow-wrap:anywhere}
.writer-book h2 a:hover{color:var(--purple)}
.writer-book .cover-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;height:100%;padding:8px;text-align:center;font-size:13px;line-height:1.5}.writer-book .cover-placeholder>.icon{width:28px;height:28px}.writer-book .cover-placeholder>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.writer-content .writer-book-meta{font-size:14px!important;line-height:1.8;margin:8px 0}.writer-book-meta span{display:inline}
.writer-book-numbers{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:12px;font-size:15px}.writer-book-numbers>span{gap:5px}.writer-book-numbers .icon{width:16px;height:16px;color:var(--muted)}.writer-book-numbers small{font-size:13px;color:var(--muted)}
.writer-book-actions{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 20px;border-top:1px solid var(--line);background:var(--bg)}
.writer-book-actions a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;font-size:15px;font-weight:600;border-radius:9px}.writer-manage{color:var(--purple)}.writer-add-chapter{background:var(--soft);border:1px solid var(--line);color:var(--purple);padding:7px 12px}.writer-add-chapter:hover{border-color:var(--purple)}.writer-book-actions .icon{width:17px;height:17px}
.writer-content .writer-books.is-list{grid-template-columns:1fr}.writer-books.is-list .writer-book{flex-direction:row}.writer-books.is-list .writer-book-actions{flex-direction:column;justify-content:center;flex:0 0 155px;border-top:0;border-left:1px solid var(--line)}.writer-books.is-list .writer-book-main{align-items:center}
.writer-shell .writer-stat strong{color:var(--purple)}.writer-shell .writer-stat p,.writer-shell .writer-stat small{font-size:15px}
.writer-shell .editor-tabs{padding:12px;background:var(--paper);border:1px solid var(--line);border-radius:14px;gap:8px}.writer-shell .editor-tabs>*{font-size:15px;min-height:44px}.writer-shell .editor-tabs button.selected,.writer-shell .publish-steps button.selected{background:var(--soft);color:var(--purple);border-color:var(--purple)}.writer-shell .studio-create,.writer-shell .writer-profile-form summary{color:var(--purple)}
.writer-shell .batch-table{font-size:15px}.writer-shell .batch-table th{color:var(--muted);background:var(--bg)}.writer-shell .batch-table td{border-color:var(--line)}.writer-shell .batch-table input{min-width:70px}.writer-shell .row{gap:16px}.writer-shell .row>span{min-width:0;overflow-wrap:anywhere}.writer-shell .row strong{flex-shrink:0}
.writer-shell .writer-filters{margin-bottom:12px}.writer-library-toolbar .writer-filters{margin-bottom:0}
@media(min-width:761px) and (max-width:1250px){.writer-shell{grid-template-columns:200px minmax(0,1fr);padding:20px;gap:20px}.writer-content .writer-books{grid-template-columns:1fr}.writer-library-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.writer-filters{grid-template-columns:1fr 1fr}.writer-filters>label:first-child{grid-column:1/-1}.writer-content .studio-heading{align-items:flex-start;flex-direction:column;gap:16px}}
@media(max-width:760px){.catalog-site main.writer-page{padding:16px 12px 40px}.writer-shell{display:block;padding:12px;border-radius:18px}.writer-shell .writer-sidebar{position:static;max-height:none;overflow:visible;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--line)}.writer-shell .writer-identity{padding:4px 0 14px}.writer-shell .writer-sidebar>.primary{display:none}.writer-shell .writer-menu-toggle{display:flex;align-items:center;gap:8px;width:100%;font-size:15px;min-height:46px}.writer-menu-toggle span{margin-left:auto;color:var(--purple);font-size:13px}.writer-shell .writer-sidebar nav{display:none;flex-direction:column;overflow:visible;padding-top:12px}.writer-shell .writer-sidebar.is-open nav{display:flex}.writer-shell .writer-public-link{display:none}.writer-shell .writer-sidebar.is-open .writer-public-link{display:flex}.writer-content .page-heading h1{font-size:25px}.writer-content .studio-heading{gap:16px}.writer-content .studio-heading>.primary{width:100%}.writer-library-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}.writer-library-summary>button{padding:12px 10px;gap:8px;font-size:13px}.writer-summary-icon{width:28px;height:28px}.writer-summary-icon .icon{width:16px;height:16px}.writer-library-summary strong{font-size:24px}.writer-library-toolbar{padding:14px 12px 0}.writer-filters{grid-template-columns:1fr 1fr;gap:12px}.writer-filters>label:first-child{grid-column:1/-1}.writer-results-bar{flex-wrap:wrap}.writer-library-options{margin-left:auto;gap:8px}.writer-content .writer-books{grid-template-columns:1fr;gap:14px}.writer-book-main{padding:16px 12px;gap:12px}.writer-book-cover{flex-basis:70px}.writer-content .writer-book .cover{width:70px;height:94px}.writer-content .writer-book h2{font-size:17px}.writer-book-labels{gap:6px;margin-bottom:8px}.writer-book .writer-category{font-size:12px}.writer-book-numbers{gap:6px 12px}.writer-book-actions{padding:10px 12px}.writer-content .writer-books.is-list .writer-book{flex-direction:column}.writer-books.is-list .writer-book-actions{flex-direction:row;flex-basis:auto;border-left:0;border-top:1px solid var(--line)}.writer-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.writer-shell .writer-stat{padding:12px}.writer-shell .writer-stat p{font-size:14px}.writer-shell .writer-stat strong{font-size:23px}.writer-shell .editor-tabs{padding:8px}.writer-shell .editor-tabs>*{font-size:14px}.writer-shell .row{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.writer-library-summary>button,.writer-content .writer-book{transition:none}}
