/* ============================================================
   community.css — 社区「以太」
   只放社区特有组件；配色一律引用 site.css 的 --site-* 令牌，
   亮暗两套自动跟随。
   ============================================================ */

/* ---------- 社区页头 ---------- */

.eth-head {
    padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1rem, 3vw, 1.5rem);
}

.eth-brand {
    display: inline-flex;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: .5rem;
}

.eth-name {
    font-size: clamp(1.8rem, 4.4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.03em;
}

.eth-mark {
    font-family: var(--site-mono);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--site-accent);
}

.eth-sub {
    color: var(--bs-secondary-color);
    margin-bottom: 0;
    font-size: .95rem;
}

/* ---------- 两栏布局：左板块 / 右帖子 ---------- */

.eth-layout {
    display: grid;
    grid-template-columns: 15.5rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.eth-side {
    position: sticky;
    /* 导航是 fixed，侧栏跟着往下让一个导航高度 */
    top: calc(var(--nav-h, 60px) + 1rem);
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .5rem;
    background-color: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
}

.eth-side-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .6rem;
    border-radius: 9px;
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: .9rem;
    line-height: 1.3;
}

.eth-side-item:hover {
    background-color: var(--site-accent-soft);
    color: var(--bs-body-color);
}

.eth-side-item.is-active {
    background-color: var(--site-accent);
    color: var(--site-on-accent);
    font-weight: 600;
}

.eth-side-icon {
    width: 1.35rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1;
}

.eth-side-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eth-side-count {
    font-family: var(--site-mono);
    font-size: .7rem;
    opacity: .65;
}

.eth-side-lock {
    font-family: var(--site-mono);
    font-size: .6rem;
    letter-spacing: .04em;
    padding: .05rem .3rem;
    border-radius: 999px;
    background-color: var(--site-accent-soft);
    color: var(--site-accent);
}

.eth-side-item.is-active .eth-side-lock {
    background-color: rgba(255, 255, 255, .22);
    color: inherit;
}

.eth-side-foot {
    display: flex;
    gap: .4rem;
    margin-top: .35rem;
    padding-top: .55rem;
    border-top: 1px solid var(--site-border);
}

.eth-side-link {
    flex: 1 1 0;
    text-align: center;
    padding: .35rem .5rem;
    font-size: .82rem;
    border-radius: 8px;
    border: 1px solid var(--site-border);
    color: var(--bs-body-color);
    text-decoration: none;
}

.eth-side-link:hover {
    border-color: var(--site-accent);
    color: var(--site-accent);
}

.eth-side-link.is-accent {
    background-color: var(--site-accent);
    border-color: var(--site-accent);
    color: var(--site-on-accent);
    font-weight: 500;
}

.eth-side-me {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    padding: .25rem .35rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: .85rem;
}

.eth-side-me:hover {
    background-color: var(--site-accent-soft);
    color: inherit;
}

/* ---------- 右侧帖子列表 ---------- */

.eth-feed {
    min-width: 0;
}

.eth-feed-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--site-border);
    margin-bottom: .25rem;
}

.eth-feed-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.eth-feed-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -.01em;
}

.eth-feed-meta {
    margin: .2rem 0 0;
    font-size: .78rem;
    color: var(--bs-secondary-color);
}

.eth-post-list {
    display: flex;
    flex-direction: column;
}

.post-row-board {
    color: var(--site-accent);
}

.meta-stat {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

/* ---------- 游客弹窗 ---------- */

.eth-modal {
    background-color: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
}

.eth-modal .modal-title {
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .eth-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: .9rem;
    }

    /* 手机端侧栏改成横向可滑的胶囊，不占一屏高度 */
    .eth-side {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding: .4rem;
        scrollbar-width: none;
    }

    .eth-side::-webkit-scrollbar {
        display: none;
    }

    .eth-side-item {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: .4rem .65rem;
    }

    .eth-side-count,
    .eth-side-lock {
        display: none;
    }

    .eth-side-foot {
        flex: 0 0 auto;
        margin: 0 0 0 .3rem;
        padding: 0 0 0 .4rem;
        border-top: 0;
        border-left: 1px solid var(--site-border);
        align-items: center;
    }

    .eth-side-me span {
        display: none;
    }
}

