:root{color-scheme:dark;font-family:Inter,"Segoe UI",sans-serif;background:#10151a;color:#f3f3f0;--muted:#a5afb0;--line:#364346;--accent:#c4e4d4}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:#10151a}header{display:flex;justify-content:space-between;align-items:center;padding:30px 6vw;border-bottom:1px solid #273035}.brand{font-size:15px;letter-spacing:4px}.mark{font-size:24px;color:var(--accent);margin-right:10px}.sub{font-size:10px;color:var(--muted);letter-spacing:2px}.local{font-size:12px;color:var(--muted)}main{max-width:1400px;margin:auto;display:grid;grid-template-columns:1fr 1fr;gap:9vw;align-items:start;padding:8vh 6vw}.intro{position:sticky;top:8vh}.eyebrow,.step{letter-spacing:2px;color:var(--accent);font-size:11px}.intro h1{font-size:clamp(42px,5vw,76px);letter-spacing:-3px;line-height:1.05;font-weight:400;margin:35px 0 25px}.intro h1 em{font-style:normal;color:var(--accent)}p{color:var(--muted);line-height:1.7}.intro>p:not(.eyebrow){font-size:18px;max-width:480px}.intro-bottom{display:flex;gap:25px;color:#758383;font-size:11px;margin-top:80px;letter-spacing:1px}.panel{border:1px solid var(--line);background:#171e22;border-radius:18px;padding:clamp(24px,3vw,46px)}h2{font-size:32px;font-weight:500;letter-spacing:-1px;margin:18px 0 8px}.panel p{font-size:15px;margin:0 0 24px}form{display:grid;gap:16px}label{display:grid;gap:8px;color:#d6dfdc;font-size:13px}input,textarea,select{font:inherit;font-size:16px;color:#f2f7f4;width:100%;background:#10171b;border:1px solid #3a4749;border-radius:9px;padding:14px}textarea{resize:vertical;min-height:78px}button{font:inherit;border:0;border-radius:9px;background:var(--accent);color:#10221b;padding:15px 18px;cursor:pointer;font-weight:600;text-align:left}button span{float:right}button:disabled{opacity:.5;cursor:wait}.secondary{background:transparent;color:var(--accent);border:1px solid #586f65;font-size:13px}.link{background:none;color:var(--muted);padding:17px 0 0;font-size:13px;font-weight:400}.hardware{padding:20px;background:#1d2929;border-radius:10px}.hardware strong{font-size:14px}.hardware p{font-size:13px;margin:9px 0 14px}meter{width:100%;height:12px;margin-top:14px}.privacy{font-size:12px!important}footer{padding:20px 6vw;color:#71817c;font-size:10px;letter-spacing:2px;display:flex;justify-content:space-between}footer span{letter-spacing:0}#message:not(:empty){padding:12px;margin-bottom:18px;border:1px solid #dba689;border-radius:8px;color:#ffcfb2;font-size:13px}:focus-visible{outline:3px solid #c4e4d4;outline-offset:3px}[hidden]{display:none!important}@media(max-width:800px){header{padding:20px 6vw}.local{display:none}main{display:block;padding:5vh 5vw}.intro{position:static}.intro h1{font-size:46px;margin:18px 0}.intro>p:not(.eyebrow){font-size:15px}.intro-bottom{margin:20px 0 26px}.panel{padding:25px}footer{padding:15px 6vw}.sub{display:none}}

.settings-button{margin-top:12px;width:100%}.notes-list{display:grid;gap:10px;margin:20px 0}.note-card{border:1px solid var(--line);border-radius:10px;padding:16px}.note-card h3{margin:0 0 8px;font-size:16px}.note-card p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px;font-size:14px}.note-actions{display:flex;gap:10px}.note-actions button{padding:8px 10px;font-size:12px}.notes-list:empty{display:none}#noteForm{margin-top:20px}
.file-download{display:inline-flex;align-items:center;padding:8px 10px;border-radius:9px;text-decoration:none}.file-sharing{margin-top:16px}.file-recipient{display:flex;align-items:center;gap:10px}.file-recipient input{width:20px;height:20px;accent-color:var(--accent)}#filesView .note-actions{flex-wrap:wrap}
#familyAttachmentForm{margin-top:16px}.family-message .file-download{margin-top:8px;max-width:100%;overflow-wrap:anywhere}
.family-message .family-delete{display:block;padding:8px 0 0;font-size:11px;color:var(--muted)}
.family-message-time{display:block;text-align:right;color:var(--muted);font-size:11px;line-height:1.3;margin-top:5px}
.family-call-panel{grid-column:1 / -1;margin:0 0 18px;padding:18px;border:1px solid var(--line);border-radius:14px;background:#182320}.family-call-status{font-weight:700;margin:0 0 8px}.family-call-videos{display:flex;gap:10px;align-items:start;flex-wrap:wrap}.family-call-videos video{width:min(100%,320px);max-height:220px;object-fit:contain;border-radius:10px;background:#101515}.family-call-buttons{margin:10px 0}
.family-members{margin:12px 0;border:1px solid var(--line);border-radius:10px;padding:10px 12px}.family-members summary{cursor:pointer;color:var(--muted);font-size:13px}.family-member-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.family-member,.family-member-self{font-size:12px;padding:7px 10px}.family-member-self{color:var(--muted)}.family-member-profile:not(:empty){border-top:1px solid var(--line);padding-top:12px;margin-top:12px}.family-member-profile p{margin:5px 0 10px;color:var(--muted);font-size:12px}
@keyframes aurora-thinking{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
#chatStatus:not([hidden])::after{content:' · · ·';display:inline-block;color:var(--accent);animation:aurora-thinking 1.1s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){#chatStatus:not([hidden])::after{animation:none}}

.equipment-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.equipment-actions button{flex:1;min-width:130px}#cameraPreview{width:100%;max-height:240px;background:#10171b;border-radius:8px;object-fit:contain}#cameraStatus{margin:12px 0 8px}.hardware button{min-height:44px}

.chat-actions{display:flex;gap:8px;flex-wrap:wrap}.family-chat{margin:20px 0;max-height:40vh;min-height:110px;overflow:auto}.family-message{padding:12px 14px;border-radius:10px;background:#1d2929;margin-bottom:10px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.family-message.user{margin-left:8%;background:#273b35}.family-message b{display:block;font-size:11px;letter-spacing:1px;color:var(--accent);margin-bottom:6px}.family-chat p{margin:0}.conversation-row{width:100%;font-size:14px}

.consent{display:flex;align-items:flex-start;gap:12px;line-height:1.5}.consent input{width:20px;height:20px;flex:none;accent-color:var(--accent)}
.voice-actions{display:flex;gap:10px;flex-wrap:wrap}.voice-actions button{min-height:44px}

/* Family workspace: keep conversation and navigation ahead of decoration. */
.intro{display:none}header{padding:20px clamp(20px,4vw,56px)}main{display:block;max-width:1000px;padding:clamp(20px,4vh,40px) 24px}.panel{padding:clamp(20px,3vw,36px)}
body[data-view="chatView"] main{max-width:1600px;padding:18px clamp(12px,2vw,28px)}body[data-view="chatView"] .panel{padding:0;overflow:hidden}body[data-view="chatView"] .test-warning,body[data-view="chatView"] #message:not(:empty){margin:12px 18px}body[data-view="chatView"] footer{display:none}
.chat-layout{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:calc(100dvh - 165px)}.chat-sidebar{background:#11191b;border-right:1px solid var(--line);padding:22px 16px;display:flex;flex-direction:column;gap:10px;min-width:0}.chat-sidebar-title{font-size:11px;letter-spacing:2px;color:var(--muted);margin-bottom:5px}.chat-sidebar #newConversation{width:100%}.chat-sidebar #listConversations{padding:4px 2px}.chat-sidebar .notes-list{margin:0;max-height:calc(100dvh - 340px);overflow:auto}.chat-sidebar .note-actions{align-items:start}.chat-sidebar .conversation-row{overflow-wrap:anywhere;text-align:left}.chat-sidebar .chat-back{margin-top:auto}.chat-main{min-width:0;padding:20px clamp(18px,3vw,46px);display:flex;flex-direction:column}.chat-heading{border-bottom:1px solid var(--line);padding-bottom:12px}.chat-heading h2{margin:0;font-size:23px;letter-spacing:-.4px}.chat-heading p{margin:3px 0 0;font-size:12px}.chat-main .family-chat{flex:1;max-height:none;min-height:25vh;overflow:auto;margin:16px 0}.chat-main #familyChatForm{margin-top:auto;gap:10px}.chat-main #familyChatForm textarea{min-height:62px;max-height:25vh}.chat-main #familyChatForm>button[type=submit]{width:auto;justify-self:end;min-width:130px;text-align:center}.chat-main #voiceStatus{margin:0;font-size:11px}.chat-main #chatStatus,.chat-main #contextNotice{margin:10px 0 0}
@media(max-width:800px){main{padding:20px 14px}body[data-view="chatView"] main{padding:8px}.chat-layout{display:flex;flex-direction:column;min-height:calc(100dvh - 145px)}.chat-sidebar{border-right:0;border-bottom:1px solid var(--line);padding:12px;display:grid;grid-template-columns:1fr auto;gap:8px}.chat-sidebar-title{grid-column:1/-1}.chat-sidebar #newConversation{min-height:44px}.chat-sidebar #listConversations{padding:8px}.chat-sidebar .notes-list,.chat-sidebar #moreConversations{grid-column:1/-1}.chat-sidebar .notes-list{max-height:22vh}.chat-sidebar .chat-back{grid-column:1/-1;margin:0;padding:4px 0}.chat-main{padding:16px;min-height:55vh}.chat-main .family-chat{min-height:24vh}}
body[data-view="chatView"] header{padding-top:12px;padding-bottom:12px}body[data-view="chatView"] .chat-layout{height:calc(100dvh - 150px);min-height:0}.chat-main{min-height:0}.chat-main .family-chat{min-height:0}.chat-sidebar .notes-list{min-height:0}
@media(max-width:800px){body[data-view="chatView"] .chat-layout{height:auto;min-height:calc(100dvh - 145px)}.chat-main{min-height:55vh}.chat-main .family-chat{min-height:24vh;max-height:45vh}}
@media(min-width:801px){body[data-view="chatView"] .chat-layout{grid-template-rows:minmax(0,1fr)}.chat-sidebar{min-height:0;overflow:hidden}.chat-sidebar .notes-list{flex:1;max-height:none;overflow:auto}.chat-main{overflow:hidden}}
@media(max-width:800px){.chat-sidebar-title{display:none}.chat-main{min-height:0}.chat-main .family-chat{min-height:12vh}.chat-main #familyChatForm{gap:6px}.chat-main #familyChatForm textarea{min-height:52px}}
.code-block{margin:12px 0;background:#10171b;border:1px solid var(--line);border-radius:9px;overflow:hidden;white-space:normal}.code-heading{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;background:#24302e;color:var(--muted);font-size:12px}.code-heading button{padding:6px 10px;font-size:12px}.code-block pre{margin:0;padding:14px;overflow:auto;white-space:pre;color:#e7f0ea;font:13px/1.55 Consolas,monospace}

.family-search{margin:.65rem 0;border:1px solid var(--line);border-radius:12px;padding:.65rem .8rem}
.family-search summary{cursor:pointer;font-weight:600}
.family-search form{display:flex;align-items:end;gap:.5rem;margin-top:.7rem}
.family-search form label{flex:1;min-width:0;margin:0}
.family-search form button{width:auto;flex:none}
.family-search [role=status]{font-size:.85rem;margin:.5rem 0;color:var(--muted)}
.family-search-results{display:grid;gap:.5rem;max-height:18rem;overflow:auto}
.family-search-results article{padding:.6rem;border-radius:8px;background:var(--panel,#1a2427)}
.family-search-results time{float:right;font-size:.75rem;color:var(--muted)}
.family-search-results p{white-space:pre-wrap;overflow-wrap:anywhere;margin:.35rem 0 0}

/* Compact private chat: keep conversations visible and give the answer space. */
@media (min-width:801px){
 body[data-view="chatView"] main{max-width:none;padding:10px 14px}
 body[data-view="chatView"] .chat-layout{height:calc(100dvh - 132px);grid-template-columns:230px minmax(0,1fr)}
 .chat-sidebar{padding:14px 12px;gap:7px}
 .chat-sidebar .notes-list{align-content:start;grid-auto-rows:max-content;gap:5px}
 .chat-sidebar .note-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;align-items:center}
 .chat-sidebar .conversation-row{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
 .chat-sidebar .note-actions.active .conversation-row{border-color:var(--accent);background:#24332e}
 .chat-sidebar .note-actions button{padding:8px;font-size:12px}
 .chat-main{padding:12px clamp(14px,2vw,28px)}
 .chat-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:8px;flex-wrap:wrap}
 .chat-heading h2{font-size:20px}.chat-heading p{font-size:11px}
 #auroraChatModels{display:flex;align-items:end;gap:6px;max-width:100%;flex-wrap:wrap}
 #auroraChatModels label{margin:0;font-size:11px;min-width:190px}
 #auroraChatModels select{padding:7px 9px;min-height:36px;font-size:13px}
 #auroraChatModels button{padding:7px 9px;min-height:36px;font-size:12px}
 #auroraChatModels [data-state="ready"]{display:none}
 #auroraChatModels .privacy:not([data-state="ready"]){margin:0;font-size:11px;max-width:240px}
 .chat-main .family-chat{margin:8px 0;flex:1 1 0;min-height:120px}
 #auroraChatFiles{margin:0 0 5px;font-size:13px}
 .chat-main #familyChatForm{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;margin:0}
 .chat-main #familyChatForm label{grid-column:1/-1;margin:0;font-size:0}
 .chat-main #familyChatForm textarea{font-size:15px;min-height:52px;max-height:18vh;padding:9px 11px}
 .chat-main .voice-actions{grid-column:1;align-items:center}
 .chat-main .voice-actions button{min-height:36px;padding:6px 10px;font-size:12px}
 .chat-main #familyChatForm>button[type=submit]{grid-column:2;grid-row:2;min-width:100px;padding:8px 12px}
 .chat-main #voiceStatus{grid-column:1/-1;font-size:10px;line-height:1.3}
}
@media(max-width:800px){
 .chat-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
 #auroraChatModels{display:flex;align-items:end;gap:5px;max-width:100%;flex-wrap:wrap}
 #auroraChatModels label{margin:0;font-size:11px;min-width:160px;flex:1}
 #auroraChatModels select,#auroraChatModels button{font-size:12px;min-height:38px;padding:6px 8px}
 #auroraChatModels [data-state="ready"]{display:none}
 .chat-sidebar .notes-list{align-content:start;grid-auto-rows:max-content}
}

.family-global-search form{display:grid;grid-template-columns:1fr;align-items:stretch}.family-global-search form button{width:100%}.family-global-search small{display:block;color:var(--muted);margin-top:.25rem}.family-global-search .family-search-results{max-height:15rem}.family-global-jump{margin-top:.5rem}

.file-search{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:0 0 16px}.file-search label{flex:1;min-width:180px}.file-search button{padding:10px 14px}.file-search [role=status]{width:100%;margin:0;color:var(--muted);font-size:12px}

#chatDraftStatus{grid-column:1/-1;margin:0;font-size:11px;color:var(--muted)}

#chatDraftRetry{grid-column:1/-1;width:max-content;padding:6px 10px;font-size:12px}

.composer-shortcut{grid-column:1/-1;margin:0!important;color:var(--muted);font-size:11px!important;line-height:1.3}

/* Family conversations: navigation stays close while messages get the space. */
body[data-view="familyChatView"] header{padding:12px clamp(18px,3vw,40px)}
body[data-view="familyChatView"] main{max-width:none;padding:10px 14px}
body[data-view="familyChatView"] .panel{padding:0;overflow:hidden}
body[data-view="familyChatView"] .test-warning,body[data-view="familyChatView"] #message:not(:empty){margin:10px 18px;font-size:12px}
body[data-view="familyChatView"] footer{display:none}
.family-workspace{display:grid;grid-template-columns:260px minmax(0,1fr);height:calc(100dvh - 135px);min-height:360px}
.family-sidebar{min-height:0;overflow:auto;padding:20px 14px;background:#121b1e;border-right:1px solid #293638}
.family-sidebar-heading{display:flex;justify-content:space-between;align-items:start;gap:8px;padding:2px 6px 12px}
.family-sidebar-heading h2{margin:5px 0 0;font-size:23px;letter-spacing:-.7px}
.family-overline{font-size:10px;letter-spacing:1.5px;color:#90aa9f}
.family-sidebar #familyChatBack{padding:5px;font-size:12px;white-space:nowrap}
.family-sidebar .notes-list{display:grid;align-content:start;grid-auto-rows:max-content;gap:4px;margin:12px 0}
.family-sidebar .conversation-row{background:transparent;border:0;border-radius:10px;padding:12px;text-align:left;color:#dce9e3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.family-sidebar .conversation-row:hover,.family-sidebar .conversation-row:focus-visible{background:#253832}
.family-sidebar .family-search,.family-sidebar .family-members,.family-new-chat{margin:6px 0;border-color:#2d3e3b;background:#182427}
.family-new-chat,.family-attachment-panel{border:1px solid #344642;border-radius:12px;padding:10px 12px}
.family-new-chat summary,.family-attachment-panel summary{cursor:pointer;color:#c4e4d4;font-size:13px;font-weight:600;list-style:none}
.family-new-chat summary::-webkit-details-marker,.family-attachment-panel summary::-webkit-details-marker{display:none}
.family-new-chat form{margin-top:12px;gap:8px}
.family-new-chat select,.family-new-chat button{padding:9px;font-size:13px}
.family-main{display:flex;flex-direction:column;min-width:0;min-height:0;padding:16px clamp(16px,3vw,36px) 14px}
.family-thread-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-bottom:1px solid #2b3938;padding-bottom:10px}
.family-thread-heading h3{margin:0 auto 0 0;font-size:19px;letter-spacing:-.3px}
.family-thread-heading .family-call-buttons{margin:0;gap:5px}
.family-thread-heading .family-call-buttons button{padding:8px 10px}
.family-thread-heading .family-search{margin:0;padding:8px 10px}
.family-main > #olderFamilyMessages{align-self:center;padding:7px 12px;margin-top:8px}
.family-main > .family-chat{flex:1 1 0;min-height:0;max-height:none;margin:12px 0;scrollbar-color:#50655d transparent}
.family-main .family-message{width:fit-content;max-width:min(78%,680px);border-radius:16px;padding:10px 14px;margin:0 0 10px;background:#263331;line-height:1.45}
.family-main .family-message.user{margin-left:auto;background:#355448}
.family-main .family-message b{letter-spacing:.3px;margin-bottom:4px}
.family-composer{border:1px solid #3c5049;border-radius:16px;background:#141e20;padding:8px 10px}
.family-attachment-panel{border:0;padding:3px 4px;margin:0}
.family-attachment-panel[open]{border-bottom:1px solid #344642;border-radius:0;padding-bottom:10px;margin-bottom:8px}
.family-attachment-panel #familyAttachmentForm{margin:10px 0 0;gap:8px;max-height:30vh;overflow:auto}
.family-attachment-panel #familyAttachmentForm input,.family-attachment-panel #familyAttachmentForm select{padding:8px;font-size:13px}
.family-attachment-panel #familyAttachmentForm button{padding:9px 12px}
.family-attachment-panel .privacy{margin:0;font-size:11px!important}
#familyMessageForm{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}
#familyMessageForm label{min-width:0}
#familyMessageForm textarea{border:0;background:transparent;min-height:46px;max-height:18vh;padding:10px 8px;resize:vertical}
#familyMessageForm button{padding:11px 15px;text-align:center;border-radius:11px}
#familyMessageForm .composer-shortcut{font-size:10px!important;padding-left:8px}
#familyDraftStatus{grid-column:1/-1;margin:0;padding-left:8px;font-size:11px!important;line-height:1.35}
#familyDraftRetry{margin:5px 8px;padding:7px 10px;font-size:12px}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:800px){
 body[data-view="familyChatView"] main{padding:6px}
 .family-workspace{display:flex;flex-direction:column;height:calc(100dvh - 125px);min-height:480px}
 .family-sidebar{flex:none;max-height:27%;padding:10px 12px;border-right:0;border-bottom:1px solid #293638}
 .family-sidebar-heading{padding:0 2px 5px}.family-sidebar-heading h2{font-size:19px}
 .family-sidebar .notes-list{display:flex;overflow-x:auto;margin:5px 0;gap:5px}
 .family-sidebar .conversation-row{width:auto;flex:none;max-width:180px;padding:8px 11px;background:#20302d}
 .family-sidebar .family-search,.family-sidebar .family-members,.family-new-chat{padding:6px 8px;margin:4px 0}
 .family-main{flex:1;min-height:0;padding:10px 12px}
 .family-thread-heading h3{font-size:17px}.family-main .family-message{max-width:90%}
 #familyMessageForm button{padding:10px;font-size:13px}
}

/* Aurora chat: quieter controls and a readable conversation area. */
body[data-view="chatView"] .panel{background:#151e21;border-color:#2d3b3b}
.chat-sidebar{background:#121b1e;border-color:#293638}
.chat-sidebar-title{color:#90aa9f;font-size:10px;letter-spacing:1.5px}
.chat-sidebar #newConversation{background:#20332d;border-color:#3a5549;color:#d4ede0;border-radius:11px}
.chat-sidebar #listConversations{color:#a7bab1}
.chat-sidebar .note-actions{border-radius:10px;transition:background .15s ease}
.chat-sidebar .note-actions.active{background:#263a33}
.chat-sidebar .note-actions .conversation-row{background:transparent;border:0;color:#dce9e3;padding:11px 9px}
.chat-sidebar .note-actions.active .conversation-row{background:transparent;border:0}
.chat-sidebar .note-actions button:last-child{border:0;background:transparent;color:#9daea7}
.chat-sidebar .note-actions:hover{background:#20302d}
.chat-heading{border-color:#2e3c3a}
.chat-heading h2{font-weight:600;letter-spacing:-.4px}
#chatMessages{scrollbar-color:#50655d transparent}
#chatMessages .family-message{width:min(100%,850px);padding:14px 16px;border-radius:16px;line-height:1.58;background:#202d2c;color:#edf3ef}
#chatMessages .family-message.user{width:fit-content;max-width:min(82%,700px);margin-left:auto;background:#355448}
#chatMessages .family-message b{letter-spacing:.5px;color:#b9ddc9}
#familyChatForm textarea{border-radius:14px;border-color:#3a5049;background:#111b1d;line-height:1.45}
#familyChatForm textarea:focus{border-color:#96cbb1;outline:2px solid #96cbb1;outline-offset:0}
#familyChatForm>button[type=submit]{border-radius:11px}
#familyChatForm .voice-actions button,#auroraChatModels button{border-color:#3d554b;color:#c4e4d4}
#chatDraftStatus{margin:0;color:#9bada5;font-size:11px;line-height:1.35}
@media (prefers-reduced-motion:reduce){.chat-sidebar .note-actions{transition:none}}

#chatMessages .answer-copy{display:block;color:#a8cabe;padding:10px 0 0;font-size:12px}
#chatMessages .answer-copy:hover{color:#e1f7e9}

/* A quieter workspace: the conversation, rather than the controls, takes priority. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--muted:#a3aab4;--line:#303640;--accent:#d0e7dc;background:#101216;color:#f1f3f5}
body{background:#101216;color:#f1f3f5}
header{background:#14171c;border-color:#292e35}
.brand{font-weight:650;letter-spacing:2.5px}.mark{color:#bce5d2}.sub,.local{color:#9ba4ad}
.panel{background:#191d23;border-color:#303640;box-shadow:0 12px 40px #0002}
input,textarea,select{background:#171b20;border-color:#3a424c;color:#f1f3f5}
button{border-radius:11px}.secondary{border-color:#46514d;color:#d0e7dc}
button:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid #a7dcc4;outline-offset:3px}
body[data-view="chatView"] .panel,body[data-view="familyChatView"] .panel{background:#1b1f25;border-color:#303640}
body[data-view="chatView"] .test-warning,body[data-view="familyChatView"] .test-warning{color:#b3b8bd;font-size:12px;line-height:1.35}
.chat-sidebar,.family-sidebar{background:#16191e;border-color:#30343b}
.chat-sidebar-title,.family-overline{color:#929ba4;letter-spacing:1px}
.chat-sidebar #newConversation{background:#262c31;border-color:#3b4445;color:#e4efe9}
.chat-sidebar .note-actions.active,.chat-sidebar .note-actions:hover{background:#292e35}
.chat-sidebar .note-actions .conversation-row,.family-sidebar .conversation-row{color:#e5e8eb}
.chat-heading,.family-thread-heading{border-color:#30353d}
.chat-heading h2,.family-thread-heading h3{color:#f5f6f7}
#auroraChatModels select{background:#23282f;border-color:#3a4149;border-radius:10px}
#auroraChatModels button{border-color:#414a4a;color:#c7d9d0}
#chatMessages,.family-main > .family-chat{scrollbar-color:#555d65 transparent}
#chatMessages .family-message{background:transparent;color:#e8ebed;border-radius:0;padding:14px 4px;line-height:1.65}
#chatMessages .family-message.user{background:#333b40;color:#f4f7f5;border-radius:18px;padding:12px 16px}
#chatMessages .family-message b,.family-main .family-message b{color:#c3dfd1;letter-spacing:.1px}
.family-main .family-message{background:#2b3038;color:#eff1f2}
.family-main .family-message.user{background:#3a554b}
.family-composer{background:#24292f;border-color:#404850;border-radius:18px}
#familyChatForm textarea{background:#24292f;border-color:#434b53;border-radius:18px;color:#f4f6f7}
#familyChatForm textarea:focus,#familyMessageForm textarea:focus{border-color:#9fc8b3;outline:2px solid #9fc8b3;outline-offset:0}
#familyChatForm>button[type=submit],#familyMessageForm button{background:#c9e6d7;color:#17221c;border-radius:12px}
.family-sidebar .family-search,.family-sidebar .family-members,.family-new-chat{background:#20252a;border-color:#373f45}
.family-new-chat summary,.family-attachment-panel summary{color:#ccdfd5}
#auroraChatFiles{color:#c8d9d0}
#chatMessages .code-block{background:#15181d;border-color:#353b43}
#chatMessages .code-heading{background:#262b32}
@media(min-width:801px){
 body[data-view="chatView"] main,body[data-view="familyChatView"] main{padding:10px 18px}
 body[data-view="chatView"] .chat-layout{grid-template-columns:248px minmax(0,1fr)}
 .chat-main,.family-main{padding-left:clamp(20px,4vw,60px);padding-right:clamp(20px,4vw,60px)}
 .chat-main #familyChatForm,.chat-main #auroraChatFiles,.chat-main #chatMessages{width:100%;max-width:980px;align-self:center}
 .chat-main #familyChatForm textarea{min-height:54px}
}
@media(max-width:800px){
 body[data-view="chatView"] main,body[data-view="familyChatView"] main{padding:5px}
 body[data-view="chatView"] .chat-layout{height:calc(100dvh - 135px);min-height:0;overflow:hidden}
 .chat-sidebar{display:grid;grid-template-columns:1fr auto;flex:none;max-height:28%;overflow:auto;background:#16191e}
 .chat-sidebar .notes-list{max-height:12vh}
 .chat-main{flex:1;min-height:0;overflow:hidden;padding:10px 13px}
 .chat-main .family-chat{flex:1 1 0;max-height:none;min-height:60px}
 .chat-main #familyChatForm{flex:none;gap:4px}
 .chat-main #familyChatForm textarea{min-height:48px;max-height:15vh}
 #auroraChatFiles[open]{max-height:25vh;overflow:auto}
 .family-workspace{height:calc(100dvh - 135px);min-height:0}
 .family-sidebar .conversation-row{background:#292f35}
 .family-main > .family-chat{min-height:110px}
 .family-main .family-composer{flex:0 1 auto;min-height:0;max-height:45%;overflow:auto}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* A real pending request, shown beside the conversation instead of above it. */
.chat-main #chatStatus{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
.thinking-indicator{display:flex;align-items:center;gap:8px;width:fit-content;margin:6px 0 16px;padding:10px 14px;border:1px solid #353d42;border-radius:14px;background:#242a30;color:#c5d6cd;font-size:13px}
.thinking-dots{display:inline-flex;align-items:center;gap:3px;height:12px}
.thinking-dots i{width:4px;height:4px;border-radius:50%;background:#c5e1d1;animation:thinking-pulse 1.2s ease-in-out infinite}
.thinking-dots i:nth-child(2){animation-delay:.15s}.thinking-dots i:nth-child(3){animation-delay:.3s}
.thinking-clock{color:#9ba9a4;font-size:12px;font-variant-numeric:tabular-nums}
@keyframes thinking-pulse{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.thinking-dots i{animation:none}}

/* Chat workspace: restrained surfaces, readable type and room for the conversation. */
body[data-view="chatView"],body[data-view="familyChatView"]{background:#0d1015}
body[data-view="chatView"] header,body[data-view="familyChatView"] header{background:#11151a;border-color:#232a32}
body[data-view="chatView"] .panel,body[data-view="familyChatView"] .panel{background:#181d24;border-color:#2b323b;border-radius:20px;box-shadow:0 24px 70px #0004}
body[data-view="chatView"] .test-warning,body[data-view="familyChatView"] .test-warning{margin:0;padding:9px 18px;background:#202630;border-bottom:1px solid #303741;color:#c4cbd2;font-size:12px}
.chat-sidebar,.family-sidebar{background:#14191f;border-color:#2a3039}
.chat-sidebar{padding:18px 14px;gap:8px}
.chat-sidebar-title,.family-overline{font-size:10px;font-weight:650;letter-spacing:.11em;color:#9aa7b0}
.chat-sidebar #newConversation{background:#e2eee8;color:#18241f;border:0;text-align:center;min-height:44px}
.chat-sidebar #newConversation:hover{background:#f0faf4}
.chat-sidebar #listConversations{padding:11px 8px 4px;color:#aab5bc}
.chat-sidebar .note-actions{gap:0;align-items:center;border:1px solid transparent}
.chat-sidebar .note-actions.active{background:#29323a;border-color:#3a4650}
.chat-sidebar .note-actions .conversation-row{font-size:13px;font-weight:550;padding:11px 10px}
.chat-sidebar .note-actions button:last-child{font-size:11px;color:#acb8bd;padding:9px 8px}
.chat-main,.family-main{background:radial-gradient(ellipse at 50% -25%,#26323a 0%,#1a2027 42%,#181d24 80%)}
.chat-heading,.family-thread-heading{min-height:58px;border-color:#313a43}
.chat-heading h2,.family-thread-heading h3{font-size:20px;font-weight:650;letter-spacing:-.03em}
.chat-heading p{color:#a7b3b8}
#auroraChatModels label{color:#aab6bd}
#auroraChatModels select{background:#252d35;border:1px solid #424e58}
#auroraChatModels button,.chat-main .voice-actions button{background:#252d35;border:1px solid #414c55;color:#dbe7e1}
#chatMessages .family-message{font-size:15px;line-height:1.72;color:#edf1f3}
#chatMessages .family-message.user{background:#303e3c;color:#f5faf7;border:1px solid #42544e}
#chatMessages .family-message b,.family-main .family-message b{color:#b9daca;font-size:11px;font-weight:700}
#auroraChatFiles{border:1px solid #39454d;border-radius:12px;background:#222a31;padding:9px 12px;color:#d3e2d9}
#auroraChatFiles summary{cursor:pointer;font-size:13px;font-weight:600}
#auroraChatFiles[open]{padding:12px;overflow:auto;max-height:30vh}
#auroraChatFiles[open]>*:not(summary){margin-top:9px}
#familyChatForm textarea{background:#252e36;border:1px solid #47545d;box-shadow:0 8px 24px #0002;padding:14px 16px;line-height:1.5}
#familyChatForm textarea::placeholder,#familyMessageForm textarea::placeholder{color:#a7b2ba}
#familyChatForm>button[type=submit],#familyMessageForm button[type=submit]{background:#d7eee1;color:#16231b;font-weight:700}
#familyChatForm>button[type=submit]:hover,#familyMessageForm button[type=submit]:hover{background:#effaf3}
.family-sidebar-heading h2{font-size:22px;font-weight:650;color:#f2f5f6}
.family-privacy{font-size:12px!important;line-height:1.5!important;color:#b1bbc1}
.family-sidebar .conversation-row{background:#20272f;border:1px solid #313c45;border-radius:12px;margin:2px 0}
.family-sidebar .conversation-row:hover,.family-sidebar .conversation-row:focus-visible{background:#2c3940}
.family-main .family-message{background:#29323c;border:1px solid #38434d;border-radius:17px;color:#f2f5f7}
.family-main .family-message.user{background:#344a42;border-color:#486259}
.family-composer{background:#252e36;border-color:#46545d;box-shadow:0 8px 24px #0002}
#familyMessageForm textarea:focus{outline:2px solid #9fc8b3;outline-offset:-2px}
@media(min-width:801px){
 body[data-view="chatView"] .chat-layout{grid-template-columns:250px minmax(0,1fr)}
 .chat-main #familyChatForm,.chat-main #auroraChatFiles,.chat-main #chatMessages{max-width:920px}
 .chat-main #familyChatForm{grid-template-columns:minmax(0,1fr) auto;gap:7px}
}
@media(max-width:800px){
 body[data-view="chatView"] .panel,body[data-view="familyChatView"] .panel{border-radius:14px}
 body[data-view="chatView"] .test-warning,body[data-view="familyChatView"] .test-warning{padding:7px 12px;font-size:11px}
 .chat-sidebar{padding:9px 11px}.chat-sidebar #newConversation{min-height:40px}
 .chat-main,.family-main{padding:10px 12px}
 .chat-heading,.family-thread-heading{min-height:48px}
 #chatMessages .family-message{font-size:15px;line-height:1.6}
 #familyChatForm textarea{padding:10px 12px}
 .family-sidebar .conversation-row{margin:0}
}

a.settings-button{display:block;padding:15px 18px;border-radius:11px;border:1px solid #46514d;color:#d0e7dc;text-decoration:none;font-size:13px;background:transparent}
a.settings-button:hover{border-color:var(--accent);color:var(--accent)}
a.settings-button span{float:right}

.aurora-image-link{display:block;margin:12px 0;max-width:420px}
.aurora-image{display:block;width:100%;height:auto;border-radius:14px;border:1px solid #364346;background:#0d1218;cursor:zoom-in}
.family-message.assistant .aurora-image-link:hover .aurora-image{border-color:var(--accent)}

/* Боковые меню: названия диалогов не режем в одну строку — даём две строки и больше места. */
@media(min-width:801px){
 body[data-view="chatView"] .chat-layout{grid-template-columns:280px minmax(0,1fr)}
}
.chat-sidebar .conversation-row,.family-sidebar .conversation-row{
 white-space:normal!important;text-overflow:clip!important;word-break:break-word;
 overflow-wrap:anywhere;
 display:-webkit-box!important;-webkit-box-orient:vertical!important;
 -webkit-line-clamp:3!important;overflow:hidden!important;
 line-height:1.3;padding:9px 10px;font-size:13.5px}
.chat-sidebar .note-actions{align-items:stretch}
.chat-sidebar .note-actions button,.family-sidebar .note-actions button{padding:6px 8px;font-size:11px;white-space:nowrap}
.chat-sidebar .notes-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:2px}
.chat-sidebar::-webkit-scrollbar,.chat-sidebar .notes-list::-webkit-scrollbar{width:8px}
.chat-sidebar .notes-list::-webkit-scrollbar-thumb{background:rgba(94,234,212,.28);border-radius:8px}
@media(max-width:800px){
 .chat-sidebar .conversation-row,.family-sidebar .conversation-row{-webkit-line-clamp:3}
 .chat-sidebar .notes-list{max-height:30vh}
}

/* Кнопка удаления диалога — маленький крестик: название получает больше места. */
.chat-sidebar .conversation-delete{width:26px;min-width:26px;padding:2px 0;font-size:13px;line-height:1;
 text-align:center;opacity:.45}
.chat-sidebar .note-actions:hover .conversation-delete,
.chat-sidebar .conversation-delete:focus-visible{opacity:1}

/* Ответ, который печатается прямо сейчас */
.family-message.streaming{opacity:.92}
.family-message.streaming .stream-body{white-space:pre-wrap}
.family-message.streaming .stream-body::after{content:'▍';margin-left:2px;color:var(--accent);
 animation:stream-caret 1s steps(1) infinite}
@keyframes stream-caret{50%{opacity:0}}
