.community-bubble{position:fixed;right:22px;bottom:24px;width:60px;height:60px;display:grid;place-items:center;border:1px solid #ffffff80;border-radius:22px;background:linear-gradient(145deg,#6c5ce7,#3d83cd);box-shadow:0 8px 26px #304a8050;color:white;z-index:1001;cursor:pointer}.community-bubble svg{width:30px;height:30px}.community-panel{position:fixed;right:22px;bottom:96px;width:min(430px,calc(100vw - 24px));max-height:calc(100dvh - 120px);overflow:auto;z-index:1002;border:1px solid var(--line,#dfe3ee);border-radius:22px;background:var(--reading-surface,#fff);color:var(--ink,#243047);box-shadow:0 18px 65px #152a4b40}.community-header{display:flex;align-items:center;justify-content:space-between;padding:20px;background:linear-gradient(120deg,#6857d918,#258eb512);border-bottom:1px solid var(--line,#ddd)}.community-header small{font-size:10px;letter-spacing:.12em}.community-header h2{margin:6px 0 0;font-size:21px}.community-panel button,#community-admin button{font:inherit;cursor:pointer;border:1px solid var(--line,#dce0eb);border-radius:9px;padding:8px 12px;color:inherit;background:var(--reading-soft,#f2f4fa)}.community-header button{font-size:24px}.community-tabs{display:flex;gap:8px;padding:12px}.community-tabs button{flex:1}.community-tabs button[aria-selected=true]{background:#6655d8!important;color:white!important;border-color:transparent!important}.community-summary{display:flex;align-items:center;justify-content:space-between;padding:0 16px;font-size:12px}.community-intro{font-size:12px;line-height:1.65;margin:12px 16px;color:var(--muted,#637087)}.community-feed{height:290px;overflow-y:auto;overscroll-behavior:contain;padding:0 14px;overflow-anchor:none}.community-message{padding:12px;margin:10px 0;border:1px solid var(--line,#e1e5ee);border-radius:13px;background:var(--reading-soft,#f7f8fc)}.community-author{display:flex;gap:8px;align-items:baseline;justify-content:space-between}.community-author strong{font-size:13px;overflow-wrap:anywhere}.community-author time{font-size:10px;color:var(--muted,#718099);flex-shrink:0}.community-message p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;margin:8px 0}.community-message blockquote{margin:8px 0;padding:7px 10px;border-left:3px solid #8779dc;font-size:11px;color:var(--muted,#637087);overflow-wrap:anywhere}.community-actions{display:flex;gap:6px;flex-wrap:wrap}.community-actions button{font-size:11px!important;padding:5px 9px!important}.community-stars{color:#c58b1e}.community-compose{padding:14px;border-top:1px solid var(--line,#ddd);display:grid;gap:10px}.community-compose label{display:grid;gap:6px;font-size:12px}.community-compose select,.community-compose textarea{box-sizing:border-box;width:100%;border:1px solid var(--line,#ddd);border-radius:10px;padding:10px;background:var(--reading-surface,#fff);color:inherit;font:inherit}.community-compose textarea{resize:vertical;max-height:180px;font-size:13px}.community-compose>div:last-child{display:flex;justify-content:space-between;gap:10px;align-items:center}.community-compose small{font-size:11px}.community-compose button[type=submit]{background:#6554d8!important;color:white!important}.community-contact{padding:25px;line-height:1.8}.community-contact>span{font-size:11px;color:#8173d6}.community-contact a{display:inline-block;margin:12px 0;background:#6554d8;color:#fff;padding:12px 18px;border-radius:12px;text-decoration:none}.community-panel [data-status],#community-admin [data-status]{padding:0 16px;font-size:12px;color:var(--muted,#637087)}#community-admin .community-feed{height:440px}#community-admin [data-blocked]{padding:16px}#community-admin [data-blocked] p{display:flex;justify-content:space-between}.community-panel [hidden],#community-admin [hidden]{display:none!important}@media(max-width:480px){.community-panel{right:12px;bottom:86px;max-height:calc(100dvh - 100px)}.community-feed{height:220px}.community-bubble{right:16px;bottom:16px;width:56px;height:56px}.community-author{flex-wrap:wrap}.community-header{padding:15px}}

html[data-theme="dark"] :is(.community-panel,#community-admin){--reading-surface:#202938;--reading-soft:#182130;--line:#374357;--ink:#e5eaf4;--muted:#acb8cd} .community-bubble{touch-action:none} .community-bubble:focus-visible{outline:3px solid #9c8eff;outline-offset:4px}
.community-bubble{left:0;top:0;right:auto;bottom:auto;box-sizing:border-box;width:56px;height:56px;padding:12px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(125deg,#268be9,#6855df,#c14dbe,#268be9);background-size:300% 300%;animation:community-color 7s ease-in-out infinite;will-change:transform;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;isolation:isolate}
.community-bubble svg{width:32px;height:32px;pointer-events:none}
.community-bubble::before{content:'';position:absolute;inset:-5px;border:1px solid #8a83ed70;border-radius:50%;animation:community-glow 3s ease-in-out infinite;pointer-events:none;z-index:-1}
.community-bubble-label{position:absolute;top:calc(100% + 5px);left:50%;transform:translateX(-50%);font:600 10px/1.2 system-ui,sans-serif;white-space:nowrap;color:var(--ink,#243047);pointer-events:none;text-shadow:0 1px 5px var(--reading-surface,#fff)}
.community-bubble.is-dragging{cursor:grabbing;box-shadow:0 8px 22px #304a8040}
.community-bubble.is-dragging::before{animation:none;opacity:0}
@keyframes community-color{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
@keyframes community-glow{0%,100%{opacity:.3;transform:scale(.96)}50%{opacity:.85;transform:scale(1.08)}}
@media(max-width:480px){.community-bubble{width:52px;height:52px;padding:10px}.community-bubble svg{width:30px;height:30px}}
@media(prefers-reduced-motion:reduce){.community-bubble,.community-bubble::before{animation:none}}

.community-message{max-width:88%;margin-right:auto;border-radius:16px 16px 16px 4px}.community-message.is-own{margin-left:auto;margin-right:0;background:linear-gradient(135deg,#6958d91a,#428bd51a);border-color:#8a7ae15c;border-radius:16px 16px 4px 16px}.community-author{gap:6px;flex-wrap:wrap}.community-author strong{color:#7564d2}.community-message.is-own .community-author strong{color:#477bc2}.community-feed{scrollbar-width:thin}.community-compose textarea:focus{outline:2px solid #8c7ee3;outline-offset:2px}

html.community-chat-open{overflow:hidden}
dialog.community-panel{box-sizing:border-box;inset:0;margin:auto;transform:none;width:min(440px,calc(100vw - 32px));height:min(620px,82dvh);max-height:calc(100dvh - 32px);padding:0;overflow:hidden;border-radius:22px;font-family:system-ui,-apple-system,sans-serif}
dialog.community-panel[open]{display:flex;flex-direction:column}
dialog.community-panel::backdrop{background:rgb(12 19 36 / 45%);backdrop-filter:blur(3px)}
dialog.community-panel>[data-public]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto}
dialog.community-panel .community-feed{height:auto;flex:1;min-height:70px;background:var(--reading-soft,#f7f8fc);padding:10px 14px}
dialog.community-panel .community-header,dialog.community-panel .community-tabs,dialog.community-panel .community-compose{flex-shrink:0}
.community-panel .community-header{padding:14px 16px;background:var(--reading-surface,#fff);gap:10px}
.community-panel .community-header small{font-size:8px;letter-spacing:.1em;color:var(--muted,#758297)}
.community-panel .community-header h2{font-size:17px;line-height:1.3;margin:4px 0 0;letter-spacing:-.3px}
dialog.community-panel .community-header [data-close]{min-width:34px;min-height:34px;width:34px;height:34px;padding:0;border:0;border-radius:50%;font-size:23px;display:grid;place-items:center;flex-shrink:0}
.community-panel [data-close]:focus:not(:focus-visible){outline:none;box-shadow:none}
.community-panel .community-tabs{padding:8px 12px;gap:6px;border-bottom:1px solid var(--line,#e5e8f0)}
.community-panel .community-tabs button{padding:8px 10px;font-size:12px;font-weight:650;border:0;border-radius:10px}
.community-panel .community-summary{padding:6px 14px;font-size:11px;min-height:30px;box-sizing:border-box}
.community-panel .community-summary button{font-size:10px;padding:4px 8px;background:transparent;border:0;color:var(--muted,#637087)}
.community-rules{padding:0 14px 8px;font-size:11px;color:var(--muted,#637087)}
.community-rules summary,.community-review summary{cursor:pointer;list-style:none}
.community-rules summary::after{content:' ⌄';font-size:12px}.community-rules[open] summary::after{content:' ⌃'}
.community-rules .community-intro{margin:8px 0 0;font-size:11px;line-height:1.6}
.community-message{box-sizing:border-box;width:fit-content;max-width:88%;padding:9px 11px;margin:8px 0;border:1px solid var(--line,#e5e8f0);background:var(--reading-surface,#fff);box-shadow:0 2px 5px #1b244006;border-radius:15px 15px 15px 4px}
.community-message.is-own{background:#6856d6;color:#fff;border-color:transparent;border-radius:15px 15px 4px 15px}
.community-author{gap:6px;flex-wrap:nowrap;align-items:center;justify-content:flex-start}
.community-avatar{width:22px;height:22px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;background:#8073dc18;color:#7564d2;font-size:10px;font-weight:700}
.community-author strong{font-size:11px;line-height:1.35;color:#6c5cbd}
.community-author time{font-size:9px;margin-left:auto;color:var(--muted,#7f8a9d)}
.community-message.is-own .community-author strong,.community-message.is-own .community-author time{color:#ffffffd9}
.community-message.is-own .community-avatar{background:#ffffff24;color:#fff}
.community-message p{font-size:13px;line-height:1.6;margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.community-message .community-actions button{background:transparent;border:0;padding:2px 0!important;min-height:24px;font-size:10px!important;opacity:.7}
.community-message .community-actions{gap:12px}
.community-message.is-own blockquote{color:#ffffffd9;border-color:#ffffff70;background:#ffffff12;border-radius:4px}
.community-message.is-own .community-stars{color:#ffe18a}
.community-compose{grid-template-columns:minmax(0,1fr) 40px;gap:6px 8px;padding:10px 12px;background:var(--reading-surface,#fff)}
.community-review{grid-column:1/-1;grid-row:1;font-size:11px;color:var(--muted,#748096)}
.community-review summary{width:fit-content;padding:3px 0}.community-review[open]{padding-bottom:4px}
.community-review label{margin-top:6px}.community-review select{font-size:13px;padding:8px}
.community-compose>[data-reply]{grid-row:2;grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;font-size:11px;background:var(--reading-soft,#f4f5fa);padding:5px 8px;border-radius:8px}
.community-compose>textarea{grid-column:1;grid-row:3;min-height:40px;height:40px;max-height:96px;resize:none;padding:9px 12px;border-radius:18px;font-size:16px;line-height:20px;background:var(--reading-soft,#f4f5fa)}
.community-compose>div:last-child{display:contents}
.community-compose>div:last-child>small{grid-column:1/-1;grid-row:4;font-size:10px;line-height:1.4;color:var(--muted,#7f8a9d);padding:0 4px}
.community-compose button[type=submit]{grid-column:2;grid-row:3;width:40px;height:40px;min-width:40px;padding:10px!important;border-radius:50%!important;align-self:end;border:0}
.community-compose button[type=submit] svg{width:20px;height:20px;display:block}
.community-panel [data-status]:empty{display:none}.community-panel [data-status]{margin:4px 0;font-size:11px}
.community-panel [data-older]{font-size:11px;padding:5px;border:0;background:transparent}
.community-panel .community-contact{padding:20px;font-size:13px;overflow:auto}.community-panel .community-contact h3{font-size:18px}
.community-bubble[hidden]{display:none!important}
@media(max-width:480px){dialog.community-panel{width:calc(100vw - 24px);height:min(560px,78dvh);max-height:calc(100dvh - 24px);border-radius:20px}.community-panel .community-header{padding:12px 14px}.community-panel .community-header h2{font-size:16px}.community-panel .community-header small{font-size:8px}.community-panel .community-tabs{padding:7px 10px}.community-panel .community-message{max-width:92%}.community-compose{padding:9px 10px}.community-panel .community-feed{padding:8px 10px}}
@media(max-height:520px){dialog.community-panel{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}.community-panel .community-header small,.community-panel .community-rules{display:none}.community-panel .community-header{padding:8px 12px}.community-panel .community-tabs{padding:4px 10px}}
/* Phone: a clean chat screen, without a grey frame around the conversation. */
@media(max-width:600px){
 dialog.community-panel{inset:0;margin:0;width:100%;max-width:100%;height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;border:0;border-radius:0;box-shadow:none;background:var(--reading-surface,#fff)}
 dialog.community-panel::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
 dialog.community-panel .community-header{padding-top:max(12px,env(safe-area-inset-top));padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
 dialog.community-panel .community-compose{padding-bottom:max(10px,env(safe-area-inset-bottom))}
 dialog.community-panel>[data-public]{overflow:hidden}
 dialog.community-panel .community-feed{min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
 dialog.community-panel .community-review[open],dialog.community-panel .community-rules[open]{max-height:110px;overflow-y:auto;flex-shrink:0}
}
