:root{font-family:system-ui,-apple-system,sans-serif;color:#3c3435;background:#f7f4f1;--accent:#99626f;--muted:#897c7d}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button,a,input,textarea{outline-offset:4px}button{border:0;background:var(--accent);color:white;border-radius:13px;padding:13px 20px;cursor:pointer;font-weight:600}button:disabled{opacity:.5;cursor:wait}a{color:var(--accent)}input,textarea{width:100%;border:1px solid #ddd1d3;border-radius:10px;background:#fff;padding:12px;color:inherit}textarea{resize:vertical}label{display:block;font-size:14px;font-weight:600;margin:15px 0}label input,label textarea{margin-top:7px}h1,h2{font-family:Georgia,serif;font-weight:400}h1{font-size:42px}small{color:var(--muted);font-size:12px}.eyebrow{display:block;font-size:10px;letter-spacing:2px;margin-top:6px}.login{max-width:430px;margin:9vh auto;padding:32px;text-align:center}.login h1{font-size:58px;margin:22px 0}.login label{text-align:left}.login button{width:100%}.mark{font-size:50px;color:var(--accent)}#error,#profile-error{color:#a93443;padding:0 18px;font-size:14px;white-space:pre-wrap}.app{max-width:1320px;margin:0 auto;display:grid;grid-template-columns:330px 1fr;min-height:100dvh}aside{padding:35px;border-right:1px solid #e9dfe0;background:#f0e9e6;display:flex;flex-direction:column;align-items:center}.brand{display:flex;gap:12px;align-items:center;align-self:flex-start;font-size:25px}.brand .eyebrow{font-size:9px}.portrait{width:100%;aspect-ratio:4/5;border-radius:100px 100px 24px 24px;margin-top:35px;overflow:hidden;background:linear-gradient(145deg,#ddc0bf,#b68997);display:grid;place-items:center}.portrait img{width:100%;height:100%;object-fit:cover}.portrait [hidden]{display:none}#placeholder{text-align:center;font-size:80px;color:#fff}#placeholder small{display:block;font-size:13px;color:#fff}aside h1{margin:22px 0 5px}aside p{text-align:center;color:var(--muted);line-height:1.6;font-size:14px}.secondary{background:#fff9;color:#754755;width:100%;border:1px solid #d4bdc2}.aside-note{margin:28px 0}.tools{margin-top:auto;display:flex;gap:9px;align-items:center;flex-wrap:wrap;justify-content:center;font-size:12px}.text{background:none;color:var(--accent);padding:6px;font-size:13px}.conversation{height:100dvh;display:flex;flex-direction:column;padding:0 35px}header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e9dfe0;padding:27px 0;font-weight:600}header small{display:block;margin:5px 0 0 17px;font-weight:400}.dot{display:inline-block;height:7px;width:7px;border-radius:50%;background:#99626f;margin-right:8px}.pill{font-size:10px;padding:8px 12px;border-radius:18px;background:#eee4e5;color:#875c68}#notice{padding:14px 0;font-size:11px;line-height:1.6;color:var(--muted)}#messages{flex:1;overflow:auto;padding:20px 4px;scroll-behavior:smooth}.bubble{width:fit-content;max-width:85%;margin:0 0 18px;padding:16px 20px;background:white;border-radius:18px 18px 18px 4px;box-shadow:0 3px 18px #3c343506}.bubble.user{margin-left:auto;background:#ecdee2;border-radius:18px 18px 4px 18px}.bubble p{margin:7px 0 0;line-height:1.7;font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}.bubble small{font-size:10px;font-weight:600}.welcome{padding:50px 25px;text-align:center;color:#897c7d}.welcome h2{font-size:34px;color:#70515a}.welcome p{line-height:1.7}.typing{padding:15px;font-size:13px;color:var(--muted)}#chat{display:flex;gap:12px;align-items:center;padding:12px;border:1px solid #e3d6d9;background:white;border-radius:18px;margin-top:10px}#chat textarea{border:0;resize:none;max-height:160px;padding:8px;font-size:15px}#send{font-size:25px;padding:9px 17px;border-radius:50%;flex-shrink:0}footer{text-align:center;color:var(--muted);font-size:10px;padding:13px 0 20px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}dialog{border:0;border-radius:22px;padding:30px;max-width:520px;width:calc(100% - 30px);max-height:90dvh;color:inherit}dialog::backdrop{background:#39252b77;backdrop-filter:blur(5px)}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head h2{font-size:30px;margin:0}dialog p{color:var(--muted);font-size:14px}.check{display:flex;align-items:center;gap:10px;font-weight:400}.check input{width:auto;margin:0}#save-profile{width:100%;margin-top:20px}@media(max-width:750px){.app{grid-template-columns:1fr}aside{padding:15px;display:grid;grid-template-columns:65px 1fr auto;gap:4px 14px;border-right:0;border-bottom:1px solid #e9dfe0;align-items:center}.brand,.aside-note{display:none}.portrait{grid-row:1/3;width:65px;height:75px;margin:0;border-radius:18px;aspect-ratio:auto}#placeholder{font-size:35px}#placeholder small{display:none}aside h1{font-size:27px;margin:0}aside #character{margin:0;text-align:left;font-size:11px}.secondary{grid-column:3;grid-row:1/3;font-size:11px;padding:10px;max-width:110px}.tools{grid-column:1/4;margin:6px 0 0;gap:16px}.conversation{height:calc(100dvh - 133px);min-height:420px;padding:0 15px}header{padding:15px 0;font-size:13px}#notice{font-size:10px;padding:9px 0}#messages{padding-top:10px}.bubble{max-width:91%;padding:13px 16px}.bubble p{font-size:14px}footer{font-size:9px;padding-bottom:12px}.welcome{padding:25px 5px}.welcome h2{font-size:28px}}
select{font:inherit;width:100%;padding:12px;border:1px solid #ddd1d3;border-radius:10px;background:white;color:inherit;margin-top:7px}#image-dialog{max-width:760px}#image-error{color:#a93443}#image-status{color:#754755}#image-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px}.image-card{padding:12px;background:#f7f4f1;border-radius:15px;min-width:0}.image-card img{width:100%;height:auto;border-radius:10px}.image-card p{overflow-wrap:anywhere;white-space:pre-wrap;font-size:12px}.image-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.image-actions button,.image-actions a{font-size:12px}#generate-image{width:100%;margin:12px 0}

.chat-image{display:block;max-width:100%;max-height:600px;height:auto;border-radius:12px;margin:12px 0}.bubble a{display:inline-block;font-size:12px;margin-top:5px}

.portrait{margin-top:0}aside h1{margin-bottom:18px}#send{width:44px;height:40px;padding:0;border-radius:0;clip-path:polygon(50% 0,100% 100%,0 100%);background:var(--accent);flex-shrink:0}#send:focus-visible{filter:brightness(.75)}#dialog-title{overflow-wrap:anywhere}.tools{padding-top:20px}
@media(max-width:750px){.portrait{grid-row:1}aside h1{margin:0}.secondary{grid-row:1}.tools{padding-top:0}}

#reference-preview{max-height:220px;max-width:100%;object-fit:contain}#reference-form{padding-bottom:18px;border-bottom:1px solid #e9dfe0}.conversation>.check{margin:6px 0;font-size:12px;flex-shrink:0}#messages{min-height:80px}

[hidden]{display:none!important}#reference-form button{margin-top:14px}#reference-preview{width:auto}#image-dialog form{margin-bottom:18px}.login .setup-note{text-align:left}.login input{margin-bottom:6px}

#chat .attach{flex-shrink:0;margin:0;padding:10px;background:#f0e9e6;color:#754755;border-radius:10px;cursor:pointer;font-size:12px}#chat-upload-preview{display:flex;align-items:center;gap:10px;padding:8px 0;flex-shrink:0}#chat-upload-image{width:60px;height:60px;object-fit:cover;border-radius:8px}#chat-upload-name{font-size:12px;overflow-wrap:anywhere}#chat-file:focus-visible+.sr{outline:2px solid var(--accent)}

#day-options[hidden]{display:none} .day-upload{padding:16px 0;border-bottom:1px solid #ddd} .day-upload small{display:block;margin:8px 0} #day-dialog .image-actions{flex-wrap:wrap}

.profile-thumbnail{display:block;width:96px;height:96px;object-fit:cover;border-radius:12px;margin:12px 0;border:1px solid #ddd}.profile-thumbnail[hidden]{display:none}