/* ---------- 用户信息块 ---------- */

.avatar {
    display: inline-block;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--site-surface-alt);
    border: 1px solid var(--site-border);
    flex: 0 0 auto;
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 96px; height: 96px; }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: inherit;
    text-decoration: none;
}

.user-name {
    font-weight: 600;
    font-size: .92rem;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    color: var(--bs-secondary-color);
}

.level-badge {
    font-family: var(--site-mono);
    font-size: .68rem;
    padding: .05rem .4rem;
    border-radius: 4px;
    color: var(--site-on-accent);
    background-color: var(--site-accent);
    letter-spacing: .02em;
}

.title-badge {
    font-size: .7rem;
    padding: .05rem .45rem;
    border-radius: 999px;
    border: 1px solid var(--site-accent);
    color: var(--site-accent);
    white-space: nowrap;
}

.role-badge {
    font-size: .68rem;
    padding: .05rem .4rem;
    border-radius: 4px;
    background-color: var(--site-surface-alt);
    border: 1px solid var(--site-border);
    color: var(--bs-secondary-color);
}

.user-signature {
    color: var(--bs-secondary-color);
    font-size: .88rem;
    line-height: 1.7;
}

/* ---------- 个人主页头部 ---------- */

.profile-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background-color: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
}

.profile-main {
    min-width: 12rem;
    flex: 1 1 14rem;
}

.profile-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: .3rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: .85rem;
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.profile-stats strong {
    display: block;
    font-family: var(--site-mono);
    font-size: 1rem;
    color: var(--bs-body-color);
    font-weight: 600;
}

/* ---------- 空状态（社区版，复用主站变量） ---------- */

.eth-empty {
    max-width: 32rem;
    margin: 1.25rem auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    background-color: var(--site-surface);
}

.eth-empty-face {
    font-family: var(--site-mono);
    font-size: 1.4rem;
    color: var(--site-accent);
    margin-bottom: .6rem;
}

/* ---------- 表单 ---------- */

.eth-form {
    max-width: 26rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    background-color: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    box-shadow: var(--site-shadow);
}

.eth-form .form-label {
    font-size: .82rem;
    color: var(--bs-secondary-color);
    margin-bottom: .3rem;
}

.eth-form-foot {
    margin: 1.1rem 0 0;
    text-align: center;
    font-size: .82rem;
    color: var(--bs-secondary-color);
}

.eth-form-foot a {
    color: var(--site-accent);
    text-decoration: none;
}

.eth-note {
    font-size: .78rem;
    color: var(--bs-secondary-color);
}

/* ---------- 头像上传 ---------- */

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--site-border);
    background-color: var(--site-surface-alt);
}

/* ---------- 社区内的按钮尺寸 ---------- */

.eth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* ---------- 帖子列表行（批次 B 起用） ---------- */

.post-row {
    position: relative;
    display: block;
    padding: .95rem 1rem;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background-color .15s ease;
}

/* 分隔线画在伪元素上：左右各留 1rem，悬停时让位给圆角高亮 */
.post-row::after {
    content: "";
    position: absolute;
    right: 1rem;
    bottom: 0;
    left: 1rem;
    height: 1px;
    background-color: var(--site-border);
    transition: opacity .15s ease;
}

.post-row:hover {
    background-color: var(--site-row-hover);
    color: inherit;
}

.post-row:hover::after,
.eth-post-list > .post-row:last-child::after {
    opacity: 0;
}

.post-row:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: -2px;
}

.post-row-title {
    display: block;
    font-weight: 600;
    font-size: .98rem;
    margin-bottom: .3rem;
}

.post-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    font-size: .76rem;
    color: var(--bs-secondary-color);
}

.dot {
    opacity: .45;
}

/* ---------- 分页 ---------- */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: center;
}

