/* 心愿墙正文和页脚共用内容边界；仅作用于本页，不接管根字号和公共导航。 */
body.wishwall-list-page #masthead #archives-title { margin: 0; padding: 0; font-size: 48px; font-weight: 400; line-height: normal; }
body.wishwall-list-page #body > .container.wishwall-shell,
body.wishwall-list-page #foot-menu > .container:not(.line-container) {
    box-sizing: border-box;
    width: 100%;
    max-width: 1104px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}
body.wishwall-list-page #foot-menu + #footer > .container {
    width: 100%;
    max-width: 1072px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}
body.wishwall-list-page #body > .container.wishwall-shell {
    --wishwall-brand: #ff4886;
    --wishwall-card: #21232b;
    --wishwall-surface: #18191e;
    --wishwall-border: #303240;
    --wishwall-text: #f5f5f7;
    --wishwall-secondary: #d7d8dd;
    --wishwall-muted: #a6a7af;
    padding-top: 32px;
    padding-bottom: 40px;
    color: var(--wishwall-text);
    font: 14px/22px var(--ui-font-family, system-ui, sans-serif);
    text-align: left;
}

.wishwall-shell *, .wishwall-shell *::before, .wishwall-shell *::after { box-sizing: border-box; }
.wishwall-shell [hidden] { display: none !important; }
.wishwall-shell h2, .wishwall-shell h3, .wishwall-shell p, .wishwall-shell form { margin: 0; letter-spacing: 0; }
.wishwall-shell button, .wishwall-shell input { font: inherit; }
.wishwall-shell button { cursor: pointer; }
.wishwall-shell button:disabled { cursor: default; }
.wishwall-shell a { text-decoration: none; }
.wishwall-shell button:focus-visible, .wishwall-shell a:focus-visible {
    outline: 2px solid var(--wishwall-brand);
    outline-offset: 3px;
}

body.wishwall-list-page .wishwall-breadcrumb {
    --post-breadcrumb-font-size: 16px;
    margin: 0 0 20px;
}
.wishwall-breadcrumb .nav-breadcrumb-wrap { display: flex; align-items: center; gap: 12px; min-height: 22px; padding: 0; line-height: 22px; }
.wishwall-breadcrumb .nav-breadcrumb-wrap .action-butn { padding: 0; border: 0; background: none; color: var(--wishwall-brand) !important; }
.wishwall-breadcrumb .nav-breadcrumb-wrap .point { flex: 0 0 6px; width: 6px; height: 10px; margin: 0; }
.wishwall-breadcrumb .nav-breadcrumb-wrap .name { width: auto; min-width: 0; color: #ffffff80; }

body.wishwall-list-page .wishwall-layout { display: grid; grid-template-columns: minmax(0, 766px) 286px; align-items: start; gap: 20px; }
body.wishwall-list-page #body #archives.wishwall-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    float: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
}
body.wishwall-list-page #body #archives.wishwall-main::after { display: none; }
body.wishwall-list-page #body #archives.wishwall-main .wishwall-heading { font-size: 28px; font-weight: 500; line-height: 38px; }
.wishwall-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--wishwall-muted); }
.wishwall-intro p { min-width: 0; font-size: 14px; line-height: 22px; }
.wishwall-mobile-break, .wishwall-intro > .wishwall-mobile-publish { display: none; }

