/* CUP community is an independent window; no studio page layout overrides. */
.top-actions .cup-community-entry{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:6px 12px;border:1px solid color-mix(in srgb,#926bcb 40%,var(--line,#d5dce8));border-radius:11px;background:color-mix(in srgb,#926bcb 6%,var(--panel,#fff));color:color-mix(in srgb,#926bcb 80%,var(--text,#233146));font:500 12px/1.5 var(--studio-ui-font,Arial,"Microsoft YaHei",sans-serif);white-space:nowrap;cursor:pointer;box-shadow:0 2px 4px #65438d08}
.top-actions .cup-community-entry svg{width:16px;height:16px}.top-actions .cup-community-entry[aria-expanded=true]{background:color-mix(in srgb,#926bcb 14%,var(--panel,#fff))}
.top-actions .cup-community-entry{position:relative}
.top-actions .cup-community-entry .cup-community-unread-dot{position:absolute;top:1px;right:1px;width:8px;height:8px;border-radius:50%;background:#e55e70;box-shadow:0 0 0 2px var(--panel,#fff);pointer-events:none}
.top-actions .cup-community-entry .cup-community-unread-dot[hidden]{display:none}
#cup-community-root{--cc-paper:var(--panel,#fff);--cc-ink:var(--text,#1d2c43);--cc-muted:var(--muted,#738098);--cc-line:var(--line,#dfe4ee);--cc-soft:color-mix(in srgb,var(--cc-paper) 95%,#9277bb);--cc-purple:#946dc8;--cc-purple-ink:color-mix(in srgb,#946dc8 85%,var(--cc-ink));--cc-lilac:color-mix(in srgb,#946dc8 12%,var(--cc-paper));position:fixed;inset:0;z-index:170;pointer-events:none;font:13px/1.6 var(--studio-ui-font,Arial,"Microsoft YaHei",sans-serif);color:var(--cc-ink)}
#cup-community-root *{box-sizing:border-box}#cup-community-root [hidden]{display:none!important}#cup-community-root button,#cup-community-root input,#cup-community-root textarea,#cup-community-root select{font:inherit}#cup-community-root button{cursor:pointer}#cup-community-root button:disabled{cursor:not-allowed;opacity:.45}#cup-community-root :is(button,input,textarea,select):focus-visible{outline:2px solid var(--cc-purple);outline-offset:3px}#cup-community-root svg{width:16px;height:16px;flex:none}#cup-community-root h1,#cup-community-root h2,#cup-community-root h3,#cup-community-root p{margin:0}
#cup-community-root .cc-window{pointer-events:auto;position:fixed;top:76px;right:20px;width:min(1100px,calc(100vw - 280px));height:min(780px,calc(100dvh - 100px));min-width:min(340px,calc(100vw - 16px));min-height:min(360px,calc(100dvh - 100px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px);display:flex;flex-direction:column;overflow:hidden;resize:both;container-type:inline-size;background:var(--cc-soft);border:1px solid color-mix(in srgb,#9c85c0 25%,var(--cc-line));border-radius:17px;box-shadow:0 18px 70px #2533542b,0 2px 7px #25335412}
#cup-community-root[data-mode=expanded] .cc-window{left:var(--studio-sidebar,232px);right:0;top:58px;bottom:0;width:auto;height:calc(100dvh - 58px);min-width:0;max-width:none;max-height:none;border:0;border-left:1px solid var(--cc-line);border-radius:0;resize:none}
#cup-community-root[data-mode=full] .cc-window,#cup-community-root .cc-window:fullscreen{inset:0;width:100vw;height:100dvh;min-width:0;max-width:none;max-height:none;border-radius:0;border:0;resize:none;background:var(--cc-soft)}
#cup-community-root .cc-windowbar{display:flex;flex:none;flex-wrap:wrap;gap:10px;align-items:center;padding:10px 14px;background:var(--cc-paper);border-bottom:1px solid var(--cc-line);user-select:none;cursor:grab;touch-action:none}
#cup-community-root .cc-window-title{display:flex;gap:8px;align-items:center;margin-right:auto;white-space:nowrap}#cup-community-root .cc-window-title svg{color:var(--cc-purple)}#cup-community-root .cc-window-title strong{font-size:13px;font-weight:650}
#cup-community-root .cc-window-actions{display:flex;align-items:center;gap:2px}#cup-community-root .cc-divider{display:block;width:1px;height:17px;background:var(--cc-line);margin-inline:5px}
#cup-community-root .cc-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;gap:5px;min-height:29px;min-width:29px;padding:5px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--cc-muted);font-size:11px;line-height:1.5}
#cup-community-root .cc-icon:hover{background:var(--cc-lilac);color:var(--cc-purple-ink)}#cup-community-root .cc-zoom{min-width:43px;font-variant-numeric:tabular-nums}
#cup-community-root .cc-content{display:flex;flex-direction:column;flex:1;min-height:0;padding:20px 20px 12px;overflow:hidden;zoom:var(--cc-scale,1)}
#cup-community-root .cc-heading{display:flex;flex:none;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:17px}#cup-community-root .cc-heading h1{font-size:23px;font-weight:650;letter-spacing:-.6px;line-height:1.5}#cup-community-root .cc-heading p{color:var(--cc-muted);font-size:11px;margin-top:3px}#cup-community-root .cc-heading-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}#cup-community-root .cc-moderation-entry{color:var(--cc-muted);font-size:11px}
#cup-community-root .cc-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 12px;border:1px solid var(--cc-line);border-radius:8px;background:var(--cc-paper);color:var(--cc-ink);font-size:12px;line-height:1.5;white-space:nowrap;box-shadow:none}
#cup-community-root .cc-button:hover{border-color:color-mix(in srgb,var(--cc-purple) 40%,var(--cc-line));background:var(--cc-lilac)}#cup-community-root .cc-button.cc-primary{background:var(--cc-purple);border-color:var(--cc-purple);color:#fff}#cup-community-root .cc-button.cc-primary:hover{background:color-mix(in srgb,var(--cc-purple) 92%,#222)}#cup-community-root .cc-button.cc-danger{color:#b35e72;border-color:color-mix(in srgb,#b35e72 30%,var(--cc-line))}
#cup-community-root .cc-link{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:4px 1px;min-height:26px;font-size:11px;line-height:1.5;color:var(--cc-muted);background:transparent;border:0;border-radius:3px}#cup-community-root .cc-link:hover,#cup-community-root .cc-link[aria-pressed=true]{color:var(--cc-purple-ink)}#cup-community-root .cc-link svg{width:14px;height:14px}
#cup-community-root .cc-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,.65fr);gap:18px;min-height:0;flex:1}#cup-community-root .cc-feed{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}
#cup-community-root .cc-categories{display:flex;flex:none;flex-wrap:wrap;gap:4px}#cup-community-root .cc-category{display:inline-flex;justify-content:center;align-items:center;font-size:12px;line-height:1.5;min-height:30px;padding:6px 9px;border:0;border-radius:7px;background:transparent;color:var(--cc-muted)}#cup-community-root .cc-category[aria-pressed=true]{background:var(--cc-lilac);color:var(--cc-purple-ink)}
#cup-community-root .cc-posts{display:flex;flex:1;flex-direction:column;gap:11px;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:1px 3px 3px 0}
#cup-community-root .cc-post{padding:15px;border:1px solid var(--cc-line);border-radius:11px;background:var(--cc-paper);min-width:0;flex:none}#cup-community-root .cc-post>header{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px;font-size:11px;color:var(--cc-muted)}#cup-community-root .cc-post>header strong{font-size:12px;font-weight:600;color:var(--cc-ink)}#cup-community-root .cc-post time{font-size:11px}
#cup-community-root .cc-avatar{display:inline-grid;place-items:center;width:29px;height:29px;border-radius:50%;flex:none;background:color-mix(in srgb,#8ca8d9 20%,var(--cc-paper));color:color-mix(in srgb,#587ba8 80%,var(--cc-ink));font-size:12px;font-weight:600}#cup-community-root .cc-avatar.cc-self{background:var(--cc-lilac);color:var(--cc-purple-ink)}
#cup-community-root .cc-pill{font-size:11px;white-space:nowrap;border-radius:99px;background:var(--cc-lilac);color:var(--cc-purple-ink);padding:2px 7px;margin-left:auto}
#cup-community-root .cc-post-title{font-size:15px;line-height:1.65;letter-spacing:0;font-weight:600;display:block;margin:0 0 7px;border:0;background:transparent;padding:0;color:var(--cc-ink);text-align:left;overflow-wrap:anywhere}#cup-community-root .cc-post-title:hover{color:var(--cc-purple-ink)}
#cup-community-root .cc-post-excerpt{font-size:12px;line-height:1.9;color:var(--cc-muted);white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
#cup-community-root .cc-post-images{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}#cup-community-root .cc-post-images:empty{display:none}#cup-community-root .cc-post-image{display:block;width:calc((100% - 14px)/3);max-width:180px;padding:0;overflow:hidden;border:1px solid var(--cc-line);border-radius:8px;background:var(--cc-soft)}#cup-community-root .cc-post-image img{display:block;width:100%;aspect-ratio:1.2;object-fit:cover}
#cup-community-root .cc-post-actions{display:flex;align-items:center;gap:13px;margin-top:9px}#cup-community-root .cc-delete-action{margin-left:auto}
#cup-community-root .cc-pager{display:flex;align-items:center;gap:10px;justify-content:center;flex:none;color:var(--cc-muted);font-size:11px}#cup-community-root .cc-pager>.cc-icon{margin-left:auto}
#cup-community-root .cc-chat{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:var(--cc-paper);border:1px solid var(--cc-line);border-radius:12px}#cup-community-root .cc-chat>header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:15px 14px 12px;border-bottom:1px solid var(--cc-line)}#cup-community-root .cc-chat h2{font-size:16px;font-weight:650;line-height:1.5}
/* This window is mounted under body, outside the workbench's scoped palette. */
#cup-community-root .cc-chat{--studio-primary:#1c3b66;--studio-primary-text:#fff;--accent:#8cb7f1}
html[data-cup-theme=day] #cup-community-root .cc-chat{--studio-primary:#2462dd;--accent:#2463cf}
html[data-cup-theme=night] #cup-community-root .cc-chat{--studio-primary:#456fc4;--accent:#91b2ef}
#cup-community-root .cc-presence{color:var(--cc-muted);font-size:11px;display:inline-flex;align-items:center;gap:5px}#cup-community-root .cc-presence:before{content:'';width:5px;height:5px;border-radius:50%;background:var(--cc-muted)}#cup-community-root .cc-presence[data-connected=true]:before{background:#30ad7d;box-shadow:0 0 0 3px #30ad7d15}#cup-community-root .cc-chat-state{font-size:11px;color:var(--cc-muted);padding:8px 13px 0;flex:none}
#cup-community-root .cc-messages{display:flex;flex:1;flex-direction:column;gap:17px;min-height:0;overflow:auto;padding:17px 13px;overscroll-behavior:contain;scrollbar-width:thin}
/* Keep message rows full-width for alignment, but let each bubble fit its text. */
#cup-community-root .cc-message{display:flex;align-items:flex-start;gap:8px;min-width:0;flex:none;width:100%}
#cup-community-root .cc-message.cc-mine{flex-direction:row-reverse}
#cup-community-root .cc-message>.cc-avatar{width:30px;height:30px;border-radius:9px;font-size:12px;background:color-mix(in srgb,var(--accent,#2463cf) 12%,var(--cc-paper));color:var(--accent,#2463cf)}
#cup-community-root .cc-message.cc-mine>.cc-avatar{background:var(--studio-primary,#2462dd);color:var(--studio-primary-text,#fff)}
#cup-community-root .cc-message>div{display:flex;flex:0 1 auto;flex-direction:column;align-items:flex-start;min-width:0;max-width:min(75%,420px)}
#cup-community-root .cc-message.cc-mine>div{align-items:flex-end}
#cup-community-root .cc-message header{display:flex;align-self:stretch;align-items:center;gap:6px;flex-wrap:wrap;min-width:0;max-width:100%;font-size:11px;line-height:1.5;color:var(--cc-muted);margin-bottom:5px}
#cup-community-root .cc-message.cc-mine header{justify-content:flex-end;text-align:right}
#cup-community-root .cc-message header strong{min-width:0;max-width:100%;font-weight:600;color:var(--cc-ink);overflow-wrap:anywhere}
#cup-community-root .cc-message header time{flex:none;white-space:nowrap;font-variant-numeric:tabular-nums}
#cup-community-root .cc-message header .cc-icon{margin-left:0;min-width:22px;min-height:22px;padding:2px}
#cup-community-root .cc-message header svg{width:13px;height:13px}
#cup-community-root .cc-bubble{width:fit-content;min-width:0;max-width:100%;font-size:13px;line-height:1.75;padding:8px 11px;background:var(--raised,var(--cc-soft));border:1px solid var(--cc-line);border-radius:3px 12px 12px 12px;color:var(--cc-ink);text-align:start;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}
#cup-community-root .cc-mine .cc-bubble{background:var(--studio-primary,#2462dd);border-color:var(--studio-primary,#2462dd);color:var(--studio-primary-text,#fff);border-radius:12px 3px 12px 12px}
#cup-community-root .cc-message header .cc-recall{color:var(--accent,#2463cf);font-size:11px;white-space:nowrap}
#cup-community-root .cc-chat-form{display:block;margin:8px;padding:8px;border:1px solid color-mix(in srgb,var(--accent,#2463cf) 30%,var(--cc-line));border-radius:10px;background:var(--cc-paper);flex:none}#cup-community-root .cc-chat-input{display:block;width:100%;border:0;border-radius:4px;box-shadow:none;background:transparent;color:var(--cc-ink);font-size:12px;line-height:1.8;resize:none;padding:4px 5px;min-height:48px;max-height:130px}#cup-community-root .cc-chat-form footer{display:flex;gap:6px;align-items:center;flex-wrap:wrap}#cup-community-root .cc-chat-form small{font-size:10px;color:var(--cc-muted);margin-left:auto}#cup-community-root .cc-chat-form .cc-button{font-size:11px;min-height:28px;padding:4px 9px}
#cup-community-root .cc-chat .cc-button.cc-primary{background:var(--studio-primary,#2462dd);border-color:var(--studio-primary,#2462dd);color:var(--studio-primary-text,#fff)}
#cup-community-root .cc-chat .cc-button.cc-primary:hover{background:color-mix(in srgb,var(--studio-primary,#2462dd) 92%,#222)}
#cup-community-root .cc-chat :is(button,textarea):focus-visible{outline-color:var(--accent,#2463cf)}
@container(max-width:480px){#cup-community-root .cc-message>div{max-width:min(82%,calc(100% - 38px))}}
#cup-community-root .cc-window-foot{display:flex;align-items:center;justify-content:space-between;flex:none;gap:12px;padding:7px 17px;background:var(--cc-paper);border-top:1px solid var(--cc-line);font-size:10px;color:var(--cc-muted);min-height:31px}#cup-community-root .cc-resize-note{margin-left:auto}#cup-community-root .cc-undo{display:flex;align-items:center;gap:7px}#cup-community-root .cc-undo .cc-link{font-size:11px;min-height:20px;padding:0}
#cup-community-root .cc-empty{padding:28px 13px;color:var(--cc-muted);text-align:center;font-size:12px;line-height:1.9}#cup-community-root .cc-posts>.cc-empty{border:1px dashed var(--cc-line);border-radius:11px;background:var(--cc-paper)}
#cup-community-root .cc-access{padding:14px;display:flex;align-items:center;gap:12px;background:var(--cc-paper);border-bottom:1px solid var(--cc-line);font-size:12px;line-height:1.8;flex:none}#cup-community-root .cc-access .cc-button{margin-left:auto;flex:none}#cup-community-root .cc-locked{opacity:.75}
#cup-community-root .cc-pending{display:flex;align-items:center;gap:8px;padding:8px 11px;margin-bottom:12px;background:var(--cc-lilac);border:1px solid color-mix(in srgb,#946dc8 20%,var(--cc-line));border-radius:8px;color:var(--cc-purple-ink);font-size:11px;flex:none}#cup-community-root .cc-pending .cc-link{margin-left:auto;color:var(--cc-purple-ink);white-space:nowrap}
#cup-community-root .cc-pending{flex-direction:column;align-items:stretch}#cup-community-root .cc-pending>header,#cup-community-root .cc-pending>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}#cup-community-root .cc-pending small{font-size:11px}
#cup-community-root :is(.cc-feed-error,.cc-chat-error,.cc-compose-error,.cc-detail-error,.cc-delete-error){font-size:12px;color:#bc667b;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}#cup-community-root :is(.cc-feed-error,.cc-chat-error,.cc-compose-error,.cc-detail-error,.cc-delete-error):empty{display:none}#cup-community-root .cc-chat-error{padding:5px 12px}
#cup-community-root .cc-dock{pointer-events:auto;position:fixed;right:22px;bottom:22px;display:inline-flex;align-items:center;gap:9px;padding:13px 17px;border:1px solid color-mix(in srgb,#946dc8 35%,var(--cc-line));border-radius:13px;background:var(--cc-paper);color:var(--cc-purple-ink);font-size:13px;box-shadow:0 7px 28px #26304d1b}
#cup-community-root .cc-toast{pointer-events:none;position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:5;padding:11px 16px;max-width:calc(100vw - 32px);background:var(--cc-paper);border:1px solid color-mix(in srgb,#946dc8 25%,var(--cc-line));border-radius:10px;box-shadow:0 8px 30px #25335424;color:var(--cc-purple-ink);font-size:12px;overflow-wrap:anywhere}
#cup-community-root dialog{pointer-events:auto;width:min(580px,calc(100vw - 32px));max-width:580px;max-height:90dvh;overflow:auto;border:1px solid var(--cc-line);border-radius:15px;padding:23px;background:var(--cc-paper);color:var(--cc-ink);box-shadow:0 20px 100px #25335435;font:13px/1.7 var(--studio-ui-font,Arial,"Microsoft YaHei",sans-serif)}#cup-community-root dialog::backdrop{background:#1f2b454d;backdrop-filter:blur(3px)}
#cup-community-root .cc-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}#cup-community-root .cc-dialog-head h2{font-size:20px;font-weight:650}#cup-community-root .cc-dialog-head p{font-size:12px;color:var(--cc-muted);margin-top:4px}#cup-community-root .cc-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-top:19px}
#cup-community-root .cc-compose-form label{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;font-size:12px;color:var(--cc-muted)}#cup-community-root .cc-fields{display:grid;grid-template-columns:minmax(0,1fr) 145px;gap:12px}
#cup-community-root :is(.cc-compose-form input,.cc-compose-form textarea,.cc-compose-form select,.cc-comment-input){display:block;width:100%;min-width:0;border:1px solid var(--cc-line);border-radius:8px;background:var(--cc-soft);color:var(--cc-ink);font-size:13px;line-height:1.8;padding:10px 12px;box-shadow:none}#cup-community-root .cc-compose-form textarea{min-height:160px;resize:vertical}#cup-community-root .cc-attach-bar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;color:var(--cc-muted)}#cup-community-root .cc-attach-bar small{font-size:11px}
#cup-community-root .cc-attachments{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}#cup-community-root .cc-attachments>div{position:relative;width:86px;height:80px;border:1px solid var(--cc-line);border-radius:8px}#cup-community-root .cc-file-preview{display:block;width:100%;height:100%;padding:0;border:0;border-radius:8px;overflow:hidden;background:var(--cc-soft)}#cup-community-root .cc-file-preview img{display:block;width:100%;height:100%;object-fit:contain}#cup-community-root .cc-attachments>div>.cc-icon{position:absolute;top:-7px;right:-7px;border:1px solid var(--cc-line);border-radius:50%;width:22px;min-width:22px;height:22px;min-height:22px;padding:3px;background:var(--cc-paper)}
#cup-community-root .cc-detail{width:min(740px,calc(100vw - 32px));max-width:740px}#cup-community-root .cc-detail-body h2{font-size:22px;line-height:1.6;font-weight:650;overflow-wrap:anywhere}#cup-community-root .cc-detail-meta{display:flex;gap:9px;align-items:center;flex-wrap:wrap;color:var(--cc-muted);font-size:11px;margin:13px 0 18px}#cup-community-root .cc-detail-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.95}#cup-community-root .cc-detail-images .cc-post-image{max-width:210px}#cup-community-root .cc-comments{display:grid;gap:15px;border-top:1px solid var(--cc-line);margin-top:20px;padding:19px 0}
#cup-community-root .cc-comment{display:flex;gap:9px;align-items:flex-start;min-width:0}#cup-community-root .cc-comment>div{flex:1;min-width:0}#cup-community-root .cc-comment header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--cc-muted);font-size:11px}#cup-community-root .cc-comment header strong{font-weight:600;color:var(--cc-ink)}#cup-community-root .cc-comment header>.cc-icon{margin-left:auto;min-width:24px;min-height:24px}#cup-community-root .cc-comment p{font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:5px}#cup-community-root .cc-comment-form{display:flex;gap:9px;align-items:flex-end;margin-top:14px}#cup-community-root .cc-comment-input{min-height:70px;resize:vertical;flex:1}#cup-community-root .cc-more-comments{margin-bottom:8px}
#cup-community-root .cc-delete{max-width:440px}#cup-community-root .cc-delete h2{font-size:20px;margin-bottom:12px}#cup-community-root .cc-delete p{font-size:13px;color:var(--cc-muted)}#cup-community-root .cc-image-preview{max-width:1000px;width:min(1000px,calc(100vw - 32px))}#cup-community-root .cc-image-preview img{display:block;width:100%;height:auto;max-height:72dvh;object-fit:contain}#cup-community-root .cc-image-preview h2{font-size:16px;overflow-wrap:anywhere}
#cup-community-root .cc-discard{max-width:460px}#cup-community-root .cc-discard h2{font-size:20px;margin-bottom:12px}#cup-community-root .cc-discard p{font-size:13px;line-height:1.9;color:var(--cc-muted)}
#cup-community-root .cc-moderation{width:min(620px,calc(100vw - 32px));max-width:620px}#cup-community-root .cc-moderation-toggle{display:flex;align-items:center;gap:9px;padding:12px 14px;margin-bottom:18px;background:var(--cc-lilac);border:1px solid color-mix(in srgb,var(--cc-purple) 18%,var(--cc-line));border-radius:9px;color:var(--cc-ink);font-size:13px;cursor:pointer}#cup-community-root .cc-moderation-toggle input{margin:0;width:17px;height:17px;accent-color:var(--cc-purple);flex:none}#cup-community-root .cc-moderation-label{display:flex;flex-direction:column;gap:8px;color:var(--cc-muted);font-size:12px}#cup-community-root .cc-moderation textarea{display:block;min-width:0;width:100%;min-height:180px;max-height:40dvh;resize:vertical;border:1px solid var(--cc-line);border-radius:9px;padding:12px 14px;background:var(--cc-soft);color:var(--cc-ink);font-size:13px;line-height:1.8;box-shadow:none}#cup-community-root .cc-moderation-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 10px;font-size:10px;color:var(--cc-muted);margin-top:8px}#cup-community-root .cc-moderation-count{font-variant-numeric:tabular-nums}#cup-community-root .cc-moderation .cc-moderation-empty{font-size:12px;color:var(--cc-muted);line-height:1.8;margin-top:12px}#cup-community-root .cc-moderation-error{font-size:12px;color:#b75c72;line-height:1.8;overflow-wrap:anywhere}#cup-community-root .cc-moderation .cc-moderation-error:not(:empty){margin-top:12px}#cup-community-root .cc-moderation .cc-moderation-status{font-size:12px;color:var(--cc-purple-ink);margin-top:8px;line-height:1.8}#cup-community-root .cc-moderation .cc-dialog-actions{flex-wrap:wrap}#cup-community-root .cc-moderation-reload{margin-right:auto;font-size:11px;white-space:normal;text-align:left}#cup-community-root .cc-moderation button{overflow-wrap:anywhere}
#cup-community-root .cc-chat-policy{flex:none;margin:0 10px 8px;color:var(--cc-muted);font-size:10px;line-height:1.6;text-align:center;overflow-wrap:anywhere}
#cup-community-root .cc-mobile-tabs{display:none;gap:8px;margin-bottom:13px;flex:none}#cup-community-root .cc-mobile-tabs .cc-button{flex:1}#cup-community-root .cc-mobile-tabs [aria-pressed=true]{background:var(--cc-lilac);color:var(--cc-purple-ink)}
@container(max-width:700px){#cup-community-root .cc-layout{display:flex;flex-direction:column}#cup-community-root .cc-mobile-tabs{display:flex}#cup-community-root[data-community-view=posts] .cc-chat{display:none}#cup-community-root[data-community-view=chat] .cc-feed{display:none}#cup-community-root .cc-feed,#cup-community-root .cc-chat{flex:1;min-height:0}#cup-community-root .cc-chat-form small{font-size:11px}#cup-community-root .cc-heading h1{font-size:21px}}
@media(max-width:760px){.top-actions .cup-community-entry{min-height:33px;padding:5px 9px;font-size:11px}#cup-community-root .cc-window{top:70px;left:8px;right:8px;width:calc(100vw - 16px);height:calc(100dvh - 82px);max-width:calc(100vw - 16px)}#cup-community-root[data-mode=expanded] .cc-window{left:0;top:68px;width:100vw;height:calc(100dvh - 68px);border:0}#cup-community-root .cc-content{padding:17px 12px 10px}#cup-community-root .cc-windowbar{padding:9px;gap:5px}#cup-community-root .cc-window-actions{margin-left:auto}#cup-community-root .cc-window-actions .cc-divider{margin-inline:2px}#cup-community-root .cc-window-title strong{font-size:12px}#cup-community-root .cc-window-actions .cc-icon{min-width:27px;min-height:29px;padding:5px}#cup-community-root .cc-window-actions .cc-zoom{min-width:40px}#cup-community-root .cc-heading h1{font-size:20px}#cup-community-root .cc-heading p{font-size:11px}#cup-community-root .cc-resize-note{display:none}#cup-community-root .cc-fields{grid-template-columns:1fr}#cup-community-root .cc-compose-form :is(input,textarea,select),#cup-community-root .cc-chat-input,#cup-community-root .cc-comment-input{font-size:16px}#cup-community-root .cc-comment-form{flex-wrap:wrap}#cup-community-root .cc-comment-input{flex-basis:100%}#cup-community-root .cc-comment-send{margin-left:auto}#cup-community-root dialog{padding:20px;max-height:88dvh}}
@media(max-width:480px){.top-actions .cup-community-entry{width:34px;min-width:34px;padding:6px;gap:0}.top-actions .cup-community-entry span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}}
@media(pointer:coarse){#cup-community-root .cc-icon,#cup-community-root .cc-category,#cup-community-root .cc-button{min-height:42px;min-width:42px}}
@media(prefers-reduced-motion:reduce){#cup-community-root *{scroll-behavior:auto!important;transition:none!important}}
#cup-community-root .cc-feed-tools{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;flex:none}
#cup-community-root .cc-sorts{display:flex;align-items:center;gap:2px;padding:3px;background:var(--cc-soft);border:1px solid var(--cc-line);border-radius:8px;flex:none}
#cup-community-root .cc-sort{min-height:28px;padding:4px 10px;border:0;border-radius:5px;background:transparent;color:var(--cc-muted);font-size:11px}
#cup-community-root .cc-sort[aria-pressed=true]{background:var(--cc-paper);color:var(--cc-purple-ink);box-shadow:0 1px 4px #0000000a}
#cup-community-root .cc-pin-badge{display:inline-flex;align-items:center;border:1px solid color-mix(in srgb,var(--cc-purple-ink) 25%,var(--cc-line));border-radius:5px;padding:2px 6px;background:var(--cc-lilac);color:var(--cc-purple-ink);font-size:10px;line-height:1.5}
#cup-community-root .cc-post.is-pinned{border-color:color-mix(in srgb,var(--cc-purple-ink) 28%,var(--cc-line))}
#cup-community-root .cc-pin-action{margin-left:auto;font-size:11px}
#cup-community-root .cc-pin-action+.cc-delete-action{margin-left:0}

#cup-community-root .cc-lobby-clear-button{flex:none;margin-left:auto;min-height:28px;padding:4px 9px;font-size:11px;color:var(--cc-muted)}
#cup-community-root .cc-lobby-clear{width:min(440px,calc(100vw - 32px));max-width:440px}
#cup-community-root .cc-lobby-clear h2{margin-bottom:12px;font-size:20px}
#cup-community-root .cc-lobby-clear p{color:var(--cc-muted);font-size:13px;line-height:1.75}
#cup-community-root .cc-lobby-clear .cc-dialog-actions{flex-wrap:wrap}
#cup-community-root .cc-lobby-clear .cc-lobby-clear-error{margin-top:10px;color:#bc667b}
#cup-community-root .cc-lobby-clear-error:empty{display:none}
@media(pointer:coarse){#cup-community-root .cc-lobby-clear-button{min-height:42px}}

#cup-community-root .cc-sticker-trigger[aria-expanded=true]{background:var(--cc-lilac);color:var(--cc-purple-ink)}
#cup-community-root .cc-sticker-picker{
  position:fixed;inset:auto;z-index:4;display:flex;flex-direction:column;gap:8px;
  width:min(336px,calc(100vw - 16px));max-height:calc(100dvh - 16px);margin:0;padding:10px;
  overflow:auto;overscroll-behavior:contain;pointer-events:auto;color:var(--cc-ink);
  background:var(--cc-paper);border:1px solid var(--cc-line);border-radius:12px;
  box-shadow:0 10px 32px #121b3335;
}
#cup-community-root .cc-sticker-picker[popover]:not(:popover-open){display:none}
#cup-community-root .cc-sticker-tabs{display:flex;flex-wrap:wrap;gap:4px;flex:none;padding:3px;background:var(--cc-soft);border-radius:8px}
#cup-community-root .cc-sticker-tabs button{
  flex:1 1 auto;min-height:32px;padding:5px 8px;border:1px solid transparent;border-radius:6px;
  background:transparent;color:var(--cc-muted);font-size:11px;line-height:1.4;
}
#cup-community-root .cc-sticker-tabs button[aria-selected=true]{background:var(--cc-paper);border-color:var(--cc-line);color:var(--cc-ink);font-weight:600}
#cup-community-root .cc-sticker-tiles{
  display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;padding:4px;
  min-height:0;max-height:184px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;
}
#cup-community-root .cc-sticker-tile{
  display:grid;place-items:center;min-width:0;min-height:42px;padding:5px;
  border:1px solid transparent;border-radius:7px;background:transparent;color:var(--cc-ink);
}
#cup-community-root .cc-sticker-tile:hover,#cup-community-root .cc-sticker-tile:focus-visible{background:var(--cc-lilac);border-color:var(--cc-line)}
#cup-community-root .cc-sticker{
  display:inline-block;width:1.45em;height:1.45em;object-fit:contain;vertical-align:-.32em;
}
#cup-community-root .cc-sticker-tile .cc-sticker{width:30px;height:30px;max-width:100%;vertical-align:middle}
#cup-community-root :is(.cc-bubble,.cc-post-excerpt,.cc-detail-text,.cc-comment p)>.cc-sticker{
  width:var(--cc-sticker-display-width,96px);max-width:100%;height:auto;aspect-ratio:1;vertical-align:middle;
}
#cup-community-root .cc-post-excerpt{--cc-sticker-display-width:48px}
#cup-community-root .cc-sticker-preview{margin:7px 0;padding:6px 8px;border:1px solid var(--cc-line);border-radius:7px;background:var(--cc-soft)}
#cup-community-root .cc-sticker-preview>span{display:block;margin-bottom:3px;color:var(--cc-muted);font-size:10px;line-height:1.4}
#cup-community-root .cc-sticker-preview-body{max-height:76px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;overscroll-behavior:contain;font-size:13px;line-height:1.75}
#cup-community-root .cc-sticker-feedback{flex:none;color:var(--cc-purple-ink);font-size:10px;line-height:1.5}
#cup-community-root .cc-sticker-feedback:empty{display:none}
@media(max-width:360px){#cup-community-root .cc-sticker-tiles{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(pointer:coarse){#cup-community-root .cc-sticker-tabs button,#cup-community-root .cc-sticker-tile{min-height:44px}}

#cup-community-root .cc-comment.is-pinned {
  padding:9px 10px;
  border:1px solid color-mix(in srgb,var(--cc-purple) 24%,var(--cc-line));
  border-radius:9px;
  background:color-mix(in srgb,var(--cc-purple) 5%,var(--cc-paper));
}
#cup-community-root .cc-comment-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:3px 9px;
  margin-top:4px;
}
#cup-community-root .cc-comment-action {
  min-height:28px;
  padding:4px 6px;
  font-size:11px;
}
#cup-community-root .cc-comment-action[aria-pressed=true] {
  color:var(--cc-purple-ink);
  background:var(--cc-lilac);
}
#cup-community-root .cc-comment-action[aria-disabled=true] {
  cursor:wait;
  opacity:.52;
}
#cup-community-root :is(.cc-comment-quote,.cc-comment-reply-context) {
  min-width:0;
  border-inline-start:2px solid var(--cc-purple);
  border-radius:0 7px 7px 0;
  background:var(--cc-soft);
  color:var(--cc-muted);
  font-size:11px;
  line-height:1.65;
  overflow-wrap:anywhere;
}
#cup-community-root .cc-comment-quote { margin:7px 0 0;padding:6px 9px; }
#cup-community-root .cc-comment-quote strong,
#cup-community-root .cc-comment-reply-context strong {
  display:block;
  margin-bottom:2px;
  color:var(--cc-ink);
  font-weight:650;
}
#cup-community-root .cc-comment-quote span,
#cup-community-root .cc-comment-reply-preview { white-space:pre-wrap; }
#cup-community-root .cc-comment-reply-context {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  padding:8px 9px;
}
#cup-community-root .cc-comment-reply-context[hidden] { display:none; }
#cup-community-root .cc-comment-reply-context>div { min-width:0;flex:1; }
#cup-community-root .cc-comment-reply-context button { flex:none; }
#cup-community-root .cc-comment-reply-context:not([hidden])+.cc-comment-form { margin-top:7px; }
#cup-community-root :is(.cc-comment-quote,.cc-comment-reply-preview) img {
  width:auto;
  max-width:30px;
  max-height:30px;
  vertical-align:middle;
}
@media(pointer:coarse) {
  #cup-community-root .cc-comment-action { min-width:40px;min-height:42px; }
}