.pager-btn {
    min-width: 2rem;
    padding: .25rem .55rem;
    font-size: .82rem;
    text-align: center;
    text-decoration: none;
    color: var(--bs-secondary-color);
    border: 1px solid var(--site-border);
    border-radius: 8px;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.pager-btn:hover {
    border-color: var(--site-accent);
    color: var(--site-accent);
    background-color: var(--site-accent-soft);
}

.pager-btn:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: 2px;
}

.pager-btn.is-active {
    color: var(--site-on-accent);
    background-color: var(--site-accent);
    border-color: var(--site-accent);
}


/* ---------- 让短页面也把页脚压到底部 ---------- */

.community-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.community-body main {
    flex: 1 0 auto;
}

/* ---------- 发帖表单 ---------- */

.eth-form-wide {
    max-width: 46rem;
}

.eth-counter {
    font-family: var(--site-mono);
    font-size: .72rem;
    color: var(--bs-secondary-color);
}

/* ---------- 帖子详情 ---------- */

.eth-post {
    padding: clamp(1.5rem, 4vw, 2.75rem) 0 1.25rem;
}

.post-title {
    font-size: clamp(1.35rem, 3.2vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.35;
    margin: .5rem 0 .9rem;
    overflow-wrap: anywhere;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    font-size: .82rem;
    color: var(--bs-secondary-color);
}

.post-body {
    margin: 1.5rem 0 1.75rem;
    font-size: 1rem;
    line-height: 1.9;
    /* 用户输入是纯文字：保留换行与连续空格，不让长串撑破容器 */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--site-border);
}

/* ---------- 点赞按钮 ---------- */

.like-form {
    display: inline-flex;
    margin: 0;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    font-size: .82rem;
    line-height: 1.2;
    color: var(--bs-secondary-color);
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--site-border);
    border-radius: 999px;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.like-btn svg {
    flex: 0 0 auto;
}

.like-btn:hover {
    color: var(--site-accent);
    border-color: var(--site-accent);
}

.like-btn-sm {
    padding: .15rem .55rem;
    font-size: .75rem;
}

.like-form.is-liked .like-btn {
    color: var(--site-accent);
    border-color: var(--site-accent);
    background-color: var(--site-accent-soft);
}

.like-btn[disabled] {
    opacity: .55;
}

.like-count {
    font-family: var(--site-mono);
    font-size: .78em;
}

/* ---------- 评论区 ---------- */

.comment-section {
    padding: 1rem 0 4rem;
}

.comment-form {
    padding: 1rem 1.1rem;
    background-color: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
}

.comment-form .form-label {
    font-size: .82rem;
    color: var(--bs-secondary-color);
}

.comment-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .6rem;
}

.comment-form-sm {
    margin-top: .7rem;
    padding: .75rem .85rem;
}

.comment-list {
    margin-top: 1.5rem;
}

.comment {
    padding: .9rem 0;
    border-top: 1px solid var(--site-border);
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
}

.comment-time {
    margin-left: auto;
    font-family: var(--site-mono);
    font-size: .7rem;
    color: var(--bs-secondary-color);
}

.comment-reply-to {
    margin: .35rem 0 0;
    font-size: .76rem;
    color: var(--bs-secondary-color);
}

.comment-body {
    margin: .45rem 0 .55rem;
    font-size: .94rem;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .8rem;
}

/* 回复平铺在所属顶层评论下面：一条竖线表示从属，不再往右叠 */
.comment-replies {
    margin: .35rem 0 0 1.1rem;
    padding-left: .9rem;
    border-left: 1px solid var(--site-border);
}

.comment-reply {
    padding: .7rem 0;
    border-top: 1px dashed var(--site-border);
}

.comment-reply:first-child {
    border-top: 0;
    padding-top: .3rem;
}

.comment-reply:last-child {
    padding-bottom: .2rem;
}

/* ---------- 评论折叠 ---------- */

.comment-body {
    transition: max-height .28s ease;
}

.comment-body.is-clampable {
    position: relative;
    overflow: hidden;
}

