/* 留言板（PD-BOARD-001）：手机网页和电脑网页共用。颜色都取 ui-kit.css 的共用配色（跟随系统深浅色，PD-CLIENT-014），
   括号里的兜底值是浅色；站长标用金色（和旁白里的对白同一种金），不用粉色字 */

.board-list { padding-bottom: 16px; }

.board-rows { margin: 0 0 8px; background: var(--y-surface, #fffaf8); border-bottom: 1px solid var(--y-line, #f1dfdd); }
.board-row {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px;
    border: 0; background: none; color: var(--y-text, #3b2a2e); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.board-row + .board-row { border-top: 1px solid var(--y-line, #f1dfdd); }
.board-row:active { background: var(--y-pressed, rgba(122, 64, 84, .08)); }
.board-row svg, .board-write svg, .board-foot svg, .board-icon svg {
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.board-row svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--y-icon, #5e454c); }
.board-row svg:last-child { width: 16px; height: 16px; color: var(--y-text3, #a3868c); }
.board-row .grow { flex: 1; min-width: 0; }
.board-row .val { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--y-text2, #8a6c72); font-size: 14px; }
.board-badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--y-badge, #fa5151); color: #fff;
    font-size: 11.5px; line-height: 18px; text-align: center;
}

.board-write {
    display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 24px); margin: 4px 12px 10px; padding: 9px 12px;
    border: 1px solid var(--y-line, #f1dfdd); border-radius: 10px; background: var(--y-surface, #fffaf8); color: var(--y-text, #3b2a2e);
    font: inherit; font-size: 14px; cursor: pointer;
}
.board-write:hover { background: var(--y-hover, #f9ebea); }
.board-write svg { width: 17px; height: 17px; }

.board-card {
    display: flex; gap: 10px; padding: 12px 14px; background: var(--y-surface, #fffaf8); border-bottom: 1px solid var(--y-line, #f1dfdd);
    cursor: pointer; outline-offset: -2px;
}
.board-card:active { background: var(--y-pressed, rgba(122, 64, 84, .08)); }
.board-card.on { background: var(--y-primary-soft, rgba(201, 108, 138, .12)); }
.board-card.deleted { align-items: center; color: var(--y-text3, #a3868c); font-size: 14px; }
.board-card.deleted .grow { flex: 1; }
.board-ava {
    width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: var(--y-placeholder, #f2e3e3);
}
.board-ava.small { width: 32px; height: 32px; }
.board-ava.text { display: grid; place-items: center; color: var(--y-text2, #8a6c72); font-size: 15px; }
.board-main { flex: 1; min-width: 0; }
.board-meta { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 22px; color: var(--y-text3, #a3868c); font-size: 12.5px; }
.board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--y-text, #3b2a2e); font-size: 14px; font-weight: 600; }
.board-tag {
    flex: 0 0 auto; padding: 0 6px; border-radius: 4px; background: var(--y-surface-alt, #f6e9e8); color: var(--y-text2, #8a6c72);
    font-size: 11px; line-height: 18px;
}
.board-tag.gold { background: rgba(160, 98, 10, .12); color: var(--y-dialogue, #a0620a); }
.board-tag.warn { background: var(--y-danger-soft, rgba(217, 67, 95, .08)); color: var(--y-danger, #d9435f); }
.board-account { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.board-time { flex: 0 0 auto; margin-left: auto; font-size: 12px; white-space: nowrap; }
.board-body {
    margin-top: 3px; color: var(--y-text, #3b2a2e); font-size: 15px; line-height: 1.55;
    white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.board-list .board-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.board-note { margin-top: 4px; color: var(--y-danger, #d9435f); font-size: 12.5px; }
.board-foot { display: flex; align-items: center; gap: 18px; margin-top: 6px; color: var(--y-text2, #8a6c72); font-size: 12.5px; }
.board-stat, .board-like { display: inline-flex; align-items: center; gap: 4px; }
.board-foot svg { width: 16px; height: 16px; }
.board-like {
    margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer;
}
.board-like:active { background: var(--y-pressed, rgba(122, 64, 84, .08)); }
.board-like.on svg { color: var(--y-primary, #c96c8a); fill: var(--y-primary-soft, rgba(201, 108, 138, .12)); }
.board-notice {
    margin: 10px 12px; padding: 10px 12px; border-radius: 10px; background: var(--y-danger-soft, rgba(217, 67, 95, .08));
    color: var(--y-danger, #d9435f); font-size: 13.5px;
}
.board-empty, .board-end { padding: 28px 16px; color: var(--y-text3, #a3868c); font-size: 13.5px; text-align: center; }
.board-retry {
    display: block; width: 100%; padding: 28px 16px; border: 0; background: none; color: var(--y-text2, #8a6c72);
    font: inherit; font-size: 13.5px; text-decoration: underline; cursor: pointer;
}

/* ---------------- 详情 ---------------- */

.board-detail { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--y-bg, #faf0ef); }
.board-head {
    position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 8px;
    background: var(--y-bar, #fdf4f3); border-bottom: 1px solid var(--y-line, #f1dfdd);
}
.board-head-title {
    position: absolute; top: 0; bottom: 0; left: 56px; right: 56px; display: grid; place-items: center; overflow: hidden;
    color: var(--y-text, #3b2a2e); font-size: 17px; font-weight: 600; white-space: nowrap; pointer-events: none;
}
.board-icon {
    width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 50%;
    background: none; color: var(--y-icon, #5e454c); cursor: pointer;
}
.board-icon:active { background: var(--y-pressed, rgba(122, 64, 84, .08)); }
.board-icon svg { width: 23px; height: 23px; }
.board-icon .dotfill { fill: currentColor; stroke: none; }
.board-icon.more { margin-left: auto; }
.board-icon.small { width: 28px; height: 22px; margin: 0 -6px 0 2px; border-radius: 6px; color: var(--y-text3, #a3868c); }
.board-icon.small svg { width: 18px; height: 18px; }
.board-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.board-thread { padding-bottom: 12px; }
.board-full { display: flex; gap: 10px; padding: 14px; background: var(--y-surface, #fffaf8); border-bottom: 1px solid var(--y-line, #f1dfdd); }
.board-full.deleted { color: var(--y-text3, #a3868c); font-size: 14px; }
.board-full .board-body { font-size: 16px; }
.board-section { padding: 12px 14px 6px; color: var(--y-text2, #8a6c72); font-size: 12.5px; }
.board-reply { display: flex; gap: 9px; padding: 10px 14px; background: var(--y-surface, #fffaf8); border-bottom: 1px solid var(--y-line, #f1dfdd); cursor: pointer; }
.board-reply .board-body { font-size: 14.5px; }
.board-reply .to { color: var(--y-text2, #8a6c72); }
.board-reply.flash { animation: board-flash 1.8s ease-out; }
@keyframes board-flash { from { background: var(--y-primary-soft, rgba(201, 108, 138, .12)); } }

.board-composer {
    flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; padding: 7px 10px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px));
    background: var(--y-bar, #fdf4f3); border-top: 1px solid var(--y-line, #f1dfdd);
}
.board-replying { display: flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--y-text2, #8a6c72); font-size: 12.5px; }
.board-replying .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-replying button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--y-text3, #a3868c); cursor: pointer; }
.board-replying svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.board-input-row { display: flex; align-items: flex-end; gap: 8px; }
.board-input {
    flex: 1; min-width: 0; min-height: 34px; max-height: 120px; padding: 7px 12px; border: 0; border-radius: 17px;
    background: var(--y-surface, #fffaf8); color: var(--y-text, #3b2a2e); font: inherit; font-size: 15px; line-height: 1.4; resize: none; outline: 0;
}
.board-send {
    flex: 0 0 auto; height: 34px; padding: 0 14px; border: 0; border-radius: 17px;
    background: var(--y-bubble-mine, #12b7f5); color: #fff; font: inherit; font-size: 14px; cursor: pointer;
}
.board-send:disabled { opacity: .45; }
.board-count { padding: 0 6px; color: var(--y-text3, #a3868c); font-size: 11.5px; text-align: right; }
.board-count.over { color: var(--y-danger, #d9435f); }
.board-gate {
    width: 100%; min-height: 36px; padding: 6px 12px; border: 0; border-radius: 18px; background: var(--y-surface, #fffaf8);
    color: var(--y-text2, #8a6c72); font: inherit; font-size: 14px; cursor: pointer;
}

.board-mention { position: relative; display: flex; gap: 10px; padding: 12px 14px; background: var(--y-surface, #fffaf8); border-bottom: 1px solid var(--y-line, #f1dfdd); cursor: pointer; }
.board-quote {
    margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--y-quote-peer, rgba(122, 64, 84, .06));
    color: var(--y-text2, #8a6c72); font-size: 13px; overflow-wrap: anywhere;
}
.board-dot { position: absolute; top: 14px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--y-badge, #fa5151); }

/* ---------------- 「⋯」菜单：手机从底下弹出，电脑在中间 ---------------- */

dialog.board-menu {
    width: 100%; max-width: 520px; margin: auto auto 0; padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    border: 0; border-radius: 16px 16px 0 0; background: var(--y-surface, #fffaf8); color: var(--y-text, #3b2a2e);
}
dialog.board-menu::backdrop { background: var(--y-overlay, rgba(47, 24, 32, .38)); }
.board-menu-title { padding: 10px 16px 6px; color: var(--y-text3, #a3868c); font-size: 12.5px; text-align: center; overflow-wrap: anywhere; }
.board-menu-item {
    display: block; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--y-text, #3b2a2e);
    font: inherit; font-size: 16px; text-align: center; cursor: pointer;
}
.board-menu-item + .board-menu-item { border-top: 1px solid var(--y-line, #f1dfdd); }
.board-menu-item:active, .board-menu-item:hover { background: var(--y-hover, #f9ebea); }
.board-menu-item.danger { color: var(--y-danger, #d9435f); }
.board-menu-item.cancel { margin-top: 2px; border-top: 6px solid var(--y-bg, #faf0ef); }
@media (min-width: 761px) {
    dialog.board-menu { width: 300px; margin: auto; padding: 6px 0; border-radius: 14px; box-shadow: var(--y-shadow-pop, 0 12px 34px rgba(122, 64, 84, .2)); }
}

/* ---------------- 手机网页：详情是一整页，从右边滑进来（和聊天页一样） ---------------- */

.board-pane {
    position: absolute; inset: 0; z-index: 30; background: var(--y-bg, #faf0ef);
    transform: translateX(100%); transition: transform .26s cubic-bezier(.22, .8, .24, 1); will-change: transform;
}
.board-pane.on { transform: none; }
.board-pane .board-head { height: calc(48px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
.board-pane .board-head-title { top: env(safe-area-inset-top, 0px); }
@media (prefers-reduced-motion: reduce) { .board-pane { transition: none; } }

/* ---------------- 电脑网页：左栏是列表，右边是详情 ---------------- */

.board-side { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--y-line, #f1dfdd); }
.board-side .board-card { padding: 10px 14px; }
.board-side .board-ava { width: 34px; height: 34px; }
.board-side .board-body { font-size: 14px; -webkit-line-clamp: 2; }
.board-side .board-rows { border-top: 0; }
.board-side .board-row { min-height: 44px; font-size: 14px; }
.board-side .board-time { font-size: 11.5px; }
/* 左栏太窄：站长看的账号名只在右边详情和「⋯」菜单里显示 */
.board-side .board-account { display: none; }
.board-host-desktop .board-scroll { padding: 0 max(0px, calc((100% - 760px) / 2)); }
.board-host-desktop .board-head .board-icon.back { visibility: hidden; }
.board-blank { margin: auto; padding: 24px; color: var(--y-text2, #8a6c72); text-align: center; }
.board-blank p { margin: 0 0 14px; font-size: 14px; }
.board-blank button {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: 0; border-radius: 18px;
    background: var(--y-primary-grad, linear-gradient(135deg, #d9809a, #b9587a)); color: #fff; font: inherit; font-size: 14px; cursor: pointer;
}
.board-blank svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
    .board-host-desktop .board-head .board-icon.back { visibility: visible; }
}
