*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,sans-serif;background:#0a0a0b;color:#e8e4df;min-height:100vh}.auth-container{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.auth-container h1{font-size:2.5rem;font-weight:300;letter-spacing:.1em;margin-bottom:.5rem}.auth-container .tagline{color:#c9956a;font-size:1rem;margin-bottom:.5rem;font-style:italic}.auth-container .subtitle{color:#666;font-size:.8rem;margin-bottom:2rem;text-align:center;line-height:1.6}.auth-container input{background:#1a1a1d;border:1px solid #333;color:#e8e4df;padding:.75rem 1rem;border-radius:8px;width:280px;margin-bottom:.75rem;font-size:.95rem;outline:none}.auth-container input:focus{border-color:#666}.auth-container button{background:#e8e4df;color:#0a0a0b;border:none;padding:.75rem 2rem;border-radius:8px;font-size:.95rem;cursor:pointer;width:280px;font-weight:500}.auth-container button:hover{background:#fff}.auth-container .toggle{color:#888;font-size:.85rem;margin-top:1rem;cursor:pointer}.auth-container .toggle:hover{color:#bbb}.auth-container .error{color:#e55;font-size:.85rem;margin-bottom:.5rem}.select-container{display:flex;flex-direction:column;align-items:center;min-height:100vh;padding:2rem}.select-container h2{font-weight:300;font-size:1.5rem;margin-bottom:.5rem;margin-top:2rem}.select-container .sub{color:#888;font-size:.85rem;margin-bottom:2rem}.char-grid{display:flex;gap:1.5rem;flex-wrap:wrap;justify-content:center;max-width:800px}.char-card{background:#141416;border:1px solid #2a2a2d;border-radius:12px;width:220px;overflow:hidden;cursor:pointer;transition:border-color .2s,transform .2s}.char-card:hover{border-color:#555;transform:translateY(-2px)}.char-card img{width:100%;height:260px;object-fit:cover;object-position:center 15%}.char-card .info{padding:1rem}.char-card .info h3{font-size:1.1rem;font-weight:500;margin-bottom:.3rem}.char-card .info p{font-size:.8rem;color:#999;line-height:1.4}.chat-container{display:flex;flex-direction:column;height:100vh;max-width:700px;margin:0 auto;position:relative}.chat-bg{position:fixed;top:0;left:0;right:0;bottom:0;z-index:0;background-size:cover;background-position:center 20%;opacity:.2;pointer-events:none;filter:blur(2px)}.chat-header{display:flex;align-items:center;gap:.75rem;padding:1rem 1.5rem;border-bottom:1px solid #1a1a1d;position:relative;z-index:1;background:rgba(10,10,11,.85)}.chat-header img{width:40px;height:40px;border-radius:50%;object-fit:cover}.chat-header h3{font-weight:500;font-size:1rem}.chat-header .back{color:#888;cursor:pointer;margin-right:.5rem;font-size:1.2rem}.chat-messages{flex:1 1;overflow-y:auto;padding:1.5rem;display:flex;flex-direction:column;gap:1rem;position:relative;z-index:1}.msg{max-width:85%;padding:.85rem 1.1rem;border-radius:12px;line-height:1.6;font-size:.93rem;white-space:pre-wrap}.msg.user{align-self:flex-end;background:rgba(42,42,58,.75);border:1px solid rgba(58,58,74,.6);color:#e8e4ef}.msg.assistant{align-self:flex-start;background:rgba(26,26,29,.75);border:1px solid rgba(42,42,45,.6);color:#e8e4df}.msg.system{align-self:center;color:#666;font-size:.8rem;font-style:italic}.msg em{color:#c9956a;font-style:italic}.chat-input{display:flex;gap:.5rem;padding:1rem 1.5rem;border-top:1px solid #1a1a1d;position:relative;z-index:1;background:rgba(10,10,11,.9)}.chat-input textarea{flex:1 1;background:#141416;border:1px solid #2a2a2d;color:#e8e4df;padding:.75rem 1rem;border-radius:10px;font-size:.93rem;font-family:inherit;resize:none;outline:none;min-height:44px;max-height:120px}.chat-input textarea:focus{border-color:#555}.chat-input button{background:#e8e4df;color:#0a0a0b;border:none;padding:0 1.2rem;border-radius:10px;font-size:.9rem;cursor:pointer;font-weight:500}.chat-input button:disabled{opacity:.4;cursor:not-allowed}.typing-indicator{color:#888;font-size:.8rem;font-style:italic;padding:.5rem 1.1rem}.memory-tag{display:inline-block;font-size:.7rem;color:hsla(27,47%,60%,.6);background:hsla(27,47%,60%,.1);padding:2px 8px;border-radius:8px;margin-top:6px;letter-spacing:.5px}.custom-form{display:flex;flex-direction:column;gap:1rem;max-width:500px;width:100%;padding:1.5rem;margin-top:1rem}.custom-form input,.custom-form textarea{background:#1a1a1d;border:1px solid #333;color:#e8e4df;padding:.75rem 1rem;border-radius:8px;font-size:.9rem;font-family:inherit;outline:none}.custom-form textarea{min-height:100px;resize:vertical}.custom-form input:focus,.custom-form textarea:focus{border-color:#666}.custom-form label{color:#999;font-size:.8rem;margin-bottom:-.5rem}.custom-form button{background:#e8e4df;color:#0a0a0b;border:none;padding:.75rem;border-radius:8px;font-size:.95rem;cursor:pointer;font-weight:500}.custom-form button:hover{background:#fff}.custom-form .avatar-upload{display:flex;align-items:center;gap:1rem}.custom-form .avatar-preview{width:80px;height:80px;border-radius:12px;background:#2a2a2d;object-fit:cover;border:1px solid #333}.char-card.create-card{display:flex;align-items:center;justify-content:center;border-style:dashed;border-color:#444}.char-card.create-card .plus{font-size:3rem;color:#555;font-weight:200}.char-card.create-card:hover .plus{color:#999}.persona-btn{position:absolute;top:1rem;right:1.5rem;background:hsla(27,47%,60%,.15);border:1px solid hsla(27,47%,60%,.4);color:#d4a574;padding:.5rem 1rem;border-radius:8px;font-size:.85rem;cursor:pointer;font-family:inherit;transition:all .2s}.persona-btn:hover{background:hsla(27,47%,60%,.25);border-color:#d4a574;color:#e8c9a8}.persona-modal{position:fixed;inset:0;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;z-index:100}.persona-modal-inner{background:#141416;border:1px solid #2a2a2d;border-radius:12px;padding:2rem;max-width:500px;width:90%}.persona-modal-inner h3{font-weight:400;margin-bottom:.5rem}.persona-modal-inner p{color:#888;font-size:.8rem;margin-bottom:1rem}.persona-modal-inner textarea{width:100%;background:#1a1a1d;border:1px solid #333;color:#e8e4df;padding:.75rem;border-radius:8px;font-size:.9rem;font-family:inherit;min-height:150px;resize:vertical;outline:none;margin-bottom:1rem}.persona-modal-inner textarea:focus{border-color:#666}.persona-modal-inner .btn-row{display:flex;gap:.75rem;justify-content:flex-end}.persona-modal-inner button{padding:.5rem 1.2rem;border-radius:8px;font-size:.85rem;cursor:pointer;font-family:inherit;border:none}.persona-modal-inner .save-btn{background:#e8e4df;color:#0a0a0b}.persona-modal-inner .cancel-btn{background:none;border:1px solid #333;color:#999}