:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:#f8eff7;background:#101322;color-scheme:dark;--pink:#f4add0;--muted:#bdafc4}
*{box-sizing:border-box}[hidden]{display:none!important}html{height:100%}body{margin:0;height:var(--viewport-height,100dvh);min-height:320px;display:flex;flex-direction:column;overflow:hidden;background:radial-gradient(ellipse at 80% 0%,#40263f,#101322 64%);padding:calc(12px + env(safe-area-inset-top,0px)) 20px calc(8px + env(safe-area-inset-bottom,0px));gap:10px}
a{color:var(--pink)}button,input,select,textarea{font:inherit}button,a,select{touch-action:manipulation}button{min-height:44px;border:0;border-radius:13px;background:var(--pink);padding:10px 16px;color:#2d182b;font-weight:750;cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.secondary{background:#ffffff0e;color:#e8d9e9;border:1px solid #ffffff20}.danger{background:#633344;color:#ffe5eb}.pink{color:var(--pink)}.small{font-size:12px;line-height:1.6;color:var(--muted)}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--pink);outline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.site-head,main,footer{width:100%;max-width:1080px;margin:0 auto}.site-head{display:flex;justify-content:space-between;align-items:center;flex:none;gap:14px;padding:4px 0}.brand{font-weight:850;font-size:23px;letter-spacing:-1px;text-decoration:none;color:white}nav{display:flex;gap:16px;align-items:center}nav a{font-size:13px;text-underline-offset:3px}main{display:flex;flex-direction:column;flex:1;min-height:0;gap:8px}.notice{color:#d6bed1;font-size:12px;line-height:1.45;overflow-wrap:anywhere;flex:none;padding:4px 6px;max-height:88px;overflow:auto}.panel{display:flex;flex:1;flex-direction:column;min-height:0;background:#ffffff06;border:1px solid #ffffff24;border-radius:22px;overflow:hidden;box-shadow:0 14px 60px #00000015}
.chat-head{flex:none;display:flex;gap:12px;align-items:center;padding:15px 20px;border-bottom:1px solid #ffffff16;background:#1a192780}.avatar{background:linear-gradient(140deg,#9c6a9b,var(--pink));height:44px;width:44px;border-radius:50%;display:grid;place-items:center;font-size:24px;flex:none}.companion-heading{flex:1;min-width:0}.name{font-size:19px;font-weight:800;overflow-wrap:anywhere}.companion-heading select{width:100%;max-width:340px;background:#17192a;border:1px solid #ffffff2a;color:#f8eff7;border-radius:9px;padding:7px 9px;margin:5px 0;font-size:16px;min-height:36px}.head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.head-actions button{font-size:12px;padding:8px 12px}.head-actions span{color:var(--pink);font-size:11px;font-weight:500;margin-left:3px}
.conversation-area{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px;display:flex;flex-direction:column;gap:16px;scrollbar-color:#7e5b78 transparent}.bubble{padding:13px 16px;border-radius:18px;max-width:min(82%,650px);line-height:1.6;font-size:15px;overflow-wrap:anywhere;white-space:pre-wrap;flex:none}.assistant{background:#342d42;align-self:flex-start;border-bottom-left-radius:5px}.mine{background:#e8a3c5;color:#271524;align-self:flex-end;border-bottom-right-radius:5px}.empty-state{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:20px;color:var(--muted)}.empty-state h1{font-size:24px;color:#f8eff7;letter-spacing:-.6px;margin:10px 0}.empty-state p{font-size:14px;line-height:1.6;margin:0 0 18px}.empty-heart{color:var(--pink);font-size:36px}.starter-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.starter-actions button{font-size:12px}.jump-latest{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);font-size:12px;box-shadow:0 4px 20px #0008;white-space:nowrap}.reply-progress{font-size:12px;color:var(--muted);margin:0;padding:7px 20px;flex:none}
.compose{display:flex;gap:10px;align-items:flex-end;flex:none;border-top:1px solid #ffffff16;padding:12px 16px;background:#151626}.compose textarea{width:100%;min-width:0;min-height:52px;max-height:140px;resize:none;margin:0;flex:1;border:1px solid #6c536b;background:#17192a;color:white;border-radius:13px;padding:13px;font-size:16px;line-height:1.5;overflow-y:auto}.compose button{min-height:52px;padding:12px 18px}footer{display:flex;justify-content:space-between;align-items:center;flex:none;gap:8px;color:var(--muted);font-size:11px;line-height:1.5}footer nav{gap:12px}footer a{font-size:11px}
dialog{width:min(580px,calc(100% - 28px));max-height:calc(100dvh - 44px);padding:24px;border:1px solid #68506c;border-radius:22px;background:#1b1b2b;color:#f8eff7;overflow:auto;overscroll-behavior:contain;box-shadow:0 24px 100px #0009}dialog::backdrop{background:#090b18ba;backdrop-filter:blur(4px)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.dialog-head h2{font-size:23px;letter-spacing:-.5px;line-height:1.2;margin:5px 0}.dialog-head button{font-size:12px;flex:none}.tool-actions{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.tool-actions button{font-size:13px}.character-notes{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:14px}dialog label{display:block;font-size:14px;line-height:1.5;margin:16px 0 9px}dialog textarea{width:100%;font-size:16px;padding:12px;color:white;background:#17192a;border:1px solid #6c536b;border-radius:12px;resize:vertical}.check-label{display:flex;align-items:flex-start;gap:10px}.check-label input{width:20px;height:20px;flex:none;accent-color:var(--pink);margin:2px 0}#memoryStatus{font-size:13px;line-height:1.6;color:#e7c5d8}.memory-card{border-top:1px solid #ffffff25;padding:14px 0;overflow-wrap:anywhere}.memory-card p{font-size:14px;line-height:1.6}.memory-card button{margin:4px 6px 4px 0;font-size:12px}.danger-zone{border-top:1px solid #ffffff20;margin-top:24px;padding-top:16px;font-size:13px;line-height:1.6;color:var(--muted)}.danger-zone h3{color:#ecd9e9;font-size:14px;margin:0}.danger-zone button{font-size:12px}
@media(max-width:600px){body{padding:calc(8px + env(safe-area-inset-top,0px)) 10px calc(6px + env(safe-area-inset-bottom,0px));gap:6px}.site-head{padding:3px 2px}.brand{font-size:21px}nav{gap:12px}nav a{font-size:12px}.chat-head{padding:11px 12px;gap:9px}.avatar{width:36px;height:36px;font-size:21px}.head-actions{flex-direction:column;gap:5px}.head-actions button{min-height:36px;font-size:11px;padding:6px 9px}.name{font-size:17px}.companion-heading select{font-size:16px;padding:5px 7px;min-height:32px;max-width:220px}.messages{padding:17px 12px;gap:13px}.bubble{max-width:92%;font-size:15px;padding:12px 14px}.compose{padding:10px;gap:8px}.compose button{padding:12px 14px}.panel{border-radius:18px}footer{flex-wrap:wrap;padding:2px;justify-content:center}footer nav{gap:15px}.dialog-head h2{font-size:21px}dialog{padding:20px}.empty-state h1{font-size:20px}.notice{font-size:11px}.reply-progress{padding-left:14px}}
@media(max-height:500px){.site-head{display:none}.chat-head{padding:7px 12px}.chat-head .avatar,.chat-head .small,.name{display:none}.companion-heading select{margin:0}.head-actions{flex-direction:row}footer{display:none}.compose textarea{min-height:44px}.compose button{min-height:44px}.notice{max-height:40px}.empty-heart{display:none}.empty-state h1{font-size:18px}}
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.settings-grid>div{min-width:0}#characterForm input,#characterForm select{width:100%;min-height:44px;font-size:16px;border:1px solid #6c536b;border-radius:12px;background:#17192a;color:white;padding:12px}#characterCount{margin:6px 0}dialog{max-height:calc(var(--viewport-height,100dvh) - 28px)}.send-recovery{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 16px;border-top:1px solid #ffffff20;background:#292136;flex:none}.send-recovery p{font-size:12px;line-height:1.5;margin:0;color:#ead7e7}.send-recovery button{font-size:12px;flex:none}.head-actions button{min-height:44px}.companion-heading select{min-height:44px}
@media(max-width:450px){.settings-grid{grid-template-columns:1fr}.send-recovery{padding:8px 10px}.send-recovery p{font-size:11px}}
