.library-actions{display:flex;gap:10px;align-items:center}.writing-resources{display:grid;gap:5px;padding:22px 14px 5px;border-top:1px solid var(--line,#e4ddd2);margin-top:20px}.writing-resources .button{justify-content:flex-start}.writing-resources .text-button{text-align:left;margin:8px 12px;color:#80776b;font-size:12px}.feature-dialog{box-sizing:border-box;width:min(1180px,94vw);max-width:none;max-height:92dvh;padding:0;border:1px solid #dcd3c6;border-radius:14px;background:#fbf9f4;color:#28231e;overflow:hidden}.feature-dialog[open]{display:flex;flex-direction:column}.feature-dialog::backdrop{background:#25221b77;backdrop-filter:blur(3px)}.feature-heading{display:flex;justify-content:space-between;gap:20px;padding:24px 30px 20px;border-bottom:1px solid #e3dbce;flex-shrink:0}.feature-heading h2{font-size:24px;font-weight:600;margin:6px 0 10px}.feature-heading p{font-size:13px;line-height:1.7;color:#7a7065;margin:0}.feature-heading .eyebrow{font-size:10px;letter-spacing:2px}.feature-heading .icon-button{font-size:26px;flex-shrink:0}.feature-content{overflow:auto;padding:22px 30px;min-height:120px}.feature-footer{border-top:1px solid #e3dbce;padding:16px 30px;background:#f6f2ea;flex-shrink:0}.feature-footer .dialog-error{margin:0 0 12px;line-height:1.6}.feature-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px}.feature-actions .save-status{margin-right:auto}.feature-dialog input:not([type=checkbox]),.feature-dialog select,.feature-dialog textarea{box-sizing:border-box;color:#302a23;background:#fffdfa;border:1px solid #d9cfbf;border-radius:6px;font:inherit;padding:10px 12px;min-width:0}.feature-dialog input:focus,.feature-dialog select:focus,.feature-dialog textarea:focus{outline:2px solid #94464655;outline-offset:2px}.feature-dialog input[type=checkbox]{accent-color:#8b363b;width:16px;height:16px;flex-shrink:0;margin-top:4px}.feature-subbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px;font-size:13px}.feature-subbar select{flex:1;min-width:180px;max-width:100%}.feature-compare{display:grid;grid-template-columns:1fr 1fr;gap:18px}.feature-compare section{min-width:0;background:#fffdfa;border:1px solid #e3dbce;border-radius:8px;overflow:hidden}.feature-compare h3{margin:0;padding:14px 18px;font-size:13px;font-weight:600;border-bottom:1px solid #e3dbce;background:#f4efe5;display:flex;justify-content:space-between;gap:10px}.feature-compare h3 small{font-size:11px;font-weight:400;color:#82796c}.feature-compare pre{padding:20px;margin:0;min-height:260px;max-height:45dvh;overflow:auto;font:15px/1.95 'Songti SC','Noto Serif SC',serif;white-space:pre-wrap;overflow-wrap:anywhere}.feature-empty{text-align:center;padding:60px 22px;color:#81766b;line-height:1.8}.feature-empty h3{color:#4b4239;font-size:18px}.feature-dialog .muted{font-size:12px;color:#8a8075;line-height:1.7}.diff-box{border:1px solid #e2d9cb;border-radius:8px;margin-top:18px;overflow:hidden}.diff-box summary{cursor:pointer;padding:12px 16px;font-size:13px;background:#f5f0e7}.diff-box summary span{color:#82776b;margin-left:16px}.diff-box>p{margin:12px 16px}.diff-lines{max-height:36dvh;overflow:auto;padding:8px 0}.diff-lines>div{display:flex;font-size:13px;line-height:1.7;padding:2px 14px;white-space:pre-wrap;overflow-wrap:anywhere}.diff-lines span{width:24px;flex-shrink:0;color:#817467;user-select:none}.diff-lines code{font:inherit;min-width:0}.diff-added{background:#e6efe4}.diff-removed{background:#f6e6e1}.diff-added span{color:#3b6638}.diff-removed span{color:#943d35}.version-create{border:1px solid #ded4c5;padding:18px;border-radius:8px;background:#f3eee4;margin-bottom:24px}.field-label{display:block;font-size:13px;margin-bottom:10px}.version-create>div{display:flex;gap:10px}.version-create input{flex:1}.version-preview{max-height:43dvh;overflow:auto}.version-caption{display:flex;align-items:center;justify-content:space-between;padding:16px 0;color:#73685d}.version-caption strong{font-size:21px;color:#352d25}.version-caption span{font-size:12px}.version-preview section{background:#fffdfa;border:1px solid #e2d9cc;border-radius:8px;margin-bottom:16px;padding:24px}.version-preview h3{font:600 21px 'Songti SC',serif;margin:14px 0}.version-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:15px/1.9 'Songti SC',serif}.trial-name-row{display:flex;align-items:center;gap:12px;margin-bottom:16px;font-size:13px}.trial-name-row input{flex:1}.trial-inputs{display:flex;flex-direction:column}.trial-inputs input{margin:12px 16px 0}.trial-inputs textarea{margin:12px 16px 16px;min-height:250px;max-height:50dvh;resize:vertical;flex:1;font:15px/1.95 'Songti SC',serif}.trial-rescue{display:flex;gap:12px;margin-top:14px}.trial-rescue .button{font-size:12px;padding:8px 10px}.import-name{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px}.import-name input{flex:1}.import-warnings{margin:18px 0;padding:12px 16px;border-left:3px solid #b49a65;background:#f5efe1;color:#77664c;font-size:12px;line-height:1.7}.import-warnings p{margin:4px 0}.import-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:16px}.import-controls p{font-size:12px;margin-right:auto;color:#786d61}.import-controls .button{font-size:12px;padding:8px 12px}.import-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.import-grid h3{font-size:13px;margin:0 0 12px}.import-paragraphs,.import-scenes{height:38dvh;min-height:230px;overflow:auto;border:1px solid #e2d8ca;border-radius:8px;background:#fffdfa}.import-paragraph{display:flex;gap:10px;padding:10px 12px;font-size:13px;line-height:1.8;border-bottom:1px solid #f1ece4;white-space:pre-wrap;overflow-wrap:anywhere;cursor:pointer}.import-paragraph>span:last-child{min-width:0}.import-paragraph.is-break{background:#f4e8e4}.paragraph-number{font-size:10px;color:#a29689;min-width:18px}.import-scenes article{padding:16px;border-bottom:1px solid #e2d8ca}.import-scenes label{display:block;font-size:11px;color:#8f8273;margin-bottom:8px}.import-scenes input{width:100%;font-weight:600}.import-scenes pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.8 'Songti SC',serif;color:#74685b;max-height:160px;overflow:auto}.feature-dialog .button:disabled{opacity:.45;cursor:default}
@media(max-width:850px){.writing-header{flex-wrap:wrap;height:auto;min-height:75px;gap:8px;padding:12px 16px}.writing-header .header-actions{margin-left:auto}.feature-heading,.feature-content,.feature-footer{padding:18px}.trial-name-row{flex-wrap:wrap}.trial-name-row .muted{width:100%}.trial-picker .button{flex:1}.feature-compare{gap:12px}}
@media(max-width:600px){.library-heading{align-items:flex-start;gap:20px;flex-wrap:wrap}.library-actions{width:100%}.feature-dialog{width:96vw;max-height:95dvh;border-radius:10px}.feature-heading{padding:16px}.feature-heading h2{font-size:20px}.feature-content,.feature-footer{padding:14px}.feature-compare,.import-grid{grid-template-columns:1fr}.feature-compare pre{min-height:100px;max-height:27dvh}.trial-inputs textarea{min-height:230px}.feature-actions .button{flex:1;font-size:12px;padding:10px}.feature-actions .save-status{width:100%}.version-create>div{flex-direction:column}.version-caption{align-items:flex-start;gap:10px;flex-direction:column}.import-name input{min-width:180px}.import-name .muted{width:100%}.import-paragraphs,.import-scenes{height:30dvh;min-height:180px}.writing-resources{margin-top:8px;padding:8px;grid-template-columns:repeat(2,1fr)}.writing-resources .text-button{grid-column:1/-1}.writing-resources .button{font-size:12px;padding:6px}}
