:root{--bg:#1a1a2e;--bg-surface:#232340;--text:#d4d4d8;--text-muted:#8888a0;--accent:#d4a04a;--accent-dim:#a07830;--border:#335;--thread-branch:#7aa2c8}*{box-sizing:border-box;margin:0;padding:0}body{background:var(--bg);color:var(--text);max-width:48rem;margin:0 auto;padding:2rem 1.5rem;font-family:Georgia,Times New Roman,serif;line-height:1.6}h1,h2,h3{color:var(--accent);font-weight:400}h1{margin-bottom:.25rem;font-size:1.8rem}h2{color:var(--text-muted);margin-bottom:1.5rem;font-size:1.1rem}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}.world-graph-container{margin-bottom:2rem}.world-graph{width:100%;height:auto;display:block}.graph-node{cursor:pointer;transition:r .15s}.graph-node:hover{r:11}.graph-label{fill:var(--text);cursor:pointer;font-family:Georgia,Times New Roman,serif;font-size:13px}.graph-label:hover{fill:var(--accent)}.thread-list{list-style:none}.thread-list li{border-bottom:1px solid var(--border);padding:.75rem 1rem}.thread-list li:last-child{border-bottom:none}.thread-list a{display:block}.thread-meta{color:var(--text-muted);font-family:monospace;font-size:.8rem}.turn{border-bottom:1px solid var(--border);padding:1.25rem 0}.turn:last-child{border-bottom:none}.turn-meta{color:var(--text-muted);margin-bottom:.5rem;font-family:monospace;font-size:.8rem}.turn-author{color:var(--accent)}.turn-timestamp{color:var(--text-muted);margin-left:.5rem;font-size:.8rem}.turn-prose{font-size:1rem;line-height:1.7}.page-changes{flex-wrap:wrap;gap:.35rem;margin-top:.5rem;display:flex}.page-change-chip{background:var(--bg-surface);border:1px solid var(--border);border-left:2px solid var(--accent-dim);border-radius:3px;align-items:baseline;gap:.3rem;max-width:100%;padding:.2rem .5rem;font-family:monospace;font-size:.78rem;display:inline-flex}.page-change-path{color:var(--text-muted)}.page-change-section{color:var(--accent-dim);font-weight:600}.page-change-content{color:var(--text);white-space:nowrap;text-overflow:ellipsis;max-width:20rem;overflow:hidden}.page-change-remove .page-change-section{opacity:.6;text-decoration:line-through}.page-change-label{color:var(--text-muted);font-style:italic}.back-link{margin-bottom:1rem;font-size:.9rem;display:inline-block}nav{margin-bottom:1.5rem}.compose{border-top:1px solid var(--border);margin-top:2rem;padding-top:1.5rem}.compose h3{color:var(--text-muted);margin-bottom:.5rem;font-size:.9rem}.compose textarea{background:var(--bg-surface);width:100%;color:var(--text);border:1px solid var(--border);resize:vertical;border-radius:4px;padding:.75rem;font-family:Georgia,Times New Roman,serif;font-size:1rem;line-height:1.6}.compose textarea:focus{border-color:var(--accent-dim);outline:none}.compose button{background:var(--accent-dim);color:var(--bg);cursor:pointer;border:none;border-radius:4px;margin-top:.5rem;padding:.5rem 1.25rem;font-size:.9rem}.compose button:hover{background:var(--accent)}.compose-actions{align-items:center;gap:.5rem;margin-top:.5rem;display:flex}.add-page-edit-btn{background:var(--bg-surface);border:1px solid var(--border)}.page-edit-chips{flex-wrap:wrap;gap:.4rem;margin-top:.5rem;display:flex}.page-edit-chip{background:var(--bg-surface);border:1px solid var(--border);color:var(--text);border-radius:4px;align-items:center;gap:.3rem;padding:.2rem .5rem;font-family:monospace;font-size:.8rem;display:inline-flex}.chip-remove{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:0 .15rem;font-size:.9rem;line-height:1}.chip-remove:hover{color:var(--text)}.page-edit-form{background:var(--bg-surface);border:1px solid var(--border);border-radius:4px;flex-direction:column;gap:.4rem;margin-top:.5rem;padding:.75rem;display:flex}.page-edit-form textarea{background:var(--bg);width:100%;color:var(--text);border:1px solid var(--border);border-radius:4px;padding:.35rem .5rem;font-family:inherit;font-size:.85rem}.page-edit-form input[type=text]{background:var(--bg);width:100%;color:var(--text);border:1px solid var(--border);border-radius:4px;padding:.35rem .5rem;font-family:inherit;font-size:.85rem}.page-edit-form textarea{resize:vertical}.page-edit-remove-label{color:var(--text-muted);align-items:center;gap:.3rem;font-size:.85rem;display:flex}.page-edit-form-buttons{gap:.5rem;display:flex}.page-edit-form-buttons button{margin-top:0}.page-links{background:var(--bg-surface);border-radius:4px;margin-bottom:1.5rem;padding:.75rem 1rem}.page-links h3{color:var(--text-muted);margin-bottom:.25rem;font-size:.85rem}.page-links ul{list-style:none}.page-links li{font-family:monospace;font-size:.85rem}.page-sections{margin-top:1rem}.page-section{border-bottom:1px solid var(--border);padding:.75rem 0}.page-section:last-child{border-bottom:none}.page-section h3{color:var(--accent-dim);text-transform:uppercase;letter-spacing:.07em;margin-bottom:.4rem;font-size:.8rem}.page-section p{line-height:1.7}.page-section-content{white-space:pre-wrap;line-height:1.7}.turn-hidden{opacity:.5;border-bottom:1px solid var(--border)}.turn-hidden .turn-prose{color:var(--text-muted);font-style:italic;text-decoration:line-through}.hide-toggle{margin-left:.75rem}.hide-toggle-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:0 .25rem;font-family:monospace;font-size:.75rem}.hide-toggle-btn:hover{color:var(--accent)}.branch-off{margin-left:.75rem}.branch-off-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:0 .25rem;font-family:monospace;font-size:.75rem}.branch-off-btn:hover{color:var(--accent)}.branch-off-form{align-items:center;gap:.35rem;display:inline-flex}.branch-off-input{background:var(--bg-surface);color:var(--text);border:1px solid var(--border);border-radius:3px;width:12rem;padding:.15rem .4rem;font-family:monospace;font-size:.75rem}.branch-off-input:focus{border-color:var(--accent-dim);outline:none}.edit-turn-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;margin-left:.5rem;padding:0 .25rem;font-family:monospace;font-size:.75rem}.edit-turn-btn:hover{color:var(--accent)}.turn-edit{margin-top:.25rem}.turn-edit-textarea{background:var(--bg-surface);width:100%;color:var(--text);border:1px solid var(--border);resize:vertical;border-radius:4px;padding:.75rem;font-family:Georgia,Times New Roman,serif;font-size:1rem;line-height:1.6}.turn-edit-textarea:focus{border-color:var(--accent-dim);outline:none}.turn-edit-actions{gap:.5rem;margin-top:.35rem;display:flex}.turn-edit-save,.turn-edit-cancel{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:.15rem .4rem;font-family:monospace;font-size:.75rem}.turn-edit-save:hover,.turn-edit-cancel:hover{color:var(--accent)}.state-at-turn{margin-left:.75rem}.state-at-turn-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:0 .25rem;font-family:monospace;font-size:.75rem}.state-at-turn-btn:hover{color:var(--accent)}.state-loading{color:var(--text-muted);margin-left:.5rem;font-size:.75rem;font-style:italic}.state-panel{background:var(--bg-surface);border:1px solid var(--border);border-radius:4px;margin-top:.75rem;padding:.75rem 1rem;font-size:.85rem}.state-page{margin-bottom:.75rem}.state-page:last-child{margin-bottom:0}.state-page h4{color:var(--accent-dim);margin-bottom:.25rem;font-family:monospace;font-size:.8rem;font-weight:400}.state-sections dt{color:var(--text-muted);margin-left:.5rem;font-family:monospace}.state-sections dd{margin-bottom:.25rem;margin-left:1.5rem}.new-thread{margin-bottom:1.5rem}.new-thread-btn{border:1px solid var(--border);color:var(--text-muted);cursor:pointer;background:0 0;border-radius:4px;padding:.3rem .75rem;font-family:monospace;font-size:.85rem}.new-thread-btn:hover{color:var(--accent);border-color:var(--accent-dim)}.new-thread-form{align-items:center;gap:.4rem;display:inline-flex}.new-thread-input{background:var(--bg-surface);color:var(--text);border:1px solid var(--border);border-radius:4px;width:16rem;padding:.3rem .5rem;font-family:monospace;font-size:.85rem}.new-thread-input:focus{border-color:var(--accent-dim);outline:none}.error{color:#e05050}.merge-panel-wrapper{margin-bottom:1rem}.merge-btn{border:1px solid var(--border);color:var(--text-muted);cursor:pointer;background:0 0;border-radius:4px;padding:.3rem .75rem;font-family:monospace;font-size:.85rem}.merge-btn:hover{color:var(--accent);border-color:var(--accent-dim)}.merge-panel{background:var(--bg-surface);border:1px solid var(--border);border-radius:4px;padding:1rem}.merge-header{justify-content:space-between;align-items:center;margin-bottom:.75rem;display:flex}.merge-header h3{color:var(--text-muted);margin:0;font-size:.9rem}.merge-cancel-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;font-family:monospace;font-size:.75rem}.merge-cancel-btn:hover{color:var(--accent)}.merge-source-select{margin-bottom:.75rem}.merge-source-select label{color:var(--text-muted);margin-right:.5rem;font-size:.85rem}.merge-source-select select{background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:4px;padding:.3rem .5rem;font-family:Georgia,Times New Roman,serif;font-size:.9rem}.merge-source-select select:focus{border-color:var(--accent-dim);outline:none}.merge-clean{color:var(--text-muted);margin-bottom:.5rem;font-size:.85rem;font-style:italic}.merge-empty,.merge-no-pages{color:var(--text-muted);font-size:.85rem;font-style:italic}.merge-conflicts{margin-bottom:.75rem}.merge-conflicts h4{color:var(--accent-dim);margin-bottom:.5rem;font-size:.85rem;font-weight:400}.merge-conflict-item{border-left:2px solid var(--accent-dim);margin-bottom:.5rem;padding:.5rem .75rem}.conflict-path{color:var(--accent-dim);margin-bottom:.35rem;font-family:monospace;font-size:.8rem}.conflict-choices{flex-direction:column;gap:.25rem;display:flex}.conflict-choice{cursor:pointer;align-items:baseline;gap:.35rem;font-size:.85rem;display:flex}.conflict-choice input[type=radio]{accent-color:var(--accent)}.choice-label{color:var(--text-muted);font-family:monospace;font-size:.75rem}.choice-value{color:var(--text)}.merge-preview{margin-bottom:.75rem}.merge-preview summary{color:var(--text-muted);cursor:pointer;font-family:monospace;font-size:.85rem}.merge-preview summary:hover{color:var(--accent)}.merge-preview-page{background:var(--bg);border-radius:4px;margin-top:.5rem;padding:.5rem .75rem}.merge-preview-page h4{color:var(--accent-dim);margin-bottom:.25rem;font-family:monospace;font-size:.8rem;font-weight:400}.merge-compose{margin-top:.75rem}.merge-compose label{color:var(--text-muted);margin-bottom:.25rem;font-size:.85rem;display:block}.merge-prose-textarea{background:var(--bg);width:100%;color:var(--text);border:1px solid var(--border);resize:vertical;border-radius:4px;padding:.5rem;font-family:Georgia,Times New Roman,serif;font-size:.9rem;line-height:1.6}.merge-prose-textarea:focus{border-color:var(--accent-dim);outline:none}.merge-submit-btn{background:var(--accent-dim);color:var(--bg);cursor:pointer;border:none;border-radius:4px;margin-top:.5rem;padding:.4rem 1rem;font-size:.85rem}.merge-submit-btn:hover{background:var(--accent)}.top-nav{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;margin-bottom:1.5rem;padding-bottom:.75rem;display:flex}.nav-brand{color:var(--accent);font-family:monospace;font-size:1rem;text-decoration:none}.nav-brand:hover{text-decoration:underline}.nav-user{color:var(--text-muted);font-size:.85rem}.nav-logout-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:0 .25rem;font-family:monospace;font-size:.8rem}.nav-logout-btn:hover{color:var(--accent)}.nav-auth-links a{font-family:monospace;font-size:.85rem}.auth-form{max-width:24rem;margin-top:1rem}.auth-field{margin-bottom:.75rem}.auth-field label{color:var(--text-muted);margin-bottom:.2rem;font-size:.85rem;display:block}.auth-field input{background:var(--bg-surface);width:100%;color:var(--text);border:1px solid var(--border);border-radius:4px;padding:.45rem .6rem;font-family:Georgia,Times New Roman,serif;font-size:.95rem}.auth-field input:focus{border-color:var(--accent-dim);outline:none}.auth-submit{background:var(--accent-dim);color:var(--bg);cursor:pointer;border:none;border-radius:4px;margin-top:.5rem;padding:.5rem 1.25rem;font-size:.9rem}.auth-submit:hover{background:var(--accent)}.auth-alt{color:var(--text-muted);margin-top:1rem;font-size:.85rem}.role-badge{color:var(--accent-dim);border:1px solid var(--border);border-radius:3px;margin-left:.35rem;padding:.05rem .3rem;font-family:monospace;font-size:.7rem}.invite-wrapper{margin-left:.5rem}.invite-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:0 .25rem;font-family:monospace;font-size:.8rem}.invite-btn:hover{color:var(--accent)}.invite-url{color:var(--accent);word-break:break-all;margin-left:.35rem;font-family:monospace;font-size:.7rem;display:inline-block}.invite-error{margin-left:.35rem;font-size:.7rem}