/* Velvet theme cleanup and phone-first conversation layout. */
:root{--bg:#f6f4f2;--panel:#fff;--panel2:#f9f7f5;--panel3:#f0ece9;--line:rgba(45,38,54,.12);--text:#292534;--muted:#726e7b;--soft:#514d5b;--pink:#a6507d;--lav:#7564a8;--mint:#4b9c7c;--gold:#aa7648;--shadow:0 18px 48px rgba(44,35,52,.09);--radius:18px}
body{background:radial-gradient(ellipse at 80% -20%,rgba(174,145,188,.1),transparent 42%),var(--bg);color:var(--text)}
body[data-theme="light"]{--bg:#f6f4f2;--panel:#fff;--panel2:#f9f7f5;--panel3:#f0ece9;--line:rgba(45,38,54,.12);--text:#292534;--muted:#726e7b;--soft:#514d5b;--pink:#a6507d;--lav:#7564a8;--mint:#4b9c7c;--gold:#aa7648;--shadow:0 18px 48px rgba(44,35,52,.09)}
body[data-theme="light"] .sidebar,body[data-theme="light"] .topbar{background:rgba(250,249,247,.94)}
body[data-theme="light"] .hero{background:linear-gradient(112deg,#eee5f0,#f8f4f7 55%,#f5e9ee);border-color:rgba(163,77,123,.2)}
body[data-theme="light"] .hero-copy h1 em{color:#a34d7b}body[data-theme="light"] .hero-copy p{color:#5e5969}
body[data-theme="light"] .room-card,body[data-theme="light"] .person-card,body[data-theme="light"] .panel-card{background:linear-gradient(145deg,#fff,#faf8f7)}
body[data-theme="light"] .room-card:hover,body[data-theme="light"] .person-card:hover{background:#fff}
body[data-theme="light"] .chat-layout,body[data-theme="light"] .chat-list,body[data-theme="light"] .conversation,body[data-theme="light"] .info-panel{background:#fff}
body[data-theme="light"] .search,body[data-theme="light"] .compose-input,body[data-theme="light"] .field input,body[data-theme="light"] .field textarea,body[data-theme="light"] .report-dialog,body[data-theme="light"] .report-dialog select,body[data-theme="light"] .report-dialog textarea{background:#fff;color:var(--text)}
body[data-theme="light"] .chat-item:hover,body[data-theme="light"] .chat-item.selected{background:#f1edf3}
body[data-theme="light"] .bubble{background:#f0edf3;border-color:rgba(50,40,60,.08);color:#302b38}body[data-theme="light"] .mine .bubble{background:linear-gradient(135deg,#705783,#56466b);color:#fff}body[data-theme="light"] .bubble small{color:#777181}body[data-theme="light"] .mine .bubble small{color:#e3d9e8}
body[data-theme="light"] .send{background:linear-gradient(135deg,#b45d89,#8b75bc);color:#fff}body[data-theme="light"] .report-card{background:#fff}body[data-theme="light"] .report-card blockquote{background:#f4f1f5}
body[data-theme="light"] .text-btn,body[data-theme="light"] .tiny-link{color:#704b82}body[data-theme="light"] .tag{color:#704b82;background:#f2edf7;border-color:#e7dced}body[data-theme="light"] .quick-prompt{color:#584b65}
body[data-theme="light"] .profile-card .bio{color:#625e6b}body[data-theme="light"] .field label,body[data-theme="light"] .report-dialog label{color:#625e6b}
body[data-theme="light"] .signin-card{background:linear-gradient(145deg,#fff,#f8f4f7)}body[data-theme="light"] .mobile-nav{background:rgba(255,255,255,.96);border-color:var(--line)}body[data-theme="light"] .mobile-nav button.active{color:#a34d7b}body[data-theme="light"] .toast{background:#332a38;color:#fff}
body[data-theme="midnight"]{--bg:#0e131b;--panel:#151c26;--panel2:#1b2430;--panel3:#242f3d;--line:rgba(224,235,255,.12);--text:#eef3fa;--muted:#a3afbf;--soft:#ccd6e4;--pink:#8fb5ff;--lav:#70cbd1;--mint:#78d2b6;--gold:#e9c18a;--shadow:0 24px 65px rgba(0,0,0,.36);background:radial-gradient(ellipse at 80% -20%,rgba(76,120,164,.17),transparent 42%),var(--bg)}
body[data-theme="midnight"] .sidebar,body[data-theme="midnight"] .topbar{background:rgba(14,19,27,.94)}body[data-theme="midnight"] .hero{background:linear-gradient(112deg,#1d2b3b,#182330 55%,#243044);border-color:rgba(143,181,255,.2)}body[data-theme="midnight"] .hero-copy h1 em{color:#9bbdff}body[data-theme="midnight"] .primary,body[data-theme="midnight"] .send{background:linear-gradient(120deg,#8fb5ff,#70cbd1);color:#101924}
body[data-theme="midnight"] .nav-btn.active{color:#c5d9ff;background:linear-gradient(90deg,rgba(143,181,255,.16),rgba(112,203,209,.08));box-shadow:inset 2px 0 #8fb5ff}body[data-theme="midnight"] .room-card,body[data-theme="midnight"] .person-card,body[data-theme="midnight"] .panel-card{background:linear-gradient(145deg,#1b2430,#151c26)}body[data-theme="midnight"] .chat-layout,body[data-theme="midnight"] .chat-list,body[data-theme="midnight"] .conversation,body[data-theme="midnight"] .info-panel{background:#151c26}body[data-theme="midnight"] .search,body[data-theme="midnight"] .compose-input,body[data-theme="midnight"] .field input,body[data-theme="midnight"] .field textarea,body[data-theme="midnight"] .report-dialog,body[data-theme="midnight"] .report-dialog select,body[data-theme="midnight"] .report-dialog textarea{background:#101720;color:var(--text)}body[data-theme="midnight"] .bubble{background:#253242;color:#edf3fb;border-color:rgba(255,255,255,.07)}body[data-theme="midnight"] .mine .bubble{background:linear-gradient(135deg,#405b81,#365b70);color:#fff}body[data-theme="midnight"] .mobile-nav{background:rgba(18,25,35,.97)}body[data-theme="midnight"] .brand-mark,body[data-theme="midnight"] .profile-mark{background:linear-gradient(140deg,#9cc0ff,#61cbd0);color:#13202d}body[data-theme="midnight"] .room-icon{background:rgba(143,181,255,.14);color:#b4ccff}body[data-theme="midnight"] .room-icon.coral{background:rgba(143,181,255,.14);color:#b4ccff}body[data-theme="midnight"] .tag{background:rgba(143,181,255,.12);border-color:rgba(143,181,255,.18);color:#bed5ff}body[data-theme="midnight"] .report-link,body[data-theme="midnight"] .text-btn,body[data-theme="midnight"] .tiny-link{color:#b7ceff}body[data-theme="midnight"] .quick-prompt{color:#cfddf0}body[data-theme="midnight"] .group-head,body[data-theme="midnight"] .event-card{background:linear-gradient(110deg,rgba(143,181,255,.1),rgba(112,203,209,.06))}body[data-theme="midnight"] .toggle.on{background:#739ed9}
.topbar-brand{border:0;background:none;padding:4px 0;color:var(--text);font:800 21px Manrope,sans-serif;letter-spacing:-.8px}.topbar-brand span{color:var(--pink)}.home-grid{grid-template-columns:minmax(0,1fr)}#evaChatLayout{grid-template-columns:minmax(0,1fr)}.top-search{height:38px;width:112px;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:0 11px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--muted);font-size:11px}.top-search>span:first-child{font-size:17px}.top-search:hover{border-color:var(--pink);color:var(--text)}
.top-actions{gap:9px}.theme-switch{display:flex;align-items:center;justify-content:center;gap:7px;height:38px;min-width:82px;padding:0 11px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font-size:11px;font-weight:700}.theme-switch:hover{border-color:var(--pink)}
.chat-page-actions{display:flex;gap:8px;margin:14px 0 0}.typing-indicator{min-height:28px;padding:4px 15px;color:var(--muted);font-size:12px;line-height:20px}.typing-indicator[hidden]{display:none!important}.typing-indicator span{display:inline-block;width:5px;height:5px;margin:0 2px 1px;border-radius:50%;background:var(--pink);animation:typingPulse 1.15s infinite ease-in-out}.typing-indicator span:nth-child(2){animation-delay:.15s}.typing-indicator span:nth-child(3){animation-delay:.3s}@keyframes typingPulse{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.chat-back{display:none;flex:none;width:36px;height:36px;font-size:24px;line-height:1;padding:0}.eva-runtime{margin-top:16px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.prototype-note{max-width:700px;margin-top:22px;padding:22px}
.signup-pending{margin:18px 0}.signup-pending h2{font:700 18px Manrope;margin:0 0 8px}.signup-pending p{font-size:13px;color:var(--muted);line-height:1.65}.signup-pending b{color:var(--text);overflow-wrap:anywhere}
.chat-items,.conv-body,.page{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
@media(max-width:760px){
  html,body{height:100%;min-height:100%;overflow:hidden}body{height:100dvh}.shell{height:100dvh;min-height:0;display:block;overflow:hidden}.main{height:100dvh;min-height:0;display:flex;flex-direction:column}.topbar{height:58px;min-height:58px;flex:0 0 58px;padding:0 14px}.topbar-brand{font-size:19px}.top-actions{gap:6px}.theme-switch{height:36px;min-width:68px;padding:0 8px;font-size:10px}.top-actions .icon-btn{height:36px;width:36px}.top-search{height:36px;width:36px;padding:0;justify-content:center}.top-search-label{display:none}.profile-top-btn{min-width:36px;width:36px;padding:0;justify-content:center}.profile-top-btn>span:not(.profile-mark){display:none}.profile-mark{height:21px;width:21px}.mobile-menu{display:none!important}
  .page{width:100%;max-width:none;min-height:0;flex:1 1 auto;overflow-y:auto;padding:20px 15px calc(84px + env(safe-area-inset-bottom))}.mobile-nav{position:fixed;display:flex;justify-content:space-around;align-items:stretch;left:0;right:0;bottom:0;height:calc(66px + env(safe-area-inset-bottom));padding:6px 8px calc(6px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--line);border-radius:18px 18px 0 0;background:rgba(255,255,255,.97);backdrop-filter:blur(18px);z-index:20;box-shadow:0 -8px 30px rgba(20,18,28,.1)}.mobile-nav button{flex:1;min-width:0;border:0;background:transparent;color:var(--muted);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:4px 1px;font-size:11px;font-weight:600}.mobile-nav button .ico{width:auto;font-size:21px;line-height:1}.mobile-nav button.active{color:var(--pink)}
  .hero{min-height:0;border-radius:19px}.hero-copy{padding:23px 21px}.hero-copy h1{font-size:26px}.hero-copy p{font-size:14px}.hero-art{display:none}.home-grid{display:block}.rooms{grid-template-columns:1fr 1fr}.room-card{min-height:120px}.people-row{grid-template-columns:1fr 1fr}.section-head{margin:24px 0 13px}.section-head h2{font-size:17px}.page-title{font-size:25px}.sub{font-size:14px}.profile-grid{grid-template-columns:1fr;gap:12px}.profile-card{padding:20px}.form-card{padding:18px}.field label{font-size:12px}.field input,.field textarea{font-size:15px;min-height:44px}.field textarea{min-height:96px}.panel-title{font-size:15px}.settings-row b{font-size:13px}.settings-row small,.info-copy{font-size:12px}
  .chat-section-active .page,.eva-section-active .page{height:calc(100dvh - 58px - 66px - env(safe-area-inset-bottom));flex:0 0 calc(100dvh - 58px - 66px - env(safe-area-inset-bottom));padding:8px 10px 8px;overflow:hidden}.chat-section-active #view-direct.active,.eva-section-active #view-eva.active{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}.chat-section-active #view-direct>.eyebrow,.chat-section-active #view-direct>.page-title,.chat-section-active #view-direct>.sub,.eva-section-active #view-eva>.eyebrow,.eva-section-active #view-eva>.page-title,.eva-section-active #view-eva>.sub{display:none}.chat-section-active .chat-page-actions{margin:0;padding:0 0 8px;flex:0 0 auto}.chat-page-actions .secondary{padding:9px 12px;font-size:12px}.chat-section-active #directChatLayout,.eva-section-active #evaChatLayout{height:auto;min-height:0;flex:1 1 auto;margin:0!important;border-radius:16px;display:flex;overflow:hidden}.chat-section-active #directChatLayout .chat-list{display:flex;flex:1 1 auto;min-width:0;border:0}.chat-section-active #directChatLayout .conversation{display:none;min-height:0;flex:1 1 auto}.chat-section-active #directChatLayout.mobile-chat-open .chat-list{display:none}.chat-section-active #directChatLayout.mobile-chat-open .conversation{display:flex}.chat-section-active #directChatLayout .info-panel{display:none}.chat-section-active .chat-list-head{padding:12px 13px}.chat-section-active .chat-list-head h2{font-size:16px;margin-bottom:10px}.chat-section-active .search{height:42px;font-size:14px}.chat-section-active .chat-items{flex:1;min-height:0;overflow-y:auto;padding:7px}.chat-section-active .chat-item{padding:12px 9px}.chat-section-active .chat-info b{font-size:14px}.chat-section-active .chat-info small{font-size:12px}.chat-section-active .chat-meta{font-size:11px}.chat-section-active .conversation-head{height:62px;min-height:62px;padding:0 11px}.chat-section-active .conversation-head .avatar{height:38px;width:38px}.chat-section-active .conv-name b{font-size:15px}.chat-section-active .conv-name small{font-size:11px}.chat-section-active .chat-back{display:grid;place-items:center}.chat-section-active .conv-actions .icon-btn{height:34px;width:34px}.chat-section-active .conv-body{flex:1 1 0;min-height:0;overflow-y:auto;padding:15px 12px;gap:12px}.chat-section-active .message{max-width:94%;gap:7px}.chat-section-active .message .avatar{height:29px;width:29px}.chat-section-active .bubble{font-size:14px;line-height:1.55;padding:10px 13px}.chat-section-active .bubble small{font-size:10px}.chat-section-active .composer{flex:0 0 auto;padding:9px 10px calc(10px + env(safe-area-inset-bottom));gap:8px}.chat-section-active .compose-input{height:46px;font-size:16px;padding:0 13px}.chat-section-active .send{height:44px;width:44px;flex:none;font-size:18px}.typing-indicator{min-height:27px;padding-left:15px;font-size:12px}
  .chat-conversation-open .topbar,.chat-conversation-open .mobile-nav{display:none!important}.chat-conversation-open .page{height:100dvh;flex:1 1 100%;padding:0;overflow:hidden}.chat-conversation-open #view-direct.active{height:100dvh}.chat-conversation-open #view-direct .chat-page-actions{display:none}.chat-conversation-open #directChatLayout{height:100dvh;border:0;border-radius:0;box-shadow:none}.chat-conversation-open #directChatLayout .chat-list{display:none}.chat-conversation-open #directChatLayout .conversation{display:flex}.chat-conversation-open .chat-back{display:grid}
  .eva-runtime{margin:0 0 8px;padding:8px 11px;flex:0 0 auto}.eva-runtime .info-copy{font-size:11px}.eva-section-active #evaChatLayout{border-radius:16px}.eva-section-active #evaChatLayout .conversation{display:flex;min-height:0;flex:1}.eva-section-active #evaChatLayout .conversation-head{height:58px;min-height:58px}.eva-section-active #evaMessages{flex:1;min-height:0;overflow-y:auto;padding:14px 12px}.eva-section-active #evaMessages .message{max-width:94%}.eva-section-active #evaMessages .bubble{font-size:14px;line-height:1.55}.eva-section-active #evaMessages .bubble small{font-size:10px}.eva-section-active #evaChatLayout .composer{flex:0 0 auto;padding:9px 10px calc(10px + env(safe-area-inset-bottom))}.eva-section-active #evaChatLayout .compose-input{height:46px;font-size:16px}.eva-section-active #evaChatLayout .send{height:44px;width:44px}
  .signin-wrap{min-height:calc(100dvh - 130px);padding:15px 0}.signin-card{padding:25px 20px}.signin-card p{font-size:13px}.signin-card .field label{font-size:12px}.signin-card input{font-size:16px;min-height:46px}.signin-card .primary{min-height:46px}.theme-options{grid-template-columns:1fr 1fr}
}
