:root{color-scheme:dark;font-family:Tahoma,system-ui,sans-serif;background:#101418;color:#e8e6e3}*{box-sizing:border-box}body{margin:0 auto;max-width:1050px;padding:16px}header,.toolbar,nav{display:flex;align-items:center;gap:12px;flex-wrap:wrap}header{justify-content:space-between;border-bottom:1px solid #344252;padding-bottom:18px}h1{margin:6px 0;color:#7bd88f}h2{font-size:1.2rem}p{line-height:1.9}section{padding:16px 0}button,input,select,textarea{font:inherit;border-radius:10px;padding:12px;border:1px solid #3b4b60;background:#1b242e;color:inherit}button{cursor:pointer;background:#274c84;min-height:44px}button:hover{background:#3564ac}button:disabled{opacity:.5;cursor:wait}input,textarea{width:100%}textarea{min-height:100px;resize:vertical}label{display:block;line-height:2.2;margin:8px 0}.check{display:flex;align-items:center;gap:10px}.check input{width:auto;min-width:20px;min-height:20px}details{padding:14px 0}summary{cursor:pointer}nav{margin:18px 0}nav button.active{background:#2a6858}.card{background:#19212a;border:1px solid #344252;border-radius:14px;padding:14px;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9}.card.user{border-right:4px solid #8ab4f8}.card.assistant{border-right:4px solid #7bd88f}.hint,small{color:#b0bdcc;font-size:.85rem}#notice{color:#f5cf8c;min-height:1.8em}#messages{max-height:55vh;overflow:auto}.card button{margin:6px}pre{white-space:pre-wrap;direction:ltr;text-align:left;overflow-wrap:anywhere}[hidden]{display:none!important}@media(min-width:700px){#say-form{display:flex;align-items:end;gap:12px}#say-form label{flex:1}#login{max-width:500px;margin:auto}}

#peer-local-video,#peer-remote-video{width:280px;max-width:100%;border-radius:12px;background:#101418}.peer-avatars{display:flex;gap:16px;flex-wrap:wrap}#peer-call-consent,#vision-consent{width:auto}#alfaro-avatar-color{width:100px}
.message-text{user-select:text;-webkit-user-select:text;cursor:text}.message-actions{display:flex;flex-wrap:wrap;gap:6px;white-space:normal;user-select:none;-webkit-user-select:none}.message-actions button{font-size:.85rem;margin:4px 0}
.card.message-selected{outline:2px solid #f5cf8c}

.messenger-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:14px}.chat-sidebar{background:#19212a;border-radius:14px;padding:12px;max-height:65vh;overflow:auto}.chat-preview{display:flex;flex-direction:column;width:100%;text-align:right;margin:6px 0;background:transparent}.chat-preview.active{background:#2a6858}.chat-preview small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.chat-content{min-width:0}@media(max-width:650px){.messenger-layout{grid-template-columns:1fr}.chat-sidebar{max-height:220px}.chat-preview{padding:8px}#messages{max-height:55vh}}

/* Messenger presentation: owner-approved refresh, no memory changes. */
body{max-width:1280px}#chat .messenger-layout{gap:0;border:1px solid #30434a;border-radius:22px;overflow:hidden;background:#0c171b}.chat-sidebar{border-radius:0;background:#14252b;border-left:1px solid #30434a;max-height:75vh}.chat-preview{border:0;border-radius:14px;padding:14px}.chat-preview.active{background:#245b55}.chat-content{display:flex;flex-direction:column;background:radial-gradient(circle at 15% 20%,#ffffff05 1px,transparent 2px) 0 0/22px 22px,#0d1b20;padding:16px}#messages{display:flex;flex-direction:column;gap:12px;min-height:32vh;max-height:60vh;padding:8px}.card.user,.card.assistant{width:fit-content;max-width:88%;margin:0;padding:12px 16px;border:0;box-shadow:0 2px 5px #0003;border-radius:18px;white-space:normal}.card.user{align-self:flex-start;background:#185c50;border-top-right-radius:4px}.card.assistant{align-self:flex-end;background:#24343e;border-top-left-radius:4px}.message-text{white-space:pre-wrap;line-height:1.85}.message-menu{padding:4px 0 0}.message-menu summary{font-size:.78rem;color:#b8d6cf;list-style:none}.message-actions{padding-top:8px;border-top:1px solid #ffffff15}.message-actions button{padding:8px;font-size:.78rem;background:#162a30}.card p:empty{display:none}#new-message-box{position:sticky;bottom:0;background:#14252b;border-radius:18px;padding:12px;margin-top:16px}#new-message-box>summary{font-size:.8rem;color:#b8d6cf}#say-form textarea{min-height:64px;border-radius:16px;background:#20353c}#say-form button{background:#218673;border:0;border-radius:24px}nav button{border-radius:24px}button:focus-visible,summary:focus-visible{outline:2px solid #8be2cf;outline-offset:3px}@media(max-width:650px){body{padding:8px}.chat-sidebar{max-height:190px;border-left:0;border-bottom:1px solid #30434a}.chat-content{padding:8px}.card.user,.card.assistant{max-width:94%}#messages{padding:4px;max-height:52vh}#say-form{display:flex;flex-wrap:wrap;gap:8px}#say-form label{width:100%;margin:0}#say-form button{flex:1}}

/* Persian indigo design brief — no additional dependencies. */
:root{color-scheme:light;background:#eaf1ff;color:#17264d}body{max-width:1320px;background:#eaf1ff}header{border-color:#c5d3f1}h1{color:#3046a0}button,input,select,textarea{background:#fff;color:#17264d;border-color:#c5d3f1}button{background:#344b9d;color:#fff}button:hover{background:#263976}.hint,small{color:#526386}#notice{color:#344b9d}.primary-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:10px;background:#182b5d;border-radius:20px}.primary-tabs button{background:#304787;border:0;min-height:58px}.primary-tabs button.active{background:#536bd0}.utility-tabs button{background:#d9e3fa;color:#243967;border:0}.utility-tabs{gap:8px}#chat .messenger-layout{background:#fff;border-color:#c5d3f1;box-shadow:0 10px 40px #26397612}.chat-sidebar{background:#f5f8ff;border-color:#d8e1f3}.chat-preview{color:#223764;background:transparent}.chat-preview.active{background:#dce5ff;color:#243a82}.chat-preview:hover{background:#e7edfc}.chat-content{position:relative;isolation:isolate;background:#eff4ff}.chat-content:before{content:'AI';position:absolute;inset:0;display:grid;place-items:center;font:bold 120px system-ui;color:#334d9b08;pointer-events:none;z-index:-1}.card.user{background:#354da4;color:white}.card.assistant{background:#fff;color:#17264d;box-shadow:0 2px 8px #23417212}.message-menu summary{color:inherit;opacity:.75}.message-actions button{background:#dce5ff;color:#243967}.message-actions{border-color:#c5d3f1}#new-message-box{background:#fff;border:1px solid #d8e1f3}#new-message-box>summary{color:#526386}#say-form textarea{background:#f5f8ff;color:#17264d;border-color:#d8e1f3}#say-form button{background:#354da4}.conversation-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;border-bottom:1px solid #d8e1f3;padding-bottom:10px}.conversation-toolbar button{font-size:.75rem}.attachment-bar{display:flex;flex-wrap:wrap;gap:6px}.attachment-bar button{font-size:.8rem;padding:8px}.family-contacts{display:grid;gap:6px;margin-bottom:14px}.family-contacts button{text-align:right;background:#e1e9fc;color:#243967}.family-contacts #father-invite{font-size:.75rem;background:transparent;color:#344b9d;padding:4px 12px}.chat-selection{display:flex;gap:4px}.chat-selection button{font-size:.72rem;padding:6px;background:#dce5ff;color:#243967}.chat-select-row{display:flex;align-items:center;gap:6px}.chat-select{width:20px;height:20px;flex-shrink:0}.demo-label{color:#5a5880;background:#edf0ff;padding:10px;border-radius:10px}#family-demo-messages{display:flex;flex-direction:column;gap:12px;min-height:220px}#family-demo-form{display:flex;gap:8px;margin-top:12px}#family-demo-form textarea{min-height:64px}.card{background:#fff;border-color:#d8e1f3}.check{color:inherit}@media(max-width:650px){.primary-tabs{grid-template-columns:repeat(3,minmax(0,1fr));padding:8px;gap:6px}.primary-tabs button{font-size:.78rem;padding:8px;min-height:48px}.conversation-toolbar{flex-wrap:wrap}.attachment-bar{width:100%}.chat-sidebar{max-height:280px}.chat-content:before{font-size:90px}.utility-tabs{gap:4px}.utility-tabs button{font-size:.75rem;padding:8px}}

/* Match supplied reference: navy banner, pale tabs, left conversation rail. */
body{max-width:1536px;padding:0 24px 24px;background:#fff}header{margin:0 -24px;padding:22px 32px;background:linear-gradient(120deg,#183367,#254985,#172e69);color:#fff;min-height:115px}header h1{color:#fff;font-size:2.2rem}header small{color:#e6eeff}header button{background:#ffffff18;border-color:#ffffff40;color:#fff}.primary-tabs{padding:0;background:transparent;border-radius:0;margin:18px 0;gap:12px}.primary-tabs button{background:linear-gradient(125deg,#e7f0ff,#dce9fc);color:#0d2163;border-radius:20px;font-weight:bold;font-size:1.05rem;min-height:65px}.primary-tabs button:hover,.primary-tabs button.active{background:#233f9e;color:#fff}.messenger-layout{direction:ltr;grid-template-columns:minmax(250px,34%) minmax(0,1fr)}.messenger-layout>*{direction:rtl}.chat-sidebar{background:#fff;border-left:0;border-right:1px solid #d2dff1;padding:18px;max-height:80vh}.chat-content{background:#fff;padding:18px}.chat-content:before{font-family:Georgia,serif;font-size:230px;color:#d4e3fa55}.card.user,.card.assistant{background:#e4eeff;color:#10215d;box-shadow:none}.card.user{border-bottom-right-radius:3px}.card.assistant{border-bottom-left-radius:3px}.conversation-toolbar{padding:12px 0 22px;font-weight:bold;font-size:1.1rem}.family-contacts button{min-height:60px;border-radius:16px;background:#eef4ff}.chat-preview.active{background:#e3edff}.chat-preview{padding:18px 12px}.chat-selection button{background:#e4eeff}#new-message-box{background:#edf3ff;border:0;border-radius:26px}#say-form textarea{background:#fff;border:0;border-radius:20px}#say-form button{background:#173796;border-radius:20px}.utility-tabs{margin:8px 0}.utility-tabs button{padding:6px 12px;min-height:36px;font-size:.78rem}#notice{font-size:.8rem;min-height:0;margin:8px 0}.chat-content .card{position:relative}#messages{min-height:36vh}.chat-sidebar input{background:#edf3ff;border:0}@media(max-width:650px){body{padding:0 10px 12px}header{margin:0 -10px;padding:16px;min-height:88px}header h1{font-size:1.7rem}.primary-tabs{display:flex;overflow-x:auto;gap:6px;padding-bottom:4px}.primary-tabs button{flex:0 0 auto;min-height:48px;font-size:.8rem;padding:10px 14px;white-space:nowrap}.messenger-layout{grid-template-columns:1fr}.chat-sidebar{border-right:0;border-bottom:1px solid #d2dff1;padding:10px}.chat-content{padding:10px}.chat-content:before{font-size:120px}.conversation-toolbar{font-size:.85rem}.family-contacts{grid-template-columns:1fr 1fr}.family-contacts small{grid-column:1/-1}.family-contacts button{min-height:42px}.card.user,.card.assistant{max-width:94%}}

.brand{display:flex;align-items:center;gap:18px}.brand-icon{background:#fff;color:#193571;border-radius:22px;min-width:72px;height:72px;display:grid;place-items:center;letter-spacing:3px;font-size:16px;box-shadow:0 6px 14px #0002}.header-actions{display:flex;gap:18px;margin-right:auto}.header-actions button{border:0;background:transparent;font-size:36px;padding:0;min-width:44px}.utility-tabs{opacity:.85;justify-content:flex-end}.category-tools{padding:0;font-size:.78rem;position:relative;margin-bottom:8px}.category-tools summary{color:#667ca2}.contact-avatar{display:inline-grid;place-items:center;width:60px;height:60px;border-radius:50%;background:linear-gradient(140deg,#eef5ff,#d6e6ff);font-size:30px;font-weight:bold;color:#0d2266;flex-shrink:0}.family-contacts button{display:flex;align-items:center;gap:14px;text-align:right;background:transparent;border:0;border-bottom:1px solid #e3ebf7;border-radius:0}.family-contacts small{display:block}.family-contacts #father-contact{background:#e4efff;border-radius:16px}.conversation-person{display:flex;align-items:center;gap:12px}.conversation-toolbar{background:linear-gradient(#fff 55%,#edf3ff 55%);border-radius:12px;flex-wrap:wrap}.conversation-toolbar .check{font-weight:normal;font-size:.95rem}.conversation-toolbar button{background:#e6efff;color:#0e256b;border:0}.message-pick{float:right;display:inline-flex;margin:0 8px 0 0}.message-pick input,.demo-pick{appearance:none;width:23px;min-width:23px;height:23px;min-height:23px;border:2px solid #1a326f;border-radius:5px;background:#fff;padding:0}.message-pick input:checked,.demo-pick:checked{background:#294ba7;box-shadow:inset 0 0 0 4px #fff}.message-pick{font-size:0}.demo-pick{float:right;margin:0 8px}.card.user,.card.assistant{padding:16px 20px;min-width:130px}#messages{min-height:40vh}.message-menu{opacity:.75}.chat-content:before{color:#e7effb;font-size:240px}.chat-content{background:radial-gradient(ellipse at center,#f9fbff 0,#fff 68%)}.chat-content .card{background:#e5effc}.message-text{font-size:1rem}#say-form{flex-wrap:wrap}#say-form label{min-width:180px}#message-paste{font-size:.72rem!important}#say-form>button:last-child{border-radius:50%;min-width:64px;min-height:64px;font-size:0}#say-form>button:last-child:after{content:'➤';font-size:28px;display:block;transform:rotate(180deg)}@media(max-width:650px){.brand-icon{min-width:48px;height:48px;border-radius:15px}.brand{gap:10px}.header-actions{gap:6px}.header-actions button{font-size:26px}.contact-avatar{width:40px;height:40px;font-size:22px}.conversation-toolbar .check{font-size:.8rem}.chat-content:before{font-size:130px}#say-form>button:last-child{min-width:48px;min-height:48px;flex:0 0 48px}.card.user,.card.assistant{padding:12px;max-width:96%}}

.utility-menu{font-size:.75rem;padding:3px 0;text-align:left}.utility-menu summary{color:#60769c}.utility-menu .utility-tabs{margin:4px 0}#workspace-title{font-size:.88rem;margin:4px 0}#workspace-description{font-size:.78rem;color:#667ca2;margin:4px 0;line-height:1.5}.message-time{display:block;font-size:.7rem;color:#566c94;margin-top:4px}.brand-icon{position:relative}.brand-icon:after{content:'';position:absolute;bottom:8px;right:10px;width:10px;height:10px;background:#fff;transform:rotate(30deg)}#family-demo .card{border-radius:20px;padding:18px}#family-demo .card.user{border-bottom-right-radius:3px}#family-demo .card.assistant{border-bottom-left-radius:3px}

.inline-calls{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0;padding:12px;background:#e7efff;border-radius:18px}.inline-calls button{flex:1;background:#254498;color:white;min-height:48px}.chat-content>#local-voice-panel,.chat-content>#peer-room-panel,.chat-content>#hamzad-media{background:#f5f8ff;border:1px solid #d7e3f8;padding:14px;border-radius:16px;margin:8px 0}.chat-content video{max-width:100%;height:auto}.chat-content audio{width:100%;margin:10px 0}.chat-content .toolbar{gap:6px}@media(max-width:650px){.inline-calls{gap:6px;padding:8px}.inline-calls button{font-size:.8rem;padding:8px}.chat-content>#local-voice-panel,.chat-content>#peer-room-panel{padding:10px}.chat-content .toolbar button{flex:1}}
