/* ------------------------------------------------------------------
   Default 主题功能样式：顶栏搜索 / 登录弹窗 / 抽屉 / 底部导航
   / 卡片话题与菜单 / 发布框 / 友链与关于页
   ------------------------------------------------------------------ */

/* ---------------------------------------------------------- 顶栏 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-width: 0;
}

.search {
    position: relative;
    width: 200px;
    height: 34px;
}

.search input {
    width: 100%;
    height: 100%;
    padding: 0 34px 0 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 999px;
    outline: none;
    background: var(--surface, #fff);
    color: inherit;
    font-family: inherit;
    font-size: 13px;
}

.search input::placeholder { color: var(--muted, #9ca3af); }

.search__btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted, #6b7280);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.search__btn:hover { background: var(--accent-weak); color: var(--accent); }

.header-user {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 50%;
    background: var(--surface, #fff);
    color: var(--muted, #6b7280);
    font-size: 15px;
    cursor: pointer;
    overflow: hidden;
    flex: 0 0 auto;
}

.header-user:hover { border-color: var(--accent); color: var(--accent); }
.header-user img { width: 100%; height: 100%; object-fit: cover; }
.header-user__initial { font-size: 13px; font-weight: 600; color: var(--accent); }

.menu-toggle {
    display: none;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 50%;
    background: var(--surface, #fff);
    color: var(--muted, #6b7280);
    font-size: 15px;
    cursor: pointer;
}

@media (max-width: 860px) {
    .site-nav { display: none; }

    .menu-toggle { display: inline-flex; }

    .search {
        width: 34px;
        transition: width .22s ease;
    }

    .search input {
        width: 0;
        padding: 0;
        opacity: 0;
        border-color: transparent;
    }

    .search__btn { right: 0; width: 34px; height: 34px; }

    .search.is-open { width: min(46vw, 180px); }
    .search.is-open input {
        width: 100%;
        padding: 0 34px 0 12px;
        opacity: 1;
        border-color: var(--line, #e5e7eb);
    }

    .site-header .container { gap: 8px; }
    .site-header { overflow: hidden; }
}

/* ---------------------------------------------------------- 底部导航 */
.bottom-nav { display: none; }

@media (max-width: 860px) {
    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        display: flex;
        background: var(--surface, #fff);
        border-top: 1px solid var(--line, #e5e7eb);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bottom-nav__item {
        flex: 1;
        padding: 10px 0;
        border: 0;
        background: none;
        color: var(--muted, #6b7280);
        font-family: inherit;
        font-size: 12.5px;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
    }

    .bottom-nav__item.is-active { color: var(--accent); font-weight: 600; }

    body { padding-bottom: 54px; }
}

/* ---------------------------------------------------------- 抽屉 */
.drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15, 23, 42, .42);
}

.drawer-mask[hidden] { display: none; }

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 61;
    width: min(80vw, 300px);
    display: flex;
    flex-direction: column;
    background: var(--surface, #fff);
    box-shadow: 0 0 30px rgba(15, 23, 42, .18);
    transform: translateX(-102%);
    transition: transform .22s ease;
    overflow-y: auto;
}

.drawer.open { transform: none; }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line, #e5e7eb);
}

.drawer__close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--accent-weak);
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.drawer__nav { display: flex; flex-direction: column; padding: 8px; }

.drawer__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    color: inherit;
    font-size: 14px;
    text-decoration: none;
}

