.chat-dialog{width:min(1320px,calc(100vw - 48px));height:min(880px,94dvh);max-height:94dvh}
.chat-sidebar{flex-basis:240px}.chat-main{position:relative}.chat-context{margin-top:16px}
.companion-status{display:flex;align-items:center;gap:20px;padding:13px 24px 8px;font-size:11px;color:#b6a7c2;flex-shrink:0}.companion-status b{font-weight:500;color:#ead6ff;margin-left:4px}.cp-stage{color:#d3b7ec;display:flex;align-items:center;gap:7px}.cp-stage i{width:5px;height:5px;background:#c2a0de;border-radius:50%;box-shadow:0 0 9px #c2a0de70}.cp-mood{margin-left:auto;font-size:10px}
.companion-toolbar{display:flex;align-items:center;gap:8px;padding:4px 24px 14px;border-bottom:1px solid var(--border);flex-shrink:0}.companion-toolbar button{background:#b994d40a;border:1px solid #b994d42b;border-radius:5px;padding:7px 12px;font-size:11px;color:#ba9dd0;white-space:nowrap}.companion-toolbar button:hover,.companion-toolbar button.selected{background:#c19bdf1c;border-color:#ad83ca;color:#e4c9fa}.companion-toolbar>span{margin-left:auto;font-size:10px;color:#8a769b}
.chat-workspace{display:flex;flex:1;min-height:0;min-width:0;position:relative}.chat-thread{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}.chat-messages{scroll-behavior:auto}.chat-messages .message-text{font-size:14px}.chat-header-name{font-family:var(--serif);font-size:17px}.chat-demo-note{font-size:10px;color:#aa95b8}.chat-footer{font-size:10px}.chat-footer>button{font-size:11px}.choice-button{font-size:11px}.composer-input{font-size:14px}.chat-composer-area{padding-top:10px;border-top:1px solid #bb99d417;background:#211a2b}.message-tools{display:flex;align-items:center;gap:10px;margin-top:5px}.is-user .message-tools{justify-content:flex-end}.message-tools button{background:none;color:#9982ac;font-size:10px;padding:3px 0}.message-tools button:hover{color:#e3c8f9}.message-tools span{font-size:10px;color:#bea3cf}.chat-date{font-size:10px;color:#a68db7;margin-bottom:20px}
.companion-panel{width:310px;flex:0 0 310px;display:flex;flex-direction:column;min-height:0;border-left:1px solid #88669d3b;background:linear-gradient(140deg,#282031,#211b2a);z-index:3}.companion-panel>header{display:flex;align-items:flex-start;gap:10px;justify-content:space-between;padding:21px 20px 18px;border-bottom:1px solid var(--border)}.companion-panel header .eyebrow{font-size:8px;letter-spacing:1.5px;color:#b39ac4}.companion-panel h2{font:500 18px/1.7 var(--serif);color:#ecdcf4}.companion-panel header button{width:28px;height:28px;border:1px solid #9571aa4d;background:#6e4d8722;border-radius:5px;color:#cdb2df;font-size:20px}.cp-panel-content{overflow:auto;padding:20px;scrollbar-width:thin;scrollbar-color:#6c507d transparent}.companion-panel h3{font-size:13px;font-weight:500;color:#d8c2e8}.cp-relationship{border:1px solid #9171a333;border-radius:9px;background:#c59de808;padding:15px;margin-bottom:22px}.cp-relationship h3{font:18px var(--serif);margin:6px 0 17px}.cp-relationship>label{display:block;font-size:10px;color:#ad97bb;margin-top:12px}.cp-relationship b{float:right;color:#d1b5e5;font-weight:400}.cp-relationship meter{display:block;width:100%;height:6px;margin-top:7px;accent-color:#bf98df}.cp-relationship meter::-webkit-meter-bar{background:#493853;border:0}.cp-relationship meter::-webkit-meter-optimum-value{background:linear-gradient(90deg,#9373b3,#d1acd8)}.cp-relationship p{font-size:11px;color:#d1bddf;line-height:1.9;margin-top:15px}.cp-relationship small{display:block;font-size:10px;color:#a08bab;line-height:1.9;margin-top:9px}.cp-section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.cp-section-heading span{font-size:10px;color:#a990b9}.cp-hint{font-size:10px;line-height:1.9;color:#a08caf}.cp-memories{list-style:none;margin:15px 0 21px;padding:0;display:grid;gap:10px}.cp-memories li{padding:12px 14px;border:1px solid #9674aa33;border-radius:7px;background:#19142060;overflow-wrap:anywhere}.cp-memories li>span{font-size:9px;color:#bc96d4;letter-spacing:1px}.cp-memories li>p{font-size:12px;color:#d7c4e2;line-height:1.85;margin:5px 0}.cp-memories button{font-size:10px;color:#ad90bf;background:none;padding:3px 0}.cp-memories button:hover{color:#e7bdd9}.cp-memories .cp-memory-empty{text-align:center;padding:23px 12px;border-style:dashed}.cp-memory-empty>span{font-size:25px!important}.cp-memory-empty>p{color:#a58daf!important}.cp-form{display:grid;gap:15px}.cp-form label,.cp-form-row label{display:grid;gap:7px;font-size:11px;color:#c2aacc;min-width:0}.cp-form input:not([type=checkbox]),.cp-form select,.cp-form textarea,.cp-form-row select{width:100%;min-width:0;border:1px solid #80638e70;border-radius:6px;background:#1a1421;padding:10px;color:#e1cee9;outline-offset:3px;font-size:12px;line-height:1.8;resize:vertical}.cp-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cp-form .button{width:100%;font-size:12px;padding:11px}.cp-intro{font-size:12px;line-height:2;color:#c0a9cc;margin-bottom:22px}.cp-recall{background:none;border:1px solid #87679770;border-radius:6px;width:100%;text-align:left;color:#cfb2e3;font-size:11px;padding:12px;margin-top:14px}.cp-footnote{border-top:1px solid var(--border);padding-top:14px;margin-top:20px}.cp-form label.cp-checkbox{display:flex;align-items:center;gap:9px;font-size:12px}.cp-checkbox input{accent-color:#c5a3ed}.cp-reading-preview{background:#b18ec10a;border-left:2px solid #9470ab;margin:25px 0;padding:15px 18px}.cp-reading-preview>span{font-size:10px;color:#ab8cb9}.cp-reading-preview p{font:14px/2.2 var(--serif);color:#d8c7e1;margin-top:12px}
.cp-new-character{border-top:1px solid var(--border);padding-top:20px;margin-bottom:25px}.cp-new-character>summary{font-size:14px;color:#d1b1e6;cursor:pointer;margin-bottom:18px}.cp-new-character .cp-form{margin-top:17px}.cp-new-character .cp-hint{margin-top:15px}
.cp-relationship h3{font-size:15px;margin:4px 0 12px}.cp-meters{display:grid;grid-template-columns:1fr 1fr;gap:16px}.cp-meters label{font-size:10px;color:#ad97bb}.cp-relationship p{margin-top:12px}.cp-relationship details{margin-top:8px}.cp-relationship summary{font-size:10px;color:#a08bab;cursor:pointer}
.chat-shell.reading-large .message-text{font-size:18px;line-height:2}.chat-shell.reading-large .cp-reading-preview p{font-size:18px}.chat-shell.reading-focus .chat-sidebar{display:none}
.chat-shell.reading-paper .chat-thread{background:#f2eade}.chat-shell.reading-paper .chat-messages .message-text{color:#473c38;background:#e7ddd0;border-color:#dccfbd}.chat-shell.reading-paper .message.is-user .message-text{background:#e2d8df;color:#4b374f}.chat-shell.reading-paper .message-author,.chat-shell.reading-paper .message-tools button,.chat-shell.reading-paper .chat-date{color:#7b626e}.chat-shell.reading-paper .chat-composer-area{background:#ece2d8;border-color:#d7c7b8}.chat-shell.reading-paper .chat-composer{background:#f7f1e8;border-color:#ac8f9f}.chat-shell.reading-paper .composer-input{color:#493944}.chat-shell.reading-paper .composer-input::placeholder{color:#8d7b85}.chat-shell.reading-paper .choice-button{color:#695266;border-color:#b69baa}.chat-shell.reading-paper .chat-demo-note,.chat-shell.reading-paper .chat-footer,.chat-shell.reading-paper .chat-footer>button{color:#796473}.chat-shell.reading-paper .message-tools span{color:#805278}.chat-shell.reading-paper .cp-reading-preview{background:#f2eade}.chat-shell.reading-paper .cp-reading-preview p{color:#53403e}
@media(max-width:1200px){.chat-sidebar{flex-basis:205px;padding:23px 19px}.companion-panel{width:280px;flex-basis:280px}.companion-toolbar>span{display:none}.companion-status{gap:14px}.chat-shell:has(.companion-panel) .chat-sidebar{display:none}}
@media(max-width:760px){.chat-dialog{width:100%;max-height:100dvh;height:100dvh;border:0;border-radius:0}.chat-sidebar{display:none}.companion-status{padding:10px 16px 6px;gap:14px;font-size:10px}.cp-mood{font-size:9px}.companion-toolbar{padding:4px 14px 11px;gap:7px}.companion-toolbar button{font-size:11px;padding:7px 10px}.companion-panel{position:absolute;inset:0;width:100%;border-left:0;box-shadow:0 0 20px #0005}.companion-panel>header{padding:17px 20px}.cp-panel-content{padding:18px 22px 30px}.cp-relationship{margin-bottom:20px}.chat-shell:has(.companion-panel) .chat-thread{visibility:hidden}.chat-composer-area{padding-bottom:env(safe-area-inset-bottom)}.chat-footer{padding-bottom:2px;font-size:9px}.chat-demo-note{font-size:9px;padding-bottom:9px}.chat-messages .message-text{font-size:14px}.chat-messages{padding:18px 15px}.chat-choices{max-height:102px;overflow:auto}.chat-dialog .chat-header{padding:12px 16px}.chat-mode{font-size:9px}.chat-header-name{font-size:15px}}
@media(prefers-reduced-motion:reduce){.companion-panel,.cp-stage i{animation:none}}
