:root{height:100vh;height:100dvh;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;color:#342f2a;background:#e8e3dc;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html,body,#root{width:100%;height:100%;overflow:hidden}body{margin:0;min-width:0;min-height:0;background:radial-gradient(circle at 12% 10%,rgba(255,255,255,.8),transparent 30%),linear-gradient(135deg,#eee9e2,#ded8cf)}button,textarea,input,select{font:inherit}button{border:0}.app-shell{display:grid;grid-template-columns:286px minmax(0,1fr);width:min(1240px,calc(100vw - 48px));height:min(820px,calc(100vh - 48px));height:min(820px,calc(100dvh - 48px));min-height:0;min-width:956px;margin:24px auto;overflow:hidden;background:#fbfaf8;border:1px solid rgba(75,60,45,.08);border-radius:24px;box-shadow:0 26px 70px #3f322629}.sidebar{display:flex;min-height:0;flex-direction:column;overflow:hidden;padding:30px 20px 24px;background:#f0ece6;border-right:1px solid #e1dcd4}.brand{display:flex;gap:13px;align-items:center;padding:0 10px 20px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;color:#fff;font-weight:700;background:#d47b5d;border-radius:14px 14px 14px 5px;box-shadow:0 7px 18px #bd5e3f3d}.brand strong,.brand span{display:block}.brand strong{font-size:16px;letter-spacing:.04em}.brand span{margin-top:2px;color:#968c81;font-size:10px;letter-spacing:.08em;text-transform:uppercase}.new-chat-button{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:42px;margin-bottom:22px;color:#fff;background:#d47b5d;border-radius:13px;box-shadow:0 6px 16px #ba57392e;font-size:12px;font-weight:600;cursor:pointer}.new-chat-button span{font-size:18px;font-weight:400;line-height:1}.new-chat-button:hover:not(:disabled){background:#c96f51}.new-chat-button:disabled{cursor:default;opacity:.58;box-shadow:none}.session-heading{display:flex;align-items:center;gap:8px;padding:0 10px 10px;color:#8a8178;font-size:12px;font-weight:600}.session-count{padding:1px 7px;background:#e2dcd4;border-radius:12px;font-size:10px}.session-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:7px;overflow-y:auto;padding:0 3px 8px 0;scrollbar-width:thin;scrollbar-color:#d4ccc3 transparent}.session-item{position:relative;display:flex;align-items:center;width:100%;color:#4b453f;text-align:left;background:transparent;border-radius:15px;transition:background .2s,transform .2s}.session-item:hover{background:#ffffff94}.session-item.active{background:#fff;box-shadow:0 5px 18px #46392d12}.session-select{display:flex;align-items:center;width:100%;min-width:0;gap:12px;padding:12px 52px 12px 13px;color:inherit;text-align:left;background:transparent;border-radius:inherit;cursor:pointer}.session-select:disabled{cursor:default}.session-item img{display:block;width:42px;height:42px;flex:0 0 42px;object-fit:cover;border-radius:13px}.session-copy{min-width:0;flex:1}.session-copy strong,.session-copy small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.session-copy strong{margin-bottom:4px;font-size:13px}.session-copy small{color:#9b9289;font-size:11px}.active-dot{position:absolute;right:18px;width:6px;height:6px;background:#d47b5d;border-radius:50%}.session-actions{position:absolute;right:7px;display:none;align-items:center;gap:2px;padding:3px;background:#fffffff0;border-radius:9px;box-shadow:0 3px 10px #4134291a}.session-item:hover .session-actions,.session-item:focus-within .session-actions{display:flex}.session-actions button{width:25px;height:25px;color:#8b8178;background:transparent;border-radius:7px;font-size:12px;cursor:pointer}.session-actions button:hover:not(:disabled){color:#7e5948;background:#f3ede7}.session-actions button.danger:hover:not(:disabled){color:#b55747;background:#fff0ed}.session-actions button:disabled{cursor:default;opacity:.45}.session-rename-form{display:flex;width:100%;gap:5px;padding:13px 8px}.session-rename-form input{min-width:0;height:34px;flex:1;padding:0 9px;color:#4b453f;background:#fff;border:1px solid #d8cfc6;border-radius:9px;outline:none;font-size:11px}.session-rename-form input:focus{border-color:#d29a84;box-shadow:0 0 0 2px #d27a5d1a}.session-rename-form button{width:30px;color:#7c7168;background:#eee8e1;border-radius:8px;cursor:pointer}.session-rename-form button[type=submit]{color:#fff;background:#d47b5d}.sidebar-placeholder{margin:12px 9px;color:#9b9289;font-size:10px;line-height:1.6;text-align:center}.sidebar-error{margin:5px 4px 8px;padding:8px 9px;color:#a84f42;background:#fff0ed;border-radius:9px;font-size:10px;line-height:1.45}.sidebar-note{display:flex;gap:10px;align-items:flex-start;margin-top:12px;padding:14px;color:#766c63;background:#e7e1d9;border-radius:14px}.sparkle{color:#d47b5d}.sidebar-note strong{font-size:11px}.sidebar-note p{margin:4px 0 0;color:#988e84;font-size:10px;line-height:1.5}.chat-panel{display:flex;width:100%;height:100%;min-width:0;min-height:0;flex-direction:column;overflow:hidden;background:#fbfaf8}.chat-header{display:flex;flex:0 0 92px;align-items:center;justify-content:space-between;height:92px;padding:0 34px;background:#ffffffb8;border-bottom:1px solid #ece8e2}.character-summary{display:flex;min-width:150px;align-items:center;gap:13px}.avatar-wrap{position:relative;width:50px;height:50px;flex:0 0 50px}.avatar-wrap img{display:block;width:100%;height:100%;object-fit:cover;border-radius:16px}.online-dot{position:absolute;right:-2px;bottom:-1px;width:13px;height:13px;background:#68ad75;border:3px solid white;border-radius:50%}.character-summary h1{margin:0 0 4px;font-size:17px}.character-summary p{display:flex;align-items:center;gap:6px;margin:0;color:#8c837b;font-size:11px}.status-dot{width:5px;height:5px;background:#68ad75;border-radius:50%}.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.mode-badge{padding:6px 10px;color:#8a653d;background:#fff4de;border:1px solid #f0d7ac;border-radius:999px;font-size:10px;font-weight:600;white-space:nowrap}.mode-badge.ai{color:#3f7250;background:#edf8ef;border-color:#cce5d1}.mode-badge.error{color:#a84f42;background:#fff0ed;border-color:#efcbc5}.mode-select{display:flex;align-items:center;gap:6px;color:#8c8177;font-size:10px}.mode-select select{height:34px;padding:0 8px;color:#625950;background:#fff;border:1px solid #e4ddd5;border-radius:9px;outline:none}.mode-select select:disabled{cursor:default;opacity:.65}.settings-button,.clear-button{padding:9px 13px;color:#8c8177;background:#f4f1ed;border:1px solid #e9e3dc;border-radius:10px;font-size:11px;cursor:pointer}.settings-button:hover:not(:disabled){color:#8c5d42;background:#fff7f2}.settings-button:disabled{cursor:default;opacity:.55}.mobile-new-chat,.mobile-conversation-list,.mobile-sidebar-heading,.mobile-sidebar-backdrop{display:none}.account-button{max-width:136px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.clear-button:hover:not(:disabled){color:#bc654b;background:#fff2ed}.clear-button:disabled{cursor:default;opacity:.5}.mode-banner{display:flex;flex:0 0 auto;align-items:center;align-self:center;gap:8px;margin:14px 20px 0;padding:7px 14px;color:#9b6c3f;background:#fff4de;border:1px solid #f5dfb8;border-radius:999px;font-size:10px}.mode-banner span{color:#db9a48;font-size:15px}.mode-banner.ai{color:#477756;background:#edf8ef;border-color:#cce5d1}.mode-banner.ai span{color:#67a676}.mode-banner.error{color:#a84f42;background:#fff0ed;border-color:#efcbc5}.mode-banner.error span{color:#c96f5d}.messages{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:18px 38px 30px;scrollbar-width:thin;scrollbar-color:#d9d1c8 transparent}.date-divider{display:flex;align-items:center;gap:12px;margin:3px 0 25px;color:#aaa197;font-size:10px}.date-divider:before,.date-divider:after{content:"";height:1px;flex:1;background:#eee9e3}.message-row{display:flex;gap:10px;margin:0 0 21px}.message-row.user{justify-content:flex-end}.message-row.system{justify-content:center}.message-avatar{display:block;width:32px;height:32px;flex:0 0 32px;object-fit:cover;border-radius:10px}.message-content{display:flex;max-width:min(68%,560px);flex-direction:column}.user .message-content{align-items:flex-end}.system .message-content{max-width:min(78%,680px);align-items:center}.bubble{padding:11px 15px;color:#4a433d;background:#fff;border:1px solid #ece6df;border-radius:5px 17px 17px;box-shadow:0 4px 13px #4335280d;font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.user .bubble{color:#fff;background:#d77d5f;border:none;border-radius:17px 5px 17px 17px;box-shadow:0 6px 17px #be5c3d2e}.system .bubble{color:#81776e;background:#f1ede8;border:0;border-radius:12px;box-shadow:none;font-size:11px}.message-meta{display:flex;align-items:center;gap:6px;margin-top:6px}.message-content time{color:#b1a9a0;font-size:9px}.message-status{padding:2px 6px;border-radius:999px;font-size:9px}.message-status.pending,.message-status.streaming{color:#98703f;background:#fff4de}.message-status.failed{color:#aa5345;background:#fff0ed}.recalled-memories{width:100%;margin-top:7px;color:#74685f;background:#f6f2ed;border:1px solid #e9e1d8;border-radius:11px;font-size:10px}.recalled-memories summary{padding:8px 10px;list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none}.recalled-memories summary::-webkit-details-marker{display:none}.recalled-memories summary:before{content:"▸";display:inline-block;margin-right:6px;color:#ba765d;transition:transform .16s}.recalled-memories[open] summary:before{transform:rotate(90deg)}.recalled-memory-list{display:flex;flex-direction:column;gap:7px;padding:0 9px 9px}.recalled-memory-item{padding:8px 9px;background:#fff;border-radius:9px}.recalled-memory-item>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.recalled-memory-item strong{color:#514840;font-size:10px;overflow-wrap:anywhere}.recalled-memory-item span{flex:0 0 auto;color:#98674f;font-size:9px}.recalled-memory-item p{margin:5px 0 0;color:#81766d;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.typing{display:flex;gap:4px;align-items:center;height:39px}.typing i{width:5px;height:5px;background:#b6ada4;border-radius:50%;animation:pulse 1s infinite ease-in-out}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}@keyframes pulse{0%,60%,to{transform:translateY(0);opacity:.5}30%{transform:translateY(-3px);opacity:1}}.empty-state{display:grid;place-items:center;padding:80px 20px;color:#aaa198;font-size:12px}.empty-state span{font-size:30px;color:#ded7ce}.empty-state p{margin:8px 0}.loading-state{padding:48px 20px;color:#9f958c;text-align:center;font-size:11px}.welcome-message{margin-top:8px}.composer-area{flex:0 0 auto;padding:0 34px 22px;background:linear-gradient(transparent,#fbfaf8 14%)}.composer{display:flex;align-items:flex-end;gap:12px;padding:12px 12px 12px 18px;background:#fff;border:1px solid #e2dcd5;border-radius:17px;box-shadow:0 8px 24px #3d302412}.composer:focus-within{border-color:#d8aa99;box-shadow:0 8px 25px #b7664b1a}.composer textarea{min-height:38px;max-height:100px;flex:1;resize:none;padding:8px 0;color:#49423c;background:transparent;border:0;outline:0;font-size:13px;line-height:1.6}.composer textarea::placeholder{color:#b7afa7}.composer button{min-width:86px;height:40px;color:#fff;background:#d47b5d;border-radius:12px;font-size:12px;cursor:pointer;box-shadow:0 5px 14px #ba573933}.composer button:hover:not(:disabled){background:#c96f51}.composer button:disabled{background:#d9d3cd;box-shadow:none;cursor:default}.composer .stop-button{color:#a65445;background:#fff0ed;border:1px solid #ebc8c0;box-shadow:none}.composer .stop-button:hover{color:#944638;background:#ffe5df}.composer-hint{margin:8px 4px 0;color:#aea69e;text-align:right;font-size:9px}.error-message{margin:0 0 8px;color:#bd5e4c;font-size:11px}.settings-overlay{position:fixed;z-index:20;inset:0;display:grid;place-items:center;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));background:#3129225c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.settings-panel{width:min(460px,calc(100vw - 40px));max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);overflow-y:auto;padding:26px;background:#fbfaf8;border:1px solid rgba(74,58,44,.1);border-radius:22px;box-shadow:0 24px 70px #31261d3d}.settings-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.settings-heading h2{margin:0;font-size:19px}.settings-heading p{margin:6px 0 0;color:#948a81;font-size:11px}.close-settings{display:grid;place-items:center;width:32px;height:32px;color:#8f857c;background:#eee9e3;border-radius:10px;font-size:20px;cursor:pointer}.settings-form{display:flex;flex-direction:column;gap:16px;margin-top:24px}.settings-form label:not(.checkbox-field){display:flex;flex-direction:column;gap:7px}.settings-form label>span{color:#625950;font-size:12px;font-weight:600}.settings-form input[type=text],.settings-form input:not([type]),.settings-form select{width:100%;height:42px;padding:0 12px;color:#403a35;background:#fff;border:1px solid #ddd6ce;border-radius:11px;outline:none}.settings-form input:focus,.settings-form select:focus{border-color:#d29a84;box-shadow:0 0 0 3px #d27a5d1a}.settings-form small{color:#9b9289;font-size:10px;line-height:1.5}.checkbox-field{display:flex;align-items:center;gap:9px;cursor:pointer}.checkbox-field input{width:16px;height:16px;accent-color:#d47b5d}.settings-message{margin:-3px 0 0;padding:9px 11px;border-radius:9px;font-size:11px}.settings-message.error{color:#a84f42;background:#fff0ed}.settings-message.success{color:#497b54;background:#edf8ef}.settings-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:2px}.settings-actions button{min-width:92px;height:40px;border-radius:11px;cursor:pointer}.secondary-button{color:#71675e;background:#eee9e3}.primary-button{color:#fff;background:#d47b5d}.primary-button:disabled{cursor:default;opacity:.6}.profile-summary{display:flex;flex-wrap:wrap;gap:6px;padding:12px;color:#857a71;background:#f1ede8;border-radius:11px;font-size:10px}.profile-summary span:not(:last-child):after{content:"·";margin-left:6px;color:#b5aaa0}.memory-panel{width:min(900px,calc(100vw - 40px))}.memory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px}.memory-search{display:flex;min-width:0;flex:1;gap:7px}.memory-search input{min-width:140px;height:39px;flex:1;padding:0 12px;color:#514a44;background:#fff;border:1px solid #ddd6ce;border-radius:10px;outline:none}.memory-search input:focus{border-color:#d29a84;box-shadow:0 0 0 3px #d27a5d1a}.memory-search button{height:39px;padding:0 13px;color:#fff;background:#c87558;border-radius:10px;cursor:pointer}.memory-search button.secondary-button{color:#71675e;background:#eee9e3}.memory-search button:disabled{cursor:default;opacity:.55}.add-memory-button{flex:0 0 auto;height:39px;padding:0 16px;border-radius:10px;cursor:pointer}.add-memory-button:hover{background:#c96f51}.memory-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px;padding:13px 0 15px;border-bottom:1px solid #e9e3dc}.memory-filter-grid label{display:flex;min-width:0;flex-direction:column;gap:6px;color:#625950;font-size:10px;font-weight:600}.memory-filter-grid select{width:100%;height:36px;padding:0 9px;color:#514a44;background:#fff;border:1px solid #ddd6ce;border-radius:9px;outline:none}.memory-filter-grid select:focus{border-color:#d29a84;box-shadow:0 0 0 3px #d27a5d1a}.memory-display-toggle{display:flex;align-items:flex-start;gap:9px;margin-top:13px;padding:11px 12px;color:#665c54;background:#f1ede8;border-radius:11px;cursor:pointer}.memory-display-toggle input{width:16px;height:16px;margin:1px 0 0;accent-color:#d47b5d}.memory-display-toggle>span{display:flex;min-width:0;flex-direction:column;gap:3px}.memory-display-toggle strong{font-size:11px}.memory-display-toggle small{color:#948a81;font-size:9px;line-height:1.5}.memory-editor{display:flex;flex-direction:column;gap:13px;margin-top:16px;padding:17px;background:#f3efea;border:1px solid #e5ddd5;border-radius:15px;scroll-margin-top:16px}.memory-editor-heading{display:flex;align-items:center;justify-content:space-between}.memory-editor-heading strong{font-size:13px}.memory-editor-heading button{width:27px;height:27px;color:#8f857c;background:#e7e0d9;border-radius:8px;cursor:pointer}.memory-editor>label:not(.checkbox-field),.memory-editor-grid label{display:flex;min-width:0;flex-direction:column;gap:6px}.memory-editor label>span{color:#625950;font-size:11px;font-weight:600}.memory-editor small{color:#968c83;font-size:9px}.memory-editor select,.memory-editor input[type=text],.memory-editor input[type=number],.memory-editor textarea{width:100%;padding:0 11px;color:#403a35;background:#fff;border:1px solid #ddd6ce;border-radius:10px;outline:none}.memory-editor select,.memory-editor input[type=text],.memory-editor input[type=number]{height:39px}.memory-editor textarea{min-height:96px;padding-top:9px;padding-bottom:9px;resize:vertical;line-height:1.55}.memory-editor select:focus,.memory-editor input:focus,.memory-editor textarea:focus{border-color:#d29a84;box-shadow:0 0 0 3px #d27a5d1a}.memory-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.memory-checkboxes{display:flex;flex-wrap:wrap;gap:12px 22px}.memory-editor .settings-actions{margin-top:0}.memory-editor .settings-actions button{min-width:88px;height:36px;border-radius:10px}.memory-feedback{margin-top:14px}.memory-list{display:flex;flex-direction:column;gap:11px;margin-top:16px}.memory-empty{padding:50px 20px;color:#9e948b;text-align:center;font-size:11px}.memory-card{padding:15px 16px;background:#fff;border:1px solid #e8e2db;border-radius:14px;box-shadow:0 4px 13px #4335280a}.memory-card.pinned{border-color:#e6c2b2;box-shadow:0 4px 16px #b7664b14}.memory-card.inactive{background:#f5f2ee;opacity:.74}.memory-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.memory-card-title{min-width:0}.memory-card-title h3{margin:0 0 7px;color:#403933;font-size:13px;line-height:1.45;overflow-wrap:anywhere}.memory-badges{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.memory-type{color:#8d5b43;font-size:10px;font-weight:700}.memory-pinned,.memory-active{padding:3px 7px;color:#8f867d;background:#ece7e1;border-radius:999px;font-size:9px}.memory-pinned{color:#9a624b;background:#fff0e9}.memory-active.active{color:#497b54;background:#edf8ef}.memory-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:5px}.memory-actions button{height:28px;padding:0 9px;color:#766b62;background:#f0ebe5;border-radius:8px;font-size:10px;cursor:pointer}.memory-actions button:hover:not(:disabled){color:#895942;background:#fff4ef}.memory-actions button.danger:hover:not(:disabled){color:#ad5143;background:#fff0ed}.memory-actions button:disabled{cursor:default;opacity:.5}.memory-card>p{margin:12px 0;color:#4c453f;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.memory-tags{display:flex;flex-wrap:wrap;gap:5px;margin:-3px 0 11px}.memory-tags span{padding:3px 7px;color:#806f62;background:#f2eee9;border-radius:999px;font-size:9px;overflow-wrap:anywhere}.memory-meta{display:flex;flex-wrap:wrap;gap:5px 12px;color:#a0978e;font-size:9px}.memory-load-more{align-self:center;min-width:120px;height:36px;margin:4px 0;color:#835d49;background:#f1eae4;border-radius:10px;cursor:pointer}.memory-load-more:hover:not(:disabled){background:#eadfd6}.memory-load-more:disabled{cursor:default;opacity:.55}.auth-page{display:grid;width:100%;height:100%;min-height:0;overflow-y:auto;place-items:center;padding:28px 18px;background:radial-gradient(circle at 12% 8%,rgba(255,255,255,.95),transparent 32%),radial-gradient(circle at 88% 86%,rgba(212,123,93,.14),transparent 34%),linear-gradient(135deg,#eee9e2,#ded8cf)}.auth-card{width:min(440px,100%);padding:34px;background:#fbfaf8f5;border:1px solid rgba(75,60,45,.09);border-radius:24px;box-shadow:0 26px 70px #3f322629}.auth-brand{display:flex;align-items:center;gap:12px}.auth-brand strong,.auth-brand span{display:block}.auth-brand strong{font-size:15px;letter-spacing:.04em}.auth-brand span{margin-top:2px;color:#968c81;font-size:9px;letter-spacing:.08em;text-transform:uppercase}.auth-heading{margin:30px 0 22px}.auth-eyebrow{color:#c56e52;font-size:10px;font-weight:700;letter-spacing:.12em}.auth-heading h1{margin:7px 0 8px;font-size:24px}.auth-heading p{margin:0;color:#8f857c;font-size:12px;line-height:1.6}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;background:#eee9e3;border-radius:12px}.auth-tabs button{height:36px;color:#837970;background:transparent;border-radius:9px;font-size:12px;cursor:pointer}.auth-tabs button.active{color:#704d3d;background:#fff;box-shadow:0 3px 11px #49392c14;font-weight:600}.auth-form{display:flex;flex-direction:column;gap:15px;margin-top:20px}.auth-form label{display:flex;flex-direction:column;gap:7px}.auth-form label>span{color:#625950;font-size:12px;font-weight:600}.auth-form input{width:100%;height:44px;padding:0 13px;color:#403a35;background:#fff;border:1px solid #ddd6ce;border-radius:11px;outline:none}.auth-form input:focus{border-color:#d29a84;box-shadow:0 0 0 3px #d27a5d1a}.auth-form small{color:#9b9289;font-size:10px;line-height:1.5}.auth-message{margin:0;padding:10px 12px;border-radius:10px;font-size:11px;line-height:1.55}.auth-message.error{color:#a84f42;background:#fff0ed}.auth-message.success{color:#497b54;background:#edf8ef}.auth-submit{height:44px;margin-top:2px;color:#fff;background:#d47b5d;border-radius:12px;box-shadow:0 6px 16px #ba57392e;font-size:12px;font-weight:600;cursor:pointer}.auth-submit:hover:not(:disabled){background:#c96f51}.auth-submit:disabled{cursor:default;opacity:.62;box-shadow:none}.auth-scope-note{margin:20px 0 0;padding-top:16px;color:#9d948b;border-top:1px solid #ece6df;font-size:10px;line-height:1.6}.auth-state-card{display:flex;align-items:center;gap:10px;width:min(460px,100%);padding:24px;color:#756b62;background:#fbfaf8f5;border-radius:18px;box-shadow:0 18px 50px #3f322621;font-size:12px}.auth-loader{width:16px;height:16px;border:2px solid #dfd6cd;border-top-color:#d47b5d;border-radius:50%;animation:auth-spin .8s linear infinite}@keyframes auth-spin{to{transform:rotate(360deg)}}.auth-error-card{align-items:flex-start;flex-direction:column}.auth-error-card h1{margin:5px 0 0;font-size:20px}.auth-error-card p{margin:0;color:#a84f42;font-size:12px;line-height:1.6}.auth-error-card small{color:#8f857c;font-size:10px;line-height:1.7}.auth-error-card button{height:38px;padding:0 15px;color:#fff;background:#d47b5d;border-radius:10px;cursor:pointer}.account-panel{width:min(500px,calc(100vw - 40px))}.account-form input[type=email],.account-form input[type=text]{width:100%;height:42px;padding:0 12px;color:#403a35;background:#fff;border:1px solid #ddd6ce;border-radius:11px;outline:none}.account-form input[readonly]{color:#8c837b;background:#f2eee9}.account-boundary-note{display:flex;flex-direction:column;gap:5px;padding:12px;color:#81766d;background:#f1ede8;border-radius:11px;font-size:10px;line-height:1.55}.account-boundary-note strong{color:#665c54;font-size:11px}.account-actions{align-items:center;justify-content:space-between}.account-actions>div{display:flex;gap:9px}.logout-button{color:#a65445;background:#fff0ed;border:1px solid #ebc8c0}.account-actions button:disabled{cursor:default;opacity:.58}@media(max-width:1050px){.app-shell{grid-template-columns:250px minmax(0,1fr);width:calc(100vw - 24px);height:calc(100vh - 24px);height:calc(100dvh - 24px);margin:12px}.chat-header{padding-right:24px;padding-left:24px}.mode-select>span{display:none}.mode-badge{display:none}.messages{padding-right:26px;padding-left:26px}}@media(max-width:955px){.app-shell{grid-template-columns:minmax(0,1fr);width:100vw;height:100vh;height:100dvh;min-width:0;margin:0;border:0;border-radius:0}.sidebar{position:fixed;z-index:31;inset:0 auto 0 0;display:flex;width:min(340px,calc(100vw - 44px));height:100vh;height:100dvh;padding:max(18px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));visibility:hidden;pointer-events:none;border-right:1px solid #ded6cd;box-shadow:18px 0 50px #31261d33;transform:translate(-102%);transition:transform .2s ease,visibility 0s linear .2s}.sidebar.mobile-open{visibility:visible;pointer-events:auto;transform:translate(0);transition-delay:0s}.mobile-sidebar-backdrop{position:fixed;z-index:30;inset:0;display:block;width:100%;height:100%;padding:0;background:#3129226b;border-radius:0;cursor:pointer;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.mobile-sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding-left:4px}.mobile-sidebar-heading strong{font-size:14px}.mobile-sidebar-heading button{display:grid;place-items:center;width:40px;height:40px;color:#766c63;background:#e4ddd5;border-radius:11px;font-size:22px;cursor:pointer}.sidebar .session-select{padding-right:88px}.sidebar .session-actions{display:flex}.sidebar .session-actions button{width:32px;height:32px}.sidebar .active-dot{right:82px}.mobile-conversation-list,.mobile-new-chat{display:inline-block}}@media(max-width:700px){.chat-header{height:auto;min-height:112px;flex:0 0 auto;align-items:stretch;flex-direction:column;gap:9px;padding:max(10px,env(safe-area-inset-top)) max(13px,env(safe-area-inset-right)) 10px max(13px,env(safe-area-inset-left))}.character-summary{min-width:0;gap:10px}.avatar-wrap{width:40px;height:40px;flex-basis:40px}.avatar-wrap img{border-radius:13px}.character-summary h1{font-size:15px}.header-actions{width:100%;justify-content:flex-start;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}.header-actions::-webkit-scrollbar{display:none}.header-actions>*{flex:0 0 auto}.mode-banner{align-self:stretch;margin:9px 12px 0;border-radius:12px;line-height:1.5}.messages{padding:14px max(14px,env(safe-area-inset-right)) 22px max(14px,env(safe-area-inset-left))}.message-content{max-width:84%}.composer-area{padding:0 max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.composer{gap:8px;padding:9px 9px 9px 13px}.composer textarea,.sidebar input,.mode-select select,.settings-panel input,.settings-panel textarea,.settings-panel select,.auth-form input{font-size:16px}.composer button{min-width:72px}.settings-overlay{place-items:stretch;padding:0}.settings-panel,.memory-panel{width:100vw;height:100vh;height:100dvh;max-height:100dvh;padding:max(19px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(19px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border:0;border-radius:0}.memory-toolbar{align-items:stretch;flex-direction:column}.memory-search,.add-memory-button{width:100%}.memory-filter-grid{grid-template-columns:1fr 1fr}.memory-card-heading{align-items:stretch;flex-direction:column}.memory-actions{justify-content:flex-start}}@media(max-width:560px){.auth-page{align-items:start;padding:14px}.auth-card{padding:25px 20px;border-radius:20px}.auth-heading{margin-top:24px}.auth-heading h1{font-size:21px}.account-actions{align-items:stretch;flex-direction:column-reverse}.account-actions>div{width:100%}.account-actions button{flex:1}.memory-search{display:grid;grid-template-columns:1fr auto auto}.memory-search input{grid-column:1 / -1;width:100%}.memory-search button{min-width:72px}.memory-filter-grid,.memory-editor-grid{grid-template-columns:1fr}.memory-editor{padding:14px}.memory-checkboxes{align-items:flex-start;flex-direction:column;gap:10px}.memory-card{padding:14px}.memory-actions button{flex:1}}