/* Moments layout and shared forum / lobby palette. */
#cup-community-root {
  --cc-paper:#181f28;
  --cc-ink:#e7eef4;
  --cc-muted:#a7b4c2;
  --cc-line:#303d4a;
  --cc-soft:#222e38;
  --cc-name:#a5c7e6;
  --cc-accent:#a8cbed;
  --cc-primary:#a9c9e8;
  --cc-primary-ink:#152c42;
  --cc-like:#f396b1;
  --cc-positive:#a9d9ca;
  --cc-positive-bg:#294139;
  --cc-cover-a:#263e38;
  --cc-cover-b:#233546;
  --cc-cover-line:#648f98;
  --cc-avatar-a:#41665b;
  --cc-avatar-b:#2c494a;
  --cc-avatar-ink:#e0f5ef;
  --cc-avatar-own:#2b4661;
  --cc-bubble-other:#26333d;
  --cc-bubble-own:#2b435b;
  --cc-bubble-own-ink:#e7f3ff;
  /* The existing dialog, sticker and focus styles use these aliases. */
  --cc-purple:var(--cc-accent);
  --cc-purple-ink:var(--cc-name);
  --cc-lilac:var(--cc-soft);
  color-scheme:dark;
}
html[data-cup-theme=day] #cup-community-root {
  --cc-paper:#fff;
  --cc-ink:#202b35;
  --cc-muted:#5c6a78;
  --cc-line:#e3eaee;
  --cc-soft:#f1f5f7;
  --cc-name:#396382;
  --cc-accent:#315f87;
  --cc-primary:#285b86;
  --cc-primary-ink:#fff;
  --cc-like:#a83856;
  --cc-positive:#35645c;
  --cc-positive-bg:#e1eee9;
  --cc-cover-a:#dceee8;
  --cc-cover-b:#e9f1f9;
  --cc-cover-line:#95b7c6;
  --cc-avatar-a:#d0e9df;
  --cc-avatar-b:#aecfcd;
  --cc-avatar-ink:#204c48;
  --cc-avatar-own:#daeaf8;
  --cc-bubble-other:#f0f4f5;
  --cc-bubble-own:#dcebf9;
  --cc-bubble-own-ink:#1d3b55;
  color-scheme:light;
}
.top-actions .cup-community-entry {
  --cc-entry-accent:#a9c9e8;
  color:var(--cc-entry-accent);
  border-color:color-mix(in srgb,var(--cc-entry-accent) 28%,var(--line,#d5dce8));
  background:color-mix(in srgb,var(--cc-entry-accent) 8%,var(--panel,#181f28));
  box-shadow:none;
}
html[data-cup-theme=day] .top-actions .cup-community-entry { --cc-entry-accent:#325c7f; }
.top-actions .cup-community-entry[aria-expanded=true] {
  background:color-mix(in srgb,var(--cc-entry-accent) 15%,var(--panel,#181f28));
}
#cup-community-root :is(.cc-window,.cc-window:fullscreen) {
  background:var(--cc-paper);
  border-color:var(--cc-line);
}
#cup-community-root .cc-button.cc-primary {
  color:var(--cc-primary-ink);
  background:var(--cc-primary);
  border-color:var(--cc-primary);
}
#cup-community-root .cc-button.cc-primary:hover {
  background:color-mix(in srgb,var(--cc-primary) 91%,var(--cc-primary-ink));
}
#cup-community-root :is(.cc-dock,.cc-toast,.cc-pending) {
  border-color:color-mix(in srgb,var(--cc-accent) 22%,var(--cc-line));
}
#cup-community-root .cc-content {
  --cc-gutter:max(18px,calc((100% - 820px)/2));
  min-width:0;
  padding:0;
}
#cup-community-root .cc-moments-cover {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  gap:8px 16px;
  min-height:74px;
  margin:0;
  padding:10px var(--cc-gutter);
  border-bottom:1px solid var(--cc-line);
  background:linear-gradient(105deg,var(--cc-cover-a),var(--cc-cover-b));
}
#cup-community-root .cc-moments-cover::before,
#cup-community-root .cc-moments-cover::after {
  content:"";
  position:absolute;
  z-index:-1;
  pointer-events:none;
  border:1px solid var(--cc-cover-line);
  border-radius:45%;
  transform:rotate(-21deg);
  opacity:.55;
}
#cup-community-root .cc-moments-cover::before {
  inset:-42px -20px auto auto;
  width:224px;
  height:144px;
  box-shadow:0 0 0 12px color-mix(in srgb,var(--cc-cover-line) 12%,transparent),0 0 0 26px color-mix(in srgb,var(--cc-cover-line) 9%,transparent);
}
#cup-community-root .cc-moments-cover::after { inset:-22px -46px auto auto;width:210px;height:135px; }
#cup-community-root .cc-moments-cover-copy { min-width:0; }
#cup-community-root .cc-moments-cover h1 { font-size:20px;font-weight:680;letter-spacing:.02em;line-height:1.4; }
#cup-community-root .cc-moments-cover p { font-size:12px; }
#cup-community-root .cc-moments-cover .cc-heading-actions { max-width:100%; }
#cup-community-root .cc-moments-tabs {
  display:flex;
  flex:none;
  align-items:center;
  gap:18px;
  margin:0;
  padding-inline:var(--cc-gutter);
  border-bottom:1px solid var(--cc-line);
  background:var(--cc-paper);
}
#cup-community-root .cc-moments-tabs .cc-button {
  flex:none;
  min-height:42px;
  padding:1px 4px 0;
  border:0;
  border-radius:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:var(--cc-muted);
  font-size:13px;
}
#cup-community-root .cc-moments-tabs .cc-button:hover { color:var(--cc-name);background:var(--cc-soft); }
#cup-community-root .cc-moments-tabs :is([aria-pressed=true],[aria-selected=true]) {
  border-bottom-color:var(--cc-accent);
  background:transparent;
  color:var(--cc-name);
  font-weight:680;
}
#cup-community-root .cc-moments-tabs .cc-button:focus-visible { outline-offset:-3px; }
#cup-community-root .cc-layout { display:flex;flex-direction:column;min-width:0;gap:0; }
#cup-community-root .cc-feed { flex:1;gap:0; }
#cup-community-root[data-community-view=posts] .cc-chat,
#cup-community-root[data-community-view=chat] .cc-feed { display:none; }
#cup-community-root .cc-feed-tools {
  padding:6px var(--cc-gutter);
  border-bottom:1px solid var(--cc-line);
}
#cup-community-root .cc-feed-error:not(:empty) { padding:5px var(--cc-gutter); }
#cup-community-root .cc-pending { margin:8px var(--cc-gutter); }
#cup-community-root .cc-posts {
  gap:0;
  padding:0 var(--cc-gutter);
  scroll-padding-block:8px;
}
#cup-community-root .cc-posts>.cc-empty { border:0;background:transparent; }
#cup-community-root .cc-post:has(>.cc-post-main) {
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  align-items:start;
  gap:12px;
  padding:16px 0;
  border:0;
  border-radius:0;
  background:transparent;
}
#cup-community-root .cc-post+.cc-post { border-top:1px solid var(--cc-line); }
#cup-community-root .cc-post-main { min-width:0; }
#cup-community-root .cc-post-main>header {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px 7px;
  margin-bottom:3px;
}
#cup-community-root .cc-post-main>header strong {
  min-width:0;
  color:var(--cc-name);
  font-size:14px;
  font-weight:700;
  overflow-wrap:anywhere;
}
#cup-community-root .cc-avatar {
  border-radius:8px;
  color:var(--cc-avatar-ink);
  background:linear-gradient(145deg,var(--cc-avatar-a),var(--cc-avatar-b));
}
#cup-community-root .cc-avatar.cc-self { background:var(--cc-avatar-own);color:var(--cc-name); }
#cup-community-root .cc-post>.cc-avatar { width:36px;height:36px;border-radius:9px;font-size:15px; }
#cup-community-root .cc-post-main .cc-pill { margin-inline-start:0;color:var(--cc-muted); }
#cup-community-root .cc-pin-badge {
  color:var(--cc-positive);
  background:var(--cc-positive-bg);
  border-color:color-mix(in srgb,var(--cc-positive) 23%,var(--cc-line));
}
#cup-community-root .cc-post-main .cc-post-title {
  margin:0 0 2px;
  font-size:14px;
  font-weight:670;
  white-space:normal;
}
#cup-community-root .cc-post-main .cc-post-excerpt {
  color:var(--cc-ink);
  font-size:13px;
  line-height:1.67;
  -webkit-line-clamp:4;
}
#cup-community-root .cc-post-main>.cc-post-images {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  width:min(100%,405px);
  margin-top:9px;
}
#cup-community-root .cc-post-main>.cc-post-images:empty { display:none; }
#cup-community-root .cc-post-main>.cc-post-images:has(>.cc-post-image:nth-child(2):last-child) {
  grid-template-columns:repeat(2,minmax(0,1fr));
  width:min(100%,268px);
}
#cup-community-root .cc-post-main>.cc-post-images:has(>.cc-post-image:only-child) {
  grid-template-columns:minmax(0,1fr);
  width:min(100%,180px);
}
#cup-community-root .cc-post-main .cc-post-image { width:100%;max-width:none;min-width:0;border-radius:5px; }
#cup-community-root .cc-post-main .cc-post-image img { aspect-ratio:1.3; }
#cup-community-root .cc-post-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:2px 8px;
  margin-top:6px;
  color:var(--cc-muted);
}
#cup-community-root .cc-post-meta time { white-space:nowrap; }
#cup-community-root .cc-post-meta .cc-post-actions { flex-wrap:wrap;gap:3px;margin:0; }
#cup-community-root .cc-post-meta .cc-link { min-height:28px;padding:3px 7px;color:var(--cc-name);font-size:12px; }
#cup-community-root .cc-post-meta .cc-link:hover { background:var(--cc-soft); }
#cup-community-root .cc-post-meta :is(.cc-pin-action,.cc-delete-action) { margin-inline-start:0; }
#cup-community-root :is([data-like],.cc-comment-like)[aria-pressed=true] { color:var(--cc-like); }
#cup-community-root :is([data-like],.cc-comment-like)[aria-pressed=true] svg {
  fill:color-mix(in srgb,var(--cc-like) 23%,transparent);
}
#cup-community-root .cc-pager {
  flex-wrap:wrap;
  padding:6px var(--cc-gutter);
  border-top:1px solid var(--cc-line);
}
#cup-community-root .cc-thread-slot:empty { display:none; }
#cup-community-root .cc-thread-inline {
  position:relative;
  min-width:0;
  margin-top:7px;
  padding:7px 10px 9px;
  border-radius:7px;
  background:var(--cc-soft);
}
#cup-community-root .cc-thread-inline::before {
  content:"";
  position:absolute;
  top:-4px;
  inset-inline-start:13px;
  width:8px;
  height:8px;
  background:inherit;
  transform:rotate(45deg);
  pointer-events:none;
}
#cup-community-root .cc-thread-toolbar { display:flex;justify-content:flex-end;flex-wrap:wrap;gap:4px 8px; }
#cup-community-root .cc-thread-toolbar .cc-link { color:var(--cc-name); }
#cup-community-root .cc-thread-inline .cc-comments { gap:6px;margin:0;padding:3px 0;border:0; }
#cup-community-root .cc-thread-inline .cc-comment {
  padding:4px 0;
  border:0;
  border-radius:0;
  background:transparent;
}
#cup-community-root .cc-thread-inline .cc-comment+.cc-comment { border-top:1px solid var(--cc-line); }
#cup-community-root .cc-thread-inline .cc-comment>.cc-avatar { display:none; }
#cup-community-root .cc-thread-inline .cc-comment header strong { color:var(--cc-name);font-size:12px; }
#cup-community-root .cc-thread-inline .cc-comment p { margin-top:2px;font-size:12px;line-height:1.64; }
#cup-community-root .cc-thread-inline .cc-comment-actions { margin-top:0; }
#cup-community-root .cc-thread-inline .cc-comment-quote { background:var(--cc-paper); }
#cup-community-root .cc-thread-inline .cc-comment-form {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:6px;
  margin-top:8px;
}
#cup-community-root .cc-thread-inline .cc-comment-input { min-height:50px;background:var(--cc-paper); }
#cup-community-root .cc-comment-compose-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  margin-inline-start:auto;
}

