/* 작성자/계정 공용 프로필 카드 + board/view 작성자 아바타 확대 모달 */

.darkthread-author-profile-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    margin: 0.85rem 0 0;
    padding: 1.1rem 1.15rem;
    overflow: visible;
    border: 1px solid rgba(100, 116, 139, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.34), rgba(8, 10, 14, 0.84) 48%, rgba(2, 2, 3, 0.96) 100%),
        linear-gradient(180deg, rgba(12, 12, 13, 0.98), rgba(3, 3, 4, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 14px 28px rgba(0, 0, 0, 0.32);
}

.darkthread-author-profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(71, 85, 105, 0.14), transparent 44%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 10px);
    opacity: 0.78;
    pointer-events: none;
}

.darkthread-author-profile-avatar {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 5.5rem;
    height: 5.5rem;
    flex: 0 0 auto;
    margin-top: 0.1rem;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--dt-fg);
}

.darkthread-author-profile-avatar .darkthread-author-profile-avatar-shell {
    width: 4.25rem;
    height: 4.25rem;
}

.darkthread-author-profile-avatar .darkthread-comment-avatar-fallback {
    font-size: 1.65rem;
    font-weight: 700;
}

.darkthread-author-profile-avatar-zoom {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 12, 0.58);
    color: var(--dt-fg);
    font-size: 1.15rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.darkthread-author-profile-avatar:hover .darkthread-author-profile-avatar-zoom,
.darkthread-author-profile-avatar-zoom:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.darkthread-author-avatar-zoom-shell {
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.darkthread-author-avatar-zoom-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    overflow: visible;
}

.darkthread-author-avatar-zoom-image {
    display: block;
    width: auto;
    max-width: min(92vw, 62rem);
    max-height: 86vh;
    object-fit: contain;
    border: 0;
    border-radius: 0.9rem;
    box-shadow: 0 20px 60px rgba(2, 6, 12, 0.82);
    margin: 0 auto;
}

.darkthread-author-avatar-zoom-close {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid rgba(248, 250, 252, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: var(--dt-fg);
    font-size: 0.95rem;
}

/* board/view 작성자 아바타 확대 모달: 기본 dialog 테두리 제거 및 정중앙 정렬 고정 */
#authorAvatarZoomDialog {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    max-width: none !important;
}

#authorAvatarZoomDialog .darkthread-author-avatar-zoom-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto !important;
    max-width: none !important;
    margin: 0 auto !important;
}

#authorAvatarZoomDialog .darkthread-author-avatar-zoom-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto !important;
    max-width: none !important;
}

#authorAvatarZoomDialog .darkthread-author-avatar-zoom-center {
    align-items: center !important;
    justify-content: center !important;
}

#authorAvatarZoomImage {
    width: auto !important;
    min-width: 0 !important;
    max-width: min(92vw, 62rem) !important;
    height: auto !important;
    max-height: 86vh !important;
    margin: 0 auto !important;
}

.darkthread-author-profile-main {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1 1 auto;
    padding-top: 0.2rem;
}

.darkthread-author-profile-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-wrap: wrap;
}

.darkthread-author-profile-name {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    margin: 0;
    max-width: 100%;
    color: var(--dt-fg);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.darkthread-author-profile-crown,
.darkthread-author-profile-name .darkthread-comment-admin-crown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
}

.darkthread-author-profile-crown.is-master-tier,
.darkthread-author-profile-name .darkthread-comment-admin-crown.is-master-tier {
    color: #facc15;
    filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.3));
}

.darkthread-author-profile-crown.is-admin-tier,
.darkthread-author-profile-name .darkthread-comment-admin-crown.is-admin-tier {
    color: #d8b4fe;
    filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.45));
}

.darkthread-author-profile-role {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--dt-fg-muted);
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
}

.darkthread-author-profile-role.is-master {
    border-color: rgba(185, 28, 28, 0.4);
    color: #f87171;
}

.darkthread-author-profile-role.is-admin {
    border-color: rgba(167, 139, 250, 0.35);
    color: #c4b5fd;
}

.darkthread-author-profile-bio {
    position: relative;
    margin: 0.82rem 0 0;
    padding: 0.72rem 0.9rem;
    width: 100%;
    max-width: none;
    min-height: 8rem;
    height: 8rem;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(2, 6, 12, 0.46);
    color: var(--dt-fg-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    scrollbar-gutter: stable;
}

.darkthread-author-profile-bio::before {
    content: none;
    position: absolute;
    top: -0.36rem;
    left: 1rem;
    width: 0.68rem;
    height: 0.68rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-left: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 12, 0.46);
    transform: rotate(45deg);
}

.darkthread-author-profile-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem 0.85rem;
    flex-wrap: wrap;
    margin: 0.58rem 0 0;
    color: var(--dt-fg-muted);
    font-size: 0.8rem;
}

.darkthread-author-profile-meta div {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}

.darkthread-author-profile-meta dt {
    color: var(--dt-fg-soft);
    font-weight: 650;
}

.darkthread-author-profile-meta dd {
    margin: 0;
    color: var(--dt-fg-muted);
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .darkthread-author-profile-card {
        align-items: flex-start;
        padding: 0.85rem;
    }

    .darkthread-author-profile-avatar {
        width: 5rem;
        height: 5rem;
        font-size: 1.65rem;
    }

    .darkthread-author-profile-bio {
        margin-top: 0.72rem;
        padding: 0.64rem 0.78rem;
    }

    .darkthread-author-profile-bio::before {
        left: 0.9rem;
    }
}

/* board/view, 계정 요약, 관리자 회원 보기: 좁은 화면에서 아바타 중앙 → 닉네임 → 자기소개 순 */
@media (max-width: 760px) {
    .darkthread-author-profile-card {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem 1rem;
    }

    .darkthread-author-profile-avatar {
        align-self: center;
    }

    .darkthread-author-profile-main {
        width: 100%;
        max-width: 100%;
    }

    .darkthread-author-profile-head {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.42rem;
        width: 100%;
        text-align: center;
    }

    .darkthread-author-profile-name {
        justify-content: center;
    }

    .darkthread-author-profile-bio {
        text-align: start;
        margin-top: 0.55rem;
    }

    .darkthread-author-profile-meta {
        justify-content: center;
        text-align: center;
    }

    .darkthread-author-profile-meta div {
        flex-direction: column;
        align-items: center;
        gap: 0.12rem;
    }

    .darkthread-author-profile-card .account-profile-bio-inline-head {
        justify-content: center;
    }

    .darkthread-author-profile-card .account-profile-bio-inline-form {
        text-align: start;
    }

    .darkthread-author-profile-card .account-profile-bio-field textarea.notice-admin-input {
        text-align: left;
    }
}
