.owner-hub { max-width:1200px; margin-inline:auto; display:grid; gap:24px; }
.owner-welcome { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.owner-welcome h1 { font-size:clamp(24px,3vw,34px); font-weight:800; line-height:1.5; overflow-wrap:anywhere; }
.owner-eyebrow { color:#315EDB; font-size:12px; font-weight:600; margin-bottom:4px; }
.owner-muted { color:#6B7280; font-size:14px; line-height:1.8; }
.owner-secondary,.owner-primary { display:inline-flex; justify-content:center; align-items:center; gap:10px; padding:10px 18px; border-radius:10px; min-height:44px; font-size:14px; font-weight:600; flex-shrink:0; }
.owner-secondary { background:#EEF2FF; color:#315EDB; border:1px solid #DCE4FC; }
.owner-secondary:hover { background:#E0E7FF; }
.owner-status { display:flex; align-items:flex-start; gap:12px; padding:18px 20px; border:1px solid #E5E7EB; border-radius:14px; background:#FFFFFF; }
.owner-status h2,.owner-share h2 { font-size:15px; font-weight:700; }
.owner-status p { color:#6B7280; font-size:13px; margin-top:3px; line-height:1.8; }
.owner-status-dot { width:9px; height:9px; flex-shrink:0; border-radius:50%; background:#F59E0B; margin-top:9px; }
.owner-status-dot.is-active { background:#22C55E; }
.owner-status .owner-secondary { margin-inline-start:auto; }
.owner-setup { background:#FFFFFF; border:1px solid #DCE4FC; border-radius:18px; padding:24px; }
.owner-setup-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.owner-setup h2,.owner-section-title { font-size:18px; font-weight:700; }
.owner-progress { height:6px; border-radius:20px; background:#EEF2FF; margin-block:18px 24px; overflow:hidden; }
.owner-progress span { display:block; height:100%; background:#315EDB; border-radius:20px; }
.owner-next { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.owner-next h3 { font-size:18px; font-weight:700; margin-bottom:6px; }
.owner-text-button { color:#315EDB; font-size:13px; min-height:44px; margin-top:12px; text-align:start; }
.owner-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-top:14px; }
.owner-action { position:relative; padding:22px; background:#FFFFFF; border:1px solid #E5E7EB; border-radius:16px; transition:border-color .15s,box-shadow .15s; }
.owner-action:hover { border-color:#8CA9FF; box-shadow:0 4px 16px #315EDB0D; }
.owner-action-icon { display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:12px; background:#EEF2FF; color:#315EDB; margin-bottom:18px; }
.owner-action h3 { font-size:15px; font-weight:700; }
.owner-action p { font-size:13px; color:#6B7280; margin-top:6px; line-height:1.8; }
.owner-action-arrow { position:absolute; inset-inline-end:20px; top:26px; color:#315EDB; }
.owner-share { display:flex; align-items:center; justify-content:space-between; gap:24px; border:1px solid #E5E7EB; background:#FFFFFF; padding:20px; border-radius:14px; }
.owner-share-controls { display:flex; gap:8px; min-width:0; flex:1; max-width:540px; }
.owner-share input { width:100%; min-width:0; background:#F2F3F5!important; border:1px solid #E5E7EB; padding:10px 12px; border-radius:10px; font-size:13px; }
.owner-preview { margin:24px auto 0; max-width:1200px; border:1px solid #E5E7EB; border-radius:16px; background:#FFFFFF; }
.owner-preview>summary { padding:20px; display:flex; justify-content:space-between; gap:12px; font-size:15px; font-weight:600; }
.owner-preview>summary::after { content:'+'; color:#315EDB; }
.owner-preview[open]>summary::after { content:'−'; }
.owner-preview-content { padding:20px; border-top:1px solid #E5E7EB; }
.owner-save-bar { position:sticky; bottom:12px; z-index:20; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:14px 18px; background:#FFFFFF; border:1px solid #E5E7EB; border-radius:14px; box-shadow:0 4px 20px #171A2110; }
@media(max-width:1100px) { .owner-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) { .owner-welcome,.owner-next,.owner-share { flex-direction:column; align-items:stretch; } .owner-welcome { gap:12px; } .owner-setup { padding:18px; } .owner-setup-heading { align-items:flex-start; flex-direction:column; gap:8px; } .owner-actions { gap:10px; } .owner-action { padding:16px; } .owner-action-arrow { inset-inline-end:14px; top:20px; } .owner-share-controls { max-width:none; } .owner-share-controls .owner-secondary { padding-inline:12px; } .owner-save-bar { bottom:76px; } }
/* Space chat: readable messages, usable composer, and uninterrupted reading. */
html[data-brand] .room-chat-shell { height:var(--chat-available-height,calc(100dvh - 145px)); min-height:300px; background:#FFFFFF; }
.room-owner-badge { background:#315EDB; color:#FFFFFF; }
#room-messages { background:#FAFBFD; overscroll-behavior:contain; overflow-anchor:none; }
#room-messages [data-message-id]>div:nth-child(2) { max-width:85%; }
#room-messages [data-message-id]>div:nth-child(2)>div:first-child { flex-wrap:wrap; gap:6px; }
#room-messages [data-message-id]>div:nth-child(2)>div:first-child>span:first-child { white-space:normal; overflow-wrap:anywhere; }
#room-messages [data-message-body]>div { overflow-wrap:anywhere; }
#room-messages img { max-width:100%; height:auto; }
#room-messages [data-delete-message] { opacity:.55; min-width:28px; min-height:28px; }
#room-messages [data-delete-message]:hover,#room-messages [data-delete-message]:focus-visible { opacity:1; }
#room-message-form { border-radius:16px; align-items:flex-end; }
#room-message-form textarea { background:transparent!important; min-height:40px; max-height:140px; line-height:1.7; }
#room-message-form>label,#room-message-form>button { min-width:40px; min-height:40px; }
html[data-brand] #room-message-form button[type=submit] svg { color:#FFFFFF!important; }
.room-composer-feedback { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; font-size:11px; color:#6B7280; margin-top:8px; }
.room-composer-feedback [role=status] { font-size:12px; }
.room-new-messages { align-self:center; background:#315EDB; color:white; border-radius:24px; padding:8px 18px; margin:8px; font-size:13px; min-height:40px; }
.room-new-messages[hidden],#room-remove-attachment[hidden] { display:none; }
@media(max-width:767px) { .room-chat-shell { height:calc(100dvh - 210px); min-height:300px; } #room-chat { padding:12px; } #room-messages { padding:14px; } }
@media(pointer:coarse) { .room-keyboard-hint { display:none; } }
#room-messages .room-image-thumbnail { display:block; width:220px; max-width:100%; border:1px solid #E5E7EB; border-radius:12px; overflow:hidden; background:#FFFFFF; text-align:center; }
#room-messages .room-image-thumbnail img { display:block; width:100%; height:150px; max-height:150px; object-fit:cover; }
.room-image-thumbnail span { display:block; padding:6px 10px; color:#315EDB; font-size:11px; }
.room-image-thumbnail:hover { border-color:#315EDB!important; }
html[data-brand] .room-image-viewer { padding:52px 16px 16px; border:0; border-radius:16px; width:max-content; max-width:94vw; max-height:92dvh; background:#FFFFFF; overflow:auto; }
.room-image-viewer::backdrop { background:rgba(23,26,33,.8); }
.room-image-viewer>img { display:block; width:auto; height:auto; max-width:calc(94vw - 32px); max-height:calc(92dvh - 68px); object-fit:contain; }
.room-image-close { position:absolute; top:8px; inset-inline-end:10px; width:36px; height:36px; border-radius:50%; background:#EEF2FF; color:#315EDB; font-size:18px; }
@media(max-width:640px) { #room-messages .room-image-thumbnail { width:180px; } #room-messages .room-image-thumbnail img { height:125px; } }
/* Community settings: centered workspace, clear sections, visible upload actions. */
.community-settings { width:100%; max-width:1220px; margin-inline:auto; }
.settings-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-block:8px 24px; }
.settings-heading h1 { font-size:28px; font-weight:800; margin-bottom:6px; }
.settings-sections { display:flex; gap:10px; margin-bottom:22px; }
.settings-sections a { padding:8px 16px; border-radius:9px; color:#315EDB; background:#FFFFFF; border:1px solid #E5E7EB; font-size:13px; }
.settings-sections a:hover { background:#EEF2FF; border-color:#8CA9FF; }
.settings-card { scroll-margin-top:20px; padding:28px!important; }
.settings-card-heading { display:flex; align-items:center; gap:12px; margin-bottom:26px; padding-bottom:20px; border-bottom:1px solid #E5E7EB; }
.settings-section-icon { display:flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:12px; background:#EEF2FF; color:#315EDB; font-size:13px; font-weight:700; flex-shrink:0; }
.settings-card-heading h2 { font-size:18px; font-weight:700; }
.settings-card-heading p { font-size:12px; color:#6B7280; margin-top:3px; }
html[data-brand] .community-settings textarea,html[data-brand] .community-settings select,html[data-brand] .community-settings input[type=text] { background:#FFFFFF!important; border:1px solid #DDE1E8!important; border-radius:10px; min-height:46px; }
.community-settings textarea { line-height:1.9; }
.community-settings label[for] { font-weight:600; }
.community-settings label:has(input[name=show_member_count]) { padding-top:8px; }
.community-settings label:has(input[name=show_member_count])>span:first-of-type { background:#D1D5DB!important; }
.community-settings input[name=show_member_count]:checked+span { background:#315EDB!important; }
.community-settings input[name=show_member_count]:focus-visible+span { outline:2px solid #315EDB; outline-offset:3px; }
.community-settings .settings-identity>div:not(.settings-card-heading) { margin-bottom:20px; padding-bottom:20px; }
.community-settings button[id$='choose-btn'] { min-height:42px; padding:10px 18px; background:#EEF2FF; border:1px solid #DCE4FC; color:#315EDB; font-weight:600; }
.community-settings button[id$='choose-btn']:hover { background:#E0E7FF; }
.settings-identity>div:has(#cover_image),.settings-identity>div:has(#discover_cover_image) { background:#FAFBFD; border:1px solid #E5E7EB; border-radius:12px; padding:18px; }
.settings-identity #landing-cover-preview-wrap { height:130px; }
.settings-identity #landing-discover-cover-preview-wrap { height:100px; }
.settings-identity #landing-logo-preview-wrap { width:76px; height:76px; }
html[data-brand] .settings-identity label:has(input[name=brand_color]) { background:transparent!important; border-radius:50%; padding:3px; border:2px solid transparent; }
html[data-brand] .settings-identity label:has(input[name=brand_color]:checked) { border-color:#315EDB!important; box-shadow:0 0 0 2px #FFFFFF inset; }
.settings-identity label:has(input[name=brand_color]) span { border:0!important; width:32px; height:32px; }
.community-settings .owner-save-bar { margin-top:24px; box-shadow:0 4px 16px #171A2108; }
.community-settings .owner-save-bar .btn-primary { padding:12px 26px; border-radius:10px; }
@media(max-width:767px) { .settings-heading { align-items:flex-start; flex-direction:column; gap:14px; } .settings-heading h1 { font-size:24px; } .settings-card { padding:20px!important; } .settings-card-heading { margin-bottom:20px; } .community-settings .owner-save-bar { flex-direction:column; align-items:stretch; } }
.dm-page { max-width:1300px; margin-inline:auto; }
.dm-layout { display:grid; grid-template-columns:310px minmax(0,1fr); border:1px solid #E5E7EB; background:#FFFFFF; border-radius:18px; overflow:hidden; height:calc(100dvh - 260px); min-height:480px; }
.dm-sidebar { overflow-y:auto; border-inline-end:1px solid #E5E7EB; }
.dm-sidebar>h2,.dm-members>summary { font-size:15px; font-weight:700; padding:18px; }
.dm-contact { display:flex; gap:12px; align-items:center; padding:14px 18px; width:100%; text-align:start; border-bottom:1px solid #F2F3F5; }
.dm-contact:hover,.dm-contact.is-selected { background:#EEF2FF; }
.dm-contact>span:last-child { min-width:0; flex:1; }
.dm-contact strong { display:block; font-size:14px; overflow-wrap:anywhere; }
.dm-contact small { display:block; color:#6B7280; font-size:12px; margin-top:4px; overflow-wrap:anywhere; }
.dm-avatar { width:40px; height:40px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:#EEF2FF; color:#315EDB; border-radius:50%; font-size:13px; font-weight:700; }
.dm-hint { font-size:13px; color:#6B7280; padding:16px; line-height:1.9; }
.dm-search { display:flex; gap:8px; margin:0 14px 14px; }
.dm-search input { width:100%; min-width:0; border:1px solid #E5E7EB; border-radius:9px; padding:8px; font-size:12px; }
.dm-search button { padding:8px 12px; }
.dm-thread { display:flex; flex-direction:column; min-width:0; min-height:0; }
.dm-thread-heading { display:flex; align-items:center; gap:12px; padding:18px; border-bottom:1px solid #E5E7EB; }
.dm-thread-heading h2 { font-weight:700; font-size:15px; }
.dm-thread-heading p { font-size:12px; color:#6B7280; }
.dm-back { display:none; }
.dm-messages { flex:1; overflow-y:auto; padding:24px; background:#FAFBFD; display:flex; flex-direction:column; gap:14px; overscroll-behavior:contain; }
.dm-message { align-self:flex-end; max-width:80%; }
.dm-message.is-own { align-self:flex-start; }
.dm-message p { border:1px solid #E5E7EB; border-radius:14px; background:#FFFFFF; color:#171A21; padding:10px 14px; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
.dm-message.is-own p { background:#315EDB; color:#FFFFFF; border-color:#315EDB; }
.dm-message time { display:block; color:#6B7280; font-size:11px; margin:4px 4px 0; }
.dm-composer { padding:16px; border-top:1px solid #E5E7EB; }
.dm-composer form { display:flex; gap:10px; align-items:flex-end; }
.dm-composer textarea { flex:1; min-width:0; max-height:140px; min-height:44px; padding:10px 12px; border:1px solid #E5E7EB; border-radius:10px; resize:none; }
.dm-composer [role=status] { font-size:12px; color:#6B7280; margin-top:6px; }
.dm-welcome { align-items:center; justify-content:center; text-align:center; padding:30px; background:#FAFBFD; }
.dm-welcome h2 { font-size:22px; font-weight:700; margin:16px 0 8px; }
.dm-welcome-icon { background:#EEF2FF; color:#315EDB; border-radius:22px; width:76px; height:76px; display:flex; align-items:center; justify-content:center; font-size:36px; }
.dm-empty { margin:auto; text-align:center; }
#direct-new[hidden] { display:none; }
@media(max-width:767px) { .dm-layout { grid-template-columns:1fr; min-height:420px; height:calc(100dvh - 270px); } .dm-layout:not(.has-conversation) .dm-welcome { display:none; } .dm-layout.has-conversation .dm-sidebar { display:none; } .dm-back { display:block; color:#315EDB; font-size:24px; } .dm-messages { padding:16px; } .dm-composer { padding:12px; } }
.room-sender-link { text-align:start; overflow-wrap:anywhere; color:#315EDB; border-radius:4px; }
.room-sender-link:hover { text-decoration:underline; text-underline-offset:4px; }
.room-sender-link span { font-size:11px; opacity:.7; }
/* Let private conversations use the full workspace, without a duplicate page intro. */
.dm-page { max-width:none; }
.dm-page .dm-layout { height:var(--dm-available-height,calc(100dvh - 130px)); min-height:320px; grid-template-columns:290px minmax(0,1fr); border-radius:18px; box-shadow:0 4px 20px #171A2104; }
.dm-thread-heading { padding:12px 20px; min-height:68px; flex-shrink:0; }
.dm-thread-heading .dm-avatar { width:36px; height:36px; }
.dm-sidebar>h2 { padding:20px; border-bottom:1px solid #E5E7EB; }
.dm-composer { padding:12px 18px; flex-shrink:0; }
.dm-composer form { border:1px solid #E5E7EB; border-radius:14px; padding:5px; background:#FFFFFF; align-items:flex-end; }
html[data-brand] .dm-composer textarea { border:0; background:transparent; padding:8px 12px; min-height:42px; line-height:1.7; overflow-y:hidden; }
.dm-composer .owner-primary { border-radius:10px; min-height:42px; padding:9px 18px; }
.dm-composer [role=status]:empty { display:none; }
@media(max-width:767px) { .dm-page .dm-layout { grid-template-columns:1fr; height:var(--dm-available-height,calc(100dvh - 110px)); min-height:320px; } .dm-composer { padding:10px; } .dm-thread-heading { padding:12px 14px; } }
/* My communities: a focused member library, with clear entry and quiet secondary actions. */
.mine-page { width:100%; max-width:1240px; margin-inline:auto; padding:8px 0 30px; }
.mine-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:38px; }
.mine-heading h1 { font-size:30px; font-weight:800; margin-bottom:8px; }
.mine-heading>.btn-primary { padding:12px 20px; border-radius:10px; }
.mine-section-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.mine-section-heading h2 { font-size:18px; font-weight:700; }
.mine-explore-link { color:#315EDB; font-size:13px; font-weight:600; }
.mine-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; align-items:start; }
.mine-community { border:1px solid #E5E7EB; background:#FFFFFF; border-radius:18px; overflow:visible; box-shadow:0 4px 16px #171A2103; transition:border-color .15s,box-shadow .15s; }
.mine-community:hover { border-color:#B4C5F8; box-shadow:0 8px 24px #315EDB08; }
.mine-cover { display:block; position:relative; height:134px; border-radius:18px 18px 0 0; overflow:hidden; background:linear-gradient(120deg,#DCE5FF,#EEF2FF 65%,#FAF9F6); }
.mine-cover>img { width:100%; height:100%; object-fit:cover; }
.mine-cover-decoration { position:absolute; inset:0; background:radial-gradient(circle at 90% 80%,#FFFFFF99 0 70px,transparent 71px); }
.mine-cover-decoration svg { position:absolute; width:112px; height:112px; color:#315EDB; opacity:.14; left:26px; top:16px; transform:rotate(-12deg); }
.mine-role { position:absolute; top:16px; right:16px; border-radius:7px; background:#FFFFFFEE; color:#315EDB; padding:5px 10px; font-size:11px; font-weight:600; }
.mine-card-body { padding:0 22px 16px; }
.mine-identity { display:flex; flex-direction:column; align-items:flex-start; gap:14px; position:relative; margin-top:-26px; }
.mine-avatar { width:56px; height:56px; border:4px solid #FFFFFF; border-radius:16px; background:#315EDB; color:#FFFFFF; font-weight:700; display:flex; justify-content:center; align-items:center; overflow:hidden; font-size:17px; }
.mine-avatar img { width:100%; height:100%; object-fit:cover; }
.mine-identity h3 { font-size:18px; font-weight:700; overflow-wrap:anywhere; line-height:1.7; }
.mine-description { color:#6B7280; font-size:13px; line-height:1.9; min-height:50px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:8px 0 16px; }
.mine-members { display:flex; align-items:center; gap:6px; font-size:12px; color:#6B7280; margin-bottom:18px; }
.mine-enter { display:flex; align-items:center; justify-content:space-between; padding:11px 16px; border-radius:10px; font-size:14px; font-weight:600; }
.mine-card-footer { display:flex; align-items:center; justify-content:space-between; border-top:1px solid #F2F3F5; margin-top:16px; padding-top:12px; }
.mine-card-footer>a { color:#6B7280; font-size:12px; }
.mine-card-footer>a:hover { color:#315EDB; }
.mine-options { position:relative; }
.mine-options summary { color:#6B7280; border-radius:7px; min-width:32px; min-height:32px; display:flex; align-items:center; justify-content:center; letter-spacing:2px; }
.mine-options summary:hover { background:#EEF2FF; }
.mine-options form { position:absolute; bottom:38px; left:0; z-index:5; background:#FFFFFF; padding:6px; min-width:155px; border:1px solid #E5E7EB; border-radius:9px; box-shadow:0 8px 24px #171A2110; }
.mine-options button { color:#DC2626; padding:10px 12px; font-size:12px; white-space:nowrap; width:100%; text-align:start; border-radius:6px; }
.mine-options button:hover { background:#FEF2F2; }
.mine-empty { background:#FFFFFF; border:1px dashed #CCD7F2; border-radius:18px; padding:56px 24px; text-align:center; }
.mine-empty-icon { display:flex; align-items:center; justify-content:center; width:64px; height:64px; background:#EEF2FF; color:#315EDB; font-size:30px; border-radius:18px; margin:0 auto 18px; }
.mine-empty h3 { font-size:22px; font-weight:700; }
.mine-empty p { font-size:14px; line-height:1.9; color:#6B7280; max-width:420px; margin:12px auto 22px; }
@media(max-width:1100px) { .mine-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) { .mine-grid { grid-template-columns:1fr; } .mine-heading { align-items:flex-start; flex-direction:column; gap:16px; margin-bottom:26px; } .mine-section-heading { align-items:flex-start; flex-direction:column; gap:8px; } .mine-heading h1 { font-size:26px; } }
.workspace-notice { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 14px; border:1px solid var(--notice-border,#dce6ff); border-radius:12px; background:var(--notice-bg,#f3f6ff); color:var(--notice-color,#315edb); font-size:13px; line-height:1.5; flex-shrink:0; min-width:0; box-shadow:0 3px 12px rgba(23,26,33,.025); }
.workspace-notice-message { display:flex; align-items:center; gap:10px; min-width:0; overflow-wrap:anywhere; }
.workspace-notice-warning { --notice-bg:#fff8eb; --notice-border:#f5dfb5; --notice-color:#91600b; }
.workspace-notice-success { --notice-bg:#effaf4; --notice-border:#cbead8; --notice-color:#187447; }
.workspace-notice-error { --notice-bg:#fff2f2; --notice-border:#f4d0d0; --notice-color:#b42323; }
.workspace-notice-action { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; padding:5px 12px; border-radius:8px; background:#f1ac32; color:#382600; font-size:12px; font-weight:600; text-decoration:none; transition:background .15s; }
.workspace-notice-action:hover { background:#eaa022; }
.workspace-notice-message > svg { flex-shrink:0; align-self:center; margin-top:0; }
@media(max-width:640px) { .workspace-notice { padding:8px 12px; gap:8px; font-size:12px; flex-wrap:wrap; } .workspace-notice-action { margin-inline-start:auto; } }
.workspace-topbar { position:sticky; top:12px; z-index:30; min-height:64px; padding:10px 14px; border:1px solid #e5e7eb; border-radius:18px; background:#fff; box-shadow:0 5px 20px rgba(23,26,33,.05); flex-shrink:0; }
.workspace-topnav { overflow-x:auto; flex-wrap:nowrap; scrollbar-width:thin; padding-block:2px; }
.workspace-topnav > a { border-radius:12px; flex-shrink:0; }
.workspace-identity { min-height:40px; padding-inline-start:14px; border-inline-start:1px solid #e5e7eb; }
@media(max-width:767px) { .workspace-topbar { top:8px; min-height:58px; padding:9px 12px; border-radius:16px; } .workspace-identity { border:0; padding:0; } }