/* The lobby uses the same surfaces while retaining left/right message rows. */
#cup-community-root .cc-chat,
html[data-cup-theme] #cup-community-root .cc-chat {
  --studio-primary:var(--cc-primary);
  --studio-primary-text:var(--cc-primary-ink);
  --accent:var(--cc-accent);
  flex:1;
  border:0;
  border-radius:0;
}
#cup-community-root .cc-chat>header {
  flex:none;
  padding:10px var(--cc-gutter);
  background:color-mix(in srgb,var(--cc-cover-a) 24%,var(--cc-paper));
}
#cup-community-root .cc-chat h2 { font-size:15px; }
#cup-community-root .cc-chat-state { padding:6px var(--cc-gutter) 0; }
#cup-community-root .cc-messages { gap:14px;padding:14px var(--cc-gutter); }
#cup-community-root .cc-message>.cc-avatar {
  width:32px;
  height:32px;
  border-radius:9px;
  background:linear-gradient(145deg,var(--cc-avatar-a),var(--cc-avatar-b));
  color:var(--cc-avatar-ink);
}
#cup-community-root .cc-message.cc-mine>.cc-avatar { background:var(--cc-avatar-own);color:var(--cc-name); }
#cup-community-root .cc-message header strong { color:var(--cc-name); }
#cup-community-root .cc-bubble { background:var(--cc-bubble-other); }
#cup-community-root .cc-mine .cc-bubble {
  background:var(--cc-bubble-own);
  color:var(--cc-bubble-own-ink);
  border-color:color-mix(in srgb,var(--cc-accent) 22%,var(--cc-line));
}
#cup-community-root .cc-chat-form {
  margin:7px var(--cc-gutter);
  padding:7px 9px;
  border-color:color-mix(in srgb,var(--cc-accent) 22%,var(--cc-line));
}
#cup-community-root .cc-chat .cc-button.cc-primary:hover {
  background:color-mix(in srgb,var(--cc-primary) 91%,var(--cc-primary-ink));
}
#cup-community-root .cc-chat-policy { margin-inline:var(--cc-gutter); }

