/* Batch 4 · community: PM / announcements / polls / emoji */

#forum-link,
#album-link,
#download-link,
#notification-link {
    text-decoration: none;
}

.community-btn {
    position: relative;
}

.community-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 999px;
    background: #eb459e;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
}

.announcement-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 4px 8px 4px 14px;
    border-bottom: 1px solid rgba(240, 178, 50, .18);
    background: linear-gradient(90deg, rgba(240, 178, 50, .09), transparent);
}

.announcement-banner-open {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #c7b08a;
    text-align: left;
}

.announcement-banner-open:hover {
    color: #e7c78e;
}

.announcement-tag {
    flex: 0 0 auto;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(240, 178, 50, .13);
    color: #e7bd68;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
}

#announcement-banner-title {
    overflow: hidden;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 62vh;
    overflow-y: auto;
}

.announcement-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .02);
}

.announcement-card-head {
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex-wrap: wrap;
}

.announcement-card-head h3 {
    margin: 0;
    color: #e0e4eb;
    font-size: 13px;
}

.announcement-card-head time {
    margin-left: auto;
    color: #6e7581;
    font-size: 9px;
}

.announcement-type {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(88, 101, 242, .12);
    color: #a7afff;
    font-size: 8px;
    font-weight: 700;
}

.announcement-summary {
    margin: 6px 0 0;
    color: #9aa1ad;
    font-size: 10.5px;
}

.announcement-content {
    margin-top: 8px;
    color: #7d8490;
    font-size: 10px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.community-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .025);
    color: var(--text);
    text-align: left;
}

.community-card:hover {
    border-color: rgba(88, 101, 242, .5);
    background: rgba(88, 101, 242, .08);
}

.community-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: rgba(88, 101, 242, .12);
    color: #b8beff;
    font-size: 17px;
}

.community-card-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.community-card-text strong {
    font-size: 12px;
}

.community-card-text small {
    color: #747b86;
    font-size: 9px;
}

.emoji-btn {
    min-width: 25px;
}

.emoji-panel {
    position: absolute;
    left: 22px;
    bottom: 78px;
    z-index: 31;
    width: min(330px, calc(100% - 44px));
    max-height: 220px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #1b1c21;
    box-shadow: 0 16px 45px rgba(0, 0, 0, .45);
}

.emoji-item {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    font-size: 17px;
    line-height: 1;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, .08);
}

.pm-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 58vh;
    overflow-y: auto;
}

.pm-conversation {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.pm-conversation:hover {
    background: rgba(255, 255, 255, .05);
}

.pm-conversation-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.pm-conversation-info strong {
    color: #d3d8e1;
    font-size: 11px;
}

.pm-conversation-info span {
    overflow: hidden;
    color: #777e8a;
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex: 0 0 auto;
}

.pm-conversation-meta time {
    color: #656c77;
    font-size: 8px;
}

.pm-unread-badge {
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: #eb459e;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    line-height: 15px;
    text-align: center;
}

.pm-thread-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 48vh;
    min-height: 180px;
    overflow-y: auto;
    padding: 2px;
}

.pm-message {
    max-width: 78%;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
}

.pm-message.mine {
    align-self: flex-end;
    border-color: rgba(88, 101, 242, .28);
    background: rgba(88, 101, 242, .1);
}

.pm-message-info {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 3px;
}

.pm-message-info strong {
    color: #b9c0ff;
    font-size: 9px;
}

.pm-message-info time {
    color: #646b76;
    font-size: 8px;
}

.pm-message-text {
    color: #c3c8d2;
    font-size: 10.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.pm-compose {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.pm-compose textarea {
    flex: 1;
    min-height: 36px;
    max-height: 100px;
    resize: vertical;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--input);
    color: var(--text);
    font: inherit;
    font-size: 11px;
}

.poll-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 62vh;
    overflow-y: auto;
}

.poll-card {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .02);
}

.poll-card h3 {
    margin: 0;
    color: #dfe3ea;
    font-size: 13px;
}

.poll-desc {
    margin: 5px 0 0;
    color: #8a919d;
    font-size: 10px;
    line-height: 1.5;
}

.poll-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 7px;
    color: #6f7681;
    font-size: 8.5px;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 9px;
}

.poll-option {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #aeb4bf;
    font-size: 10.5px;
    cursor: pointer;
}

.poll-option:hover {
    background: rgba(255, 255, 255, .04);
}

.poll-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.poll-results {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 9px;
}

.poll-result {
    position: relative;
    min-height: 28px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(255, 255, 255, .04);
}

.poll-result.mine {
    outline: 1px solid rgba(88, 101, 242, .45);
}

.poll-result-bar {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(88, 101, 242, .15);
}

.poll-result-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 28px;
    padding: 0 8px;
}

.poll-result-text strong {
    color: #b9c0cb;
    font-size: 10px;
}

.poll-result-text small {
    color: #717884;
    font-size: 8.5px;
}

@media (max-width: 640px) {
    .community-grid {
        grid-template-columns: 1fr;
    }

    .emoji-panel {
        grid-template-columns: repeat(8, 1fr);
    }

    .pm-message {
        max-width: 90%;
    }
}