body.wishwall-list-page .wishwall-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 8px 12px;
    border: 1px solid var(--wishwall-border);
    border-radius: 8px;
    background: var(--wishwall-surface);
}
.wishwall-search > img { display: block; flex: 0 0 18px; width: 18px; height: 18px; }
body.wishwall-list-page .wishwall-search input {
    flex: 1;
    width: 0;
    min-width: 0;
    height: 28px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--wishwall-text);
    font-size: 14px;
    line-height: 22px;
}
.wishwall-search input::placeholder { color: #464955; opacity: 1; }
.wishwall-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.wishwall-search button { flex-shrink: 0; width: 56px; height: 28px; padding: 0; border: 0; background: none; color: var(--wishwall-text); font-size: 14px; font-weight: 500; line-height: 22px; white-space: nowrap; }
.wishwall-search .wishwall-search-clear { width: auto; color: var(--wishwall-muted); font-weight: 400; }

.wishwall-controls { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 65px; border-bottom: 1px solid #252732; }
.wishwall-tabs { display: flex; min-width: 0; }
/* 后端把 Tab / 排序渲染成路径化链接(整页刷新), 与按钮同样式 */
.wishwall-tabs a { display: inline-flex; align-items: center; justify-content: center; }
.wishwall-tabs :is(button, a) { flex: 0 0 84px; width: 84px; height: 40px; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: #d8d8d8; font-size: 14px; line-height: 22px; }
.wishwall-tabs :is(button, a)[aria-selected="true"] { border-bottom-color: var(--wishwall-brand); color: var(--wishwall-brand); font-weight: 500; }
.wishwall-sort { display: flex; flex-shrink: 0; align-items: center; gap: 5px; min-height: 36px; }
.wishwall-sort :is(button, a) { padding: 6px 0; border: 0; background: none; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; }
.wishwall-sort :is(button, a)[aria-pressed="true"] { color: var(--wishwall-brand); }
.wishwall-sort > span { color: #464955; }
.wishwall-sort :is(button, a) + :is(button, a) { margin-left: 1px; padding-left: 6px; border-left: 1px solid #464955; }

.wishwall-feed { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.wishwall-card { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border-radius: 8px; background: var(--wishwall-card); }
.wishwall-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.wishwall-card-link:focus-visible,
.wishwall-card .wishwall-actions a.wishwall-action:focus-visible,
.wishwall-card a.wishwall-text-button:focus-visible { outline: 2px solid var(--wishwall-brand) !important; }
.wishwall-card :is(button, a:not(.wishwall-card-link)) { position: relative; z-index: 2; }
.wishwall-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 26px; }
.wishwall-badge { display: inline-flex; flex: 0 0 52px; align-items: center; justify-content: center; width: 52px; padding: 3px 0; border: 1px solid currentColor; border-radius: 4px; background: #20222b; color: var(--wishwall-brand); font-size: 12px; line-height: 18px; white-space: nowrap; }
.wishwall-badge.status--arranged { color: var(--wishwall-arranged, #7adf7a); }
.wishwall-badge.status--ended { color: var(--wishwall-muted); }
.wishwall-badge.status--pending { border: 0; color: #e79130; }
.wishwall-type { color: var(--wishwall-muted); font-size: 12px; line-height: 18px; white-space: nowrap; }
.wishwall-actions { display: flex; flex-shrink: 0; align-items: center; gap: 16px; margin-left: auto; }
.wishwall-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 24px; padding: 0; border: 0; background: none; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; white-space: nowrap; }
.wishwall-action picture, .wishwall-action img { display: block; flex-shrink: 0; width: 20px; height: 20px; }
.wishwall-action.is-liked, .wishwall-action[aria-pressed="true"] { color: var(--wishwall-brand); }
.wishwall-action:disabled { opacity: 1; }
body.wishwall-list-page #body #archives.wishwall-main h3.wishwall-card-title { margin: 0; padding: 0; color: var(--wishwall-text); font-size: 20px; font-weight: 500; line-height: 28px; overflow-wrap: anywhere; }
.wishwall-author { color: var(--wishwall-muted); font-size: 12px; line-height: 18px; }
.wishwall-preview { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--wishwall-border); border-radius: 8px; background: var(--wishwall-surface); }
.wishwall-preview-row { display: contents; }
/* 后端兜底行(有评论但无神评/热门预览): 「评论 N 条 · 查看全部评论」跨满三列, 链接靠右 */
.wishwall-preview-row.wishwall-preview-summary { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.wishwall-comment-tag { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; height: 20px; padding: 2px 4px; border-radius: 4px; background: var(--wishwall-brand); color: #fff; font-size: 12px; line-height: 16px; }
.wishwall-preview-text { min-width: 0; overflow: hidden; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
.wishwall-preview .wishwall-action,
.wishwall-detail-page .wishwall-comment-like { justify-content: flex-start; min-height: 22px; }
.wishwall-preview .wishwall-action > span,
.wishwall-detail-page .wishwall-comment-like > span { font-variant-numeric: tabular-nums; text-align: left; }
.wishwall-preview .wishwall-action { color: var(--wishwall-muted); }
.wishwall-preview .wishwall-action[aria-pressed="true"] { color: var(--wishwall-brand); }
.wishwall-preview .wishwall-action picture, .wishwall-preview .wishwall-action img { width: 16px; height: 16px; }
.wishwall-card-bottom { display: flex; align-items: center; justify-content: flex-end; min-height: 1px; }
.wishwall-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--wishwall-brand); border-radius: 8px; background: var(--wishwall-brand); color: #fff; font-size: 14px; font-weight: 500; line-height: 22px; white-space: nowrap; }
.wishwall-button:hover { background: #ee3976; }
.wishwall-paid { width: 84px; height: 38px; min-height: 38px; padding: 7px 0; }
.wishwall-empty-comments { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 16px 12px; color: var(--wishwall-muted); font-size: 14px; line-height: 22px; }
.wishwall-text-button { flex-shrink: 0; padding: 0; border: 0; background: none; color: var(--wishwall-brand); font-size: 14px; line-height: 22px; white-space: nowrap; }
.wishwall-ended-note { color: var(--wishwall-muted); font-size: 14px; line-height: 22px; }
.wishwall-article { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--wishwall-border); border-radius: 8px; background: var(--wishwall-surface); color: var(--wishwall-text); }
.wishwall-article-copy { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.wishwall-article-label { display: flex; align-items: center; gap: 8px; color: #7adf7a; font-size: 12px; line-height: 18px; }
.wishwall-article-label picture, .wishwall-article-label img { display: block; flex-shrink: 0; width: 16px; height: 16px; }
.wishwall-article-title { color: var(--wishwall-muted); font-size: 14px; font-weight: 500; line-height: 22px; overflow-wrap: anywhere; }
.wishwall-article-arrow { display: block; flex: 0 0 32px; width: 32px; height: 32px; }

.wishwall-guide { display: flex; flex-direction: column; gap: 24px; min-width: 0; padding: 20px; border: 1px solid var(--wishwall-border); border-radius: 8px; }
.wishwall-guide > h2 { color: var(--wishwall-text); font-size: 20px; font-weight: 500; line-height: 30px; }
.wishwall-guide > .wishwall-button { width: 100%; }
.wishwall-guide > hr { width: 100%; height: 1px; margin: 0; padding: 0; border: 0; background: #252732; }
.wishwall-guide ol { display: flex; flex-direction: column; gap: 24px; margin: 0; padding: 0; list-style: none; }
.wishwall-guide li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; }
.wishwall-guide li > span { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #252732; color: var(--wishwall-brand); font-size: 12px; font-weight: 500; line-height: 18px; }
.wishwall-guide li > div { min-width: 0; }
.wishwall-guide li h3 { margin: 0 0 4px; color: var(--wishwall-text); font-size: 14px; font-weight: 500; line-height: 22px; }
.wishwall-guide li p { color: var(--wishwall-muted); font-size: 12px; line-height: 18px; }

/* 分页的结构、视觉及校验沿用现有公共组件，仅设定正文中的间距。 */
body.wishwall-list-page #body #archives.wishwall-main > .page-nav { flex-shrink: 0; width: 100%; max-width: none; margin: 0; }
.wishwall-feedback { position: fixed; z-index: 1000; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 20px; border: 1px solid var(--wishwall-border); border-radius: 8px; background: var(--wishwall-surface); color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
.wishwall-comment-form + .wishwall-feedback {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
}

@media (max-width: 767.98px) {
    body.wishwall-list-page #masthead #archives-title { font-size: 26px; line-height: 36px; }
    body.wishwall-list-page #body > .container.wishwall-shell { padding: 20px 16px 32px; }
    body.wishwall-list-page .wishwall-breadcrumb { --post-breadcrumb-font-size: 12px; margin-bottom: 20px; }
    .wishwall-breadcrumb .nav-breadcrumb-wrap { gap: 10px; }
    body.wishwall-list-page .wishwall-layout { grid-template-columns: minmax(0, 1fr); }
    body.wishwall-list-page #body #archives.wishwall-main { gap: 20px; padding: 0; }
    body.wishwall-list-page #body #archives.wishwall-main .wishwall-heading { display: none; }
    .wishwall-guide { display: none; }
    .wishwall-intro { min-height: 50px; gap: 20px; padding-right: 70px; }
    .wishwall-intro p { flex: 1; max-width: 263px; }
    .wishwall-mobile-break { display: block; }
    /* 纵向对齐说明行，滚动时固定在视口右侧。 */
    .wishwall-intro > .wishwall-mobile-publish { position: fixed; align-self: center; right: 16px; z-index: 900; display: inline-flex; width: 50px; height: 50px; min-height: 50px; padding: 0; }
    .wishwall-controls { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 40px 1px; grid-auto-rows: 36px; align-items: center; row-gap: 20px; min-height: 0; border: 0; }
    .wishwall-tabs { grid-area: 1 / 1; width: 100%; }
    .wishwall-tabs :is(button, a) { flex: 1; width: 25%; min-width: 0; }
    .wishwall-controls::before { grid-area: 2 / 1; width: 100%; height: 1px; background: #252732; content: ""; }
    .wishwall-sort { grid-area: 3 / 1; justify-self: end; }
    .wishwall-feed { gap: 16px; }
    .wishwall-card { padding: 12px 8px; }
    .wishwall-card-bottom[aria-hidden="true"] { display: none; }
    body.wishwall-list-page #body #archives.wishwall-main h3.wishwall-card-title { font-size: 17px; line-height: 24px; }
    .wishwall-actions { gap: 12px; }
    .wishwall-actions .wishwall-action { gap: 4px; }
    .wishwall-empty-comments { padding-inline: 0; }
    .wishwall-article-arrow { display: none; }
    .wishwall-article-title { color: var(--wishwall-text); }
    .wishwall-article-title::after { content: " →"; }
}

/* 搜索结果仅补充差异，搜索框、卡片、侧栏和公共分页继续复用列表样式。 */
.wishwall-search-page .wishwall-search .wishwall-search-clear { width: 56px; color: var(--wishwall-text); font-weight: 500; }
.wishwall-search-page .wishwall-search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--wishwall-muted);
    font-size: 14px;
    line-height: 22px;
    overflow-wrap: anywhere;
}
.wishwall-search-summary > .wishwall-button {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 12px;
    border-color: #464955;
    background: transparent;
    font-weight: 400;
}
@media (max-width: 767.98px) {
    .wishwall-search-page .wishwall-search-summary { flex-direction: column; align-items: stretch; }
    .wishwall-search-page .wishwall-search-card--compact .wishwall-card-bottom { display: none; }
    body.wishwall-search-page #body #archives.wishwall-main > .page-nav { margin-top: 4px; }
}

/* 无结果复用搜索页的框架，只增加插画和空态说明。 */
.wishwall-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; padding: 24px; text-align: center; }
.wishwall-empty-image { position: relative; flex: 0 0 auto; width: 444px; max-width: 100%; aspect-ratio: 444 / 265; overflow: hidden; mix-blend-mode: lighten; }
.wishwall-empty-image img { position: absolute; top: -11.7%; left: 0; display: block; width: 100%; height: 111.7%; }
body.wishwall-empty-page #body #archives.wishwall-main .wishwall-empty-title { width: 100%; margin: 0; padding: 0; color: var(--wishwall-text); font-size: 20px; font-weight: 500; line-height: 30px; }
.wishwall-empty-description { width: 100%; color: var(--wishwall-muted); font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.wishwall-empty .wishwall-empty-publish { width: 140px; height: 44px; }
.wishwall-empty-clear { display: none; align-items: center; justify-content: center; width: 140px; height: 40px; color: var(--wishwall-text); font-weight: 500; }
@media (max-width: 767.98px) {
    .wishwall-empty { padding: 0 0 24px; }
    .wishwall-empty-image { width: 100%; max-width: 343px; aspect-ratio: 343 / 205; }
    body.wishwall-empty-page #body #archives.wishwall-main .wishwall-empty-title, .wishwall-empty-description { width: calc(100% - 48px); }
    .wishwall-empty-clear { display: inline-flex; }
}

/* 心愿详情：复用正文边界、发布侧栏、基础控件及反馈层，仅补充详情布局。 */
body.wishwall-detail-page #body > .container.wishwall-shell { padding-top: 32px; }
body.wishwall-detail-page #body #archives.wishwall-main.wishwall-detail-main { gap: 24px; }
body.wishwall-detail-page .wishwall-breadcrumb { margin: 0 0 32px; }
.wishwall-detail-page .wishwall-breadcrumb .nav-breadcrumb-wrap { --post-breadcrumb-font-size: inherit; }
.wishwall-detail-page .wishwall-detail-post { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.wishwall-detail-page .wishwall-detail-meta { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-detail-title { grid-area: 2 / 1 / auto / -1; margin: 0; padding: 0; color: var(--wishwall-text); font-size: 24px; font-weight: 500; line-height: 34px; overflow-wrap: anywhere; }
.wishwall-detail-page .wishwall-detail-post > .wishwall-author { grid-area: 3 / 1; }
.wishwall-detail-page .wishwall-detail-like { grid-area: 1 / 2; justify-self: end; }
.wishwall-detail-fulfilled { display: contents; }
.wishwall-detail-fulfilled > .wishwall-article { grid-area: 4 / 1 / auto / -1; gap: 6px; }
.wishwall-detail-page .wishwall-detail-paid { grid-area: 3 / 2; width: 140px; height: 38px; min-height: 38px; padding: 7px 16px; }
.wishwall-detail-page .wishwall-detail-comments { padding-top: 24px; border-top: 1px solid var(--wishwall-border); scroll-margin-top: 8rem; }
body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-detail-comments > h3,
body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-comment-form > h3 { margin: 0; padding: 0; color: var(--wishwall-text); font-size: 18px; font-weight: 500; line-height: 28px; }
/* 评论共用点赞列，列宽随最长计数变化。 */
.wishwall-detail-page .wishwall-comments-list {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) max-content;
    gap: 20px 12px;
    margin-top: 20px;
}
.wishwall-detail-page .wishwall-comments-list > * { grid-column: 1 / -1; }
.wishwall-detail-page .wishwall-comment {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-columns: subgrid;
    align-items: start;
    column-gap: 12px;
    min-width: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--wishwall-border);
}
.wishwall-detail-page .wishwall-comment-avatar { display: block; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; }
.wishwall-detail-page .wishwall-comment-avatar img { display: block; width: 32px; height: 32px; }
.wishwall-detail-page .wishwall-comment-body {
    display: grid;
    grid-column: 2 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-columns: subgrid;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.wishwall-detail-page .wishwall-comment-author { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--wishwall-secondary); font-size: 14px; font-weight: 500; line-height: 22px; overflow-wrap: anywhere; }
.wishwall-detail-page .wishwall-comment-author .wishwall-comment-tag { padding-inline: 6px; font-weight: 400; }
.wishwall-detail-page .wishwall-comment-text { grid-area: 2 / 1 / auto / -1; color: #fff; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.wishwall-detail-page .wishwall-comment-time { grid-area: 3 / 1; color: var(--wishwall-muted); font-size: 12px; line-height: 18px; white-space: nowrap; }
.wishwall-detail-page .wishwall-comment-like { grid-area: 1 / 2; justify-self: stretch; }
.wishwall-detail-page .wishwall-comment-form { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.wishwall-first-comment-page .wishwall-comment-form { scroll-margin-top: calc(var(--wishwall-nav-height, 120px) + 24px); }
body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-comment-form input,
body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-comment-form textarea { display: block; width: 100%; min-width: 0; margin: 0 !important; padding: 8px 12px; border: 1px solid var(--wishwall-border); border-radius: 8px; background: var(--wishwall-surface); box-shadow: none; color: var(--wishwall-text); font: inherit; font-size: 14px; line-height: 22px; }
body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-comment-form input { height: 40px; }
body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-comment-form textarea { min-height: 96px; height: 96px; padding: 12px; resize: vertical; }
.wishwall-detail-page .wishwall-comment-form input::placeholder, .wishwall-detail-page .wishwall-comment-form textarea::placeholder { color: var(--wishwall-muted); opacity: 1; }
.wishwall-detail-page .wishwall-comment-form textarea:focus-visible { outline: 2px solid var(--wishwall-brand); outline-offset: 3px; }
.wishwall-detail-page .wishwall-comment-send-row { display: grid; grid-template-columns: minmax(0, 236px) minmax(0, 1fr) 88px; align-items: center; gap: 12px; }
.wishwall-detail-page :is(.wishwall-comment-audit, .wishwall-comments-empty) { color: var(--wishwall-muted); font-size: 14px; line-height: 22px; }
.wishwall-detail-page .wishwall-comment-send-row > .wishwall-button { width: 88px; min-height: 40px; height: 40px; padding: 8px 16px; }

@media (max-width: 767.98px) {
    body.wishwall-detail-page #body > .container.wishwall-shell { padding-top: 20px; padding-bottom: 40px; }
    body.wishwall-first-comment-page #body > .container.wishwall-shell { padding-bottom: 54px; }
    body.wishwall-detail-page #body #archives.wishwall-main.wishwall-detail-main { gap: 24px; }
    body.wishwall-detail-page .wishwall-breadcrumb { margin-bottom: 24px; }
    .wishwall-detail-page .wishwall-detail-meta { grid-area: 1 / 1 / auto / -1; }
    body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-detail-title { font-size: 20px; line-height: 30px; }
    .wishwall-detail-page .wishwall-detail-post > .wishwall-author { grid-area: 3 / 1 / auto / -1; }
    .wishwall-detail-page .wishwall-detail-like { grid-area: 4 / 1; justify-self: start; }
    :is(.wishwall-first-comment-page, .wishwall-arranged-page) .wishwall-detail-like { min-height: 22px; }
    .wishwall-detail-fulfilled { display: flex; flex-direction: column; gap: 9px; grid-area: 4 / 1 / auto / -1; }
    .wishwall-detail-fulfilled > .wishwall-detail-like { align-self: flex-start; }
    .wishwall-detail-page .wishwall-detail-paid { grid-area: 4 / 2; width: 92px; min-height: 36px; height: 36px; padding: 6px 16px; }
    .wishwall-detail-page :is(.wishwall-detail-comments, .wishwall-comment) { border-color: #3b3b3b; }
    .wishwall-detail-page .wishwall-comment-author .wishwall-comment-tag { padding-inline: 4px; }
    .wishwall-detail-page .wishwall-comment-text { color: var(--wishwall-secondary); }
    .wishwall-detail-page .wishwall-comment-send-row { grid-template-columns: minmax(0, 1fr) 88px; }
    body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-comment-form input { grid-area: 1 / 1; height: 44px; }
    .wishwall-detail-page .wishwall-comment-send-row > .wishwall-button { grid-area: 1 / 2; min-height: 44px; height: 44px; padding: 10px 16px; }
    .wishwall-detail-page .wishwall-comment-audit { grid-area: 2 / 1 / auto / -1; }
}

/* 心愿墙弹框共用框架：原生 dialog 仅在 open 时布局，关闭时不参与正文 Grid。 */
body.wishwall-list-page:is(.wishwall-publish-open, .wishwall-paid-open, .wishwall-confirm-open) { overflow: hidden; }
body.wishwall-list-page :is(#wishwall-publish-dialog, #wishwall-paid-dialog, #wishwall-confirm-dialog) {
    position: fixed;
    inset: 0;
    width: 520px;
    height: fit-content;
    max-width: calc(100% - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    /* 描边计入外框，左右留白保持发布472px、投稿指南和确认层392px的内容宽度。 */
    padding: 24px 22px 24px 24px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--wishwall-border);
    border-radius: 8px;
    background: #20222b;
    color: var(--wishwall-text);
    font: 14px/22px var(--ui-font-family, system-ui, sans-serif);
    scrollbar-width: none;
}
body.wishwall-list-page :is(#wishwall-publish-dialog, #wishwall-paid-dialog, #wishwall-confirm-dialog)[open] { display: flex; flex-direction: column; gap: 20px; }
:is(#wishwall-publish-dialog, #wishwall-paid-dialog, #wishwall-confirm-dialog)::backdrop { background: #000b; }
:is(#wishwall-publish-dialog, #wishwall-paid-dialog, #wishwall-confirm-dialog)::-webkit-scrollbar { display: none; }
:is(#wishwall-publish-dialog, #wishwall-paid-dialog, #wishwall-confirm-dialog) .wishwall-publish-header { flex: 0 0 auto; }
:is(#wishwall-publish-dialog, #wishwall-paid-dialog, #wishwall-confirm-dialog) .wishwall-publish-header h2 { margin: 0; padding: 0; color: var(--wishwall-text); font-size: 24px; font-weight: 500; line-height: 34px; }
#wishwall-publish-dialog .wishwall-publish-form { display: flex; flex: 0 0 auto; flex-direction: column; gap: 20px; width: 100%; min-width: 0; margin: 0; }
#wishwall-publish-dialog .wishwall-publish-fields { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
#wishwall-publish-dialog .wishwall-publish-fields > *,
#wishwall-publish-dialog .wishwall-publish-form > * { flex-shrink: 0; }
#wishwall-publish-dialog #wishwall-publish-intro { margin: 0; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; }
#wishwall-publish-dialog .wishwall-publish-types { min-width: 0; margin: 0; padding: 0; border: 0; }
#wishwall-publish-dialog .wishwall-publish-types legend { display: block; width: 100%; margin: 0; padding: 0; border: 0; color: var(--wishwall-text); font-size: 14px; font-weight: 500; line-height: 22px; }
#wishwall-publish-dialog .wishwall-publish-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
#wishwall-publish-dialog .wishwall-publish-option { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; height: 44px; margin: 0; padding: 0; border: 1px solid var(--wishwall-border); border-radius: 8px; color: var(--wishwall-text); font-size: 14px; font-weight: 500; line-height: 22px; white-space: nowrap; cursor: pointer; }
#wishwall-publish-dialog .wishwall-publish-option input { position: absolute; width: 1px; height: 1px; margin: -1px !important; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#wishwall-publish-dialog .wishwall-publish-option:has(input:checked) { border-color: var(--wishwall-brand); color: var(--wishwall-brand); }
#wishwall-publish-dialog .wishwall-publish-option:has(input:focus-visible) { outline: 2px solid var(--wishwall-brand); outline-offset: 3px; }
#wishwall-publish-dialog .wishwall-publish-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#wishwall-publish-dialog .wishwall-publish-field > label { margin: 0; color: var(--wishwall-text); font-size: 14px; font-weight: 500; line-height: 22px; }
#wishwall-publish-dialog .wishwall-publish-field > input,
#wishwall-publish-dialog .wishwall-publish-field > textarea { display: block; width: 100%; min-width: 0; margin: 0 !important; padding: 10px 12px; border: 1px solid var(--wishwall-border); border-radius: 8px; background: var(--wishwall-surface); box-shadow: none; color: var(--wishwall-text); font: inherit; font-size: 14px; line-height: 22px; }
#wishwall-publish-dialog .wishwall-publish-field > input { height: 44px; }
#wishwall-publish-dialog .wishwall-publish-field > textarea { min-height: 140px; height: 140px; padding: 12px; resize: none; }
#wishwall-publish-dialog .wishwall-publish-field > input::placeholder,
#wishwall-publish-dialog .wishwall-publish-field > textarea::placeholder { color: var(--wishwall-muted); opacity: 1; }
#wishwall-publish-dialog .wishwall-publish-body-feedback { display: flex; align-items: flex-start; gap: 8px; height: 18px; }
#wishwall-publish-dialog #wishwall-publish-count { margin-left: auto; color: var(--wishwall-muted); font-size: 12px; line-height: 18px; white-space: nowrap; }
#wishwall-publish-dialog .wishwall-publish-error { margin: 0; color: #f68071; font-size: 14px; font-weight: 400; line-height: 22px; }
#wishwall-publish-dialog .wishwall-publish-body-feedback > .wishwall-publish-error { flex: 1; min-width: 0; }
#wishwall-publish-dialog .wishwall-publish-types > .wishwall-publish-error:not([hidden]) { margin-top: 8px; }
#wishwall-publish-dialog #wishwall-publish-count.is-error { color: #f68071; }
#wishwall-publish-dialog [aria-invalid="true"] { border-color: #f68071 !important; }
#wishwall-publish-dialog .wishwall-publish-field > [aria-invalid="true"]:focus-visible { outline: 1px solid #f68071; outline-offset: -1px; }
#wishwall-publish-dialog .wishwall-publish-anonymous { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 0; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; cursor: pointer; }
#wishwall-publish-dialog .wishwall-publish-anonymous input { -webkit-appearance: none; appearance: none; display: block; flex: 0 0 18px; width: 18px; height: 18px; margin: 0 !important; padding: 0; border: 1px solid var(--wishwall-border); border-radius: 4px; background: transparent; box-shadow: none; cursor: pointer; }
#wishwall-publish-dialog .wishwall-publish-anonymous input:checked { border: 0; background: url('/usr/plugins/WishWall/assets/images/publish-checkbox-check.png') center / 18px 18px no-repeat; }
#wishwall-publish-dialog .wishwall-publish-anonymous small { color: var(--wishwall-muted); font-size: 12px; line-height: 18px; }
#wishwall-publish-dialog .wishwall-publish-compliance { margin: 0; color: var(--wishwall-muted); font-size: 12px; line-height: 18px; }
#wishwall-publish-dialog .wishwall-publish-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
#wishwall-publish-dialog .wishwall-publish-cancel { width: 88px; height: 44px; background: #20222b; border-color: var(--wishwall-border); color: var(--wishwall-text); }
#wishwall-publish-dialog .wishwall-publish-submit { width: 112px; height: 44px; }
:is(#wishwall-publish-dialog, #wishwall-confirm-dialog) .wishwall-publish-status { margin: 0; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }

@media (min-width: 768px) {
    #wishwall-publish-dialog .wishwall-publish-options {
        grid-auto-rows: 44px;
        max-height: calc(3 * 44px + 2 * 8px);
        overflow-y: auto;
        scrollbar-width: thin;
    }

    #wishwall-publish-dialog .wishwall-publish-option:has(input:focus-visible) { outline-offset: -3px; }
}

@media (max-width: 767.98px) {
    /* 保持移动端文字输入框的字号，避免 iOS 聚焦时自动放大。 */
    body.wishwall-list-page .wishwall-search input,
    body.wishwall-detail-page #archives.wishwall-detail-main .wishwall-comment-form :is(input, textarea),
    #wishwall-publish-dialog .wishwall-publish-field > :is(input, textarea) {
        font-size: 16px;
    }

    body.wishwall-list-page #wishwall-publish-dialog {
        inset: auto 0 0;
        width: 100%;
        max-width: none;
        /* 矮屏留出顶部空间，表单在面板内滚动。 */
        max-height: calc(100vh - min(121px, 40vh));
        max-height: calc(100dvh - min(121px, 40dvh));
        margin: 0;
        padding: 16px 16px 24px;
        padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
        overflow: hidden;
        border: 0;
        border-radius: 16px 16px 0 0;
    }
    #wishwall-publish-dialog::backdrop { background: transparent; }
    #wishwall-publish-dialog .wishwall-publish-form { flex-shrink: 1; min-height: 0; }
    /* 填写区单独滚动，发布按钮留在面板底部。 */
    #wishwall-publish-dialog .wishwall-publish-fields {
        flex-shrink: 1;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        scrollbar-width: none;
    }
    #wishwall-publish-dialog .wishwall-publish-fields::-webkit-scrollbar { display: none; }
    #wishwall-publish-dialog .wishwall-publish-header { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    #wishwall-publish-dialog .wishwall-publish-anonymous small { display: none; }
    #wishwall-publish-dialog .wishwall-publish-submit { flex: 1; }
    body.wishwall-list-page.wishwall-publish-open .wishwall-shell,
    body.wishwall-list-page.wishwall-publish-open #foot-menu,
    body.wishwall-list-page.wishwall-publish-open #footer { visibility: hidden; }
    body.wishwall-list-page.wishwall-publish-open #wishwall-publish-dialog[open] { visibility: visible; }
    /* 心愿墙已有页面内搜索，H5 公共导航只保留设计稿中的单行入口。 */
    body.wishwall-list-page #ai-navigation-container { height: 51px; }
    body.wishwall-list-page #ai-navigation-container > .navbar-sidebar.nav-fixed { grid-template-rows: 51px; height: 51px; padding: 0; }
    body.wishwall-list-page #ai-navigation-container .navbar-sidebar-item { height: 51px; }
    body.wishwall-list-page #ai-navigation-container .mobile-search-box { display: none; }
}

@media (max-width: 359.98px) {
    #wishwall-publish-dialog .wishwall-publish-body-feedback { height: auto; min-height: 18px; }
}

/* 有偿投稿指南只补充内容和宽度，H5同样使用居中卡片，不继承发布底部sheet。 */
body.wishwall-list-page :is(#wishwall-paid-dialog, #wishwall-confirm-dialog) { width: 440px; }
:is(#wishwall-paid-dialog, #wishwall-confirm-dialog) > * { flex-shrink: 0; }
:is(#wishwall-paid-dialog, #wishwall-confirm-dialog) .wishwall-publish-header h2 { font-size: 20px; line-height: 30px; }
#wishwall-paid-dialog .wishwall-paid-intro { margin: 0; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; }
#wishwall-paid-dialog .wishwall-paid-step { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#wishwall-paid-dialog .wishwall-paid-step h3 { margin: 0; padding: 0; color: var(--wishwall-text); font-size: 14px; font-weight: 500; line-height: 22px; }
#wishwall-paid-dialog .wishwall-paid-step h3 > span { color: var(--wishwall-brand); }
#wishwall-paid-dialog .wishwall-paid-step p { margin: 0; color: var(--wishwall-muted); font-size: 14px; font-weight: 400; line-height: 22px; overflow-wrap: anywhere; }
#wishwall-paid-dialog .wishwall-paid-contact { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--wishwall-border); border-radius: 8px; background: var(--wishwall-surface); }
#wishwall-paid-dialog .wishwall-paid-contact p { margin: 0; color: var(--wishwall-muted); font-size: 12px; line-height: 18px; }
#wishwall-paid-dialog .wishwall-paid-contact a { display: block; color: var(--wishwall-brand); font-size: 14px; font-weight: 500; line-height: 22px; overflow-wrap: anywhere; }
#wishwall-paid-dialog .wishwall-paid-dismiss { width: 100%; min-height: 44px; height: 44px; }
@media (max-width: 767.98px) {
    body.wishwall-list-page :is(#wishwall-paid-dialog, #wishwall-confirm-dialog) { width: 343px; }
}

/* 发布确认叠在仍打开的表单上，保留原表单状态；两端均使用居中卡片。 */
body.wishwall-list-page #wishwall-confirm-dialog[open] { visibility: visible; }
#wishwall-confirm-dialog .wishwall-confirm-description { margin: 0; color: var(--wishwall-secondary); font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
#wishwall-confirm-dialog .wishwall-confirm-audit { display: none; margin: 0; color: var(--wishwall-muted); font-size: 14px; line-height: 22px; }
#wishwall-confirm-dialog .wishwall-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#wishwall-confirm-dialog .wishwall-confirm-actions > .wishwall-button { width: 100%; height: 44px; min-height: 44px; }
#wishwall-confirm-dialog .wishwall-confirm-back { border-color: var(--wishwall-border); background: #20222b; color: var(--wishwall-text); }
@media (max-width: 767.98px) {
    #wishwall-confirm-dialog .wishwall-confirm-audit { display: block; }
}

/* 51 大赛站点适配，沿用原有覆盖顺序。 */
body.wishwall-list-page #body > .container.wishwall-shell {
    --wishwall-brand: #1abc9c;
    --wishwall-card: #373535;
    --wishwall-surface: #252323;
    --wishwall-border: #5e5c5c;
    --wishwall-dialog: #3c3b3b;
    --wishwall-arranged: #ffc548;
}

body.wishwall-list-page #foot-menu > .container:not(.line-container),
body.wishwall-list-page #foot-menu + #footer > .container {
    max-width: var(--wishwall-site-container-width);
    padding-inline: 1rem;
}

body.wishwall-list-page #foot-menu + #footer > .container {
    margin-top: .3125rem;
}

.wishwall-shell .wishwall-breadcrumb {
    padding-bottom: 0;
    font-size: var(--post-breadcrumb-font-size);
    line-height: 22px;
}

.wishwall-breadcrumb [aria-current="page"] > a {
    color: inherit;
}

.wishwall-shell .wishwall-search input::placeholder {
    color: #5c5c5c;
}

.wishwall-shell .wishwall-controls {
    border-bottom-color: var(--wishwall-border);
}

.wishwall-shell .wishwall-sort > span {
    color: var(--wishwall-border);
}

.wishwall-shell .wishwall-card > .wishwall-card-link {
    position: absolute;
    z-index: 1;
    padding: 0;
    border: 0;
    background: transparent;
}

.wishwall-shell .wishwall-badge {
    background-color: var(--wishwall-surface);
}

.wishwall-shell .wishwall-article {
    width: 100%;
    text-align: left;
}

.wishwall-shell .wishwall-article-label {
    color: var(--wishwall-arranged);
}

.wishwall-shell .wishwall-empty-comments {
    gap: 8px;
    padding: 15px 11px;
    border: 1px solid var(--wishwall-border);
    border-radius: 8px;
    background-color: var(--wishwall-surface);
}

.wishwall-shell .wishwall-guide {
    background-color: var(--wishwall-card);
}

.wishwall-shell .wishwall-guide > hr {
    background-color: var(--wishwall-border);
}

.wishwall-shell .wishwall-guide li > span {
    background-color: #302d2d;
}

.wishwall-shell .wishwall-button:hover {
    background-color: #159e84;
}

.wishwall-shell .page-jump {
    display: flex;
    align-items: center;
    column-gap: 0;
    white-space: nowrap;
}

.wishwall-shell .page-jump button {
    line-height: 1.15;
}

.wishwall-shell .page-nav :is(button:disabled, input:disabled, [aria-disabled="true"]) {
    opacity: .65;
    cursor: default;
}

body.wishwall-list-page :is(#wishwall-publish-dialog, #wishwall-paid-dialog, #wishwall-confirm-dialog) {
    border-color: #979797;
    background-color: var(--wishwall-dialog);
}

#wishwall-publish-dialog .wishwall-publish-cancel,
#wishwall-confirm-dialog .wishwall-confirm-back {
    border-color: #727272;
    background-color: var(--wishwall-dialog);
}

#wishwall-publish-dialog .wishwall-publish-anonymous input:checked {
    background: var(--wishwall-brand) url('./images/51ds/checkbox-check.svg') center / 18px 18px no-repeat;
}

@media (min-width: 768px) {
    .wishwall-shell .wishwall-tabs {
        flex: 0 1 336px;
    }

    .wishwall-shell .wishwall-tabs :is(button, a) {
        flex: 1 1 84px;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    /* 顶栏保留 51 大赛的双行搜索。 */
    body.wishwall-list-page #ai-navigation-container {
        height: auto;
    }

    .wishwall-shell .wishwall-controls::before {
        background-color: var(--wishwall-border);
    }
}

@media (max-width: 767px) {
    body.wishwall-list-page #foot-menu > .container:not(.line-container),
    body.wishwall-list-page #foot-menu + #footer > .container {
        padding-inline: 1.563rem;
    }
}

@media (max-width: 336px) {
    .wishwall-shell .page-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
    }

    .wishwall-shell .page-jump {
        position: static;
        justify-self: center;
        transform: none;
    }

    .wishwall-shell .page-navigator {
        margin: 0;
    }
}