@container(max-width:700px) {
  #cup-community-root .cc-content { --cc-gutter:14px; }
}
@container(max-width:480px) {
  #cup-community-root .cc-content { --cc-gutter:12px; }
  #cup-community-root .cc-moments-cover { min-height:68px; }
  #cup-community-root .cc-moments-cover h1 { font-size:18px; }
  #cup-community-root .cc-moments-cover::before,
  #cup-community-root .cc-moments-cover::after { opacity:.32; }
  #cup-community-root .cc-moments-tabs { gap:12px; }
  #cup-community-root .cc-post:has(>.cc-post-main) { grid-template-columns:29px minmax(0,1fr);gap:8px;padding-block:13px; }
  #cup-community-root .cc-post>.cc-avatar { width:29px;height:29px;border-radius:7px;font-size:13px; }
  #cup-community-root .cc-thread-inline .cc-comment-form { grid-template-columns:minmax(0,1fr) auto; }
  #cup-community-root .cc-thread-inline .cc-comment-input { grid-column:1/-1; }
  #cup-community-root .cc-thread-inline .cc-comment-compose-actions { grid-column:1/-1;justify-self:end; }
}
@media(pointer:coarse) {
  #cup-community-root .cc-moments-tabs .cc-button,
  #cup-community-root .cc-post-meta .cc-link,
  #cup-community-root .cc-thread-toolbar .cc-link { min-height:44px; }
  #cup-community-root .cc-post-meta .cc-link { min-width:44px; }
  #cup-community-root .cc-chat-form .cc-button { min-height:42px; }
}

