/* P1N Community Engine v0.1.9 — author cards and optional GIF search. */
.post-card{grid-template-columns:minmax(178px,206px) minmax(0,1fr)}
.post-user.ce-author-panel{align-items:center;gap:0;padding:21px 13px 14px;text-align:center;background:linear-gradient(165deg,color-mix(in srgb,var(--brand-accent) 7%,var(--surface-2)),var(--surface-2) 75%);border-right:1px solid var(--line)}
.ce-author-identity{width:100%;display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0}
.ce-author-avatar-link{position:relative;display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;flex:none;border-radius:50%;padding:3px;background:linear-gradient(135deg,var(--brand-accent),#3266a6 78%);box-shadow:0 5px 20px #0003}
.ce-author-avatar-link>.avatar{width:100%!important;height:100%!important;min-width:0;max-width:none;border:3px solid var(--surface-2);box-shadow:none;object-fit:cover;line-height:1}
.ce-author-avatar-link:hover,.ce-author-avatar-link:focus-visible{filter:brightness(1.15);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-accent) 28%,transparent)}
.ce-author-name{width:100%;min-width:0;display:flex;flex-direction:column;align-items:center;gap:7px}
.ce-author-name strong{display:block;line-height:1.2;font-size:.92rem;max-width:100%;overflow-wrap:anywhere}
.ce-author-name .username-with-role{font-weight:800;text-decoration:none}
.ce-author-roles{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;max-width:100%}
.ce-author-roles>.role-badge{font-size:.65rem;padding:4px 9px;border-radius:999px;font-weight:800;letter-spacing:.01em;border:1px solid var(--role-color);color:var(--role-color);background:color-mix(in srgb,var(--role-color) 11%,var(--surface));line-height:1.3}
.ce-author-stats{width:100%;margin-top:17px;padding-top:12px;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 7px}
.ce-author-stat{display:flex;flex-direction:column;gap:4px;align-items:center;min-width:0;border-radius:9px;padding:7px 3px;background:color-mix(in srgb,var(--surface) 68%,transparent)}
.ce-author-stat:first-child{grid-column:1/-1;flex-direction:row;justify-content:space-between;gap:6px;padding:7px 9px}
.ce-author-stat span{color:var(--muted);font-size:.65rem;letter-spacing:.02em;line-height:1.2}
.ce-author-stat strong{color:var(--ink);font-weight:800;font-size:.82rem;font-variant-numeric:tabular-nums;white-space:nowrap}
.ce-author-view{display:inline-flex;align-items:center;justify-content:center;gap:3px;width:100%;margin-top:10px;padding:8px 6px;border-radius:8px;border:1px solid var(--line);color:var(--brand-accent);font-size:.7rem;font-weight:800;text-decoration:none}
.ce-author-view:hover{background:color-mix(in srgb,var(--brand-accent) 11%,var(--surface));border-color:var(--brand-accent)}
.ce-author-view>.ui-icon{width:13px;height:13px}
/* The GIF panel is part of each editor so a message and thread composer never cross-target each other. */
.ce-giphy-picker{padding:15px;background:var(--surface-2);border-bottom:1px solid var(--line)}
.ce-giphy-picker[hidden]{display:none!important}
.ce-giphy-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.ce-giphy-header strong{font-size:.95rem;color:var(--ink)}
.ce-giphy-close{border:1px solid var(--line);border-radius:7px;background:var(--surface);padding:6px 10px;color:var(--ink);cursor:pointer}
.ce-giphy-search{display:flex;align-items:center;gap:8px}.ce-giphy-search input{flex:1;min-width:0;margin:0!important;background:var(--surface)!important}.ce-giphy-search button{min-width:78px}
.ce-giphy-state{padding:10px 0;color:var(--muted);font-size:.77rem;min-height:35px}
.ce-giphy-results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-height:300px;overflow:auto;scrollbar-color:var(--brand-accent) var(--surface);scrollbar-width:thin}
.ce-giphy-result{padding:0;position:relative;border:1px solid var(--line);border-radius:9px;background:var(--surface);overflow:hidden;cursor:pointer;aspect-ratio:4/3;min-width:0;transition:border-color .14s,transform .14s}
.ce-giphy-result:hover,.ce-giphy-result:focus-visible{border-color:var(--brand-accent);transform:translateY(-2px);outline:0}
.ce-giphy-result img{width:100%;height:100%;object-fit:cover;display:block}
.ce-giphy-item-credit{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000b);color:white;text-shadow:0 1px 2px black;font-size:.59rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:12px 5px 3px}
.ce-giphy-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:11px}
.ce-giphy-credit{font-size:.77rem;font-weight:800;color:var(--ink);text-decoration:none;border-left:3px solid #00ff8c;padding-left:8px}
.ce-giphy-manual{border:0;background:transparent;color:var(--brand-accent);font-size:.74rem;cursor:pointer;font-weight:750}
.ce-gif-tool{min-width:42px}
@media(max-width:760px){.post-card{grid-template-columns:1fr}.post-user.ce-author-panel{flex-direction:row;align-items:center;text-align:left;flex-wrap:wrap;padding:11px 13px;gap:10px;border-right:0;border-bottom:1px solid var(--line)}.ce-author-identity{width:auto;flex:1;min-width:130px;flex-direction:row;gap:10px;align-items:center}.ce-author-avatar-link{width:48px;height:48px}.ce-author-name{align-items:flex-start;gap:5px}.ce-author-roles{justify-content:flex-start}.ce-author-stats{width:auto;display:flex;align-items:center;gap:6px;margin:0;padding:0;border:0;flex-wrap:wrap}.ce-author-stat,.ce-author-stat:first-child{display:none}.ce-author-stat:nth-child(2),.ce-author-stat:nth-child(3){display:flex;gap:4px;padding:3px 7px;flex-direction:row}.ce-author-stat strong{font-size:.72rem}.ce-author-view{display:none}}
@media(max-width:500px){.ce-giphy-results{grid-template-columns:repeat(3,minmax(0,1fr))}.ce-giphy-search button{min-width:67px;padding:6px}.ce-giphy-footer{align-items:flex-start;flex-direction:column}.ce-author-stats{display:none}}
@media(prefers-reduced-motion:reduce){.ce-giphy-result{transition:none}}

.ce-giphy-embed{display:inline-flex;flex-direction:column;gap:5px;max-width:min(100%,470px);margin:8px 0;vertical-align:top;color:var(--muted);font-size:.8rem}.ce-giphy-gif{display:block;max-width:100%;max-height:320px;border-radius:11px;object-fit:contain;border:1px solid var(--line)}.ce-giphy-embed-credit{color:var(--muted);text-decoration:none;font-size:.68rem;font-weight:700}.ce-giphy-embed-credit:hover{color:var(--brand-accent)}
