/* KIIP V3 integrated community: inherits the portal's existing dark/pink tokens.
 * This stylesheet scopes only content inside the current #app shell.
 */
.kiip-comms{min-width:0;max-width:100%;color:var(--ink)}
.kiip-comms .page-top{margin-bottom:18px}
.kiip-comms .comms-muted{color:var(--muted);font-size:12px;line-height:1.6}
.kiip-comms .comms-filters{display:flex;gap:8px;overflow-x:auto;max-width:100%;scrollbar-width:thin;padding:4px 1px 13px;margin-bottom:4px}
.kiip-comms .comms-filters .chip{display:flex;align-items:center;justify-content:center;white-space:nowrap;min-height:41px;flex:0 0 auto}
.kiip-comms .comms-toolbar{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;margin:6px 0 16px}
.kiip-comms .comms-toolbar form{display:flex;align-items:center;flex:1 1 280px;max-width:520px;gap:9px;min-width:0}
.kiip-comms .comms-toolbar input{min-width:0;width:100%;flex:1}
.kiip-comms .comms-toolbar .button{min-height:42px;white-space:nowrap}
.kiip-comms .comms-inline-actions{display:flex;gap:8px;flex-wrap:wrap}
.kiip-comms .comms-feed-status{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px;margin:14px 0}
.kiip-comms .comms-feed-status a{color:var(--accent);font-weight:750}
.kiip-comms .comms-post-list{display:flex;flex-direction:column;gap:12px;min-width:0}
.kiip-comms .comms-post{border:1px solid var(--line);background:var(--card);padding:19px 20px;border-radius:18px;min-width:0}
.kiip-comms .comms-post:hover{border-color:#805c6f;background:#242026}
.kiip-comms .comms-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:11px;line-height:1.5;margin-bottom:9px}
.kiip-comms .comms-meta time{margin-left:auto;font-variant-numeric:tabular-nums}
.kiip-comms .comms-category,.kiip-comms .comms-meta a{color:var(--accent);font-weight:750}
.kiip-comms .comms-pin{padding:2px 6px;border:1px solid #8a5974;border-radius:6px;color:#ffd5e4;font-size:10px;background:#332635}
.kiip-comms .comms-post-body-link{display:block;min-width:0}
.kiip-comms .comms-post h2{font-size:17px;line-height:1.55;font-weight:800;margin:0 0 7px;overflow-wrap:anywhere}
.kiip-comms .comms-post a:hover h2{color:var(--accent)}
.kiip-comms .comms-post p{font-size:13px;line-height:1.75;color:var(--muted);margin:0 0 9px;overflow-wrap:anywhere}
.kiip-comms .comms-byline{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;margin-top:11px;color:var(--muted);font-size:11px}
.kiip-comms .comms-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin:12px 0}
.kiip-comms .comms-images img{display:block;width:100%;max-height:280px;object-fit:cover;border:1px solid var(--line);border-radius:11px}
.kiip-comms .comms-empty{border:1px dashed #554758;border-radius:15px;background:var(--card);padding:28px 22px;color:var(--muted);font-size:13px;line-height:1.75;text-align:center}
.kiip-comms .comms-more{display:flex;justify-content:center;gap:12px;padding:21px 0}
.kiip-comms .comms-article{background:var(--card);border:1px solid var(--line);border-radius:19px;padding:25px}
.kiip-comms .comms-article h2{font-size:clamp(20px,2.3vw,27px);line-height:1.45;overflow-wrap:anywhere;margin:14px 0}
.kiip-comms .comms-prose{white-space:pre-wrap;font-size:15px;line-height:1.9;overflow-wrap:anywhere;word-break:break-word}
.kiip-comms .comms-article>.comms-prose{margin-top:24px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.kiip-comms .comms-post-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding-top:19px}
.kiip-comms .comms-post-controls .button{min-height:40px}
.kiip-comms .comms-subtle-button{margin-left:auto;border:0;background:transparent;color:var(--muted);font-size:11px;padding:7px;min-height:32px;text-decoration:underline;text-underline-offset:2px}
.kiip-comms .comms-comments{margin:20px 0}
.kiip-comms .comms-comments>h3{font-size:17px;padding-bottom:13px;margin-bottom:14px;border-bottom:1px solid var(--line)}
.kiip-comms .comms-comments>h3 span{color:var(--accent);font-variant-numeric:tabular-nums}
.kiip-comms .comms-comment{margin-bottom:10px;padding:15px 17px;background:var(--card);border:1px solid var(--line);border-radius:15px}
.kiip-comms .comms-comment-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:var(--ink);margin-bottom:9px}
.kiip-comms .comms-comment-head time{color:var(--muted);font-size:11px}
.kiip-comms .comms-comment .comms-prose{font-size:13px;line-height:1.7}
.kiip-comms #comms-comment-form,.kiip-comms .comms-compose,.kiip-comms .comms-card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:21px}
.kiip-comms #comms-comment-form{margin-top:16px;display:flex;flex-direction:column;align-items:flex-start;gap:11px}
.kiip-comms label{display:block;font-size:12px;color:var(--ink);font-weight:720}
.kiip-comms .comms-textarea,.kiip-comms .comms-input{display:block;width:100%;max-width:100%;min-width:0;background:#121115;border:1px solid #665267;border-radius:11px;padding:11px 13px;min-height:45px;color:var(--ink);font:inherit;font-size:13px;line-height:1.6;outline-offset:2px}
.kiip-comms .comms-textarea:focus,.kiip-comms .comms-input:focus{border-color:var(--accent);outline:1px solid #916d81}
.kiip-comms .comms-compose{display:flex;flex-direction:column;gap:12px}
.kiip-comms .comms-compose-actions{display:flex;gap:10px;justify-content:flex-end;align-items:center;margin-top:11px}
.kiip-comms .comms-submit-status{color:var(--muted);font-size:11px}
.kiip-comms .comms-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.kiip-comms .comms-room-list{display:flex;flex-direction:column;gap:10px}
.kiip-comms .comms-room-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;padding:17px;background:var(--card);border:1px solid var(--line);border-radius:16px;min-width:0}
.kiip-comms .comms-room-card:hover{border-color:#9e7187;background:#252028}
.kiip-comms .comms-room-avatar{width:46px;height:46px;display:grid;place-items:center;color:var(--accent);background:var(--tint);border-radius:14px;font-weight:800}
.kiip-comms .comms-room-info{min-width:0}
.kiip-comms .comms-room-title{font-size:14px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kiip-comms .comms-room-info p{font-size:12px;color:var(--muted);margin:5px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5}
.kiip-comms .comms-room-side{display:flex;align-items:flex-end;flex-direction:column;gap:7px;min-width:70px;color:var(--muted);font-size:10px}
.kiip-comms .comms-unread{font-size:11px;padding:2px 7px;border-radius:8px;background:#694257;color:#fff;min-width:22px;text-align:center}
.kiip-comms .comms-chat-room{background:var(--card);border:1px solid var(--line);border-radius:18px;overflow:hidden}
.kiip-comms .comms-chat-room-head{display:flex;align-items:center;gap:9px;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--line);background:#29232c}
.kiip-comms .comms-back{color:var(--accent);font-size:12px;white-space:nowrap}
.kiip-comms .comms-chat-room-head strong{font-size:14px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kiip-comms .comms-chat-room-head small{color:var(--muted);font-size:11px;white-space:nowrap}
.kiip-comms .comms-message-list{display:flex;flex-direction:column;gap:12px;min-height:320px;height:clamp(350px,52dvh,590px);overflow:auto;padding:21px 17px;background:#18171c;overscroll-behavior:contain}
.kiip-comms .comms-message{display:flex;flex-direction:column;gap:3px;align-items:flex-start;max-width:90%}
.kiip-comms .comms-message.own{align-self:flex-end;align-items:flex-end}
.kiip-comms .comms-message-person{font-size:11px;font-weight:650;color:var(--muted)}
.kiip-comms .comms-message-bubble{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;line-height:1.7;font-size:13px;background:#302731;border:1px solid #504251;color:var(--ink);border-radius:13px 13px 13px 4px;padding:10px 13px;max-width:100%}
.kiip-comms .comms-message.own .comms-message-bubble{background:#4c3344;border-color:#78526a;border-radius:13px 13px 4px 13px}
.kiip-comms .comms-message-bubble audio{display:block;max-width:100%;width:230px;margin-top:8px}
.kiip-comms .comms-message-translated{margin-top:9px;padding-top:8px;border-top:1px solid #665267;color:#e9cbdd;font-size:12px}
.kiip-comms .comms-message time{color:var(--muted);font-size:10px}
.kiip-comms .comms-system-message{text-align:center;font-size:10px;color:var(--muted);padding:9px 0}
.kiip-comms .comms-chat-compose{display:flex;gap:10px;align-items:flex-end;padding:13px;background:#27222b;border-top:1px solid var(--line)}
.kiip-comms .comms-chat-compose textarea{min-height:48px;max-height:120px;resize:vertical}
.kiip-comms .comms-chat-compose button{min-width:72px;min-height:48px}
.kiip-comms .comms-minor-note{color:var(--muted);font-size:11px;line-height:1.6;padding:0 15px 11px;margin:0;background:#27222b}
.kiip-comms .comms-older{display:block;background:transparent;color:var(--accent);width:100%;text-align:center;font-size:11px;padding:9px;border:0;border-bottom:1px solid var(--line)}
.kiip-comms .comms-older[hidden]{display:none}
.kiip-comms .comms-newchat{display:grid;grid-template-columns:1fr 1fr;gap:13px;align-items:start}
.kiip-comms .comms-card h2{font-size:15px;margin:0 0 8px}
.kiip-comms .comms-card>p{font-size:12px;color:var(--muted);line-height:1.75;margin:0 0 17px}
.kiip-comms #comms-find-user{display:flex;gap:8px;align-items:center}
.kiip-comms .comms-users{margin-top:16px}
.kiip-comms .comms-found-person{display:flex;align-items:center;justify-content:space-between;gap:9px;border-bottom:1px solid var(--line);padding:11px 1px}
.kiip-comms .comms-found-person strong{display:block;font-size:13px}
.kiip-comms .comms-found-person small{display:block;color:var(--muted);font-size:11px}
.kiip-comms .comms-found-person .button{padding:7px 11px;min-height:34px}
.kiip-comms .comms-selected-members{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.kiip-comms .comms-selected-members button{border:1px solid #8c5d76;border-radius:9px;padding:7px 10px;color:var(--accent);background:var(--tint);font-size:12px}
.kiip-comms #comms-create-chat{display:flex;flex-direction:column;gap:12px}
@media(max-width:950px){
 .kiip-comms .comms-newchat{grid-template-columns:1fr}
 .kiip-comms .comms-hub-grid{gap:10px}
}
@media(max-width:600px){
 .kiip-comms .comms-hub-grid{grid-template-columns:1fr}
 .kiip-comms .comms-post{padding:15px}
 .kiip-comms .comms-post h2{font-size:15px}
 .kiip-comms .comms-article{padding:16px}
 .kiip-comms .comms-article .comms-prose{font-size:14px}
 .kiip-comms .comms-toolbar form{flex-basis:100%}
 .kiip-comms .comms-toolbar{gap:9px}
 .kiip-comms .comms-toolbar .button{font-size:11px}
 .kiip-comms .comms-room-card{grid-template-columns:40px minmax(0,1fr) auto;padding:12px;gap:10px}
 .kiip-comms .comms-room-avatar{height:40px;width:40px}
 .kiip-comms .comms-chat-room-head{padding:12px 10px;flex-wrap:wrap}
 .kiip-comms .comms-message-list{padding:13px 11px;height:clamp(340px,52dvh,550px)}
 .kiip-comms .comms-chat-compose{padding:10px;gap:7px}
 .kiip-comms .comms-chat-compose button{padding:8px 12px;min-width:66px}
 .kiip-comms .comms-card{padding:15px}
 .kiip-comms #comms-find-user{flex-wrap:wrap}
}