/* The desktop window owns its resize geometry instead of the native grip. */
#cup-community-root .cc-window[data-window-resizable] { resize:none; }
#cup-community-root .cc-window-resize { display:none; }
#cup-community-root[data-window-gesture] .cc-window { user-select:none; }
@media(min-width:600px) {
  #cup-community-root[data-mode=normal] .cc-window[data-window-resizable] {
    min-height:min(360px,calc(100dvh - 16px));
    max-height:calc(100dvh - 16px);
  }
  #cup-community-root[data-mode=normal] .cc-window>.cc-window-resize {
    position:absolute;
    z-index:6;
    display:block;
    appearance:none;
    min-width:0;
    min-height:0;
    padding:0;
    margin:0;
    border:0;
    background:transparent;
    touch-action:none;
  }
  #cup-community-root[data-mode=normal] .cc-window>.cc-window-resize:hover,
  #cup-community-root[data-mode=normal] .cc-window>.cc-window-resize:focus-visible {
    background:color-mix(in srgb,var(--cc-accent) 14%,transparent);
  }
  #cup-community-root[data-mode=normal] .cc-window>.cc-window-resize:focus-visible { outline-offset:-3px; }
  #cup-community-root .cc-window-resize:is([data-window-resize=n],[data-window-resize=s]) {
    inset-inline:14px;
    height:7px;
    cursor:ns-resize;
  }
  #cup-community-root .cc-window-resize[data-window-resize=n] { top:0; }
  #cup-community-root .cc-window-resize[data-window-resize=s] { bottom:0;right:22px; }
  #cup-community-root .cc-window-resize:is([data-window-resize=e],[data-window-resize=w]) {
    top:14px;
    bottom:14px;
    width:7px;
    cursor:ew-resize;
  }
  #cup-community-root .cc-window-resize[data-window-resize=e] { right:0;bottom:22px; }
  #cup-community-root .cc-window-resize[data-window-resize=w] { left:0; }
  #cup-community-root .cc-window-resize:is([data-window-resize=ne],[data-window-resize=nw],[data-window-resize=sw],[data-window-resize=se]) {
    width:14px;
    height:14px;
  }
  #cup-community-root .cc-window-resize[data-window-resize=nw] { top:0;left:0;cursor:nwse-resize; }
  #cup-community-root .cc-window-resize[data-window-resize=ne] { top:0;right:0;cursor:nesw-resize; }
  #cup-community-root .cc-window-resize[data-window-resize=sw] { bottom:0;left:0;cursor:nesw-resize; }
  #cup-community-root .cc-window-resize[data-window-resize=se] { bottom:0;right:0;width:22px;height:22px;cursor:nwse-resize; }
  #cup-community-root .cc-window-resize[data-window-resize=se]::after {
    content:"";
    position:absolute;
    right:4px;
    bottom:4px;
    width:12px;
    height:12px;
    background:repeating-linear-gradient(135deg,transparent 0 3px,var(--cc-accent) 3px 4px,transparent 4px 6px);
    clip-path:polygon(100% 0,100% 100%,0 100%);
    opacity:.65;
  }
  #cup-community-root[data-mode=normal] .cc-window-foot { padding-inline-end:26px; }
}