.drawer__link:hover { background: var(--accent-weak); color: var(--accent); }
.drawer__link.is-active { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.drawer__count { font-size: 12px; color: var(--muted, #6b7280); }

.drawer__group {
    margin: 12px 12px 2px;
    font-size: 11.5px;
    letter-spacing: .08em;
    color: var(--muted, #9ca3af);
}

.drawer__foot { margin-top: auto; padding: 14px 16px 22px; }

/* ---------------------------------------------------------- 登录弹窗 */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
}

.auth-modal[hidden] { display: none; }

.auth-modal__mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .48); }

.auth-modal__body {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 22px 22px 24px;
    background: var(--surface, #fff);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .28);
}

.auth-modal__close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: var(--accent-weak);
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.auth-tabs { display: flex; gap: 16px; margin-bottom: 14px; }

.auth-tab {
    padding: 0 0 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted, #6b7280);
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
}

.auth-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.auth-title { margin: 0 0 4px; font-size: 20px; }
.auth-sub { margin: 0 0 16px; color: var(--muted, #6b7280); font-size: 13px; }

.auth-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 12px;
    height: 42px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px;
    background: var(--surface, #fff);
}

.auth-field > span { display: none; }

.auth-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 14px;
}

.auth-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-weak);
}

.auth-code-btn {
    flex: 0 0 auto;
    padding: 0 10px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: var(--accent-weak);
    color: var(--accent);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 14px;
    font-size: 12.5px;
    color: var(--muted, #6b7280);
}

.auth-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-link { color: var(--accent); text-decoration: none; }

.auth-error {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(220, 38, 38, .08);
    color: #d64545;
    font-size: 13px;
}

.auth-error[hidden] { display: none; }

.auth-submit {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
}

.auth-submit:disabled { opacity: .6; cursor: default; }

.auth-switch { margin-top: 12px; font-size: 12.5px; color: var(--muted, #6b7280); text-align: center; }
.auth-switch a { color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------- 卡片补充 */
.post-card { position: relative; }

.card-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.chip-topic {
    background: var(--accent-weak);
    color: var(--accent);
    border-color: transparent;
}

.chip-topic:hover { background: var(--accent); color: #fff; }

.post-card__note {
    margin-top: 8px;
    font-size: 14.5px;
    line-height: 1.8;
    color: inherit;
    max-height: 320px;
    overflow: hidden;
}

.post-card__note p { margin: 0 0 .4em; }
.post-card__note p:last-child { margin-bottom: 0; }
.post-card__note img { max-width: 100%; max-height: 300px; border-radius: 10px; }
.post-card__note a { color: var(--accent); }

/* 行内话题 */
.chip.chip--inline {
    display: inline;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--accent-weak);
    color: var(--accent);
    font-size: .94em;
    white-space: nowrap;
    text-decoration: none;
}

.post-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--muted, #6b7280);
}

.card-stats { display: flex; align-items: center; gap: 12px; }

.card-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

button.card-stat:hover { color: var(--accent); }
button.card-stat.is-active { color: var(--accent); font-weight: 600; }

.card-more-link { color: var(--accent); text-decoration: none; font-size: 12.5px; }
.card-ago { font-size: 12px; }

/* 卡片右上角菜单 */
.card-menu { position: absolute; right: 12px; top: 12px; }

.card-menu__toggle {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted, #9ca3af);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.card-menu__toggle:hover { background: var(--accent-weak); color: var(--accent); }

.card-menu__pop {
    position: absolute;
    right: 0;
    top: 30px;
    min-width: 96px;
    padding: 5px;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
    z-index: 20;
}

.card-menu__pop[hidden] { display: none; }

.card-menu__pop a,
.card-menu__pop button {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.card-menu__pop a:hover,
.card-menu__pop button:hover { background: var(--accent-weak); color: var(--accent); }
.card-menu__pop button[data-content-delete]:hover { background: rgba(220, 38, 38, .1); color: #d64545; }

/* ---------------------------------------------------------- 内容页操作栏 */
.article-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 4px;
    padding-top: 14px;
    border-top: 1px solid var(--line, #e5e7eb);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 999px;
    background: var(--surface, #fff);
    color: var(--muted, #6b7280);
    font-family: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.is-active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.action-btn__count { font-size: 12px; opacity: .8; }
.action-btn--right { margin-left: auto; border: 0; background: none; color: var(--accent); }

/* ---------------------------------------------------------- 发布框 */
.editor-box {
    position: relative;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.editor-box.is-editing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }

.editor-box__notice { margin-bottom: 6px; font-size: 12px; color: var(--muted, #6b7280); }
.editor-box__notice a { color: var(--accent); margin-left: 6px; }

.editor-box__input {
    width: 100%;
    min-height: 56px;
    border: 0;
    outline: none;
    resize: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.7;
}

.editor-box__input::placeholder { color: var(--muted, #9ca3af); }

.editor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line, #e5e7eb);
}

.editor-tools {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.editor-tools .tool {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted, #9ca3af);
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.editor-tools .tool:hover { background: var(--accent-weak); color: var(--accent); }

.editor-submit { flex: 0 0 auto; }

.editor-guest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 16px;
}

/* 表情面板 */
.emoji-pop {
    position: absolute;
    left: 0;
    top: 34px;
    z-index: 30;
    width: min(320px, calc(100vw - 40px));
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.emoji-pop[hidden] { display: none; }

.emoji-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line, #f1f5f9);
}

.emoji-tab {
    padding: 3px 8px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted, #6b7280);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.emoji-tab.is-active { background: var(--accent-weak); color: var(--accent); }

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
    gap: 2px;
}

.emoji-item {
    padding: 4px 0;
    border: 0;
    border-radius: 6px;
    background: none;
    font-size: 17px;
    line-height: 1.2;
    cursor: pointer;
}

.emoji-item:hover { background: var(--accent-weak); }

/* ---------------------------------------------------------- 友链页 */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
}

.link-card:hover { border-color: var(--accent); }

.link-card__logo {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--accent-weak);
    color: var(--accent);
    font-weight: 600;
    overflow: hidden;
}

.link-card__logo img { width: 100%; height: 100%; object-fit: cover; }

.link-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link-card__body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------- 关于页 */
.about-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 18px 20px;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
}

.about-head__avatar {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent-weak);
    color: var(--accent);
    font-size: 20px;
    font-weight: 600;
    overflow: hidden;
}

.about-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-head__body h1 { margin: 0 0 4px; font-size: 22px; }
.about-head__body p { margin: 0; }

.about-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.about-contact { display: flex; flex-wrap: wrap; gap: 10px; }

.about-contact__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 200px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--accent-weak);
    color: inherit;
    text-decoration: none;
}

.about-contact__item span { font-weight: 600; font-size: 13.5px; }
.about-contact__item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------
   卡片纵向间距：相邻卡片 16px（flex/grid 容器内交给 gap，避免双倍）
   ------------------------------------------------------------------ */
.card + .card { margin-top: 16px; }

.layout-side .card + .card,
.post-list .card + .card,
.drawer .card + .card { margin-top: 0; }

/* 主栏不是 flex 时，列表/分页与卡片之间也要有呼吸 */
.layout-main > * + * { margin-top: 16px; }
.layout-main > .post-list + *,
.layout-main > * + .post-list { margin-top: 16px; }
.about-head + .card { margin-top: 16px; }
.link-grid + .card { margin-top: 16px; }
.page-head + .card { margin-top: 2px; }
/* 文章头部与正文之间留出呼吸 */
.article-head { margin-bottom: 18px; }
.article-head + .prose { margin-top: 0; }
.article-foot { margin-top: 22px; }
/* 注册验证码按钮：登录弹窗内沿用 .auth-field 的 flex 排列，
   只有独立注册页的纵向 field--code 需要绝对定位 */
.field--code { position: relative; }
.field--code .input { padding-right: 104px; }
.field--code .auth-code-btn {
  position: absolute;
  right: 8px;
  bottom: 7px;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-weak);
  color: var(--accent);
  font-family: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
}
.field--code .auth-code-btn:hover { background: var(--accent); color: #fff; }
.field--code .auth-code-btn:disabled { opacity: .6; cursor: default; }

/* 个人中心：第三方账号绑定 */
.me-bind { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.me-bind__item { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; transition:border-color .16s, background-color .16s; }
.me-bind__item:hover { border-color: var(--brand-line); background: var(--surface-2); }
.me-bind__item form { margin:0; }
.me-bind__icon { width:34px; height:34px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; border-radius:9px; background:var(--surface-2); }
.me-bind__icon svg { width:18px; height:18px; }
.me-bind__icon--qq { color:#12b7f5; background:rgba(18,183,245,.1); }
.me-bind__icon--wechat { color:#07c160; background:rgba(7,193,96,.1); }
.me-bind__icon--github { color:#24292f; background:rgba(36,41,47,.08); }
.me-bind__body { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.me-bind__body strong { font-size:13.5px; font-weight:600; }

/* ---------------------------------------------------------------- 个人中心：头像上传 */
.me-avatar { display: flex; align-items: flex-start; gap: 12px; }
.me-avatar__preview {
  width: 56px; height: 56px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden;
  background: var(--surface-2, #f3f6fc);
  border: 1px solid var(--line, #eef1f7);
  color: var(--muted, #8b93a4);
  font-size: 20px; font-weight: 600;
}
.me-avatar__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-avatar__empty { font-size: 20px; font-weight: 600; }
.me-avatar__body { flex: 1; min-width: 0; }
.me-avatar__actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.me-avatar__tip { font-size: 12px; line-height: 1.7; }
.me-avatar__tip[hidden] { display: none; }

/* ---------------------------------------------------------------- 回到顶部 */
.back-top {
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 40;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px -14px rgba(16, 24, 40, .55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s, border-color .16s, color .16s;
}
.back-top.is-show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { border-color: var(--accent); color: var(--accent); }
@media (min-width: 721px) {
  .back-top { right: 22px; bottom: 26px; }
}


/* ---------------------------------------------------------------- 文章归档 */
.archive-list { padding: 10px 22px 18px; }

.archive-year {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 18px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.archive-year span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.archive-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px dashed transparent;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.archive-row:hover { border-bottom-color: var(--border); }

.archive-row time {
  flex: 0 0 auto;
  width: 52px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.archive-row__title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-row:hover .archive-row__title { color: var(--accent); }

.archive-row .chip { flex: 0 0 auto; }

.archive-row.is-static { cursor: default; }
.archive-row.is-static:hover .archive-row__title { color: inherit; }

@media (max-width: 600px) {
  .archive-list { padding: 6px 14px 14px; }
  .archive-row time { width: 44px; font-size: 11.5px; }
  .archive-row__title { font-size: 13px; }
}


/* ---------------------------------------------------------------- 评论：表情面板 + 验证 */
.comment-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
}

.comment-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2, #4a5261);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .16s, color .16s, background-color .16s;
}

.comment-tool:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.comment-tool[aria-expanded="true"] {
  border-color: var(--accent);
  background: rgba(51, 102, 255, .06);
  color: var(--accent);
}

.emoji-panel {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  max-height: 214px;
  overflow-y: auto;
}

.emoji-panel[hidden] { display: none; }

.emoji-panel__group { margin-bottom: 10px; }
.emoji-panel__group:last-child { margin-bottom: 0; }

.emoji-panel__title {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
}

.emoji-panel__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.emoji-item {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .14s, transform .14s;
}

.emoji-item:hover {
  background: #f2f5fa;
  transform: scale(1.14);
}

.comment-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-captcha .input {
  max-width: 110px;
  text-align: center;
  letter-spacing: .08em;
}