:root{font-family:Noto Sans SC,Segoe UI,system-ui,sans-serif;color:#17231d;background:#f5f2eb}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:7px;padding:.65rem .9rem;background:#1d634c;color:#fff;font-weight:650}button:disabled{opacity:.55;cursor:not-allowed}button.secondary{background:#e3e8e2;color:#20352a}button.danger{background:#b7493c}button.active-tab{background:#1d634c;color:#fff}.login{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#d9ebdf,#f5f2eb 55%);overflow:auto}.login form{display:grid;gap:.8rem;width:min(390px,calc(100% - 2rem));background:#fff;padding:2.4rem;border-radius:18px;box-shadow:0 16px 45px #193a2524}.login h1{margin:0;font-size:2.4rem}.login p{margin:0;color:#53645a}.eyebrow{letter-spacing:.16em;font-size:.72rem;font-weight:800;color:#58a17e;margin:0 0 .3rem}.login label,.metadata label,.cover-fields label,.password-form label{display:grid;gap:.3rem;font-size:.86rem;font-weight:700;color:#405147}input,textarea{border:1px solid #c9d1cb;border-radius:6px;padding:.58rem;background:#fff;color:#17231d;width:100%;min-width:0}.error{color:#b53327!important}.app{height:100vh;display:flex;flex-direction:column;overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.85rem 1.25rem;background:#173c30;color:#fff;flex:0 0 auto}header h1{margin:0;font-size:1.4rem}.header-actions{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}.notice{margin:0;padding:.55rem 1.25rem;background:#fff5cf;color:#6c5200;flex:0 0 auto}.workspace{display:grid;grid-template-columns:minmax(200px,240px) minmax(0,1fr);flex:1;min-height:0;overflow:hidden}aside{padding:.85rem;border-right:1px solid #d7d9d3;background:#fcfbf7;overflow:auto;min-width:0}.search{width:100%;margin-bottom:.8rem}.post-row{width:100%;display:grid;text-align:left;gap:.25rem;padding:.75rem;background:transparent;color:#22342a;border-radius:8px}.post-row:hover,.post-row.active{background:#e2eee6}.post-row small{font-size:.72rem;font-weight:400;color:#66766c}.editor{padding:1rem 1.1rem;min-width:0;overflow:auto;display:flex;flex-direction:column;gap:.85rem}.editor-toolbar{display:flex;justify-content:space-between;gap:.75rem;align-items:center;color:#59685f;flex-wrap:wrap}.editor-toolbar>div,.inline-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.upload{display:inline-flex;background:#e3e8e2;color:#20352a;border-radius:7px;padding:.65rem .9rem;cursor:pointer;font-weight:650}.upload input{display:none}.article-settings{border:1px solid #d7d9d3;border-radius:10px;background:#fff}.article-settings summary{cursor:pointer;padding:.85rem 1rem;font-weight:750;color:#274436}.article-settings summary span{margin-left:.5rem;color:#6a796e;font-size:.82rem;font-weight:500}.article-settings[open] summary{border-bottom:1px solid #e0e4df}.article-settings .metadata{padding:.85rem .85rem 0}.article-settings .cover-panel{margin:.85rem}.metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.metadata textarea{min-height:70px;resize:vertical}.cover-panel{display:grid;grid-template-columns:minmax(160px,220px) minmax(0,1fr);gap:.85rem;padding:.85rem;background:#fff;border:1px solid #d7d9d3;border-radius:10px}.cover-preview{min-height:140px;border-radius:8px;overflow:hidden;background:#eef2ef;border:1px solid #d7d9d3}.cover-preview img{display:block;width:100%;height:100%;min-height:140px;object-fit:cover}.cover-empty{display:grid;place-items:center;min-height:140px;color:#6a796e;font-size:.9rem}.cover-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;min-width:0}.cover-actions{grid-column:1 / -1;display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}.cover-actions input{flex:1 1 180px}.cover-candidates{grid-column:1 / -1;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.65rem}.cover-candidate{display:grid;gap:.35rem;padding:.4rem;background:#f7f8f5;color:#22342a;text-align:left}.cover-candidate img{width:100%;height:88px;object-fit:cover;border-radius:6px}.cover-candidate span{font-size:.72rem;font-weight:600;color:#526157}.writing{min-width:0;display:flex;flex-direction:column;flex:1 0 auto;min-height:min(68vh,760px)}.writing-toolbar{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding-bottom:.5rem;color:#526157;font-size:.84rem;flex-wrap:wrap}.view-tabs{display:inline-flex;gap:.35rem;padding:.22rem;border-radius:9px;background:#e8ece8}.view-tabs button{padding:.48rem .8rem}.editor-pane,.preview{min-width:0;flex:1;min-height:min(62vh,700px);border:1px solid #d7d9d3;border-radius:7px;background:#fff}.editor-pane{overflow:hidden}.editor-pane .cm-editor{height:100%;max-width:100%}.editor-pane .cm-scroller{overflow:auto!important}.preview{padding:clamp(1rem,3vw,2.25rem);line-height:1.75;word-break:break-word;overflow-wrap:anywhere;overflow:auto}.preview img{max-width:100%;height:auto}.empty{display:grid;min-height:50vh;place-items:center;color:#6a796e}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10;display:grid;place-items:center;padding:1rem;background:#12241bbb}.modal{width:min(680px,100%);max-height:min(760px,calc(100vh - 2rem));overflow:auto;padding:1.15rem;background:#fff;border-radius:14px;box-shadow:0 24px 80px #0008}.modal-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.7rem}.modal-heading h2,.security-section h3,.password-form h3,.modal h3{margin:0}.icon-button{font-size:1.6rem;line-height:1;padding:.2rem .55rem;background:transparent;color:#3f5146}.security-section{display:flex;justify-content:space-between;align-items:center;gap:.8rem;padding:.9rem;border:1px solid #d7d9d3;border-radius:9px;background:#f8faf7}.security-section p,.password-form p,.modal-intro{color:#59685f;font-size:.9rem;line-height:1.55}.security-section p{margin:.3rem 0 0}.password-form{display:grid;gap:.7rem;margin-top:1.1rem}.password-form p{margin:-.25rem 0 .1rem}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;margin:1rem 0}.stat-grid div{padding:.7rem;border-radius:8px;background:#edf4ee;display:grid;gap:.2rem}.stat-grid strong{font-size:1.35rem;color:#1d634c}.stat-grid span{font-size:.75rem;color:#526157}.post-stat{padding:.7rem;border-left:3px solid #5c9879;background:#f5f8f3}.top-posts{padding-left:1.25rem}.top-posts li{display:flex;justify-content:space-between;gap:.75rem;padding:.45rem 0;border-bottom:1px solid #edf0ed}.top-posts span{overflow-wrap:anywhere}.top-posts strong{white-space:nowrap;color:#526157;font-size:.82rem}@media(max-width:1100px){.cover-panel,.cover-fields{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){body{overflow:auto}.app{height:auto;min-height:100vh;overflow:visible}.workspace{grid-template-columns:1fr;overflow:visible}.workspace aside{max-height:220px;border-right:0;border-bottom:1px solid #d7d9d3}.metadata{grid-template-columns:1fr}.editor{overflow:visible}header{padding:.8rem;align-items:flex-start;flex-direction:column}.header-actions{justify-content:flex-start}.writing,.editor-pane,.preview{min-height:65vh}}@media(max-width:580px){.editor{padding:.75rem}.article-settings summary span{display:block;margin:.25rem 0 0}.security-section{align-items:flex-start;flex-direction:column}.top-posts li{align-items:flex-start;flex-direction:column;gap:.15rem}}
