:root{color:#252724;font-synthesis:none;background:#e9ebe8;font-family:Inter,Segoe UI,system-ui,sans-serif}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}textarea{resize:vertical}button{color:#30342f;cursor:pointer;background:#fff;border:1px solid #d4d7d2;border-radius:7px;padding:8px 11px}button:hover:not(:disabled){background:#f0f2ee}button:disabled{opacity:.48;cursor:not-allowed}.primary{color:#fff;background:#365f4b;border-color:#365f4b}.primary:hover:not(:disabled){background:#2c4d3d}.welcome{text-align:center;background:radial-gradient(circle,#fff 0,#edf0ec 65%);flex-direction:column;justify-content:center;align-items:center;gap:12px;height:100vh;display:flex}.welcome .brand{color:#365f4b;font-family:Georgia,serif;font-size:28px}.welcome h1{margin:5px;font-family:Georgia,serif;font-size:42px}.welcome p{color:#667067}.welcome div button{margin:6px}.welcome small{color:#747b75;margin-top:25px}.app{grid-template:58px 1fr/245px minmax(400px,1fr) var(--right-w,300px);background:#d3d6d2;gap:1px;height:100vh;display:grid}.app.no-left{grid-template-columns:minmax(400px,1fr) var(--right-w,300px)}.app.no-right{grid-template-columns:245px minmax(400px,1fr)}.app.no-left.no-right{grid-template-columns:1fr}.app>header{background:#f5f6f4;grid-column:1/-1;align-items:center;gap:12px;padding:0 15px;display:flex}.app>header b{color:#365f4b;font-family:Georgia,serif;font-size:22px}.project{color:#727872;border-left:1px solid #ccd0cc;padding-left:12px}.ai{align-items:center;gap:6px;margin:auto;display:flex}.ai button{padding:7px 9px;font-size:12px}.icon{background:0 0;border:0;padding:5px}.icon svg,.toolbar svg,.chapter-head svg{width:18px;height:18px}.left,.right{background:#f7f8f6;padding:16px;overflow:auto}.right{flex-direction:column;display:flex;position:relative;overflow:hidden}.right-resizer{cursor:col-resize;z-index:2;width:7px;position:absolute;top:0;bottom:0;left:-3px}.right-resizer:hover,.right-resizer.active{background:#b8bdb6}.left,.no-left .workspace{grid-column:1}.workspace{background:#fff;flex-direction:column;min-width:0;padding:32px 8%;display:flex;overflow:hidden}.actions{grid-template-columns:1fr 1fr;gap:7px;display:grid}.left h3{letter-spacing:.11em;color:#71776f;margin:27px 8px 8px;font-size:11px}.left nav,.right nav{flex-direction:column;gap:3px;display:flex}.left nav button,.right nav button{text-align:left;background:0 0;border:0}.left nav button.active{color:#274c3a;background:#dce6df;font-weight:650}.chapter-head{align-items:center;gap:15px;display:flex}.chapter-head input{border:0;outline:0;width:100%;padding:10px 0;font:700 30px Georgia,serif}.chapter-head button{align-items:center;gap:6px;display:flex}.toolbar{border-block:1px solid #e3e5e2;gap:3px;margin:10px 0 16px;padding:8px 0;display:flex}.toolbar button{border:0;padding:6px}.toolbar button.on{background:#dce6df}.tiptap{min-height:calc(100vh - 245px);font-size:var(--editor-font-size,18px);outline:0;font-family:Georgia,serif;line-height:1.75}.tiptap p{margin:.6em 0}.tiptap h2{font-size:28px}.tiptap p.is-editor-empty:first-child:before{color:#a8ada9;content:attr(data-placeholder);float:left;pointer-events:none;height:0}.workspace footer{color:#737973;border-top:1px solid #e7e9e6;justify-content:space-between;padding-top:10px;font-size:13px;display:flex}.saved{color:#397453}.dirty,.saving{color:#8a691b}.error{color:#a13939}.right{grid-column:3}.no-left .right{grid-column:2}.tabs{margin-bottom:20px;display:flex}.tabs button{background:0 0;border-width:0 0 2px;border-radius:0;flex:1}.tabs button.active{color:#365f4b;border-color:#365f4b;font-weight:700}.right p{color:#787f78;text-align:center;margin-top:40px;font-size:13px}.chat{flex-direction:column;flex:1;gap:10px;min-height:0;display:flex}.chat textarea,.modal input,.modal textarea{border:1px solid #d7dad6;border-radius:7px;outline-color:#527660;padding:10px}.notice{color:#4d6356;background:#edf2ee;border-radius:7px;flex:none;padding:12px;font-size:13px}.backdrop{z-index:5;background:#20252088;place-items:center;display:grid;position:fixed;inset:0}.modal{background:#fff;border-radius:12px;width:min(720px,90vw);max-height:85vh;padding:22px;font-size:14px;overflow:hidden auto;box-shadow:0 20px 60px #1116}.modal>header{justify-content:space-between;align-items:center;display:flex}.modal h2{margin:0 0 20px;font-family:Georgia,serif;font-size:20px}.modal>textarea,.modal label textarea{width:100%;min-height:260px;margin-top:7px}.modal label{margin:12px 0;font-weight:600;display:block}.modal small{color:#737973}.modal-actions{justify-content:flex-end;gap:8px;margin-top:20px;display:flex}.characters{flex-direction:column;gap:12px;display:flex}.character{background:#f5f7f4;border-radius:8px;flex-direction:column;gap:8px;padding:12px;display:flex}.character-details{flex-direction:column;gap:8px;display:flex}.character-row{flex-wrap:wrap;gap:8px;display:flex}.character-row .field{flex:1;min-width:110px}.character-toggle{background:0 0;border:0;flex:none;padding:4px;transition:transform .15s;display:flex}.character-toggle.expanded{transform:rotate(90deg)}.character-toggle svg{width:18px;height:18px}.character textarea{resize:vertical;width:100%;min-height:90px}.toast{color:#8d2929;background:#fff0f0;border:1px solid #e5a6a6;border-radius:9px;padding:15px 40px 15px 15px;position:fixed;bottom:25px;right:25px;box-shadow:0 6px 25px #0002}.toast button{background:0 0;border:0;position:absolute;top:5px;right:5px}@media (width<=900px){.app{grid-template-columns:210px 1fr}.right,.ai{display:none}.workspace{padding:25px 5%}}.scene-add-btn{padding:2px}.scene-add-btn svg{width:14px;height:14px}.chapter-scenes{flex-direction:column;gap:2px;margin:2px 0 4px 22px;padding-left:12px;display:flex;position:relative}.chapter-scenes:before{content:"";background:#d4d7d2;width:1px;position:absolute;top:0;bottom:11px;left:0}.scene-row{align-items:center;gap:2px;display:flex}.scene-row button:first-child{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;padding:5px 9px;font-size:13px;overflow:hidden}.scene-row.cursor button:first-child{background:#eef1ec}.scene-row.active button:first-child{color:#274c3a;background:#dce6df;font-weight:650}.context-menu-backdrop{z-index:5;background:0 0;position:fixed;inset:0}.context-menu-empty{color:#787f78;max-width:220px;padding:8px 9px;font-size:12px;display:block}.move-to-modal{width:min(420px,90vw)}.move-to-tree{flex-direction:column;gap:2px;max-height:50vh;margin:14px 0;display:flex;overflow:auto}.move-to-tree button.active{color:#274c3a;background:#dce6df;font-weight:650}.add-scene-modal{width:min(460px,90vw)}.add-scene-tree{flex-direction:column;gap:2px;max-height:40vh;margin:12px 0;display:flex;overflow:auto}.add-scene-tree button,.add-scene-blank-row button{text-align:left;white-space:normal;width:100%}.add-scene-tree button.active,.add-scene-blank-row button.active{color:#274c3a;background:#dce6df;font-weight:650}.add-scene-blank-row{border-top:1px solid #e7e9e6;margin-top:10px;padding-top:10px}::-webkit-scrollbar{width:12px;height:12px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#b4bbb4 padding-box padding-box;border:3px solid #0000;border-radius:999px}::-webkit-scrollbar-thumb:hover{background-color:#8f978f}::-webkit-scrollbar-corner{background:0 0}.app{min-height:0;overflow:hidden}.app>header,.left,.right,.workspace{min-height:0}.workspace{scrollbar-gutter:stable;scrollbar-color:#7c877f #edf0ed;scrollbar-width:auto;overscroll-behavior:contain;padding:0 8%;overflow:hidden auto}.workspace::-webkit-scrollbar{width:13px}.workspace::-webkit-scrollbar-track{background:#edf0ed}.workspace::-webkit-scrollbar-thumb{background:#7c877f;border:3px solid #edf0ed;border-radius:8px}.workspace-head{z-index:3;background:#fff;padding-top:22px;position:sticky;top:0}.editor-scroll{min-width:0;overflow:visible}.tiptap{overflow-wrap:anywhere;min-height:calc(100vh - 245px)}.workspace footer{background:#fff;padding:10px 0 14px}.dropdown-menu{flex:none}.dropdown-menu button{white-space:nowrap;align-items:center;gap:6px;display:flex}.dropdown-menu button svg:last-child{width:14px;height:14px}.dropdown-menu button.dropdown-icon-only{background:0 0;border:0;padding:6px}.dropdown-menu button.dropdown-icon-only:hover{background:#f0f2ee}.dropdown-options{z-index:6;background:#fff;border:1px solid #d4d7d2;border-radius:8px;flex-direction:column;width:max-content;min-width:230px;padding:5px;display:flex;position:fixed;box-shadow:0 8px 24px #0002}.dropdown-options button{text-align:left;white-space:nowrap;border:0;align-items:center;gap:10px;display:flex}.dropdown-option-icon{width:18px;height:18px;color:inherit;pointer-events:none;flex:0 0 18px;justify-content:center;align-items:center;display:inline-flex}.dropdown-option-icon svg{stroke-width:1.75px;width:18px;height:18px;display:block}.dropdown-option-row{align-items:center;gap:4px;display:flex}.dropdown-option-row>button:first-child{flex:1}.dropdown-options .dropdown-option-delete{color:#a13939;flex:none;padding:6px}.dropdown-options .dropdown-option-delete:hover:not(:disabled){background:#fff0f0}.dropdown-option-delete svg{width:16px;height:16px;display:block}.dropdown-divider{background:#e7e9e6;height:1px;margin:5px 3px}.dropdown-heading{letter-spacing:.08em;text-transform:uppercase;color:#7b817b;padding:4px 9px 2px;font-size:11px}.draft-dot{vertical-align:middle;border-radius:50%;flex:none;width:8px;height:8px;margin-right:7px;display:inline-block;position:relative;top:-1px}.dropdown-option-icon .draft-dot{margin:0}.draft-dot.prima{background:#d9a33f}.draft-dot.seconda{background:#d9733f}.draft-dot.terza{background:#4d7fb8}.draft-dot.revisione{background:#3f8f5f}.draft-dot.none{background:0 0;box-shadow:inset 0 0 0 1.5px #b3b8b3}.draft-stage-pill{flex:none}.chapter-head .draft-stage-pill button{white-space:nowrap;border-radius:999px;padding:6px 11px;font-size:13px}.chapter-head .draft-stage-pill .draft-dot{margin-right:0}.draft-stage-pill.empty button{color:#8a8f89}.header-menu{flex:none}.header-menu button{padding:7px 9px;font-size:12px}.success-toast{color:#28603a;background:#eff8f1;border-color:#9dcbaa}.error-toast{color:#8d2929;background:#fff0f0;border-color:#e5a6a6}@media (width<=900px){.workspace{padding:0 5%}.workspace-head{padding-top:18px}}.toolbar{flex-wrap:wrap;align-items:center;gap:3px}.tooltip-anchor{flex:none;display:inline-flex;position:relative}.toolbar button{justify-content:center;align-items:center;min-width:30px;min-height:32px;display:inline-flex;position:relative}.toolbar button[aria-pressed=true]{color:#21482f;background:#dce6df}.toolbar button:focus-visible,button:focus-visible{outline-offset:2px;outline:2px solid #39795a}.toolbar-divider{border-left:1px solid #d5dcd6;height:22px;margin:0 3px}.toolbar-spacer{flex:1}.tool-tooltip{z-index:1000;color:#fff;text-align:center;pointer-events:none;background:#24342c;border-radius:5px;max-width:260px;padding:7px 10px;font:12px/1.4 system-ui,sans-serif;position:fixed;transform:translate(-50%);box-shadow:0 3px 12px #0003}.tool-tooltip.above{transform:translate(-50%,-100%)}.highlight-control{flex:none;display:flex;position:relative}.highlight-control .color-trigger{width:22px;min-width:22px;padding:3px}.highlight-indicator{border:1px solid #66766a55;border-radius:1px;height:3px;position:absolute;bottom:3px;left:7px;right:7px}.highlight-menu{z-index:10;background:#fff;border:1px solid #ced7d0;border-radius:6px;width:145px;padding:5px;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 5px 20px #0002}.highlight-menu button{justify-content:flex-start;gap:10px;width:100%;padding:8px;display:flex}.highlight-menu button[aria-checked=true]{background:#edf3ef}.link-control{flex:none;display:flex;position:relative}.link-menu{z-index:10;background:#fff;border:1px solid #ced7d0;border-radius:6px;gap:6px;width:230px;padding:8px;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 5px 20px #0002}.link-menu input{flex:1;min-width:0;margin:0;padding:6px 8px}.color-swatch{border:1px solid #77867a55;border-radius:3px;flex:none;width:20px;height:16px}.tiptap mark{color:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:2px}.tiptap .ai-context{-webkit-box-decoration-break:clone;box-decoration-break:clone;background:#dbe6f7;border-radius:2px}.toast>.tooltip-anchor{position:absolute;top:5px;right:5px}.toast>.tooltip-anchor button{position:static}.ai-settings-modal{width:min(760px,92vw);padding-top:0}.ai-settings-header{z-index:3;background:#fff;border-bottom:1px solid #eceeeb;flex-wrap:wrap;gap:8px;margin:0 -22px;padding:18px 22px 12px;position:sticky;top:0}.ai-settings-header h2{margin:0}.ai-settings-header-actions{align-items:center;gap:10px;display:flex}.ai-settings-header-actions .dirty{font-size:12px}.ai-settings-header .error{flex-basis:100%;margin:4px 0 0}.ai-settings-confirm{color:#6b4a00;background:#fdf6e6;border:1px solid #f0d49a;border-radius:8px;flex-wrap:wrap;flex-basis:100%;align-items:center;gap:8px;padding:8px 10px;font-size:13px;display:flex}.ai-settings-confirm span{flex:1;min-width:200px}.ai-settings-modal h3{margin:18px 0 6px;font-family:Georgia,serif;font-size:15px}.ai-settings-modal .hint{color:#737973;margin:6px 0 0;font-size:12px}.providers{flex-direction:column;gap:10px;min-width:0;display:flex}.provider-row{background:#f5f7f4;border-radius:8px;min-width:0;padding:12px}.provider-row input[type=radio]{margin-right:6px}.provider-select{align-items:center;margin-bottom:8px;font-size:13px;font-weight:650;display:flex}.provider-fields{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;display:grid}.provider-fields .field{min-width:0;margin:0;font-size:12px;font-weight:600;display:block}.provider-fields .field input{width:100%;min-width:0;margin-top:4px;display:block}.model-field{align-items:center;gap:6px;margin-top:4px;display:flex}.model-field input{flex:1;min-width:0;margin-top:0}.model-search{flex:none;padding:6px}.model-search svg{width:15px;height:15px}.provider-actions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.provider-row>.hint,.provider-row>.error,.provider-row>.test-ok{margin:8px 0 0;font-size:12px}.provider-row .character-heading,.provider-row .character-delete-confirm{margin-bottom:8px}.connection-json-fields{margin-top:8px}.connection-json-fields textarea{resize:vertical;width:100%;min-height:56px;margin-top:4px;font-family:ui-monospace,Consolas,monospace;font-size:12px;display:block}.provider-row>small{color:#737973;margin-top:8px;font-size:12px;display:block}.provider-row .ai-params{margin-top:10px}.test-ok{color:#397453}.ai-params{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;display:grid}.base-instructions-path{background:#f5f7f4;border-radius:8px;align-items:center;gap:8px;margin-top:8px;padding:10px 12px;display:flex}.base-instructions-path code{overflow-wrap:anywhere;flex:1;min-width:0;font-size:12px}.base-instructions-path button{flex:none;padding:6px}.base-instructions-path svg{width:15px;height:15px}.ai-params label{font-size:13px;font-weight:600}.ai-params input{border:1px solid #d7dad6;border-radius:7px;width:100%;margin-top:6px;padding:8px;display:block}.ai-params input:disabled{color:#9a9f99;background:#f0f1ef}.ai-params small{color:#737973;margin-top:4px;font-size:11px;font-weight:400;display:block}.param-header{justify-content:space-between;align-items:center;gap:8px;font-size:13px;font-weight:600;display:flex}.param-switch{gap:0}.checkbox-field{align-items:center;gap:8px;font-size:13px;margin:14px 0 0!important;display:flex!important}.checkbox-field input{accent-color:#365f4b;border:none!important;width:auto!important;padding:0!important}.thinking-level-field{margin:14px 0 0;font-size:13px;font-weight:600;display:block}.scriva-engine{border:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;margin:14px 0 0;padding:0;display:grid}.scriva-engine legend{grid-column:1/-1;margin-bottom:6px;padding:0;font-size:13px;font-weight:600}.modal label.scriva-engine-option{cursor:pointer;background:#fff;border:1px solid #dfe4de;border-radius:9px;align-items:flex-start;gap:8px;margin:0;padding:10px 12px;font-weight:400;display:flex}.modal label.scriva-engine-option.active{background:#eef4f0;border-color:#9fb8a8;box-shadow:0 0 0 1px #9fb8a8}.scriva-engine-option input{accent-color:#365f4b;margin:3px 0 0}.scriva-engine-option strong{color:#252724;font-size:13px;display:block}.scriva-engine-option small{color:#69736b;margin-top:3px;font-size:12px;line-height:1.4;display:block}@media (width<=560px){.scriva-engine{grid-template-columns:1fr}}.thinking-level-field input[type=range]{accent-color:#365f4b;width:100%;max-width:220px;margin-top:6px;display:block}.ai-settings-modal>section>small{color:#737973;margin-top:4px;font-size:11px;display:block}.notes-table{flex-direction:column;gap:10px;margin-top:10px;display:flex}.note-row{align-items:flex-start;gap:8px;display:flex}.note-row textarea{flex:1;min-height:60px}.confirm-modal{width:min(360px,90vw)}.confirm-modal p{margin:0 0 4px}.confirm-modal-danger{width:min(460px,90vw);position:relative}.confirm-modal-danger-head{align-items:center;gap:16px;margin-bottom:18px;display:flex}.confirm-modal-danger-icon{color:#a13939;background:#fff0f0;border-radius:50%;flex:none;justify-content:center;align-items:center;width:52px;height:52px;display:flex}.confirm-modal-danger-icon svg{width:26px;height:26px}.confirm-modal-danger h2{margin:0;font-family:Georgia,serif;font-size:22px}.confirm-modal-danger p{margin:0 0 10px;line-height:1.5}.confirm-modal-danger small{color:#8a8f89;display:block}.confirm-modal-danger .modal-actions{border-top:1px solid #e7e9e6;gap:10px;margin-top:18px;padding-top:16px;display:flex}.confirm-modal-danger .modal-actions button{flex:1;justify-content:center}.confirm-modal-close{position:absolute;top:14px;right:14px}.danger-outline{color:#a13939;background:#fff0f0;border-color:#e5a6a6}.danger-outline:hover:not(:disabled){background:#ffe4e4}.danger{color:#fff;background:#a13939;border-color:#a13939}.danger:hover:not(:disabled){background:#8d2929}.chapter-row{align-items:center;gap:2px;display:flex}.chapter-row button{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.chapter-row .icon{flex:none}.chapter-drag-handle{color:#9aa19a;cursor:grab;flex:none;align-items:center;padding:2px;display:flex}.chapter-drag-handle svg{width:14px;height:14px}.switch{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:6px;font-size:12px;display:flex}.modal label.switch{font-weight:400;display:flex}.switch.disabled{cursor:not-allowed;opacity:.48}.credits-badge{color:#2f6b45;white-space:nowrap;font-variant-numeric:tabular-nums;cursor:pointer;background:#f1f7f3;border:1px solid #cfe0d5;border-radius:999px;align-items:center;gap:6px;min-height:0;margin-left:10px;padding:4px 10px;font-size:12px;font-weight:600;line-height:1.3;display:inline-flex}.credits-badge:hover{background:#e6f1ea}.credits-modal{width:min(560px,100vw - 32px)}.credits-modal-body{flex-direction:column;gap:12px;padding:4px 22px 8px;display:flex}.credits-modal-balance{color:#2f6b45;margin:0;font-weight:600}.credits-modal-balance span{color:#5d625b;font-weight:400}.credits-modal-hint{color:#5d625b;margin:0;font-size:13px}.credits-packs{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;display:grid}.credits-pack{cursor:pointer;background:#fff;border:1px solid #d4d7d2;border-radius:10px;flex-direction:column;align-items:center;gap:2px;padding:10px 6px;display:flex}.credits-pack b{color:#252724;font-size:17px}.credits-pack span{color:#5d625b;font-variant-numeric:tabular-nums;font-size:12px}.credits-pack.selected{background:#f1f7f3;border-color:#365f4b;box-shadow:inset 0 0 0 1px #365f4b}.credits-custom{flex-direction:column;gap:6px;font-size:13px;font-weight:600;display:flex}.credits-custom-row{align-items:center;gap:8px;font-weight:400;display:flex}.credits-custom-row input{width:110px;margin:0}.credits-custom-result{color:#2f6b45;font-variant-numeric:tabular-nums}.credits-badge svg{width:14px;height:14px}.credits-badge.low{color:#8a5a00;background:#fdf6e6;border-color:#f0d49a}.credits-badge.empty{color:#a13939;background:#fcefef;border-color:#e5a6a6}.switch input{opacity:0;width:0;height:0;position:absolute}.switch-track{background:#d4d7d2;border-radius:9px;flex:none;width:30px;height:17px;transition:background .15s;position:relative}.switch-thumb{background:#fff;border-radius:50%;width:13px;height:13px;transition:transform .15s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #0003}.switch input:checked+.switch-track{background:#365f4b}.switch input:checked+.switch-track .switch-thumb{transform:translate(13px)}.switch input:focus-visible+.switch-track{outline-offset:2px;outline:2px solid #527660}.scriva-panel{flex-direction:column;flex:1;gap:10px;min-height:0;display:flex;overflow:auto}.scriva-panel p{text-align:left;margin:0}.scriva-panel-hint{color:#787f78;font-size:13px}.scriva-panel-findings{white-space:pre-wrap;background:#f5f7f4;border-radius:8px;padding:12px;font-size:13px;line-height:1.6}.scriva-scene-brief{background:#eaf1fb;border:1px solid #b9d3f2;border-radius:8px;flex:none;padding:12px;font-size:13px;line-height:1.6}.scriva-scene-brief strong{color:#1f4d84;margin-bottom:6px;display:block}.scriva-scene-brief p{white-space:pre-wrap;margin:0}.scriva-scene-brief-empty{color:#6b716c;margin:0;font-size:12px;font-style:italic}.prompt-debug-modal{width:min(640px,92vw)}.prompt-order-list{flex-direction:column;gap:6px;margin:8px 0 0;padding:0;list-style:none;display:flex}.prompt-order-list li{background:#f5f7f4;border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;font-size:13px;font-weight:600;display:flex}.prompt-order-actions{flex:none;gap:2px;display:flex}.prompt-debug-textarea{width:100%;min-height:280px;margin-top:8px;font-family:ui-monospace,Consolas,monospace;font-size:12px;line-height:1.5;display:block}.hidden-prompts-modal{width:min(760px,92vw)}.hidden-prompts-list{flex-direction:column;gap:6px;margin:14px 0 0;padding:0;list-style:none;display:flex}.hidden-prompts-list details{background:#f5f7f4;border-radius:8px;padding:8px 12px}.hidden-prompts-list summary{cursor:pointer;font-size:13px;font-weight:600}.hidden-prompt-text{box-sizing:border-box;white-space:pre-wrap;resize:vertical;width:100%;min-height:220px;max-height:420px;margin:10px 0 2px;font-family:ui-monospace,Consolas,monospace;font-size:12px;line-height:1.5;display:block}.hidden-prompt-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;margin-top:6px;display:flex}.hidden-prompt-notice{color:#2f6b45;margin-right:auto}.prompt-modified-badge,.prompt-unsaved-badge{border-radius:999px;margin-left:8px;padding:1px 7px;font-size:11px;font-weight:600}.prompt-modified-badge{color:#2f6b45;background:#e8f1ec}.prompt-unsaved-badge{color:#8a5a00;background:#fdf6e6}.hidden-prompts-summary{color:#2f6b45;margin:6px 0 0;font-size:13px;font-weight:600}.storm-modal{flex-direction:column;height:80vh;max-height:80vh;display:flex;overflow:hidden}.storm-modal>.chat,.storm-modal>.history-list{flex:1;min-height:0;margin-top:10px}.storm-modal>.tabs{flex:none;margin-top:10px}.storm-controls{flex-wrap:wrap;flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.storm-controls label{font-size:13px;font-weight:600}.storm-controls select{border:1px solid #d7dad6;border-radius:7px;width:100%;margin-top:6px;padding:8px;display:block}.storm-controls .checkbox-field{margin:0!important}.storm-controls button{flex:none}.storm-backdrop{grid-template-columns:minmax(0,1fr) min(720px,90vw) minmax(0,1fr);place-items:center stretch;column-gap:16px;padding:0 16px}.storm-side-slot{min-width:0;height:80vh;display:flex}.storm-side-slot-left{justify-content:flex-end}.storm-side-slot-right{justify-content:flex-start}.storm-side{background:#fff;border-radius:12px;flex-direction:column;gap:10px;width:100%;max-width:440px;height:100%;min-height:0;padding:18px;font-size:14px;display:flex;box-shadow:0 20px 60px #1116}.storm-side>header{flex:none;justify-content:space-between;align-items:baseline;gap:8px;display:flex}.storm-side h3{margin:0;font-family:Georgia,serif;font-size:18px}.storm-side-status{color:#8a691b;font-size:12px}.storm-side-note{color:#3f5a4a;background:#edf2ee;border-radius:7px;flex:none;margin:0;padding:8px 10px;font-size:12px;line-height:1.45}.storm-side-body{flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}.storm-side-body>textarea{resize:none;border:1px solid #d7dad6;border-radius:7px;outline-color:#527660;flex:1;width:100%;min-height:0;padding:10px;line-height:1.55}.storm-side-body .characters{gap:10px}.storm-side-body .character input,.storm-side-body .character textarea,.storm-side-body .character select{border:1px solid #d7dad6;border-radius:7px;width:100%;padding:7px}.storm-side-body .field{margin:0;font-size:12px;font-weight:600;display:block}.storm-side .modal-actions{flex:none;margin-top:0}.storm-side .error{flex:none;margin:0}.storm-modal>header{gap:12px}.storm-title{flex-wrap:wrap;align-items:center;gap:14px;min-width:0;display:flex}.storm-title h2{margin:0}.storm-modal>header{margin-bottom:14px}.storm-panel-toggles{flex-wrap:wrap;gap:6px;display:flex}.storm-panel-toggle{border-radius:999px;align-items:center;gap:6px;padding:6px 10px;font-size:12px;display:flex;position:relative}.storm-panel-toggle svg{width:14px;height:14px}.storm-panel-toggle.active{color:#274c3a;background:#dce6df;border-color:#9fb8a8;font-weight:650}.storm-panel-toggle.active:hover:not(:disabled){background:#d0ddd4}.storm-dirty-dot{background:#c8922a;border-radius:50%;width:7px;height:7px;position:absolute;top:2px;right:4px}@media (width<=1180px){.storm-backdrop{grid-template-columns:1fr;padding:0}.storm-side-slot{z-index:6;width:min(340px,46vw);height:80vh;position:fixed;top:10vh}.storm-side-slot:empty{display:none}.storm-side-slot-left{left:12px}.storm-side-slot-right{right:12px}}.selection-chip{color:#3f4a43;background:#eef2ee;border-radius:7px;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;padding:8px 10px;font-size:12px;line-height:1.4;display:flex}.selection-chip button{flex:none;padding:2px 6px;line-height:1}.rewrite-insert-bar{flex:none;justify-content:flex-end;gap:8px;display:flex}.rewrite-insert-bar button{padding:6px 10px;font-size:12px}.chat-toolbar{flex:none;justify-content:space-between;align-items:center;gap:8px;display:flex}.chat-toolbar strong{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;overflow:hidden}.chat-toolbar button{flex:none;padding:5px 9px;font-size:12px}.chat-messages{scrollbar-gutter:stable;flex-direction:column;flex:1;gap:8px;min-height:0;padding:2px 16px 2px 2px;display:flex;overflow-y:auto}.chat-bubble{white-space:pre-wrap;overflow-wrap:anywhere;border-radius:11px;max-width:85%;padding:9px 12px;font-size:14px;line-height:1.5}.chat-bubble.user{color:#213a2c;background:#dce6df;border-bottom-right-radius:3px;align-self:flex-end}.chat-bubble.assistant{color:#30342f;background:#eef0ee;border-bottom-left-radius:3px;align-self:flex-start}.chat-bubble.pending{font-style:italic}.chat-bubble.pending.pending-streaming{font-style:normal}.pending-stop{color:#fff;background:#b5453a;border-color:#b5453a;animation:1.6s ease-in-out infinite pending-stop-pulse}.pending-stop:hover:not(:disabled){background:#9c3a30}@keyframes pending-stop-pulse{0%,to{box-shadow:0 0 #b5453a73}50%{box-shadow:0 0 0 6px #b5453a00}}@media (prefers-reduced-motion:reduce){.pending-stop{animation:none}}.status-box{isolation:isolate;color:#30342f;background:#eef0ee;border-radius:11px;align-items:center;gap:10px;padding:9px 12px;font-size:13px;font-style:italic;display:flex;position:relative}.chat-input-row{flex:none;align-items:flex-end;gap:8px;display:flex}.chat-area{color:#5d655f;flex-wrap:wrap;flex:none;justify-content:space-between;align-items:center;gap:4px 8px;font-size:12px;display:flex}.chat-area label{align-items:center;gap:6px;margin:0;font-weight:400;display:flex}.chat-area select{font:inherit;color:#30342f;background:#fff;border:1px solid #d4d7d2;border-radius:6px;padding:3px 6px;font-size:12px}.chat-area-bible input{margin:0}.chat-area-cost{color:#8a6a2a;flex:none;font-size:11px;line-height:1.35}.chat-empty{flex-direction:column;gap:12px;display:flex}.right .chat-empty p{margin-top:24px;line-height:1.5}.chat-suggestions{flex-direction:column;align-items:center;gap:6px;display:flex}.chat-suggestions button{background:#f5f7f4;border-radius:999px;padding:6px 11px;font-size:12px}.chat-turn{flex-direction:column;align-items:flex-start;gap:6px;display:flex}.chat-turn .chat-bubble{max-width:85%}.chat-bubble.prose{max-width:95%;font-family:Georgia,serif;font-size:15px;line-height:1.65}.chat-turn .chat-bubble.prose{max-width:95%}.chat-storm-btn{color:#365f4b;background:#f1f6f2;border-color:#b9cbbf;align-items:center;gap:6px;padding:6px 11px;font-size:12px;display:inline-flex}.chat-storm-btn svg{width:15px;height:15px}.chat-toolbar-actions{flex:none;gap:6px;display:flex}.chat-toolbar-actions button{align-items:center;gap:5px;display:inline-flex}.chat-toolbar-actions svg{width:14px;height:14px}.feedback-modal{width:min(480px,92vw)}.feedback-group{border:1px solid #e3e5e2;border-radius:8px;margin:0 0 12px;padding:8px 14px 10px}.feedback-group legend{padding:0 4px;font-weight:650}.modal .feedback-option{flex-wrap:wrap;align-items:center;gap:8px;margin:7px 0;font-weight:400;display:flex}.feedback-option.disabled{color:#9aa09a}.feedback-option small{flex-basis:100%;padding-left:24px}.feedback-option select{max-width:60%;font:inherit;border:1px solid #d7dad6;border-radius:6px;margin-left:auto;padding:4px 6px}.feedback-size{color:#5d655e;margin:4px 0 0;font-size:13px}.continue-modal{width:min(560px,94vw)}.continue-hint{color:#5d655e;margin:0 0 14px;font-size:13px;line-height:1.45}.continue-words{border:0;flex-wrap:wrap;gap:6px;margin:0 0 6px;padding:0;display:flex}.continue-words legend{margin-bottom:8px;padding:0;font-weight:650}.modal .continue-words label{cursor:pointer;background:#fff;border:1px solid #d4d7d2;border-radius:999px;margin:0;padding:6px 12px;font-size:13px;font-weight:400}.modal .continue-words label.active{color:#274c3a;background:#dce6df;border-color:#9fb8a8;font-weight:600}.continue-words input{opacity:0;pointer-events:none;position:absolute}.continue-words label:has(input:focus-visible){outline-offset:1px;outline:2px solid #527660}.modal .continue-directions textarea{width:100%;min-height:70px;margin-top:6px;font-weight:400}.feedback-line{cursor:context-menu;border-radius:4px;transition:background .12s}.feedback-line:hover{background:#dfe9e2}.feedback-line.applied{color:#6f7a72}.feedback-line.applied:after{content:" ✓ inserita";color:#397453;white-space:nowrap;font-weight:600}.correction-menu{width:auto;min-width:240px;max-width:300px}.correction-preview{white-space:normal;flex-direction:column;gap:3px;padding:6px 9px;font-size:12px;line-height:1.4;display:flex}.correction-preview s{color:#a13939}.correction-preview span{color:#2f6b47}.correction-missing{color:#8a8f89;white-space:normal;padding:4px 9px 6px;font-size:11px;line-height:1.35;display:block}.chat-input-row textarea{flex:1;min-height:44px;max-height:140px;margin:0}.chat-input-row button{flex:none}.rolestorm-chat .chat-input-row textarea{resize:none;min-height:72px;max-height:220px}.history-list{flex-direction:column;flex:1;gap:3px;min-height:0;display:flex;overflow-y:auto}.history-row{align-items:center;gap:2px;display:flex}.history-title{text-align:left;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;border-radius:6px;flex:1;min-width:0;padding:8px;overflow:hidden}.narrative-nav button{align-items:center;gap:10px;display:flex}.narrative-nav svg{stroke-width:1.75px;flex:0 0 18px;width:18px;height:18px}.narrative-fields{border:0;min-width:0;margin:0;padding:0}.narrative-fields>textarea{resize:vertical;width:100%;min-height:260px;margin-bottom:8px}.narrative-hint{color:#737973;line-height:1.5}.style-preset-row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.style-preset-row input{flex:1;min-width:160px}.plot-modal{box-sizing:border-box;background:#fafbf9;border:1px solid #d8dcd8;flex-direction:column;min-width:988px;min-height:520px;max-height:none;padding:0;display:flex;position:fixed;overflow:hidden}.plot-modal-header{cursor:move;-webkit-user-select:none;user-select:none;background:#fff;border-bottom:1px solid #e1e4e0;flex:none;padding:16px 26px 14px;align-items:center!important}.plot-modal-title{align-items:center;gap:14px;min-width:0;display:flex}.plot-modal-title>svg{color:#365f4b;stroke-width:1.8px;flex:none;width:31px;height:31px}.plot-modal-title h2{margin:0;font-size:22px}.plot-modal-subtitle{color:#6b6f68;max-width:none;margin:2px 0 0;font-size:12px;font-weight:400}.plot-modal-columns{flex:1;min-height:0;display:flex;overflow:hidden}.plot-chapters-panel{background:#fbfcfa;border-right:1px solid #e1e4e0;flex-direction:column;flex:0 0 292px;min-width:0;padding:16px 14px 14px 26px;display:flex;overflow:hidden}.plot-chapter-search{align-items:center;position:relative;margin:8px 0 10px!important;font-weight:400!important;display:flex!important}.plot-chapter-search svg{color:#6f766f;pointer-events:none;width:15px;height:15px;position:absolute;left:11px}.plot-chapter-search input{background:#fff;width:100%;height:34px;padding:7px 10px 7px 34px}.plot-chat-divider{cursor:ew-resize;background:#fafbf9;flex:0 0 9px;position:relative}.plot-chat-divider:after{content:"";background:#e1e4e0;width:1px;position:absolute;top:0;bottom:0;left:4px}.plot-chat-divider:hover:after{background:#9fb0a4;width:2px}.plot-chat-column{box-sizing:border-box;background:#fff;flex-direction:column;flex:none;padding:12px 18px 14px;display:flex;overflow:hidden}.plot-chat-column .tabs{flex:none;margin-bottom:16px}.plot-chat-column .chat{flex:1;min-height:0;margin:0}.plot-resize-handle{position:absolute}.plot-resize-n,.plot-resize-s{cursor:ns-resize;height:8px;left:14px;right:14px}.plot-resize-n{top:0}.plot-resize-s{bottom:0}.plot-resize-w,.plot-resize-e{cursor:ew-resize;width:8px;top:14px;bottom:14px}.plot-resize-w{left:0}.plot-resize-e{right:0}.plot-resize-nw,.plot-resize-ne,.plot-resize-sw{width:14px;height:14px}.plot-resize-nw{cursor:nwse-resize;top:0;left:0}.plot-resize-ne{cursor:nesw-resize;top:0;right:0}.plot-resize-sw{cursor:nesw-resize;bottom:0;left:0}.plot-modal-resize-handle{cursor:nwse-resize;width:18px;height:18px;position:absolute;bottom:0;right:0}.plot-modal-resize-handle:after{content:"";border-bottom:2px solid #b8bdb6;border-right:2px solid #b8bdb6;width:9px;height:9px;position:absolute;bottom:4px;right:4px}.plot-chapters{scrollbar-gutter:stable;flex-direction:column;flex:1;gap:6px;width:calc(100% + 12px);min-height:0;margin-right:-12px;padding-right:22px;display:flex;overflow-y:auto}.plot-chapters::-webkit-scrollbar{width:8px}.plot-chapters::-webkit-scrollbar-track{background:0 0}.plot-chapters::-webkit-scrollbar-thumb{background:#aeb5ae;border:2px solid #fbfcfa;border-radius:999px}.plot-chapters-title{color:#252724;text-transform:none;letter-spacing:0;margin:0;font:700 17px Georgia,serif}.plot-chapter-row{background:#fff;border:1px solid #e0e3df;border-radius:7px;align-items:center;gap:2px;min-height:36px;padding:2px;display:flex}.plot-chapter-row.active{background:#edf3ef;border-color:#c3d3c8}.plot-chapter-row .checkbox-field{margin:0 0 0 7px!important}.plot-chapter-row button{text-align:left;background:0 0;border:0;border-radius:5px;flex:1;align-items:center;gap:8px;min-width:0;padding:7px 8px;display:flex}.plot-chapter-row button span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.plot-chapter-row button.active{color:#274c3a;font-weight:650}.plot-chapter-row .icon{color:#6e766f;flex:none;padding:5px}.plot-chapter-row .icon svg{width:15px;height:15px}.plot-empty-search{text-align:left!important;color:#777!important;margin:14px 4px!important;font-size:12px!important}.plot-new-chapter{color:#365f4b;background:#fff;border-color:#dce0dc;flex:none;width:100%;margin-top:10px}.plot-detect-chapters{border-top:1px solid #e3e5e2;flex:none;margin-top:14px;padding-top:14px}.plot-ai-card{isolation:isolate;text-align:left;color:#274c3a;background:linear-gradient(135deg,#e1eee7,#edf3ef);border:1px solid #c3d3c8;border-radius:10px;align-items:flex-start;gap:10px;width:100%;padding:14px;display:flex;position:relative;overflow:hidden;box-shadow:0 1px 2px #274c3a14}.plot-ai-card:hover:not(:disabled){background:linear-gradient(135deg,#d7e8de,#e6efe9);border-color:#aebfb3;box-shadow:0 2px 5px #274c3a1f}.plot-ai-card:focus-visible{outline-offset:2px;outline:2px solid #527660}.plot-ai-card>svg{flex:none;width:20px;height:20px;margin-top:1px}.plot-ai-card>span{flex-direction:column;gap:4px;min-width:0;display:flex}.plot-ai-card strong{font-size:13px}.plot-ai-card small{color:#627168;font-size:11px;line-height:1.35}.plot-chapter-detail{background:#fff;flex:1;min-width:0;padding:15px 18px 18px;overflow-y:auto}.plot-chapter-heading{justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px;display:flex}.plot-chapter-heading-title{align-items:center;gap:8px;min-width:0;display:flex}.plot-chapter-heading-title .checkbox-field{flex:none;margin:0!important}.plot-chapter-heading h3{text-overflow:ellipsis;white-space:nowrap;margin:0;font:700 25px Georgia,serif;overflow:hidden}.plot-action-hint{color:#737973;margin:-5px 0 9px;display:block}.plot-chapter-detail>label{font-size:14px;margin:0!important}.plot-chapter-detail label textarea{resize:vertical;min-height:145px;margin-top:6px}.plot-char-count{text-align:right;color:#8a9086;margin-top:-2px;font-size:11px;display:block}.plot-generate-scenes{justify-content:space-between;align-items:flex-end;gap:20px;margin-top:10px;display:flex}.plot-generate-scenes .thinking-level-field{flex:1;max-width:330px;margin:0;font-size:12px}.plot-generate-scenes .thinking-level-field input{width:100%;margin-top:8px;display:block}.plot-scenes-title{color:#434943;margin:13px 0 8px;font-size:14px;font-weight:600}.plot-scenes{flex-direction:column;gap:8px;margin-top:0;display:flex}.plot-scene-card{background:#fbfcfa;border:1px solid #e3e5e2;border-radius:7px;flex-direction:column;gap:3px;padding:8px 10px;display:flex}.plot-scene-head{align-items:center;gap:6px;display:flex}.plot-scene-head .checkbox-field{margin:0!important}.plot-scene-head input{background:#fff;flex:1;min-width:0;margin:0;padding:7px 9px}.plot-scene-card textarea{resize:vertical;background:0 0;border-color:#0000;min-height:54px;margin:0;padding:5px 8px;line-height:1.35}.plot-new-scene{color:#365f4b;background:#fff;border-style:dashed;width:100%}.pill-action{color:#274c3a;background:#dce6df;border-color:#c3d3c8;border-radius:999px;justify-content:center;align-items:center;gap:7px;padding:9px 16px;font-weight:650;display:inline-flex}.pill-action:hover:not(:disabled){background:#cfe0d4}.pill-action svg{flex:none;width:16px;height:16px}.plot-chat-tabs{align-items:center}.plot-chat-welcome{color:#38403a;align-items:flex-start;gap:9px;font-size:12px;line-height:1.45;display:flex}.plot-chat-welcome>div{background:#fbfcfa;border:1px solid #e1e4e0;border-radius:7px;padding:12px}.plot-chat-welcome-text{white-space:pre-line}.plot-chat-avatar{color:#fff;background:#365f4b;border-radius:6px;flex:0 0 31px;place-items:center;width:31px;height:31px;display:grid}.plot-chat-avatar svg{width:18px;height:18px}.plot-new-chat{color:#365f4b;background:#fff;align-self:flex-start;margin-top:4px;padding:7px 10px}.plot-modal-footer{background:#fafbf9;border-top:1px solid #e1e4e0;flex:none;justify-content:flex-end;gap:10px;padding:10px 16px 12px;display:flex}.plot-modal-footer button{min-width:78px}.plot-status-line{color:#737973;background:#fafbf9;flex:none;align-items:center;gap:12px;min-height:24px;padding:3px 18px;display:flex}.plot-status-line .error{margin:0}.button-working{isolation:isolate;cursor:wait;position:relative;overflow:hidden;opacity:1!important}.button-working:after{content:"";z-index:-1;pointer-events:none;background:linear-gradient(105deg,#0000 35%,#52766033 50%,#0000 65%);animation:1.8s ease-in-out infinite button-working-shimmer;position:absolute;inset:-40% -65%}.button-working.primary:after,.button-working.danger:after{background:linear-gradient(105deg,#0000 35%,#ffffff59 50%,#0000 65%)}.button-working.plot-ai-card:after,.button-working.pill-action:after{background:linear-gradient(105deg,#0000 35%,#ffffffd1 50%,#0000 65%)}.button-working svg{animation:1.4s ease-in-out infinite button-working-breathe}@keyframes button-working-shimmer{0%{transform:translate(-45%)}to{transform:translate(45%)}}@keyframes button-working-breathe{0%,to{opacity:.55;transform:scale(.92)}50%{opacity:1;transform:scale(1.06)}}@media (prefers-reduced-motion:reduce){.button-working:after,.button-working svg{animation:none}.button-working:after{display:none}}.character-heading{align-items:center;gap:12px;display:flex}.character-heading .field{flex:1;min-width:0}.character-delete{color:#a13939;flex:none;align-items:center;gap:6px;display:inline-flex}.character-delete svg{width:16px;height:16px}.character-delete-confirm{background:#fff8f8;border:1px solid #e5c9c9;border-radius:7px;padding:10px}.character-delete-confirm p{margin:0 0 10px}.character-delete-confirm>div{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.narrative-modal .character input,.narrative-modal .character textarea{width:100%;min-width:0}.character .field{color:#5b6058;margin:0;font-size:12px;font-weight:600;display:block}.character .field input,.character .field select,.character .field textarea{color:#252724;width:100%;margin-top:4px;font-size:14px;font-weight:400;display:block}.character-name-field input{padding:10px 12px;font-size:18px}.dropdown-check-spacer{width:14px;display:inline-block}.rolestorm-open-btn{color:#365f4b;border-color:#365f4b;flex:none;padding:7px 9px;font-size:12px;font-weight:600}.rolestorm-window{background:#e9ebe8;flex-direction:column;height:100vh;min-height:0;display:flex}.rolestorm-header{background:#f5f6f4;flex:none;align-items:center;gap:12px;height:58px;padding:0 15px;display:flex}.rolestorm-header b{color:#365f4b;font-family:Georgia,serif;font-size:22px}.rolestorm-header-actions{align-items:center;gap:8px;margin-left:auto;display:flex}.rolestorm-window>.notice{border-radius:7px;flex:none;margin:10px 15px 0}.rolestorm-body{grid-template-columns:var(--rolestorm-left-w,280px) minmax(360px,1fr) var(--rolestorm-right-w,300px);background:#d3d6d2;flex:1;gap:1px;min-height:0;display:grid;overflow:hidden}.rolestorm-center{background:#fff;min-width:0;min-height:0;display:flex}.rolestorm-resizer{cursor:col-resize;z-index:2;width:7px;position:absolute;top:0;bottom:0}.rolestorm-resizer:hover{background:#b8bdb6}.rolestorm-characters .rolestorm-resizer{right:-3px}.rolestorm-synopsis .rolestorm-resizer{left:-3px}.rolestorm-characters{background:#f7f8f6;flex-direction:column;gap:10px;min-height:0;padding:16px;display:flex;position:relative;overflow:auto}.rolestorm-characters h3{letter-spacing:.11em;color:#71776f;align-items:center;gap:2px;margin:0;font-size:11px;display:flex}.rolestorm-characters-actions{grid-template-columns:1fr 1fr;gap:7px;display:grid}.rolestorm-ai-new{width:100%}.rolestorm-search{background:#fff;border:1px solid #d7dad6;border-radius:7px;align-items:center;gap:8px;padding:6px 10px;display:flex}.rolestorm-search svg{color:#787f78;flex:none;width:16px;height:16px}.rolestorm-search input{background:0 0;border:0;outline:0;flex:1;min-width:0;padding:2px 0}.rolestorm-characters-header{color:#787f78;justify-content:space-between;align-items:center;font-size:12px;display:flex}.rolestorm-character-list{flex-direction:column;gap:4px;min-height:0;display:flex;overflow:auto}.rolestorm-character{background:#fff;border-radius:8px;padding:2px 6px}.rolestorm-character.played{background:#dce6df}.rolestorm-character-row{align-items:center;gap:8px;padding:6px 0;display:flex}.rolestorm-avatar{color:#fff;border-radius:50%;flex:none;justify-content:center;align-items:center;width:28px;height:28px;font-size:13px;font-weight:700;display:flex}.avatar-a{background:#5b7f6c}.avatar-b{background:#7a6a9e}.avatar-c{background:#c07b41}.avatar-d{background:#4a7fa1}.avatar-e{background:#a15656}.rolestorm-character-name{text-align:left;background:0 0;border:0;flex-direction:column;flex:1;align-items:flex-start;gap:1px;min-width:0;padding:2px 0;display:flex}.rolestorm-character-name b{color:#252724;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:13px;overflow:hidden}.rolestorm-character-name small{color:#787f78;font-size:11px}.rolestorm-character.played .rolestorm-character-name small{color:#274c3a;font-weight:600}.rolestorm-character-details{flex-direction:column;gap:6px;padding:0 0 10px 44px;display:flex}.rolestorm-character-tags{flex-wrap:wrap;gap:5px;display:flex}.rolestorm-character-tags span{color:#4d6356;background:#eef1ec;border-radius:20px;padding:2px 7px;font-size:11px}.rolestorm-character-details p{color:#54594f;margin:0;font-size:12px;line-height:1.5}.rolestorm-character-details>button{align-self:flex-start}.rolestorm-empty-hint{color:#787f78;text-align:center;margin-top:20px;font-size:12px}.rolestorm-chat{background:#fff;min-height:0;padding:16px}.chat-bubble-edit{flex-direction:column;align-self:flex-start;gap:6px;width:100%;max-width:85%;display:flex}.chat-bubble-edit textarea{width:100%;min-height:70px}.chat-bubble-edit-actions{justify-content:flex-end;gap:6px;display:flex}.chat-bubble-edit.storm-bubble-edit{align-self:flex-end}.chat-bubble-group{flex-direction:column;max-width:85%;display:flex}.chat-bubble-group.user{align-self:flex-end;align-items:flex-end}.chat-bubble-group.assistant{align-self:flex-start;align-items:flex-start}.chat-bubble-group .chat-bubble{align-self:auto;max-width:100%}.rolestorm-message-actions{align-items:center;gap:1px;margin-top:2px;display:flex}.rolestorm-message-actions .icon{padding:3px}.rolestorm-message-actions .icon svg{width:14px;height:14px}.rolestorm-synopsis{background:#f7f8f6;flex-direction:column;gap:10px;min-height:0;padding:16px;display:flex;position:relative}.rolestorm-synopsis h3{letter-spacing:.11em;color:#71776f;margin:0;font-size:11px}.rolestorm-side-tabs{border-bottom:1px solid #dfe3de;flex:none;display:flex}.rolestorm-side-tabs button{color:#5d645c;letter-spacing:.04em;background:0 0;border:0;border-bottom:2px solid #0000;border-radius:0;flex:1;justify-content:center;align-items:center;gap:6px;padding:8px 6px;font-size:12px;font-weight:600;display:flex}.rolestorm-side-tabs button.active{color:#274c3a;border-bottom-color:#365f4b}.rolestorm-tab-count{color:#274c3a;background:#dce6df;border-radius:999px;min-width:18px;padding:1px 6px;font-size:11px;line-height:1.4}.research-panel{flex-direction:column;flex:1;gap:8px;min-height:0;display:flex}.research-messages{flex-direction:column;flex:1;gap:8px;min-height:0;padding-right:6px;display:flex;overflow:auto}.research-messages .chat-bubble{max-width:100%;font-size:13px}.research-messages .chat-bubble-group{flex-direction:column;display:flex}.research-messages .chat-bubble-group.user{align-items:flex-end}.research-messages .chat-bubble-group.assistant{align-items:stretch}.research-empty p{color:#5d645c;text-align:left;margin:0 0 8px;font-size:12.5px;line-height:1.5}.research-empty .research-note{color:#7b6a38}.research-images{flex-direction:column;gap:8px;margin-top:10px;display:flex}.research-image{background:#fff;border:1px solid #e1e5df;border-radius:8px;margin:0;overflow:hidden}.research-image img{object-fit:contain;background:#f4f5f3;width:100%;max-height:260px;display:block}.research-image figcaption{padding:4px 8px}.research-image.loading{color:#7b827a;white-space:normal;padding:10px;font-size:12px;font-style:italic}.research-link{color:#2f6b45;text-align:left;cursor:pointer;white-space:normal;background:0 0;border:0;align-items:center;gap:4px;padding:0;font-size:12px;display:inline-flex}.research-link:hover:not(:disabled){background:0 0;text-decoration:underline}.research-link svg{flex:none;width:12px;height:12px}.research-sources{white-space:normal;border-top:1px solid #dfe3de;flex-direction:column;align-items:flex-start;gap:3px;margin-top:10px;padding-top:8px;display:flex}.research-sources span{letter-spacing:.06em;color:#6e756d;text-transform:uppercase;font-size:11px;font-weight:700}.research-input{flex:none;align-items:flex-end;gap:8px;display:flex}.research-input textarea{resize:none;flex:1;min-height:64px;max-height:160px;margin:0}.research-restart{flex:none;align-self:flex-start;padding:5px 10px;font-size:12px}.rolestorm-guidelines{flex-direction:column;flex:1;gap:8px;min-height:0;display:flex;overflow:auto}.rolestorm-guideline{background:#fff;border-radius:8px;align-items:flex-start;gap:8px;padding:8px 10px;display:flex}.rolestorm-guideline p{color:#3a3d38;flex:1;margin:0;font-size:12.5px;line-height:1.4}.rolestorm-guideline.spent p{color:#8b9089}.rolestorm-guideline.spent del{-webkit-text-decoration:line-through #c53b3b;text-decoration:line-through #c53b3b;text-decoration-thickness:1.5px}.rolestorm-guideline-input{flex:none;align-items:flex-end;gap:8px;display:flex;position:relative}.rolestorm-guideline-input textarea{resize:none;flex:1;min-height:64px;max-height:160px;margin:0}.rolestorm-mention-list{z-index:5;background:#fff;border:1px solid #d7dad6;border-radius:8px;max-height:160px;margin-bottom:4px;position:absolute;bottom:100%;left:0;right:60px;overflow:auto;box-shadow:0 4px 14px #0000001f}.rolestorm-mention-list button{text-align:left;background:0 0;border:0;width:100%;padding:6px 10px;font-size:12.5px;display:block}.rolestorm-mention-list button:hover{background:#f0f2ee}.rolestorm-guideline-hint{color:#8b9089;margin:0;font-size:11px}.synopsis-preview-modal{width:min(980px,94vw);height:min(880px,90vh)}.synopsis-preview-body{flex-direction:column;flex:1;gap:10px;min-height:0;padding:18px 24px 14px;display:flex}.synopsis-preview-hint{color:#69736b;margin:0;font-size:13px;line-height:1.5}.synopsis-preview-body textarea{resize:none;color:#252724;background:#fff;border:1px solid #dfe4de;border-radius:10px;outline-color:#527660;flex:1;width:100%;min-height:0;padding:22px 28px;font:17px/1.7 Georgia,Times New Roman,serif}.synopsis-preview-count{color:#7a827b;align-self:flex-end;font-size:12px}@media (width<=1200px){.rolestorm-body{grid-template-columns:260px minmax(320px,1fr) 260px}}@media (width<=900px){.rolestorm-body{grid-template-columns:1fr;grid-auto-rows:minmax(0,auto) minmax(0,1fr) minmax(0,auto)}.rolestorm-characters{max-height:38vh}.rolestorm-synopsis{max-height:44vh}}.new-character-ai-modal{flex-direction:column;height:80vh;max-height:80vh;display:flex;overflow:hidden}.new-character-ai-modal>.chat{flex:1;min-height:0;margin-top:10px}.import-character-modal{flex-direction:column;gap:12px;display:flex}.import-character-file-row{align-items:center;gap:10px;display:flex}.import-character-filename{color:#54594f;text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.import-character-preview{flex-direction:column;gap:10px;max-height:50vh;display:flex;overflow:auto}.start-screen{background:radial-gradient(circle,#fff 0,#edf0ec 65%);flex-direction:column;align-items:center;gap:14px;min-height:100vh;padding:48px 24px;display:flex;overflow:auto}.start-screen .brand{color:#365f4b;font-family:Georgia,serif;font-size:26px}.start-screen h1{margin:2px 0 18px;font-family:Georgia,serif;font-size:36px}.start-projects{width:min(980px,94vw)}.start-projects-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;display:flex}.start-projects-head h2{letter-spacing:.03em;color:#3f453e;margin:0;font-size:15px}.start-projects-controls{align-items:center;gap:10px;display:flex}.search-field{background:#fff;border:1px solid #d7dad6;border-radius:7px;align-items:center;gap:6px;padding:6px 10px;display:flex}.search-field svg{color:#8b9089;flex:none;width:15px;height:15px}.search-field input{border:0;outline:0;width:180px;font-size:13px}.start-projects-controls select{border:1px solid #d7dad6;border-radius:7px;padding:7px 9px;font-size:13px}.start-empty{text-align:center;background:#fff;border:1px dashed #ccd0cc;border-radius:12px;flex-direction:column;align-items:center;gap:8px;padding:60px 30px;display:flex}.start-empty-icon{color:#7c877f;background:#eef1ec;border-radius:50%;place-items:center;width:64px;height:64px;margin-bottom:6px;display:grid}.start-empty-icon svg{width:28px;height:28px}.start-empty h3{margin:0;font-family:Georgia,serif;font-size:20px}.start-empty p{color:#727872;margin:0 0 10px}.start-empty div button{margin:0 4px}.start-empty-search{color:#787f78;text-align:center;font-size:13px}.project-grid{grid-template-columns:repeat(4,1fr);gap:16px;display:grid}@media (width<=900px){.project-grid{grid-template-columns:repeat(2,1fr)}}@media (width<=560px){.project-grid{grid-template-columns:1fr}}.project-card{text-align:left;background:#fff;border:1px solid #e3e5e2;border-radius:12px;flex-direction:column;display:flex;overflow:hidden}.project-card.busy{opacity:.6;pointer-events:none}.project-card-open{text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;padding:0;display:flex}.project-cover{aspect-ratio:2/3;color:#a8ada9;background:#eef1ec;place-items:center;width:100%;display:grid;overflow:hidden}.project-cover img{object-fit:cover;width:100%;height:100%}.project-cover svg{width:32px;height:32px}.project-card-info{flex-direction:column;gap:2px;padding:12px 14px 6px;display:flex}.project-card-info strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow:hidden}.project-genre{color:#8b9089;text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.project-card-foot{color:#8b9089;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px 12px;font-size:11.5px;display:flex}.project-card-new{color:#365f4b;cursor:pointer;background:0 0;border:1px dashed #ccd0cc;justify-content:center;align-items:center;gap:8px;min-height:220px}.project-card-new svg{width:26px;height:26px}.start-secondary-actions{grid-auto-columns:1fr;grid-auto-flow:column;justify-content:center;gap:12px;margin-top:18px;display:grid}.start-open-other{justify-content:center;align-items:center;gap:8px;display:flex}@media (width<=560px){.start-secondary-actions{grid-auto-flow:row}}.start-screen .error,.start-screen .notice{width:min(980px,94vw);margin-top:6px}.start-screen>small{color:#747b75;margin-top:20px}.create-project-modal{width:min(760px,92vw)}.path-row{gap:8px;margin-top:6px;display:flex}.path-row input{flex:1}.path-row button{flex:none;align-items:center;gap:6px;display:flex}.field-label{margin:16px 0 8px;font-size:14px;font-weight:600}.cover-picker{border:1px solid #e3e5e2;border-radius:10px;overflow:hidden}.cover-picker-tabs{background:#f7f8f6;margin:0}.cover-picker-tabs button{justify-content:center;align-items:center;gap:6px;padding:10px 8px;font-size:13px;display:flex}.cover-picker-tabs button svg{width:15px;height:15px}.cover-picker-body{padding:16px}.cover-dropzone{text-align:center;cursor:pointer;color:#7c877f;border:1px dashed #ccd0cc;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;gap:8px;width:180px;min-height:220px;margin:0 auto;padding:16px;display:flex;position:relative;overflow:hidden}.cover-dropzone.drag-over{background:#eef1ec;border-color:#365f4b}.cover-clear-btn{background:#fff;border:1px solid #d7dad6;border-radius:50%;justify-content:center;align-items:center;width:20px;height:20px;padding:0;line-height:0;display:flex;position:absolute;top:6px;right:6px;box-shadow:0 1px 4px #0003}.cover-clear-btn:hover{background:#fff0f0;border-color:#e5a6a6}.cover-clear-btn svg{width:11px;height:11px;display:block}.cover-dropzone svg{width:26px;height:26px}.cover-dropzone p{color:#54594f;margin:0;font-size:13px}.cover-dropzone small{font-size:11px}.cover-thumb{object-fit:cover;width:100%;height:100%}.cover-picker-placeholder{text-align:center;color:#7c877f;flex-direction:column;align-items:center;gap:10px;padding:30px 20px;display:flex}.cover-picker-placeholder svg{width:26px;height:26px}.cover-grid{grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:10px;display:grid}.cover-grid-item{aspect-ratio:2/3;cursor:pointer;background:#eef1ec;border:2px solid #0000;border-radius:8px;padding:0;position:relative;overflow:hidden}.cover-grid-item.selected{border-color:#365f4b}.cover-grid-item img{object-fit:cover;width:100%;height:100%;display:block}.cover-grid-check{color:#fff;background:#365f4b;border-radius:50%;place-items:center;width:18px;height:18px;display:grid;position:absolute;top:5px;right:5px}.cover-grid-check svg{width:12px;height:12px}.backup-modal{width:min(720px,94vw)}.backup-list{max-height:40vh;margin:0 0 12px;padding:0;list-style:none;overflow:auto}.backup-row{border-bottom:1px solid var(--line,#e5e5e0);justify-content:space-between;align-items:center;gap:12px;padding:8px 0;display:flex}.backup-row-actions{flex-wrap:wrap;justify-content:flex-end;gap:6px;display:flex}.backup-locations{flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0;display:flex}.backup-locations button.active{color:#274c3a;background:#dce6df}.settings-modal{background:#fafbf9;flex-direction:column;width:min(900px,94vw);height:min(820px,90vh);max-height:90vh;padding:0;display:flex;overflow:hidden}.settings-modal .settings-header{background:#fff;border-bottom:1px solid #e2e6e1;flex:none;padding:18px 24px}.settings-title{align-items:center;gap:12px;min-width:0;display:flex}.settings-title-icon{color:#365f4b;background:#e8f0eb;border-radius:10px;flex:none;place-items:center;width:38px;height:38px;display:grid}.settings-title-icon svg{width:20px;height:20px}.settings-modal h2{margin:0;font-size:22px}.settings-body{scrollbar-gutter:stable;flex:1;min-height:0;padding:22px 24px 28px;overflow-y:auto}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:14px;display:grid}.settings-card{background:#fff;border:1px solid #e1e6e0;border-radius:10px;min-width:0;padding:18px 19px;box-shadow:0 1px 2px #263c2c08}.settings-card-wide{grid-column:1/-1}.settings-card h3{color:#294b39;align-items:center;gap:9px;margin:0 0 14px;font:700 16px Georgia,serif;display:flex}.settings-card h3 svg{stroke-width:1.8px;flex:none;width:17px;height:17px}.settings-modal .settings-card label{color:#363d37;margin:0;font-size:12px;font-weight:650;display:block}.settings-card label input,.settings-card label select{color:#252724;background:#fff;border:1px solid #d5dcd5;border-radius:7px;outline-color:#527660;width:100%;min-width:0;height:38px;margin-top:7px;padding:7px 10px;font-size:14px;font-weight:400;display:block}.settings-select{margin-top:7px;display:block;position:relative}.settings-card label .settings-select select{appearance:none;height:40px;margin-top:0;padding:0 38px 0 12px;line-height:normal}.settings-select svg{pointer-events:none;color:#4b5f51;width:16px;height:16px;position:absolute;top:50%;right:12px;transform:translateY(-50%)}.settings-card label input[type=number]{max-width:130px}.settings-card .hint{color:#69736b;margin:10px 0 0;font-size:12px;line-height:1.5}.settings-card .hint:first-of-type{margin-top:-2px}.settings-path{background:#f7f9f7;border:1px solid #e4e9e3;margin-top:14px}.settings-path code{color:#3d493f}.settings-path button{background:#fff}.settings-backup-fields{grid-template-columns:minmax(0,1fr) minmax(180px,.45fr);gap:16px;margin-top:16px;display:grid}.settings-card .backup-locations{gap:6px;margin:10px 0 0}.settings-card .backup-locations small{width:100%;font-size:12px}.settings-card .backup-locations button{padding:6px 9px;font-size:12px}.settings-card>button{color:#365f4b;border-color:#cbdad0;margin-top:16px}.settings-ai-card{justify-content:space-between;align-items:center;gap:16px;display:flex}.settings-ai-card h3{margin:0}.settings-ai-card>button{white-space:nowrap;margin:0}.settings-modal>.error{background:#fff4f3;border-top:1px solid #efd5d2;margin:0;padding:8px 24px;font-size:12px}.settings-actions{background:#fff;border-top:1px solid #e2e6e1;flex:none;margin:0;padding:15px 24px}.settings-actions button{min-width:86px}@media (width<=680px){.settings-modal{width:96vw;height:94vh;max-height:94vh}.settings-modal .settings-header,.settings-actions{padding-inline:16px}.settings-body{padding:16px}.settings-grid{grid-template-columns:1fr}.settings-card-wide{grid-column:auto}.settings-backup-fields{grid-template-columns:1fr}.settings-ai-card{flex-direction:column;align-items:flex-start}}.publish-modal{width:min(1060px,95vw)}.publish-body{grid-template-columns:290px minmax(0,1fr);align-items:start;gap:18px;display:grid}.publish-side fieldset{border:0;min-width:0;margin:0 0 18px;padding:0}.publish-side legend{color:#294b39;margin-bottom:8px;padding:0;font:700 15px Georgia,serif}.modal label.publish-format{cursor:pointer;background:#fff;border:1px solid #e1e6e0;border-radius:10px;grid-template-columns:34px minmax(0,1fr);align-items:start;gap:11px;margin:0 0 8px;padding:11px 12px;font-weight:400;display:grid;position:relative}.publish-format input{opacity:0;pointer-events:none;position:absolute}.publish-format:has(input:focus-visible){outline-offset:2px;outline:2px solid #527660}.modal label.publish-format.active{background:#eef4f0;border-color:#9fb8a8;box-shadow:0 0 0 1px #9fb8a8}.publish-format-icon{color:#365f4b;background:#e8f0eb;border-radius:8px;place-items:center;width:34px;height:34px;display:grid}.publish-format-icon svg{width:18px;height:18px}.publish-format-text{min-width:0}.publish-format-text strong{color:#263027;flex-wrap:wrap;align-items:center;gap:6px;font-size:14px;display:flex}.publish-format-text small{color:#69736b;margin-top:3px;font-size:12px;line-height:1.4;display:block}.modal .publish-scope label{align-items:center;gap:8px;margin:6px 0;font-size:13px;font-weight:400;display:flex}.publish-scope input{width:auto}.publish-main{flex-direction:column;gap:14px;min-width:0;display:flex}.publish-main .settings-card .hint{margin-top:12px}.publish-main .settings-card>.hint:only-child{margin:0}.publish-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;display:grid}.settings-modal .settings-card label.publish-wide{margin-top:14px}.modal label.publish-wide textarea{color:#252724;resize:vertical;border:1px solid #d5dcd5;border-radius:7px;width:100%;min-height:84px;margin-top:7px;padding:8px 10px;font-size:14px;font-weight:400;line-height:1.45;display:block}.settings-modal .settings-card label.publish-check{align-items:center;gap:9px;margin-top:12px;font-size:13px;font-weight:400;display:flex}.settings-card label.publish-check input{width:auto;height:auto;margin:0;display:inline-block}.publish-preview-card h3{margin-bottom:12px}.publish-page{aspect-ratio:210/297;color:#111;background:#fff;border:1px solid #dcdcd6;max-width:380px;margin:0 auto;padding:30px 36px;font-size:10.5px;position:relative;overflow:hidden;box-shadow:0 2px 10px #0000001a}.publish-page:after{content:"";background:linear-gradient(#fff0,#fff);height:60px;position:absolute;inset:auto 0 0}.publish-page-header{text-align:right;margin-bottom:26px;font-size:9.5px}.publish-page .publish-page-title{text-align:center;margin:44px 0 26px}.publish-page p{text-align:left;text-indent:2.2em;margin:0}.publish-page.spacing-double p{line-height:2}.publish-page.spacing-one_half p{line-height:1.5}.publish-reader{color:#222;background:#fbf8f1;border:9px solid #2f332f;border-radius:16px;max-width:290px;max-height:430px;margin:0 auto;padding:22px 20px;font:13px/1.5 Georgia,serif;overflow:hidden}.publish-reader .publish-page-title{text-align:center;margin:14px 0 18px;font-size:16px}.publish-reader p{text-indent:1.2em;margin:0}.publish-reader p.first{text-indent:0}.publish-checks{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px;display:grid}.publish-book-pages{flex-direction:column;align-items:center;gap:16px;display:flex}.publish-spread{width:100%;max-width:560px;display:flex;box-shadow:0 2px 12px #00000026}.publish-spread img,.publish-spread-blank{background:#fff;width:50%;height:auto;display:block}.publish-spread-blank{background:#eceee9}.publish-spread img+img{border-left:1px solid #e3e3df}@media (width<=760px){.publish-body,.publish-fields,.publish-checks{grid-template-columns:1fr}}.debug-help{flex-direction:column;gap:8px;max-height:45vh;display:flex;overflow:auto}.debug-help-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.debug-help-head button{padding:2px 7px;line-height:1}.debug-help dl{flex-direction:column;gap:8px;margin:0;display:flex}.debug-help dt code{color:#274c3a;font-family:ui-monospace,Consolas,monospace;font-size:12px;font-weight:700}.debug-help dd{margin:2px 0 0;line-height:1.45}.debug-help small{color:#6b746d}.import-modal{width:min(820px,94vw)}.import-modal h3{margin:18px 0 6px;font-family:Georgia,serif;font-size:15px}.import-modal h4{margin:14px 0 6px;font-size:13px}.import-modal .hint{color:#737973;margin:4px 0 8px;font-size:12px}.import-modal section{border-top:1px solid #e7e9e6;margin-top:10px;padding-top:4px}.import-file-list{flex-direction:column;gap:2px;margin:6px 0 10px;padding-left:22px;display:flex}.import-file-list li span{text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;max-width:60%;margin-right:6px;display:inline-block;overflow:hidden}.import-file-list svg{width:15px;height:15px}.modal textarea.import-pasted-notes{min-height:110px}.import-summary{flex-direction:column;gap:4px;margin:6px 0 12px;padding-left:20px;display:flex}.import-estimate{color:#5b4a16;background:#fff8e6;border:1px solid #ecd79c;border-radius:9px;padding:10px 14px}.import-estimate p{margin:0 0 6px}.import-estimate small{color:#7a6a3a}.import-progress{margin:18px 0}.import-chapter{border-bottom:1px solid #f0f1ef;align-items:flex-start;gap:10px;padding:8px 0;display:flex}.import-chapter.excluded{opacity:.55}.import-chapter>input[type=checkbox]{margin-top:10px}.import-chapter-body{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.import-chapter-body input{font-weight:600}.import-chapter-body small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.import-chapter>button{flex:none;padding:6px 9px;font-size:12px}.modal label.import-check{align-items:flex-start;gap:8px;margin:8px 0 4px;display:flex}.import-character{font-weight:400}.import-character em{color:#527660;background:#edf2ee;border-radius:5px;padding:1px 6px;font-size:11px;font-style:normal}.modal .import-section textarea{width:100%;min-height:120px}.import-note{align-items:flex-start}.import-note input[type=checkbox]{margin-top:10px}.import-live-detail{color:#5d655d;margin-top:3px;font-style:normal;display:block}.import-retry{color:#5b4a16;background:#fff8e6;border:1px solid #ecd79c;border-radius:9px;margin:10px 0;padding:10px 14px}.import-retry p{margin:0 0 8px}.import-leave-confirm{color:#6d2525;background:#fff0f0;border:1px solid #e5a6a6;border-radius:9px;margin-top:14px;padding:10px 14px}.import-leave-confirm p{margin:0 0 8px}.import-leave-confirm div{justify-content:flex-end;gap:8px;display:flex}.narrative-modal .export-notice{color:#2f6b45}.character-composer{flex-direction:column;gap:8px;display:flex}.character-composer .composer-toggle{color:#2f5a44;background:#eef4f0;border-color:#9fb8a8;width:100%}.character-composer .composer-toggle.open{background:#e3ede6}.composer-panel{background:#f5f7f4;border:1px solid #e3e8e2;border-radius:10px;padding:16px 18px;container-type:inline-size}.composer-panel h3{color:#252724;margin:0 0 4px;font:700 19px Georgia,serif}.right .composer-panel p,.composer-panel .composer-hint{color:#737973;text-align:left;margin:0 0 12px;font-size:12px;line-height:1.5}.composer-row{grid-template-columns:1fr 1.2fr .8fr 1fr;gap:10px;margin-bottom:10px;display:grid}.composer-row.two{grid-template-columns:1fr 1fr}.modal .composer-panel label.field{margin:0;font-size:12px}.composer-panel label.field input,.composer-panel label.field select{box-sizing:border-box;width:100%;min-width:0;margin-top:4px;font-weight:400;display:block}.composer-panel label.field select{color:#252724;background:#fff;border:1px solid #d7dad6;border-radius:7px;height:38px;padding:0 10px;font-size:14px}.composer-traits{grid-template-columns:1fr 1fr;gap:8px 28px;margin:16px 0 14px;display:grid}.composer-column{flex-direction:column;gap:8px;min-width:0;display:flex}.composer-column+.composer-column{border-left:1px solid #e1e6e0;padding-left:28px}.composer-trait{color:#363d37;grid-template-columns:minmax(0,1fr) minmax(80px,1.1fr) minmax(0,1fr);align-items:center;gap:10px;font-size:13px;display:grid}.composer-pole{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.modal .composer-trait input[type=range]{accent-color:#365f4b;cursor:pointer;border:0;width:100%;margin:0;padding:0}.composer-actions{flex-wrap:wrap;gap:8px;display:flex}.character-profile{background:#fff;border:1px solid #e1e6e0;border-radius:8px;padding:12px 14px 4px;container-type:inline-size}.character-profile-title{color:#363d37;font-size:12px;font-weight:600;display:block}.character-profile .composer-traits{margin:10px 0}.character-ai-text{background:#fffbef;border:1px dashed #c9b88a;border-radius:8px;padding:10px 12px}.character-ai-text span{letter-spacing:.04em;text-transform:uppercase;color:#7a6630;font-size:11px;font-weight:600;display:block}.character-ai-text pre{white-space:pre-wrap;word-break:break-word;color:#3b3a33;margin:6px 0 0;font:12px/1.5 ui-monospace,Menlo,Consolas,monospace}@container (width<=720px){.composer-traits{grid-template-columns:1fr}.composer-column+.composer-column{border-left:0;padding-left:0}.composer-trait{grid-template-columns:minmax(0,1fr) minmax(120px,1.6fr) minmax(0,1fr)}}@container (width<=560px){.composer-row{grid-template-columns:1fr 1fr}}.splash{z-index:100;color:#30342f;cursor:default;opacity:1;background:radial-gradient(circle at 50% 38%,#fff 0,#f1f3ef 55%,#e4e8e3 100%);flex-direction:column;justify-content:center;align-items:center;gap:48px;padding:40px 24px 28px;transition:opacity .45s;display:flex;position:fixed;inset:0}.splash.leaving{opacity:0;pointer-events:none}.splash-center{text-align:center;animation:.8s both splash-rise}.splash-wordmark{color:#365f4b;letter-spacing:.01em;margin:0;font-family:Georgia,serif;font-size:clamp(56px,9vw,96px);font-weight:400}.splash-tagline{color:#6c746d;letter-spacing:.18em;text-transform:uppercase;margin:4px 0 0;font-size:15px}.splash-producer{color:#6c746d;margin:26px 0 0;font-size:14px}.splash-producer-name{letter-spacing:.12em;color:#30342f;margin-left:4px;font-weight:700;display:inline-block}.splash-credits{text-align:center;max-width:920px;animation:.8s .25s both splash-rise}.splash-credits p{color:#6c746d;margin:0;font-size:13px}.splash-logos{flex-wrap:wrap;justify-content:center;gap:18px 26px;margin:16px 0;display:flex}.splash-more{font-size:12px!important}.splash-footer{text-align:center;color:#8a918a;margin:0;font-size:11px;position:absolute;bottom:16px;left:16px;right:16px}@keyframes splash-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){.splash,.splash-center,.splash-credits{transition:none;animation:none}}.oss-logo{color:#4a5049;flex-direction:column;align-items:center;gap:6px;width:72px;margin:0;display:flex}.oss-logo svg,.oss-logo-image{width:30px;height:30px;display:block}.oss-logo-image{background:currentColor;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.oss-logo-text{align-items:center;height:30px;font-size:15px;font-weight:700;display:flex}.oss-logo figcaption{color:#6c746d;font-size:11px}.about-modal{width:min(820px,92vw)}.about-identity{text-align:center;border-bottom:1px solid #e7e9e6;padding:4px 0 14px}.about-identity p{margin:4px 0}.about-wordmark{color:#365f4b;font-family:Georgia,serif;font-size:40px}.about-modal h3{margin:18px 0 4px;font-family:Georgia,serif;font-size:16px}.about-modal .hint{color:#6c746d;font-size:13px}.about-logos{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:14px 10px;margin:14px 0;display:grid}.about-logo{text-align:center;flex-direction:column;align-items:center;gap:2px;display:flex}.about-logo small{font-size:11px;line-height:1.35}.about-search{align-items:center;gap:10px;margin:12px 0 8px;display:flex}.about-search input{flex:1;min-width:0}.about-packages{scrollbar-gutter:stable;border:1px solid #e3e5e2;border-radius:8px;max-height:40vh;margin:0;padding:0 6px 0 0;list-style:none;overflow:hidden auto}.about-packages li+li{border-top:1px solid #eef0ed}.about-package-row{text-align:left;background:0 0;border:0;border-radius:0;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;width:100%;padding:7px 14px 7px 10px;font-size:13px;display:grid}.about-package-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.about-package-name small{color:#8a918a}.about-package-license{color:#365f4b;font-size:12px}.about-package-source{color:#8a918a;text-align:right;min-width:70px;font-size:11px}.about-packages li.expanded .about-package-row{background:#f0f4f1;font-weight:600}.about-package-details{background:#fafbf9;padding:6px 16px 12px 12px}.about-package-details pre{white-space:pre-wrap;word-break:break-word;background:#fff;border:1px solid #eceee9;border-radius:6px;max-height:260px;margin:6px 0;padding:10px;font-size:11px;line-height:1.45;overflow:auto}.about-package-details code{word-break:break-all;font-size:11px}.about-trademarks{margin-top:12px;font-size:12px!important}@media (width<=560px){.about-package-row{grid-template-columns:minmax(0,1fr) auto}.about-package-source{display:none}}.move-to-tree,.add-scene-tree,.scriva-panel,.storm-side-body,.history-list,.rolestorm-character-list,.rolestorm-guidelines,.rolestorm-mention-list,.import-character-preview,.backup-list,.debug-help{scrollbar-gutter:stable;padding-right:14px}.about-packages{padding-right:14px}.update-notice{z-index:6;background:#fff;border:1px solid #cfe0d5;border-radius:12px;flex-direction:column;gap:8px;width:min(360px,100vw - 32px);padding:14px 16px;font-size:13px;display:flex;position:fixed;bottom:20px;right:20px;box-shadow:0 10px 30px #1113}.update-notice b{color:#2f6b45;font-size:14px}.update-notes{color:#4d544c;white-space:pre-line;max-height:140px;margin:0;overflow:auto}.update-notice .error{margin:0}.update-actions{justify-content:flex-end;gap:8px;display:flex}.about-updates{flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;display:flex}.about-updates label{align-items:center;gap:6px;margin:0;font-weight:400;display:flex}.about-updates select{font:inherit;background:#fff;border:1px solid #d4d7d2;border-radius:7px;padding:6px 8px}.about-update-status{color:#5d625b;flex-basis:100%;margin:0;font-size:12px}.password-input{margin-top:4px;display:block;position:relative}.password-input input{width:100%;padding-right:38px;display:block;margin-top:0!important}.password-eye{color:#5b6058;background:0 0;border:0;padding:5px;display:flex;position:absolute;top:50%;right:4px;transform:translateY(-50%)}.password-eye:hover:not(:disabled){background:#eef1ec}.password-eye svg{width:16px;height:16px}.feedback-check{vertical-align:-2px;cursor:pointer;margin:0 6px 0 0}.scriva-panel-actions{flex-wrap:wrap;flex:none;gap:6px;display:flex}.scriva-panel-actions button{align-items:center;gap:6px;padding:7px 10px;font-size:12px;display:flex}.scriva-panel-actions svg{width:15px;height:15px}.scriva-progress{background:#f5f7f4;border:1px solid #dfe3dd;border-radius:8px;flex:none;padding:10px 12px;font-size:13px;line-height:1.6}.scriva-progress p{white-space:pre-wrap}.scriva-progress-head{justify-content:space-between;align-items:center;margin-bottom:4px;display:flex}.scriva-progress-head svg{width:15px;height:15px}.scriva-finding{background:#fff8ec;border:1px solid #ecd6a8;border-radius:8px;flex-direction:column;flex:none;gap:5px;padding:10px 12px;font-size:13px;line-height:1.5;display:flex}.scriva-finding-problem{color:#5b4314;font-weight:600}.scriva-finding-quote{color:#3d403b;font-family:Georgia,serif;font-style:italic}.scriva-finding-source{color:#6c716a;font-size:12px}.scriva-finding-actions{justify-content:flex-end;gap:6px;display:flex}.scriva-finding-actions button{padding:5px 9px;font-size:12px}.success-toast{transition:opacity .6s,transform .6s}.success-toast.toast-fading{opacity:0;transform:translateY(8px)}@media (prefers-reduced-motion:reduce){.success-toast{transition:none}}.credits-plan-row{background:#f5f7f4;border:1px solid #dfe3dd;border-radius:8px;justify-content:space-between;align-items:center;gap:10px;margin:8px 0;padding:8px 10px;font-size:13px;display:flex}.credits-plan-row button{padding:6px 10px;font-size:12px}.plan-badge{letter-spacing:.12em;cursor:pointer;border:1px solid;border-radius:999px;flex:none;margin-left:-6px;padding:4px 7px 4px 8px;font:700 10px/1 Inter,Segoe UI,system-ui,sans-serif}.plan-badge-lite{color:#6c716a;background:#fff;border-color:#cfd3cd}.plan-badge-lite:hover:not(:disabled){background:#f0f2ee}.plan-badge-doc{color:#365f4b;background:#e6efe9;border-color:#c3d6c9}.plan-badge-doc:hover:not(:disabled){background:#dbe8df}.plan-badge-pro{color:#fff;background:#365f4b;border-color:#365f4b}.plan-badge-pro:hover:not(:disabled){background:#2c4d3d}.plan-badge-ultra{color:#f2dfa6;background:linear-gradient(135deg,#24402f,#3d6b53);border-color:#b8954a}.plan-badge-ultra:hover:not(:disabled){background:linear-gradient(135deg,#1d3527,#355d48)}.cloud-backup{border-top:1px solid #e3e6e1;margin-top:18px;padding-top:6px}.cloud-backup h3{align-items:center;gap:7px;display:flex}.cloud-backup h3 svg{color:#365f4b;width:18px;height:18px}.cloud-form .field{max-width:420px;margin:8px 0;font-size:12px;font-weight:600;display:block}.cloud-understood{align-items:flex-start;gap:8px;max-width:520px;font-size:13px;font-weight:400!important;display:flex!important}.cloud-understood input{margin-top:3px}.cloud-toolbar{flex-wrap:wrap;align-items:center;gap:12px;margin:8px 0;display:flex}.cloud-auto{align-items:center;gap:7px;font-size:13px;margin:0!important;font-weight:400!important;display:flex!important}.link-button{color:#365f4b;background:0 0;border:0;padding:4px;text-decoration:underline}html,body,#root{height:100%}.web-app{flex-direction:column;align-items:center;min-height:100%;padding:32px 16px;display:flex}.web-app.web-stage-editor{padding:0;display:block}.web-brand{color:#274c3a;margin-bottom:20px;font-family:Georgia,serif;font-size:26px}.web-brand span{color:#737973;font-size:16px}.web-card{background:#fff;border-radius:12px;width:min(440px,100%);padding:22px;box-shadow:0 10px 40px #1112}.web-card h2{margin:0 0 12px;font-family:Georgia,serif;font-size:20px}.web-card label{margin:12px 0;font-weight:600;display:block}.web-card input{border:1px solid #d7dad6;border-radius:7px;width:100%;margin-top:6px;padding:10px;display:block}.web-card>button.primary{width:100%;margin-top:8px}.web-muted{color:#737973;font-size:14px}.web-error{width:min(440px,100%)}.web-projects{width:min(560px,100%)}.web-projects ul{gap:8px;margin:0;padding:0;list-style:none;display:grid}.web-projects li button{text-align:left;flex-direction:column;gap:2px;width:100%;padding:12px 14px;display:flex}.web-projects small{color:#737973}.web-editor{grid-template-columns:240px minmax(0,1fr) 300px;width:100%;height:100vh;display:grid}.web-side{background:#f4f5f3;flex-direction:column;gap:10px;padding:16px;font-size:14px;display:flex;overflow:auto}.web-chapters{border-right:1px solid #e3e5e2}.web-bible{border-left:1px solid #e3e5e2}.web-project-name{justify-content:space-between;align-items:center;gap:8px;display:flex}.web-project-name strong{text-overflow:ellipsis;font-family:Georgia,serif;font-size:17px;overflow:hidden}.web-chapters ul{gap:4px;margin:0;padding:0;list-style:none;display:grid}.web-chapters li button{text-align:left;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;width:100%;overflow:hidden}.web-chapters li button.active{background:#dce6df;font-weight:600}.web-workspace{padding:20px 6%;overflow:auto}.web-topbar{justify-content:flex-end;align-items:center;gap:12px;margin-bottom:10px;display:flex}.web-save{color:#737973;margin-right:auto;font-size:13px}.web-save-dirty{color:#9a6a1f}.web-chapter-title{border:0;outline:0;width:100%;padding:4px 0;font-family:Georgia,serif;font-size:28px}.web-workspace .tiptap{min-height:60vh}.web-tabs{gap:4px;display:flex}.web-tabs button{flex:1;padding:6px 4px;font-size:13px}.web-tabs button.active{background:#dce6df;border-color:#9fb8a8}.web-bible label{font-weight:600;display:block}.web-bible textarea{border:1px solid #d7dad6;border-radius:7px;width:100%;min-height:180px;margin-top:6px;padding:8px;font-weight:400;display:block}.web-readonly{gap:10px;margin:0;padding:0;list-style:none;display:grid}.web-readonly p{white-space:pre-wrap;margin:4px 0}.web-hint{margin-top:auto}@media (width<=900px){.web-editor{grid-template-columns:1fr;height:auto}.web-side{border:0}.web-workspace{padding:16px}}
