.writer-shell{max-width:900px;margin:0 auto;padding:25px 32px 65px}.writer-form{margin:0}.writer-topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:25px;position:sticky;top:0;z-index:5;background:var(--bg);padding:10px 0 14px;border-bottom:1px solid var(--line)}.writer-back{font-size:12px;color:var(--muted);white-space:nowrap}.writer-back:hover{color:var(--accent)}.writer-save-group{display:flex;align-items:center;gap:19px}.writer-status{font-size:11px;color:var(--muted);line-height:1.6}.writer-save,.import-done{border:1px solid var(--accent);background:var(--accent);color:#fffdf8;padding:11px 20px;border-radius:5px;font:500 13px/1.5 var(--sans);white-space:nowrap;min-height:44px;cursor:pointer}.writer-save:hover,.import-done:hover{background:var(--accent-hover)}.writer-save:disabled,.import-done:disabled{opacity:.55;cursor:default}.writer-feedback,.writer-error,.writer-auth{margin:0 0 19px;padding:13px 16px;border-radius:4px;font-size:12px;line-height:1.8}.writer-feedback{color:var(--accent);background:var(--accent-soft);border:1px solid var(--line)}.writer-error{background:#a2483d0e;color:var(--danger);border:1px solid #a2483d33}.writer-auth{padding-top:0;color:var(--muted)}.writer-auth a,.import-auth a{color:var(--accent);text-decoration:underline;text-underline-offset:4px}.writer-heading{margin:29px 4px 24px;display:flex;justify-content:space-between;gap:15px;align-items:center}.writer-heading .small-label{font:500 20px/1.6 var(--serif);letter-spacing:.5px;color:var(--ink);margin:0}.writer-heading>p:last-child{font-size:11px;color:var(--muted);margin:0}.writer-paper{background:var(--surface);border:1px solid var(--line);border-radius:5px;padding:36px 45px 19px;box-shadow:0 4px 18px #343e3103}.writer-title{display:block;width:100%;border:0;border-radius:0;background:transparent;color:var(--ink);font:500 clamp(24px,3vw,31px)/1.6 var(--serif);padding:0 0 25px;outline:none}.writer-title::placeholder{font-weight:400;color:var(--muted);opacity:.65}.writer-title:focus{box-shadow:none}.writer-title:focus-visible,.writer-body:focus-visible{outline:0}.writer-tools{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:5px 0;margin-bottom:27px}.writer-format{display:flex;gap:3px;align-items:center}.writer-tools button{font:400 12px/1.5 var(--sans);border:0;border-radius:3px;color:var(--muted);background:transparent;padding:9px 10px;min-height:38px;white-space:nowrap}.writer-tools button:hover,.writer-tools button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)}.writer-tools button:disabled{opacity:.4;cursor:default}.writer-tools button strong{font-weight:600}.writer-preview-toggle{border-left:1px solid var(--line)!important;border-radius:0!important;padding-left:18px!important}.writer-body{display:block;width:100%;min-height:430px;resize:vertical;border:0;border-radius:0;outline:none;background:transparent;padding:0;color:var(--ink);font:400 18px/2.05 var(--serif);letter-spacing:.02em}.writer-body::placeholder{color:var(--muted);opacity:.65}.writer-body:focus{box-shadow:none}.writer-body:invalid:not(:focus){box-shadow:none}.writer-body:disabled,.writer-title:disabled{opacity:.45}.writer-preview{min-height:430px;overflow-wrap:anywhere;font-size:18px;color:var(--ink)}.writer-preview p:first-child{margin-top:0}.writer-preview.is-loading{font:14px/2 var(--sans);color:var(--muted)}.writer-paper-foot{display:flex;justify-content:space-between;align-items:center;gap:15px;color:var(--muted);font-size:10px;padding-top:22px}.writer-paper-foot>span:last-child{white-space:nowrap}.writer-below{padding:0 4px}.writer-details{border-bottom:1px solid var(--line);margin-top:9px}.writer-details summary{padding:17px 0;font-size:12px;color:var(--muted);cursor:pointer;list-style-position:inside;min-height:44px}.writer-details summary span{font-size:10px;margin-left:8px;opacity:.8}.writer-meta-grid{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:18px;padding:5px 0 24px}.writer-meta-grid label{display:grid;gap:9px;font-size:12px;color:var(--muted);min-width:0}.writer-meta-grid input,.writer-meta-grid textarea{width:100%;min-width:0;border:1px solid var(--line);border-radius:4px;background:var(--surface);color:var(--ink);padding:10px 12px;font:14px/1.6 var(--sans)}.writer-meta-grid textarea{resize:vertical}.writer-excerpt{grid-column:1/-1}.writer-secondary-actions{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:15px;padding:12px 0;font-size:12px}.writer-secondary-actions button{border:0;background:none;color:var(--muted);font:inherit;padding:8px 0;min-height:40px}.writer-secondary-actions a{color:var(--accent);padding:8px 0}.writer-secondary-actions button:hover,.writer-secondary-actions a:hover{text-decoration:underline;text-underline-offset:4px}.writer-shortcut{font-size:10px;text-align:center;color:var(--muted);line-height:1.9;margin:15px 0 0}.writer-shortcut span{margin:0 8px}.writer-shortcut kbd{font:inherit}.writer-noscript{font-size:13px;color:var(--muted);line-height:1.8}.writer-draft{border:1px solid var(--line);border-left:3px solid var(--rust);border-radius:4px;padding:19px 22px;background:var(--surface);margin-bottom:25px}.writer-draft strong{font-size:14px;font-weight:500}.writer-draft p{font-size:12px;line-height:1.9;color:var(--muted);margin:7px 0 15px}.writer-draft-actions{display:flex;gap:12px;flex-wrap:wrap}.writer-draft-actions button{min-height:40px;border:1px solid var(--line);border-radius:4px;background:transparent;color:var(--muted);padding:8px 13px;font-size:12px}.writer-draft-actions button:first-child{background:var(--accent);color:var(--bg);border-color:var(--accent)}.writer-shell :is(a,button,summary):focus-visible,.import-dialog :is(a,button):focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.import-dialog{width:calc(100% - 32px);max-width:560px;max-height:calc(100dvh - 48px);overflow:auto;border:1px solid var(--line);border-radius:14px;padding:28px;background:var(--surface);color:var(--ink);box-shadow:0 24px 80px #1e35252e;font-family:var(--sans)}
.import-dialog::backdrop{background:#172d2359;backdrop-filter:blur(3px)}
.import-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px}
.import-dialog-head h2{margin:0;font-size:21px;font-weight:600;line-height:1.5}
.import-close{border:0;background:none;border-radius:5px;color:var(--muted);font-size:26px;line-height:1;padding:4px 7px;cursor:pointer}
.import-close:hover{background:var(--bg);color:var(--ink)}
.import-close:disabled{opacity:.4;cursor:wait}
.import-description{font-size:13px;line-height:1.7;margin:10px 0 24px;color:var(--muted)}
.import-dropzone{width:100%;display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px 14px;border:1px dashed #a7b9aa;border-radius:9px;background:var(--bg);color:var(--ink);font:400 13px/1.5 var(--sans);cursor:pointer}
.import-dropzone:hover,.import-dropzone.is-dragging{background:var(--accent-soft);border-color:var(--accent)}
.import-dropzone:disabled{cursor:wait;opacity:.65}
.import-drop-mark{display:grid;place-items:center;font-size:25px;background:var(--accent-soft);color:var(--accent);border-radius:9px;width:42px;height:42px;margin-bottom:5px}
.import-dropzone strong{font-size:15px;font-weight:500}
.import-dropzone>span:not(.import-drop-mark),.import-dropzone small{color:var(--muted)}
.import-dropzone small{font-size:11px;margin-top:2px}
.import-progress{font-size:13px;color:var(--accent);line-height:1.7;margin:16px 0 0}
.import-progress:empty{display:none}
.import-error,.import-auth{font-size:13px;line-height:1.7;margin:14px 0 0;color:#963f31}
.import-auth{color:var(--muted)}
.import-results{list-style:none;margin:18px 0 0;padding:0}
.import-results:empty{display:none}
.import-result{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:14px;row-gap:5px;border-bottom:1px solid var(--line);padding:13px 0;font-size:13px;align-items:start}
.import-result-name{min-width:0;overflow-wrap:anywhere;font-weight:500}
.import-result-state{font-size:11px;color:var(--muted);white-space:nowrap;line-height:1.9}
.import-result[data-state=success] .import-result-state,.import-result[data-state=duplicate] .import-result-state{color:var(--accent)}
.import-result[data-state=error] .import-result-state{color:#963f31}
.import-result-detail{grid-column:1/-1;font-size:12px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
.import-result-links{grid-column:1/-1;display:flex;gap:16px;margin-top:1px;font-size:12px}
.import-result-links a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.import-dialog-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:22px}
.import-dialog-actions:has([hidden]):not(:has(button:not([hidden]))){display:none}
.import-retry{border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);font:500 13px/1.4 var(--sans);padding:11px 14px;cursor:pointer}
.import-retry:disabled{opacity:.5;cursor:wait}
.import-dialog{border-radius:7px;padding:30px;box-shadow:0 20px 80px #1c291c30}.import-dialog-head h2{font:500 25px/1.6 var(--serif)}.import-description{font-size:13px;line-height:1.9}.import-dropzone{border-color:var(--line);border-radius:5px;padding:29px 16px;line-height:1.8}.import-dropzone small{font-size:10px}.import-drop-mark{border-radius:4px}.import-error{color:var(--danger)}.import-result[data-state=error] .import-result-state{color:var(--danger)}.import-close{min-width:36px;min-height:36px}.import-retry{min-height:44px;border-radius:5px}.import-done{background:var(--accent);border:1px solid var(--accent);border-radius:5px;color:var(--bg)}
@media(max-width:640px){.writer-shell{padding:13px 18px 40px}.writer-topbar{margin-bottom:20px;padding:10px 0 12px;gap:10px}.writer-back{font-size:11px}.writer-save-group{gap:10px}.writer-status{font-size:10px;max-width:101px;text-align:right}.writer-save{font-size:12px;padding:10px 13px}.writer-heading{margin:24px 3px 17px;display:block}.writer-heading .small-label{font-size:20px}.writer-heading>p:last-child{font-size:11px;margin-top:5px}.writer-paper{padding:24px 20px 16px}.writer-title{font-size:24px;padding-bottom:20px}.writer-tools{margin-bottom:24px;gap:5px;padding:3px 0}.writer-format{gap:0}.writer-tools button{padding:10px 7px;min-height:42px;font-size:11px}.writer-preview-toggle{padding-left:11px!important}.writer-body,.writer-preview{font-size:17px;line-height:2;min-height:380px}.writer-paper-foot{font-size:9px;gap:10px;padding-top:20px}.writer-meta-grid{grid-template-columns:1fr 1fr;gap:16px}.writer-meta-grid label:nth-child(3){grid-column:1/-1}.writer-meta-grid input,.writer-meta-grid textarea{font-size:16px}.writer-draft{padding:17px}.writer-draft-actions{gap:8px}.writer-feedback,.writer-error,.writer-auth{font-size:12px;padding:12px 14px}.writer-shortcut{font-size:9px}.writer-shortcut span{margin:0 4px}.writer-secondary-actions{font-size:11px;gap:10px}.import-dialog{padding:23px;max-height:calc(100dvh - 32px)}.import-dialog-head h2{font-size:23px}.import-description{font-size:12px;margin-bottom:20px}.import-dropzone{padding:23px 10px}.import-dropzone strong{font-size:14px}.import-dropzone small{font-size:9px}}
@media(max-width:380px){.writer-shell{padding-left:13px;padding-right:13px}.writer-paper{padding-left:16px;padding-right:16px}.writer-status{max-width:83px;font-size:9px}.writer-tools button{padding-left:6px;padding-right:6px;font-size:10px}.writer-title{font-size:22px}.writer-paper-foot{font-size:8px}.writer-save{padding-left:11px;padding-right:11px}}
@media(prefers-color-scheme:dark){.writer-save,.import-done,.writer-draft-actions button:first-child{color:#233124}.writer-error{background:#a2483d18}.import-error{color:var(--danger)}}