.comment-body.is-clampable:not(.is-expanded)::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 2.6em;
    background: linear-gradient(to bottom, transparent, var(--bs-body-bg) 72%);
    pointer-events: none;
}

.comment-more {
    display: inline-block;
    margin: -.15rem 0 .55rem;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: .8rem;
    color: var(--site-accent);
    cursor: pointer;
}

.comment-more:hover {
    text-decoration: underline;
}

/* ---------- 评论操作行 ---------- */

.comment-actions > form,
.comment-actions > button,
.comment-actions > a {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1.2;
}

.comment-reply-toggle,
.comment-pin,
.link-danger {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: .8rem;
    line-height: 1.2;
    cursor: pointer;
}

.comment-reply-toggle {
    color: var(--site-accent);
}

.comment-reply-toggle:hover,
.comment-pin:hover,
.link-danger:hover {
    text-decoration: underline;
}

/* 回复框：平铺在评论下方，收起高度为 0，展开是滑入 */
.comment-reply-box {
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .26s ease, opacity .2s ease, margin-top .26s ease;
}

.comment-reply-box.is-open {
    max-height: 26rem;
    margin-top: .6rem;
    opacity: 1;
}

.comment-reply-box .comment-form {
    padding: .7rem .8rem;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    background-color: var(--site-row-hover);
}

.comment-reply-box textarea {
    font-size: .92rem;
}

@media (max-width: 575.98px) {
    .comment-replies {
        margin-left: .3rem;
        padding-left: .55rem;
    }

    .eth-post {
        padding-top: 1rem;
    }
}

/* ---------- 导航未读徽标 ---------- */

.nav-badge {
    display: inline-block;
    min-width: 1.1rem;
    margin-left: .3rem;
    padding: 0 .28rem;
    font-family: var(--site-mono);
    font-size: .64rem;
    line-height: 1.1rem;
    text-align: center;
    border-radius: 999px;
    background-color: var(--site-accent);
    color: var(--site-on-accent);
    vertical-align: .1em;
}

/* ---------- 收件箱 ---------- */

.notif-list {
    display: flex;
    flex-direction: column;
}

.notif-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background-color .15s ease;
}

.notif-row::after {
    content: "";
    position: absolute;
    right: 1rem;
    bottom: 0;
    left: 1rem;
    height: 1px;
    background-color: var(--site-border);
    transition: opacity .15s ease;
}

.notif-row:hover {
    background-color: var(--site-row-hover);
    color: inherit;
}

.notif-row:hover::after,
.notif-list > .notif-row:last-child::after {
    opacity: 0;
}

.notif-row:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: -2px;
}

.notif-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: var(--bs-secondary-color);
    background-color: var(--site-surface-alt);
}

.notif-row.is-unread .notif-icon {
    color: var(--site-accent);
    background-color: var(--site-accent-soft);
}

.notif-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.notif-text {
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.notif-row.is-unread .notif-text {
    font-weight: 600;
}

.notif-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    font-size: .74rem;
    color: var(--bs-secondary-color);
}

.notif-dot {
    flex: 0 0 auto;
    width: .45rem;
    height: .45rem;
    margin-top: .55rem;
    border-radius: 50%;
    background-color: var(--site-accent);
}

@media (max-width: 575.98px) {
    /* 窄屏下标题会换行，前面的分隔点孤零零留在行尾，干脆不显示 */
    .notif-meta .dot {
        display: none;
    }
}

/* ---------- 删除（文字按钮） ---------- */

.link-danger {
    padding: .1rem .4rem;
    border: 0;
    border-radius: 6px;
    background: none;
    font-size: .78rem;
    line-height: 1.4;
    color: var(--bs-danger);
    text-decoration: none;
    transition: background-color .15s ease;
}

.link-danger:hover {
    background-color: rgba(220, 53, 69, .1);
}

/* ---------- 个人页：TA 的帖子 ---------- */

.profile-posts {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--site-border);
}

/* ---------- 列表头部：搜索 ---------- */

.eth-feed-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem;
}

.eth-search {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin: 0;
}

