.writer-app{width:min(1560px,calc(100% - 2rem));margin:2rem auto 4rem}.writer-app [hidden]{display:none!important}.writer-topbar{display:flex;justify-content:space-between;gap:2rem;align-items:flex-end;margin-bottom:1rem}.writer-topbar h1{margin:.1rem 0 .4rem;font-size:clamp(2.2rem,5vw,4.2rem);line-height:.95}.writer-kicker{margin:0;max-width:760px;color:var(--muted,#aaa)}.writer-top-actions,.writer-statusbar,.writer-modebar,.writer-toolbar,.writer-editor-footer,.writer-dialog-actions,.writer-inline-actions,.writer-modebar-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}.writer-top-actions{justify-content:flex-end}.writer-button,.writer-toolbar button,.writer-segmented button,.writer-file-button,.writer-library-actions button,.writer-library-actions a{border:1px solid rgba(255,255,255,.18);background:#171717;color:#fff;border-radius:8px;padding:.7rem .9rem;font:700 .82rem/1 inherit;cursor:pointer;text-decoration:none}.writer-button:hover,.writer-toolbar button:hover,.writer-segmented button:hover,.writer-file-button:hover,.writer-library-actions button:hover,.writer-library-actions a:hover{border-color:rgba(255,255,255,.4)}.writer-button:disabled{opacity:.42;cursor:not-allowed}.writer-button-primary{background:#f1f1f1;color:#090909;border-color:#f1f1f1}.writer-button-subtle{background:#0d0d0d}.writer-button-danger{background:#2b1010;border-color:#6f2b2b;color:#ffd3d3}.writer-save-state{font-size:.78rem;color:#aaa}.writer-statusbar{padding:.8rem 0;border-top:1px solid rgba(255,255,255,.1);border-bottom:1px solid rgba(255,255,255,.1);font-size:.8rem;color:#aaa}.writer-statusbar a{margin-left:auto}.writer-modebar{justify-content:space-between;padding:1rem 0}.writer-segmented{display:inline-flex;border:1px solid rgba(255,255,255,.14);border-radius:9px;overflow:hidden}.writer-segmented button{border:0;border-radius:0;background:#0f0f0f}.writer-segmented button[aria-pressed="true"]{background:#eee;color:#090909}.writer-text-button{border:0;background:transparent;color:#bbb;text-decoration:underline;cursor:pointer;padding:.2rem}.writer-sr-only,.writer-body-label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

.writer-library{padding:1.5rem 0}.writer-library-header{display:flex;justify-content:space-between;gap:2rem;align-items:flex-end;margin-bottom:1.25rem}.writer-library-header h2{font-size:clamp(2rem,4vw,3rem);margin:.15rem 0}.writer-library-header p{margin:.2rem 0;color:#9e9e9e}.writer-library-controls{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:1rem;align-items:center;margin-bottom:.8rem}.writer-library-search input{width:100%;box-sizing:border-box;background:#0c0c0c;color:#f5f5f5;border:1px solid rgba(255,255,255,.15);border-radius:10px;padding:.9rem 1rem;font:inherit}.writer-library-stats{display:flex;gap:1rem;flex-wrap:wrap;color:#8e8e8e;font-size:.82rem;padding:.75rem 0 1.1rem;border-bottom:1px solid rgba(255,255,255,.08)}.writer-library-stats strong{color:#f2f2f2}.writer-library-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding-top:1rem}.writer-library-empty{grid-column:1/-1;padding:3rem 1rem;text-align:center;border:1px dashed rgba(255,255,255,.14);border-radius:12px;color:#888}.writer-library-card{display:grid;grid-template-columns:180px minmax(0,1fr);min-height:170px;border:1px solid rgba(255,255,255,.12);border-radius:12px;overflow:hidden;background:#0b0b0b}.writer-library-thumb{background:#111;display:grid;place-items:center;overflow:hidden;min-height:170px}.writer-library-thumb img{width:100%;height:100%;object-fit:cover}.writer-library-thumb span{font-weight:900;letter-spacing:.08em;color:#666}.writer-library-card-body{padding:1rem;min-width:0;display:flex;flex-direction:column}.writer-library-card-body h3{font-size:1.25rem;line-height:1.12;margin:.55rem 0 .45rem}.writer-library-card-body>p{margin:0;color:#a7a7a7;line-height:1.45;font-size:.88rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.writer-library-card-meta,.writer-library-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.65rem;flex-wrap:wrap;color:#858585;font-size:.74rem}.writer-library-card-foot{margin-top:auto;padding-top:.8rem}.writer-library-actions{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}.writer-library-actions button,.writer-library-actions a{padding:.5rem .62rem;font-size:.72rem}.writer-status-badge{display:inline-flex;align-items:center;border:1px solid rgba(255,255,255,.14);border-radius:999px;padding:.3rem .55rem;font-size:.68rem;text-transform:uppercase;letter-spacing:.05em;font-weight:800}.writer-status-badge.is-published{background:#111}.writer-status-badge.is-draft{background:#221f11}.writer-status-badge.is-scheduled{background:#10201b}.writer-status-badge.is-unknown{background:#151515;color:#777}

.writer-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.2rem;align-items:start}.writer-workspace[data-view-mode="write"]{grid-template-columns:1fr}.writer-workspace[data-view-mode="write"] .writer-preview-pane{display:none}.writer-workspace[data-view-mode="preview"]{grid-template-columns:1fr}.writer-workspace[data-view-mode="preview"] .writer-editor-pane{display:none}.writer-editor-pane,.writer-preview-pane{min-width:0}.writer-editor-pane{position:sticky;top:1rem}.writer-meta{border:1px solid rgba(255,255,255,.12);border-radius:10px;background:#0b0b0b;margin-bottom:.8rem}.writer-meta summary{cursor:pointer;padding:.85rem 1rem;font-weight:800}.writer-meta[open] summary{border-bottom:1px solid rgba(255,255,255,.1)}.writer-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;padding:1rem}.writer-field{display:grid;gap:.35rem;min-width:0}.writer-field-wide{grid-column:1/-1}.writer-field>span{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:#aaa;font-weight:800}.writer-field em,.writer-field small{font-style:normal;text-transform:none;letter-spacing:0;font-weight:500;float:right}.writer-field input,.writer-field textarea,.writer-field select,.writer-body-editor,.writer-tale-head input,.writer-tale-grid input{width:100%;box-sizing:border-box;background:#111;color:#f3f3f3;border:1px solid rgba(255,255,255,.16);border-radius:8px;font:inherit;padding:.72rem .8rem}.writer-field input:focus,.writer-field textarea:focus,.writer-field select:focus,.writer-body-editor:focus,.writer-tale-head input:focus,.writer-tale-grid input:focus{outline:2px solid rgba(255,255,255,.38);outline-offset:1px}.writer-image-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.5rem}.writer-file-button{display:inline-flex;align-items:center;white-space:nowrap}.writer-flags{display:flex;gap:1rem;flex-wrap:wrap;padding:0 1rem 1rem;color:#ccc;font-size:.85rem}.writer-schedule-field{padding-top:.2rem}.writer-toolbar{padding:.55rem;border:1px solid rgba(255,255,255,.12);border-bottom:0;border-radius:9px 9px 0 0;background:#0a0a0a;justify-content:space-between}.writer-toolbar-group{display:flex;gap:.35rem;flex-wrap:wrap}.writer-toolbar-rich{border-left:1px solid rgba(255,255,255,.1);padding-left:.55rem}.writer-toolbar button{padding:.55rem .65rem}.writer-editor-dropzone{position:relative}.writer-body-editor{min-height:62vh;border-radius:0 0 9px 9px;resize:vertical;line-height:1.65;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.94rem}.writer-drop-hint{position:absolute;inset:1rem;display:grid;place-items:center;border:2px dashed rgba(255,255,255,.4);border-radius:10px;background:rgba(0,0,0,.82);font-weight:800;z-index:3;pointer-events:none}.writer-editor-footer{justify-content:space-between;padding:.6rem .1rem;color:#888;font-size:.78rem}.writer-editor-footer>div{display:flex;gap:.8rem}.writer-preview-pane{border:1px solid rgba(255,255,255,.12);border-radius:10px;background:#080808;overflow:auto;min-height:76vh}.writer-preview-frame{margin:0 auto;transition:max-width .18s ease}.writer-preview-frame[data-preview-size="desktop"]{max-width:none}.writer-preview-frame[data-preview-size="mobile"]{max-width:430px;border-left:1px solid rgba(255,255,255,.08);border-right:1px solid rgba(255,255,255,.08)}.writer-preview-article{padding:1.2rem}.writer-preview-empty{color:#777;font-style:italic}.writer-preview-featured img{width:100%;height:auto;max-height:460px;object-fit:cover}.writer-preview-frame[data-preview-size="mobile"] .writer-preview-featured img{max-height:300px}.writer-preview-footer{padding-top:1rem}.writer-preview-content iframe{max-width:100%}.writer-embed{position:relative;aspect-ratio:16/9;margin:1.8rem 0}.writer-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

.writer-dialog{width:min(720px,calc(100% - 2rem));max-height:86vh;background:#0d0d0d;color:#fff;border:1px solid rgba(255,255,255,.16);border-radius:12px;padding:0}.writer-dialog-wide{width:min(920px,calc(100% - 2rem))}.writer-dialog::backdrop{background:rgba(0,0,0,.76)}.writer-dialog form>header{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:1rem;border-bottom:1px solid rgba(255,255,255,.1)}.writer-dialog h2{margin:0}.writer-dialog-close{border:0;background:transparent;color:#fff;font-size:1.8rem;cursor:pointer}.writer-dialog-body{padding:1rem;overflow:auto}.writer-dialog-grid{display:grid;gap:.8rem}.writer-dialog-grid-two{grid-template-columns:1fr 1fr}.writer-dialog-actions{justify-content:flex-end;padding:1rem;border-top:1px solid rgba(255,255,255,.1)}.writer-dialog-actions-spread{justify-content:space-between}.writer-dialog-actions-spread>div{display:flex;gap:.6rem}.writer-dialog-note{font-size:.8rem;color:#aaa}.writer-auth-primary{display:grid;gap:.8rem;padding:1rem;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:#111}.writer-auth-primary p{margin:0;line-height:1.55;color:#c3c3c3}.writer-dialog-note[data-state="success"]{color:#a9d9b5}.writer-dialog-note[data-state="error"]{color:#e0a6a6}.writer-dialog-note[data-state="working"]{color:#ddd}.writer-token-fallback{margin-top:1rem;border-top:1px solid rgba(255,255,255,.1);padding-top:1rem}.writer-token-fallback summary{cursor:pointer;color:#aaa;font-size:.82rem;font-weight:700}.writer-token-fallback[open] summary{margin-bottom:1rem}.writer-token-fallback p{color:#aaa;font-size:.86rem;line-height:1.55}.writer-token-fallback .writer-button{margin-top:.75rem}.writer-or{display:flex;align-items:center;gap:.6rem;color:#666;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}.writer-or:before,.writer-or:after{content:"";height:1px;flex:1;background:rgba(255,255,255,.1)}.writer-tale-head{display:grid;grid-template-columns:1fr auto 1fr;gap:.7rem;align-items:center;margin-bottom:1rem}.writer-tale-head span{text-transform:uppercase;color:#777;font-weight:800}.writer-tale-grid{display:grid;grid-template-columns:minmax(130px,.7fr) 1fr 1fr;gap:.45rem;align-items:center}.writer-tale-grid>span{font-size:.78rem;color:#aaa;font-weight:700}.writer-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;padding:1rem}.writer-template-grid button{display:grid;gap:.35rem;text-align:left;background:#111;color:#fff;border:1px solid rgba(255,255,255,.13);border-radius:10px;padding:1rem;cursor:pointer}.writer-template-grid button:hover{border-color:rgba(255,255,255,.35)}.writer-template-grid strong{font-size:1rem}.writer-template-grid span{font-size:.8rem;color:#999;line-height:1.4}.writer-history-list{display:grid;gap:.5rem}.writer-history-item{display:grid;gap:.25rem;padding:.8rem;border:1px solid rgba(255,255,255,.1);border-radius:8px;text-decoration:none;color:#eee;background:#111}.writer-history-item span{font-size:.74rem;color:#888}.writer-toast{position:fixed;right:1rem;bottom:1rem;z-index:1000;max-width:min(440px,calc(100vw - 2rem));background:#f2f2f2;color:#0a0a0a;border-radius:8px;padding:.8rem 1rem;font-weight:700;box-shadow:0 10px 30px rgba(0,0,0,.35)}

@media(max-width:1100px){.writer-app{width:min(100% - 1rem,980px)}.writer-topbar{align-items:flex-start;flex-direction:column}.writer-top-actions{justify-content:flex-start}.writer-library-list{grid-template-columns:1fr}.writer-workspace{grid-template-columns:1fr}.writer-editor-pane{position:static}.writer-workspace[data-view-mode="split"] .writer-preview-pane{display:block}.writer-preview-pane{min-height:auto}.writer-body-editor{min-height:48vh}.writer-toolbar{justify-content:flex-start}.writer-toolbar-rich{border-left:0;padding-left:0;border-top:1px solid rgba(255,255,255,.08);padding-top:.45rem;width:100%}}
@media(max-width:700px){.writer-meta-grid{grid-template-columns:1fr}.writer-field-wide{grid-column:auto}.writer-image-row{grid-template-columns:1fr}.writer-file-button,.writer-image-row .writer-button{justify-content:center}.writer-statusbar a{margin-left:0;width:100%}.writer-modebar{align-items:flex-start;gap:.8rem}.writer-preview-size{display:none}.writer-top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.writer-top-actions .writer-button{width:100%}.writer-top-actions .writer-save-state{grid-column:1/-1}.writer-preview-article{padding:.8rem}.writer-library-controls{grid-template-columns:1fr}.writer-library-header{align-items:flex-start;flex-direction:column}.writer-library-card{grid-template-columns:100px minmax(0,1fr)}.writer-library-thumb{min-height:150px}.writer-library-card-foot{align-items:flex-start}.writer-dialog-grid-two,.writer-template-grid{grid-template-columns:1fr}.writer-tale-head{grid-template-columns:1fr}.writer-tale-head span{text-align:center}.writer-tale-grid{grid-template-columns:90px 1fr 1fr}.writer-dialog-actions-spread{align-items:flex-start;flex-direction:column}.writer-dialog-actions-spread>div{width:100%;justify-content:flex-end}}
