
/* Founder Networks — isolated styles */
.efn-entry{margin-left:auto;border:1px solid var(--line);background:var(--surface,#fff);color:var(--ink);border-radius:12px;padding:9px 12px;font:700 11px inherit;white-space:nowrap}
.efn-modal{position:fixed;inset:0;z-index:520;display:none;background:var(--bg,#f6f8fb);color:var(--ink,#17202a);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.efn-modal.show{display:flex}
.efn-shell{width:min(760px,100%);height:100%;margin:auto;display:flex;flex-direction:column;background:var(--bg,#f6f8fb)}
.efn-head{flex:none;display:flex;align-items:center;gap:12px;padding:calc(12px + env(safe-area-inset-top)) 15px 12px;background:var(--surface,#fff);border-bottom:1px solid var(--line,#e4e8ee)}
.efn-head>div{flex:1;min-width:0}.efn-head b{display:block;font-size:16px}.efn-head small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.efn-back,.efn-close{border:0;background:var(--soft,#edf1f5);color:var(--ink);border-radius:50%;width:38px;height:38px;font-size:23px}
#efnBody{flex:1;min-height:0;overflow:auto;padding:15px;display:flex;flex-direction:column}
.efn-toolbar{display:flex;gap:7px;overflow:auto;margin-bottom:13px}.efn-toolbar button{border:1px solid var(--line);background:var(--surface);color:var(--muted);padding:9px 12px;border-radius:99px;white-space:nowrap;font-size:11px}.efn-toolbar button.on{background:#234a73;color:white;border-color:#234a73}
.efn-create,.efn-primary{border:0;border-radius:14px;background:#234a73;color:white;padding:14px;font-weight:750;font-size:13px}
.efn-list{display:grid;gap:10px;margin-top:15px}.efn-card{background:var(--surface,#fff);border:1px solid var(--line,#e4e8ee);border-radius:16px;padding:15px;box-shadow:0 4px 16px rgba(20,40,60,.04)}.efn-card-top{display:flex;justify-content:flex-end}.efn-lock{font-size:9px;letter-spacing:.7px;color:var(--muted);font-weight:800}.efn-card>b{display:block;font-size:15px;margin:6px 0}.efn-card p{color:var(--muted);font-size:12px;line-height:1.5;margin:0 0 12px}.efn-card button{border:0;background:var(--soft,#edf1f5);color:var(--ink);border-radius:10px;padding:9px 12px;font-size:11px;font-weight:700}
.efn-empty{margin:auto;text-align:center;padding:28px 18px;color:var(--muted);font-size:12px;line-height:1.6}.efn-empty b{display:block;color:var(--ink);font-size:15px;margin-bottom:7px}.efn-muted{font-size:12px;color:var(--muted);padding:10px}
.efn-form{display:grid;gap:15px}.efn-form>label{display:grid;gap:7px;font-size:12px;font-weight:700}.efn-form input:not([type=radio]),.efn-form textarea,.efn-invitebar input{width:100%;box-sizing:border-box;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:12px;padding:12px;font:inherit;font-size:13px}.efn-form textarea{min-height:90px;resize:vertical}.efn-choice{display:grid;gap:9px}.efn-choice label{display:flex;gap:10px;align-items:flex-start;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}.efn-choice span{display:grid;gap:4px}.efn-choice b{font-size:12px}.efn-choice small{color:var(--muted);font-size:11px}
.efn-room-info{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;padding:0 0 10px}.efn-room-info button{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:50%;width:34px;height:34px}
.efn-members{font-size:10px;color:var(--muted);padding:7px 10px;background:var(--surface);border-radius:10px;margin-bottom:10px}
.efn-messages{flex:1;min-height:160px;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:12px 2px;overscroll-behavior:contain}
.efn-msg{max-width:82%;align-self:flex-start;position:relative}.efn-msg.mine{align-self:flex-end}.efn-msg-name{font-size:10px;color:var(--muted);margin:0 6px 4px}.efn-bubble{background:var(--surface);border:1px solid var(--line);border-radius:16px 16px 16px 5px;padding:10px 13px;font-size:13px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap;touch-action:pan-y;animation:efnPop .16s ease-out}.efn-msg.mine .efn-bubble{background:#234a73;color:white;border-color:#234a73;border-radius:16px 16px 5px 16px}.efn-msg time{display:block;color:var(--muted);font-size:9px;margin:3px 5px}.efn-bubble small{opacity:.7;font-size:9px}
@keyframes efnPop{from{opacity:.45;transform:translateY(5px) scale(.985)}to{opacity:1;transform:none}}
.efn-typing{height:18px;color:var(--muted);font-size:10px;padding-left:5px}.efn-composer{display:flex;gap:8px;align-items:center;padding:9px;background:var(--surface);border:1px solid var(--line);border-radius:16px;margin-top:4px}.efn-composer input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--ink);font:inherit;font-size:13px;padding:8px}.efn-composer button{border:0;background:var(--soft);color:var(--ink);width:38px;height:38px;border-radius:12px;font-size:18px}.efn-composer .efn-send{background:#234a73;color:white}.efn-reply{font-size:10px;color:var(--muted);padding:7px 10px;background:var(--surface);border-radius:9px;margin-top:7px}.efn-emoji{display:flex;flex-wrap:wrap;gap:5px;padding:8px;background:var(--surface);border-radius:12px;margin-top:6px}.efn-emoji button{border:0;background:var(--soft);border-radius:8px;padding:6px;font-size:20px}
.efn-invitebar{display:flex;gap:7px;flex-wrap:wrap;padding-top:9px}.efn-invitebar input{flex:1;min-width:120px}.efn-invitebar>button{border:0;background:#234a73;color:white;border-radius:10px;padding:8px 12px}.efn-invitebar #efnInviteResults{width:100%;display:grid;gap:5px}.efn-invitebar #efnInviteResults button{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:9px;border-radius:9px;text-align:left}
.efn-msg-menu{position:absolute;z-index:3;left:0;bottom:calc(100% + 6px);display:flex;gap:5px;flex-wrap:wrap;padding:7px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 25px #0002}.efn-msg.mine .efn-msg-menu{left:auto;right:0}.efn-msg-menu button{border:0;background:var(--soft);color:var(--ink);padding:8px;border-radius:9px;font-size:10px}
.efn-modal.dark{--bg:#0b1119;--surface:#141e2a;--soft:#202d3b;--ink:#edf2f8;--muted:#94a3b5;--line:#2b3949;color:var(--ink)}
/* Direct message menu is an anchored Instagram-style action bubble, not a bottom sheet. */
.ef-msg-menu{inset:0;align-items:center;justify-content:center;background:rgba(9,16,25,.22);padding:14px}
.ef-msg-sheet{width:min(300px,90vw);border-radius:18px;padding:10px;background:var(--surface,#fff);box-shadow:0 12px 36px rgba(0,0,0,.22)}
.ef-msg-actions{display:flex;flex-wrap:wrap;gap:6px}.ef-msg-btn{min-height:38px;padding:0 11px;border-radius:11px;font-size:12px;flex:1 1 38%}.ef-msg-preview{margin-bottom:8px}
.ef-chat-modal[data-theme="dark"] .ef-chat-box,.ef-chat-modal[data-theme="dark"] .ef-chat-head,.ef-chat-modal[data-theme="dark"] .ef-chat-composer{background:#121b26;color:#eaf0f6;border-color:#2b3949}
.ef-chat-modal[data-theme="dark"] #chatMessages{background:#0b1119}
.ef-chat-modal[data-theme="dark"] #chatInput{background:#1a2634;color:#edf2f8;border-color:#344457}
.ef-chat-modal[data-theme="dark"] .msg-theirs .msg-bubble{background:#182331;color:#edf2f8;border-color:#2b3949}
.ef-chat-modal[data-theme="dark"] .ef-chat-head{color:#edf2f8}
.ef-chat-modal[data-theme="dark"] .ef-chat-head label{color:#aab8c8!important}

.efn-typing:not(:empty)::after{content:"";display:inline-block;width:18px;height:5px;margin-left:5px;background:radial-gradient(circle,currentColor 1.5px,transparent 2px) 0 50%/6px 5px repeat-x;animation:efnDots .8s steps(3,end) infinite}
@keyframes efnDots{0%{background-position:0 50%}100%{background-position:18px 50%}}

.efn-quote{font-size:10px;line-height:1.4;color:var(--muted);background:var(--soft);padding:7px 9px;border-radius:9px 9px 0 0;margin-bottom:3px;max-width:100%;overflow-wrap:anywhere}
.efn-msg.mine .efn-quote{color:#dce7f3;background:#1b3b5d}

@keyframes efDirectMessageIn{from{opacity:.55;transform:translate3d(0,6px,0) scale(.99)}to{opacity:1;transform:translate3d(0,0,0) scale(1)}}
#chatMessages .msg-arrive{animation:efDirectMessageIn .19s cubic-bezier(.2,.75,.25,1) both;will-change:transform,opacity}
@media(prefers-reduced-motion:reduce){#chatMessages .msg-arrive,.efn-bubble{animation:none!important}}

/* Site-wide theme: controlled from the navigation drawer and persisted locally. */
html[data-ef-theme="dark"]{
 color-scheme:dark;
 --bg:#0b1119;--surface:#141e2a;--surface-soft:#1c2937;--ink:#edf2f8;--muted:#9baabd;
 --line:#2b3949;--accent:#82acd8;--accent-soft:#1b2d41;--shadow:0 8px 30px rgba(0,0,0,.28);
}
html[data-ef-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-ef-theme="dark"] .topbar{background:rgba(15,23,33,.96);border-color:var(--line)}
html[data-ef-theme="dark"] .drawer,html[data-ef-theme="dark"] .drawer-head{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-ef-theme="dark"] .card,html[data-ef-theme="dark"] .post-card,html[data-ef-theme="dark"] .modal-box,
html[data-ef-theme="dark"] .profile-box,html[data-ef-theme="dark"] .ef-inbox-box,html[data-ef-theme="dark"] .ef-page-box,
html[data-ef-theme="dark"] .ef-notifications-box,html[data-ef-theme="dark"] .ef-create-sheet,
html[data-ef-theme="dark"] .ef-sheet-opt,html[data-ef-theme="dark"] .comments-section{
 background:var(--surface);color:var(--ink);border-color:var(--line)
}
html[data-ef-theme="dark"] .menu-btn,html[data-ef-theme="dark"] .btn:not(.primary),html[data-ef-theme="dark"] .filter,
html[data-ef-theme="dark"] .icon-btn,html[data-ef-theme="dark"] .ef-sheet-cancel{
 background:var(--surface-soft);color:var(--ink);border-color:var(--line)
}
html[data-ef-theme="dark"] input:not([type=checkbox]):not([type=radio]),html[data-ef-theme="dark"] textarea,html[data-ef-theme="dark"] select{
 background:var(--surface-soft);color:var(--ink);border-color:var(--line)
}
html[data-ef-theme="dark"] .modal-head,html[data-ef-theme="dark"] .ef-page-head,html[data-ef-theme="dark"] .ef-chat-head,
html[data-ef-theme="dark"] .ef-chat-composer{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-ef-theme="dark"] .hero,html[data-ef-theme="dark"] .section-head,html[data-ef-theme="dark"] .ef-inbox-list,
html[data-ef-theme="dark"] .ef-notifications-list{border-color:var(--line)}
html[data-ef-theme="dark"] .drawer-section,html[data-ef-theme="dark"] .meta,html[data-ef-theme="dark"] .muted,
html[data-ef-theme="dark"] .ef-modal-subtitle{color:var(--muted)}
html[data-ef-theme="dark"] .drawer-nav button{color:var(--ink)}
html[data-ef-theme="dark"] .drawer-nav button:hover{background:var(--surface-soft)}
html[data-ef-theme="dark"] .ef-liquid-tabbar{background:rgba(20,30,42,.92);border-color:var(--line)}

html[data-ef-theme="dark"] .ef-chat-modal[data-theme="light"] .ef-chat-box,
html[data-ef-theme="dark"] .ef-chat-modal[data-theme="light"] .ef-chat-head,
html[data-ef-theme="dark"] .ef-chat-modal[data-theme="light"] .ef-chat-composer{background:#fff;color:#17202a;border-color:#e1e5ea}
html[data-ef-theme="dark"] .ef-chat-modal[data-theme="light"] #chatMessages{background:#f7f9fc}
html[data-ef-theme="dark"] .ef-chat-modal[data-theme="light"] #chatInput{background:#f8fafc;color:#17202a;border-color:#dce2e9}
html[data-ef-theme="dark"] .ef-chat-modal[data-theme="light"] .msg-theirs .msg-bubble{background:#fff;color:#17202a;border-color:#e1e5ea}

.ef-msg-menu{align-items:flex-start;justify-content:flex-start;background:transparent;padding:0}
.ef-msg-sheet{position:fixed;max-height:70vh;overflow:auto}