.eth-search-input {
    width: 10.5rem;
    padding: .25rem .55rem;
    font-size: .82rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--site-border);
    border-radius: 8px;
}

.eth-search-input:focus {
    outline: none;
    border-color: var(--site-accent);
    box-shadow: 0 0 0 2px var(--site-accent-soft);
}

.eth-search-btn {
    flex: 0 0 auto;
    padding: .25rem .6rem;
    font-size: .8rem;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--bs-body-color);
    background-color: transparent;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    transition: color .15s ease, border-color .15s ease;
}

.eth-search-btn:hover {
    color: var(--site-accent);
    border-color: var(--site-accent);
}

.eth-search-clear {
    padding: 0 .15rem;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.eth-search-clear:hover {
    color: var(--bs-danger);
}

@media (max-width: 575.98px) {
    .eth-feed-head {
        flex-direction: column;
        align-items: stretch;
        gap: .55rem;
    }

    .eth-feed-tools {
        width: 100%;
        justify-content: space-between;
    }

    .eth-search {
        flex: 1 1 auto;
        min-width: 0;
    }

    .eth-search-input {
        width: 100%;
        min-width: 0;
    }

    /* 发帖按钮在窄屏不挤搜索框 */
    .eth-feed-tools > .btn {
        flex: 0 0 auto;
    }
}

/* ---------- 侧栏：账号切换入口 ---------- */

.eth-side-me {
    flex: 1 1 0;
}

.eth-side-switch {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    border: 1px solid var(--site-border);
    border-radius: 8px;
}

.eth-side-switch:hover {
    color: var(--site-accent);
    border-color: var(--site-accent);
}

/* ---------- 账号管理 ---------- */

.account-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.account-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1rem;
    background-color: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
}

.account-row.is-current {
    border-color: var(--site-accent);
    background-color: var(--site-accent-soft);
}

.account-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.account-name {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.account-tag {
    padding: .05rem .4rem;
    font-size: .68rem;
    line-height: 1.5;
    border-radius: 999px;
    background-color: var(--site-accent);
    color: var(--site-on-accent);
}

.account-link {
    font-size: .76rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.account-link:hover {
    color: var(--site-accent);
}

.account-actions {
    flex: 0 0 auto;
}

.account-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-top: 1.1rem;
}

/* ---------- 注销区 ---------- */

.eth-danger {
    margin-top: 2rem;
    padding: 1.1rem 1.2rem;
    background-color: rgba(220, 53, 69, .05);
    border: 1px solid rgba(220, 53, 69, .32);
    border-radius: var(--site-radius);
}

.eth-danger-row {
    display: flex;
    gap: .5rem;
    max-width: 22rem;
}

@media (max-width: 575.98px) {
    .account-row {
        flex-wrap: wrap;
    }

    .account-actions {
        width: 100%;
    }

    .account-actions .btn,
    .account-actions form {
        width: 100%;
    }
}

/* ---------- 头像裁剪 ---------- */

.crop-stage {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--site-surface-alt);
}

.crop-stage canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
    touch-action: none;
}

.crop-stage canvas:active {
    cursor: grabbing;
}

.crop-zoom {
    max-width: 360px;
    margin: .85rem auto 0;
}

.crop-zoom .form-label {
    margin-bottom: .25rem;
    font-size: .78rem;
    color: var(--bs-secondary-color);
}

/* 通知行：改成 POST 表单里的按钮（改状态必须 POST，SEC-15） */
.notif-form {
    margin: 0;
}

button.notif-row {
    width: 100%;
    background: none;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.notif-list > .notif-form:last-child .notif-row::after {
    opacity: 0;
}

/* 置顶评论：顶部独立一块，与普通评论区分开 */
.pinned-item {
    padding: .6rem .9rem;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    background: var(--site-row-hover);
}

.pinned-label {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin: 0 0 .35rem;
    font-size: .8rem;
    color: var(--site-accent);
}

.comment-pin {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--site-accent);
    cursor: pointer;
}

.comment-pin:hover {
    text-decoration: underline;
}
