@charset "utf-8";
/*
 * 论坛页展示样式
 * ============================================================
 * 仅限定 body.page-forums，覆盖论坛首页和版块主题列表。
 */

body.page-forums .forum-home {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    color: #5f4e3e;
}

body.page-forums .site-mainouter.site-mainouter--with-banner > tbody > tr > td#outer,
body.page-forums table.mainouter > tbody > tr > td#outer {
    overflow-x: hidden;
}

body.page-forums #outer > table.main {
    width: calc(100% - (var(--site-content-inline-gap, 26px) * 2)) !important;
    max-width: none !important;
    margin-right: auto !important;
    margin-left: auto !important;
    table-layout: auto !important;
}

body.page-forums #outer > table.main > tbody > tr > td.embedded {
    padding-right: var(--site-content-inline-gap, 26px) !important;
    padding-left: var(--site-content-inline-gap, 26px) !important;
}

body.page-forums .forum-home__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 16px;
    padding: 13px 18px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66));
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
    text-align: left;
}

body.page-forums .forum-home__title {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    margin: 0;
    color: #5f4e3e;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

body.page-forums .forum-home__title::before {
    content: "";
    width: 3px;
    height: 14px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

body.page-forums .forum-home__toolbar {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

body.page-forums .forum-home__toolbar a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 2px 10px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none !important;
    box-shadow: none;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-forums .forum-home__toolbar a:nth-child(-n+2) {
    border-color: rgba(229, 214, 191, 0.75);
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
}

body.page-forums .forum-home__toolbar a:nth-child(n+3) {
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
    box-shadow: none;
}

body.page-forums .forum-home__toolbar a:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d !important;
    outline: none;
}

body.page-forums .forum-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.page-forums .forum-section {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forums .forum-section__head {
    display: grid;
    grid-template-columns: minmax(290px, 0.96fr) 94px minmax(280px, 0.64fr) minmax(92px, 0.28fr);
    grid-template-areas: "title stats last mods";
    align-items: center;
    gap: 14px;
    padding: 9px 16px 8px;
    border-bottom: 1px solid rgba(210, 221, 234, 0.72);
    background: rgba(255, 255, 255, 0.35);
}

body.page-forums .forum-section__title {
    grid-area: title;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    background-image: none !important;
    color: #60442b;
    min-width: 0;
    max-width: 78%;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: none;
}

body.page-forums .forum-section__title::before {
    content: "";
    width: 3px;
    height: 13px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: rgba(157, 129, 96, .48);
}

body.page-forums .forum-section__hint {
    display: inline-flex;
    color: #aaa096;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

body.page-forums .forum-section__hint--stats {
    grid-area: stats;
    justify-content: center;
}

body.page-forums .forum-section__hint--last {
    grid-area: last;
    justify-content: flex-start;
    padding-left: 12px;
}

body.page-forums .forum-section__hint--mods {
    grid-area: mods;
    justify-content: flex-end;
}

body.page-forums .forum-section__body {
    display: flex;
    flex-direction: column;
}

body.page-forums .forum-card {
    display: grid;
    grid-template-columns: minmax(290px, 0.96fr) 94px minmax(280px, 0.64fr) minmax(92px, 0.28fr);
    grid-template-areas: "main stats last mods";
    gap: 14px;
    align-items: center;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.56);
    border-bottom: 1px solid rgba(220, 227, 236, 0.62);
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.page-forums .forum-card:last-child {
    border-bottom: 0;
}

body.page-forums .forum-card:hover {
    background: rgba(255, 250, 244, 0.84);
    box-shadow: inset 3px 0 0 rgba(218, 158, 82, 0.32);
    transform: translateY(-1px);
}

body.page-forums .forum-card__main {
    grid-area: main;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

body.page-forums .forum-card__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(196, 208, 222, 0.84);
    border-radius: 10px;
    background-color: rgba(241, 246, 251, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='18' viewBox='0 0 20 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.6 3.2h10.8c1.35 0 2.45 1.1 2.45 2.45v5.45c0 1.35-1.1 2.45-2.45 2.45H9.1L5.6 16.1v-2.55h-1c-1.35 0-2.45-1.1-2.45-2.45V5.65c0-1.35 1.1-2.45 2.45-2.45Z' stroke='%235f7187' stroke-width='1.55' stroke-linejoin='round'/%3E%3Cpath d='M5.7 7.15h8.6M5.7 10.05h5.9' stroke='%235f7187' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

body.page-forums .forum-card__icon img {
    display: none;
}

body.page-forums .forum-card--unread .forum-card__icon {
    border-color: rgba(226, 170, 91, 0.72);
    background-color: rgba(255, 247, 232, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='18' viewBox='0 0 20 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.6 3.2h10.8c1.35 0 2.45 1.1 2.45 2.45v5.45c0 1.35-1.1 2.45-2.45 2.45H9.1L5.6 16.1v-2.55h-1c-1.35 0-2.45-1.1-2.45-2.45V5.65c0-1.35 1.1-2.45 2.45-2.45Z' stroke='%23c88735' stroke-width='1.55' stroke-linejoin='round'/%3E%3Cpath d='M5.7 7.15h8.6M5.7 10.05h5.9' stroke='%23c88735' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86),
                0 0 0 3px rgba(239, 177, 91, 0.07);
}

body.page-forums .forum-card__copy {
    min-width: 0;
}

body.page-forums .forum-card__titleline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

body.page-forums .forum-card__name {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    color: #3f3022 !important;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none !important;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

body.page-forums .forum-card__name:hover {
    color: #9a5a13 !important;
}

body.page-forums .forum-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 4px 0 0;
    color: #837567;
    font-size: 11px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

body.page-forums .forum-card__meta {
    display: contents;
    align-items: center;
    min-width: 0;
    padding-top: 0;
    border-top: 0;
}

body.page-forums .forum-card__stats {
    grid-area: stats;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

body.page-forums .forum-stat {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #a79d92;
    font-variant-numeric: tabular-nums;
}

body.page-forums .forum-stat + .forum-stat::before {
    content: "/";
    margin-right: 4px;
    color: #d6ccc1;
    font-size: 11px;
    font-weight: 400;
}

body.page-forums .forum-stat strong {
    color: #74695f;
    font-size: 12px;
    font-weight: 500;
}

body.page-forums .forum-stat em {
    font-size: 10.5px;
    font-style: normal;
    color: #aaa096;
}

body.page-forums .forum-card .forum-last-post {
    grid-area: last;
    min-width: 0;
    padding: 0 0 0 12px;
    border: 0;
    border-left: 1px solid rgba(220, 227, 236, 0.72);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    white-space: normal !important;
}

body.page-forums .forum-card .forum-last-post__topic {
    display: -webkit-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    color: #7b6957 !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

body.page-forums .forum-card--today .forum-last-post__topic {
    color: #b15d12 !important;
    font-weight: 700;
}

body.page-forums .forum-card .forum-last-post__topic b,
body.page-forums .forum-card .forum-last-post__topic font {
    color: inherit !important;
    font-weight: inherit;
}

body.page-forums .forum-card .forum-last-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    align-items: center;
    color: #9d9082;
    font-size: 11px;
}

body.page-forums .forum-last-post__meta::before {
    content: none;
}

body.page-forums .forum-last-post__time,
body.page-forums .forum-last-post__author {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

body.page-forums .forum-last-post__time {
    color: #928270;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
}

body.page-forums .forum-last-post__time::before {
    content: "·";
    margin-right: 6px;
    color: #c4b8aa;
    font-weight: 600;
}

body.page-forums .forum-last-post__author::before {
    content: none;
}

body.page-forums .forum-last-post__author-user {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
}

body.page-forums .forum-last-post__author-avatar {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(244, 238, 231, 0.86);
    box-shadow: 0 0 0 1px rgba(212, 199, 184, 0.62);
}

body.page-forums .forum-last-post__author-real {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

body.page-forums .forum-last-post__empty {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    color: #a99b8b;
    font-size: 11px;
    font-weight: 600;
}

body.page-forums .forum-card__moderators {
    grid-area: mods;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: center;
    justify-content: flex-end;
    color: #8c7a68;
    font-size: 12px;
    min-width: 0;
    max-width: 100%;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.page-forums .forum-moderator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
}

body.page-forums .forum-moderator__avatar {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(244, 238, 231, 0.86);
    box-shadow: 0 0 0 1px rgba(212, 199, 184, 0.72);
}

body.page-forums .forum-card__moderators a {
    text-decoration: none !important;
}

body.page-forums .forum-card__moderators a:hover {
    text-decoration: underline !important;
}

body.page-forums .forum-moderator--vacant {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #b7ada2 !important;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.35;
}

body.page-forums .forum-moderator--vacant:hover {
    color: #8b7867 !important;
    text-decoration: underline !important;
}

body.page-forums .forum-board-list {
    width: 100% !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    background: transparent !important;
}

body.page-forums .forum-board-list td {
    border: 0 !important;
}

body.page-forums .forum-section-head .colhead {
    padding: 8px 14px;
    border: 0 !important;
    background: linear-gradient(90deg, rgba(255, 245, 232, 0.96), rgba(255, 235, 208, 0.9)) !important;
    color: #8a5518;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: none;
    border-top: 1px solid rgba(228, 205, 172, 0.72) !important;
    border-bottom: 1px solid rgba(228, 205, 172, 0.72) !important;
}

body.page-forums .forum-section-head__title {
    border-left: 1px solid rgba(228, 205, 172, 0.72) !important;
    border-radius: 13px 0 0 13px;
}

body.page-forums .forum-section-head__moderator {
    border-right: 1px solid rgba(228, 205, 172, 0.72) !important;
    border-radius: 0 13px 13px 0;
}

body.page-forums .forum-row .rowfollow {
    padding: 14px;
    border-top: 1px solid rgba(220, 227, 236, 0.82) !important;
    border-bottom: 1px solid rgba(220, 227, 236, 0.82) !important;
    background: rgba(255, 255, 255, 0.76) !important;
    vertical-align: middle;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.page-forums .forum-row .rowfollow:first-child {
    border-left: 1px solid rgba(220, 227, 236, 0.82) !important;
    border-radius: 16px 0 0 16px;
}

body.page-forums .forum-row .rowfollow:last-child {
    border-right: 1px solid rgba(220, 227, 236, 0.82) !important;
    border-radius: 0 16px 16px 0;
}

body.page-forums .forum-row:hover .rowfollow {
    background: rgba(255, 250, 244, 0.96) !important;
    box-shadow: 0 8px 18px rgba(49, 66, 96, 0.045);
}

body.page-forums .forum-row__identity {
    width: 100%;
    border: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-row__identity td {
    background: transparent !important;
}

body.page-forums .forum-row__icon {
    width: 42px;
    padding: 0 14px 0 0 !important;
    vertical-align: middle;
    text-align: center;
}

body.page-forums .forum-row__icon img {
    display: block;
    margin: 0 auto;
}

body.page-forums .forum-row__copy {
    min-width: 0;
}

body.page-forums .forum-row__name {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    color: #5a4633 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none !important;
}

body.page-forums .forum-row__name:hover {
    color: #9a5a13 !important;
}

body.page-forums .forum-row__description {
    display: block;
    margin-top: 4px;
    color: #837567;
    font-size: 12px;
    line-height: 1.55;
}

body.page-forums .forum-today-count {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 18px;
    padding: 1px 7px;
    border: 1px solid rgba(218, 150, 70, 0.72);
    border-radius: 999px;
    background: rgba(255, 241, 222, 0.96);
    color: #b15d12;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: 0 1px 4px rgba(177, 93, 18, 0.08);
}

body.page-forums .forum-today-count strong {
    color: inherit !important;
    font-size: 11px;
    font-weight: 700;
}

body.page-forums .forum-row__stat {
    min-width: 58px;
    color: #8c7a68;
    font-size: 12px;
}

body.page-forums .forum-row__stat strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(247, 250, 253, 0.92);
    box-shadow: inset 0 0 0 1px rgba(220, 227, 236, 0.8);
    color: #5f4e3e;
    font-size: 13px;
}

body.page-forums .forum-last-post {
    min-width: 260px;
    white-space: normal !important;
}

body.page-forums .forum-last-post__topic {
    display: -webkit-box;
    max-width: 360px;
    overflow: hidden;
    color: #5a4633 !important;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none !important;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

body.page-forums .forum-last-post__topic:hover {
    color: #9a5a13 !important;
}

body.page-forums .forum-last-post__meta {
    display: block;
    margin-top: 4px;
    color: #8c7a68;
    font-size: 11px;
    line-height: 1.45;
}

body.page-forums .forum-row__moderators {
    min-width: 96px;
    color: #8c7a68;
    font-size: 12px;
}

body.page-forums .forum-row__moderators a {
    color: #8a5518 !important;
    text-decoration: none !important;
}

body.page-forums .forum-board-ad td {
    padding: 10px 0 !important;
    background: transparent !important;
}

body.page-forums .forum-home + h2,
body.page-forums .forum-home > h2 {
    margin: 16px 0 0;
    padding: 12px 16px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 238, 0.72));
    color: #5f4e3e;
    font-size: 14px;
    text-align: left !important;
}

body.page-forums .forum-home > h2 + table {
    width: 100% !important;
    border: 1px solid rgba(220, 227, 236, 0.82) !important;
    border-top: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.76) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forums .forum-home > h2 + table td,
body.page-forums .forum-home > h2 + table td.text {
    border: 0 !important;
    background: transparent !important;
    color: #6f6256;
    line-height: 1.7;
}

body.page-forums .forum-home > h2 + table td.text {
    padding: 14px 16px !important;
}

body.page-forums .forum-view__hero {
    margin-bottom: 12px;
    position: relative;
    z-index: 20;
}

body.page-forums .forum-view__toolbar {
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

body.page-forums .forum-view__title {
    flex: 0 1 auto;
    min-width: 0;
}

body.page-forums .forum-view__title a,
body.page-forums .forum-view__title span {
    color: inherit !important;
    text-decoration: none !important;
}

body.page-forums .forum-view__title span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

body.page-forums .forum-view__title span::before {
    content: "/";
    margin: 0 2px 0 1px;
    color: #c9b8a6;
    font-weight: 500;
}

body.page-forums .forum-view__notice,
body.page-forums .forum-view__empty,
body.page-forums .forum-view__tools {
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    color: #756858;
}

body.page-forums .forum-view__notice,
body.page-forums .forum-view__empty {
    font-size: 12px;
    line-height: 1.6;
}

body.page-forums .forum-view__moderators {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 7px;
    flex: 0 1 auto;
    min-width: 0;
    color: #8c7a68;
    font-size: 11px;
    line-height: 1.35;
}

body.page-forums .forum-view__moderators > span {
    color: #b0a397;
    font-size: 10.5px;
    font-weight: 600;
}

body.page-forums .forum-view__moderators a {
    text-decoration: none !important;
}

body.page-forums .forum-view__moderators a:hover {
    text-decoration: underline !important;
}

body.page-forums .forum-view__pager {
    color: #8c7a68;
    font-size: 12px;
}

body.page-forums .forum-view__pager p {
    margin: 8px 0 12px !important;
}

body.page-forums .forum-view__pager--bottom p {
    margin: 12px 0 8px !important;
}

body.page-forums .forum-topic-section {
    overflow: hidden;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forums .forum-topic-section__head,
body.page-forums .forum-topic-card {
    display: grid;
    grid-template-columns: minmax(330px, 1fr) minmax(116px, 0.22fr) 106px 260px;
    grid-template-areas: "topic author stats last";
    align-items: center;
    gap: 14px;
}

body.page-forums .forum-topic-section__head {
    padding: 9px 16px 8px;
    border-bottom: 1px solid rgba(210, 221, 234, 0.72);
    background: rgba(255, 255, 255, 0.35);
}

body.page-forums .forum-topic-section__hint {
    display: inline-flex;
    color: #aaa096 !important;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none !important;
    white-space: nowrap;
}

body.page-forums .forum-topic-section__hint--topic {
    grid-area: topic;
}

body.page-forums .forum-topic-section__hint--author {
    grid-area: author;
    justify-content: center;
}

body.page-forums .forum-topic-section__hint--stats {
    grid-area: stats;
    justify-content: center;
}

body.page-forums .forum-topic-section__hint--last {
    grid-area: last;
    justify-content: center;
    padding-left: 12px;
    text-align: center;
}

body.page-forums .forum-topic-section__body {
    display: flex;
    flex-direction: column;
}

body.page-forums .forum-topic-card {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(220, 227, 236, 0.62);
    background: rgba(255, 255, 255, 0.56);
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.page-forums .forum-topic-card:last-child {
    border-bottom: 0;
}

body.page-forums .forum-topic-card:hover {
    background: rgba(255, 250, 244, 0.84);
    box-shadow: inset 3px 0 0 rgba(218, 158, 82, 0.32);
    transform: translateY(-1px);
}

body.page-forums .forum-topic-card__main {
    grid-area: topic;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

body.page-forums .forum-topic-card__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(196, 208, 222, 0.84);
    border-radius: 10px;
    background-color: rgba(241, 246, 251, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='18' viewBox='0 0 20 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.6 3.2h10.8c1.35 0 2.45 1.1 2.45 2.45v5.45c0 1.35-1.1 2.45-2.45 2.45H9.1L5.6 16.1v-2.55h-1c-1.35 0-2.45-1.1-2.45-2.45V5.65c0-1.35 1.1-2.45 2.45-2.45Z' stroke='%235f7187' stroke-width='1.55' stroke-linejoin='round'/%3E%3Cpath d='M5.7 7.15h8.6M5.7 10.05h5.9' stroke='%235f7187' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

body.page-forums .forum-topic-card__icon img {
    display: none;
}

body.page-forums .forum-topic-card--unread .forum-topic-card__icon {
    border-color: rgba(226, 170, 91, 0.72);
    background-color: rgba(255, 247, 232, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='18' viewBox='0 0 20 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.6 3.2h10.8c1.35 0 2.45 1.1 2.45 2.45v5.45c0 1.35-1.1 2.45-2.45 2.45H9.1L5.6 16.1v-2.55h-1c-1.35 0-2.45-1.1-2.45-2.45V5.65c0-1.35 1.1-2.45 2.45-2.45Z' stroke='%23c88735' stroke-width='1.55' stroke-linejoin='round'/%3E%3Cpath d='M5.7 7.15h8.6M5.7 10.05h5.9' stroke='%23c88735' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.page-forums .forum-topic-card--locked .forum-topic-card__icon {
    border-color: rgba(188, 190, 190, 0.72);
    background-color: rgba(241, 241, 239, 0.92);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='18' viewBox='0 0 20 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.6 3.2h10.8c1.35 0 2.45 1.1 2.45 2.45v5.45c0 1.35-1.1 2.45-2.45 2.45H9.1L5.6 16.1v-2.55h-1c-1.35 0-2.45-1.1-2.45-2.45V5.65c0-1.35 1.1-2.45 2.45-2.45Z' stroke='%23969a9c' stroke-width='1.55' stroke-linejoin='round'/%3E%3Cpath d='M5.7 7.15h8.6M5.7 10.05h5.9' stroke='%23969a9c' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

body.page-forums .forum-topic-card__copy {
    min-width: 0;
}

body.page-forums .forum-topic-card__titleline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

body.page-forums .forum-topic-card__title {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    color: #3f3022 !important;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none !important;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

body.page-forums .forum-topic-card__title:hover {
    color: #9a5a13 !important;
}

body.page-forums .forum-topic-card__title b {
    font-weight: 700;
}

body.page-forums .forum-topic-card__title font {
    font-weight: inherit;
}

body.page-forums .forum-topic-sticky-icons {
    margin-right: 0;
}

body.page-forums .forum-topic-sticky-icons .forum-topic-sticky-icon {
    width: 16px;
    height: 16px;
}

body.page-forums .forum-topic-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: #aaa096;
    font-size: 10.5px;
    line-height: 1;
}

body.page-forums .forum-topic-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
    white-space: nowrap;
}

body.page-forums .forum-topic-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid rgba(128, 128, 128, 0.45);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

body.page-forums .forum-topic-subscribe--active {
    background: rgba(255, 255, 255, 0.22);
    font-weight: bold;
}

body.page-forums .forum-topic-highlight-select {
    background-clip: padding-box;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body.page-forums ul.magic {
    cursor: pointer;
    list-style-type: none;
    padding-left: 0;
}

body.page-forums ul.magic li {
    float: left;
    width: 40px;
    height: 21px;
    margin: 0 15px 0 0;
    padding-right: 5px;
    padding-left: 5px;
    background: url("../../styles/huise.png") no-repeat;
    line-height: 20px;
    text-align: center;
}

body.page-forums ul.magic li:hover {
    background: url("../../styles/boli.png") no-repeat;
}

body.page-forums .forum-viewtopic-hero {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0 auto 12px;
    padding: 13px 18px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66));
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
    text-align: left;
}

body.page-forums .forum-viewtopic-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
    color: #aaa096;
    font-size: 11px;
}

body.page-forums .forum-viewtopic-crumbs a {
    color: #8a5518 !important;
    text-decoration: none !important;
}

body.page-forums .forum-viewtopic-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: #5f4e3e;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

body.page-forums .forum-viewtopic-title::before {
    content: "";
    width: 3px;
    height: 14px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

body.page-forums .forum-viewtopic-lock {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(170, 160, 150, 0.14);
    color: #8d8175;
    font-size: 10.5px;
    font-weight: 700;
}

body.page-forums .forum-viewtopic-pager {
    width: 100%;
    max-width: none;
    margin: 8px auto;
    color: #928270;
    font-size: 12px;
    text-align: center;
}

body.page-forums .forum-viewtopic-pager p {
    margin: 0;
}

body.page-forums .forum-viewtopic-pager .forum-viewtopic-page {
    color: #8a5518 !important;
    text-decoration: none !important;
}

body.page-forums .forum-viewtopic-pages,
body.page-forums .forum-viewtopic-page-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

body.page-forums .forum-viewtopic-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid rgba(222, 210, 193, 0.82);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #8a5518 !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
}

body.page-forums .forum-viewtopic-page--current {
    border-color: rgba(208, 150, 85, 0.7);
    background: rgba(255, 242, 224, 0.96);
    color: #7a572d !important;
}

body.page-forums .forum-viewtopic-page--disabled,
body.page-forums .forum-viewtopic-page--ellipsis {
    color: #b8afa5 !important;
}

body.page-forums .forum-viewtopic-page--disabled {
    background: rgba(245, 241, 236, 0.66);
}

body.page-forums .forum-viewtopic-page--ellipsis {
    min-width: auto;
    border-color: transparent;
    background: transparent;
}

body.page-forums .forum-viewtopic-toolbar {
    width: 100% !important;
    max-width: none;
    margin: 10px auto 12px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.035);
}

body.page-forums .forum-viewtopic-toolbar td {
    padding: 8px 12px !important;
}

body.page-forums .forum-viewtopic-toolbar__stats {
    color: #8b7867;
    font-size: 12px;
}

body.page-forums .forum-viewtopic-toolbar__stats b {
    color: #7a572d;
    font-size: 14px;
}

body.page-forums .forum-viewtopic-admin {
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.35) !important;
}

body.page-forums .forum-viewtopic-admin__groups {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

body.page-forums .forum-viewtopic-admin__regular {
    display: flex;
    align-items: center;
    flex: 1 1 720px;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

body.page-forums .forum-viewtopic-admin__danger {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

body.page-forums .forum-viewtopic-admin__group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid rgba(220, 227, 236, 0.72);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.64);
}

body.page-forums .forum-viewtopic-admin__group--danger {
    margin-left: 0;
    border-color: rgba(202, 132, 112, 0.46);
    background: rgba(255, 246, 242, 0.76);
}

body.page-forums .forum-viewtopic-admin__label {
    color: #aaa096;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

body.page-forums .forum-viewtopic-admin__form {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    white-space: nowrap;
}

body.page-forums .forum-viewtopic-admin__form select,
body.page-forums .forum-viewtopic-admin__form input[type="text"] {
    box-sizing: border-box;
    min-height: 26px;
    padding: 3px 25px 3px 9px;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.86);
    color: #5f4e3e;
    font-size: 11px;
    line-height: 1.3;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

body.page-forums .forum-viewtopic-admin__form select {
    max-width: 180px;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8b7867 50%),
                      linear-gradient(135deg, #8b7867 50%, transparent 50%);
    background-position: calc(100% - 13px) 10px, calc(100% - 8px) 10px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
}

body.page-forums .forum-viewtopic-admin__form select:focus,
body.page-forums .forum-viewtopic-admin__form input[type="text"]:focus {
    border-color: rgba(202, 145, 83, 0.74);
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 0 3px rgba(227, 160, 108, 0.12);
}

body.page-forums .forum-viewtopic-admin__form input[type="submit"],
body.page-forums .forum-viewtopic-admin__form button {
    min-height: 26px;
    padding: 3px 11px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-forums .forum-viewtopic-admin__form input[type="submit"]:hover,
body.page-forums .forum-viewtopic-admin__form button:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"] {
    border-color: rgba(214, 168, 152, 0.76);
    background: rgba(255, 246, 242, 0.94);
    color: #a05a45;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"]:hover {
    border-color: rgba(203, 139, 118, 0.9);
    background: rgba(255, 240, 234, 0.98);
    color: #8d4835;
}

body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    width: 100%;
    max-width: none;
    margin: 14px auto 8px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forums .forum-quick-reply__table, body.page-collection_view .forum-quick-reply__table {
    width: 100%;
    border: 0;
    background: transparent;
}

body.page-forums .forum-quick-reply__body, body.page-collection_view .forum-quick-reply__body {
    border: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-quick-reply h2, body.page-collection_view .forum-quick-reply h2 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    color: #3f3022;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: none !important;
}

body.page-forums .forum-quick-reply h2::before, body.page-collection_view .forum-quick-reply h2::before {
    content: "";
    width: 3px;
    height: 14px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

body.page-forums .forum-quick-reply form, body.page-collection_view .forum-quick-reply form {
    display: grid;
    gap: 9px;
    justify-items: center;
    margin: 0;
}

body.page-forums .forum-quick-reply textarea, body.page-collection_view .forum-quick-reply textarea {
    box-sizing: border-box;
    width: min(100%, 1100px) !important;
    min-height: 128px;
    padding: 11px 13px;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.88);
    color: #4f4438;
    font: inherit;
    font-size: 13px;
    line-height: 1.65;
    outline: none;
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(49, 66, 96, 0.035);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

body.page-forums .forum-quick-reply textarea + div[align="center"], body.page-collection_view .forum-quick-reply textarea + div[align="center"] {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    width: min(100%, 1100px);
    padding: 7px 10px;
    border: 1px solid rgba(220, 227, 236, 0.64);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

body.page-forums .forum-quick-reply textarea + div[align="center"] a, body.page-collection_view .forum-quick-reply textarea + div[align="center"] a {
    display: inline-flex;
    line-height: 1;
}

body.page-forums .forum-quick-reply textarea:focus, body.page-collection_view .forum-quick-reply textarea:focus {
    border-color: rgba(202, 145, 83, 0.74);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 1px 2px rgba(49, 66, 96, 0.035),
                0 0 0 3px rgba(227, 160, 108, 0.12);
}

body.page-forums .forum-quick-reply input[type="submit"], body.page-collection_view .forum-quick-reply input[type="submit"],
body.page-forums .forum-quick-reply button, body.page-collection_view .forum-quick-reply button {
    min-height: 30px;
    padding: 5px 18px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.94);
    color: #8a5518;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(157, 103, 42, 0.06);
    transition: transform 0.16s ease, color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-forums .forum-quick-reply input[type="submit"]:hover, body.page-collection_view .forum-quick-reply input[type="submit"]:hover,
body.page-forums .forum-quick-reply button:hover, body.page-collection_view .forum-quick-reply button:hover {
    border-color: rgba(208, 186, 152, 0.94);
    background: #fff7eb;
    color: #7a572d;
    transform: translateY(-1px);
}

body.page-forums .forum-quick-reply input[type="checkbox"], body.page-collection_view .forum-quick-reply input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0 5px 0 0;
    accent-color: #c99054;
    vertical-align: -2px;
}

body.page-forums .forum-quick-reply div[align="left"], body.page-collection_view .forum-quick-reply div[align="left"] {
    width: min(100%, 1100px);
    color: #7e6f60;
    font-size: 12px;
    text-align: left !important;
}

body.page-forums .forum-quick-reply table, body.page-collection_view .forum-quick-reply table {
    max-width: 100%;
}

body.page-forums .forum-quick-reply img, body.page-collection_view .forum-quick-reply img {
    vertical-align: middle;
}

.torrent-comments-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 18px calc(var(--site-content-inline-gap, 26px) * 2) 12px;
    padding: 13px 18px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66));
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

.torrent-comments-hero__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #3f3022;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: none !important;
}

.torrent-comments-hero__title::before {
    content: "";
    width: 3px;
    height: 14px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

.torrent-comments-hero__title i {
    color: #9a6a37;
    font-size: 13px;
}

.torrent-comments-list {
    box-sizing: border-box;
    width: auto;
    margin-right: calc(var(--site-content-inline-gap, 26px) * 2);
    margin-left: calc(var(--site-content-inline-gap, 26px) * 2);
}

.torrent-comment-shell {
    width: 100%;
    margin: 10px auto 0;
    scroll-margin-top: 16px;
}

.torrent-comment-card {
    margin-bottom: 10px !important;
}

.torrent-comment-foot-cell {
    padding: 7px 12px !important;
}

.torrent-comment-foot-cell .forum-post-foot {
    justify-content: flex-end;
}

body.page-details .torrent-comments-pager {
    box-sizing: border-box;
    width: auto !important;
    max-width: none !important;
    margin: 10px calc(var(--site-content-inline-gap, 26px) * 2) 12px !important;
}

body.page-details .torrent-comments-pager .site-pager {
    margin-right: auto;
    margin-left: auto;
}

body.page-details .torrent-quick-comment {
    width: 100%;
    max-width: none;
    margin: 14px calc(var(--site-content-inline-gap, 26px) * 2) 8px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-details .torrent-quick-comment .forum-quick-reply__table {
    width: 100%;
    border: 0;
    background: transparent;
}

body.page-details .torrent-quick-comment .forum-quick-reply__body {
    border: 0 !important;
    background: transparent !important;
}

body.page-details .torrent-quick-comment h2 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #3f3022;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: none !important;
}

body.page-details .torrent-quick-comment h2::before {
    content: "";
    width: 3px;
    height: 14px;
    flex: 0 0 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

body.page-details .torrent-quick-comment form {
    display: grid;
    gap: 9px;
    justify-items: center;
    margin: 0;
}

body.page-details .torrent-quick-comment textarea {
    box-sizing: border-box;
    width: min(100%, 1100px) !important;
    min-height: 128px;
    padding: 11px 13px;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.88);
    color: #4f4438;
    font: inherit;
    font-size: 13px;
    line-height: 1.65;
    outline: none;
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(49, 66, 96, 0.035);
}

body.page-details .torrent-quick-comment textarea:focus {
    border-color: rgba(202, 145, 83, 0.74);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 1px 2px rgba(49, 66, 96, 0.035),
                0 0 0 3px rgba(227, 160, 108, 0.12);
}

body.page-details .torrent-quick-comment textarea + div[align="center"] {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    width: min(100%, 1100px);
    padding: 7px 10px;
    border: 1px solid rgba(220, 227, 236, 0.64);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

body.page-details .torrent-quick-comment input[type="submit"],
body.page-details .torrent-quick-comment .forum-compose__btn,
.torrent-comment-add-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 18px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.94);
    color: #8a5518 !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(157, 103, 42, 0.06);
    transition: transform 0.16s ease, color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-details .torrent-quick-comment input[type="submit"]:hover,
body.page-details .torrent-quick-comment .forum-compose__btn:hover,
.torrent-comment-add-link a:hover {
    border-color: rgba(208, 186, 152, 0.94);
    background: #fff7eb;
    color: #7a572d !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

body.page-details .torrent-quick-comment input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0 5px 0 0;
    accent-color: #c99054;
    vertical-align: -2px;
}

body.page-details .torrent-quick-comment div[align="left"] {
    width: min(100%, 1100px);
    color: #7e6f60;
    font-size: 12px;
    text-align: left !important;
}

body.page-details .torrent-quick-comment .forum-compose__card--quickreply {
    width: min(100%, 1100px);
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.page-details .torrent-quick-comment .forum-compose__fields,
body.page-details .torrent-quick-comment .forum-compose__field,
body.page-details .torrent-quick-comment .forum-compose__editor,
body.page-details .torrent-quick-comment #editorouter {
    box-sizing: border-box;
    width: 100%;
}

body.page-details .torrent-quick-comment .forum-compose__field {
    margin: 0;
}

body.page-details .torrent-quick-comment #editorouter > table {
    width: 100% !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
    background: transparent !important;
}

body.page-details .torrent-quick-comment #editorouter > table td {
    border-color: rgba(220, 227, 236, 0.58) !important;
    background: transparent !important;
}

body.page-details .torrent-quick-comment .forum-compose__editor textarea.bbcode {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 150px;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[type="button"]),
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> select.codebuttons) {
    padding: 3px !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-details .torrent-quick-comment #editorouter input[type="button"],
body.page-details .torrent-quick-comment #editorouter select.codebuttons {
    min-height: 25px;
    border: 1px solid rgba(202, 214, 228, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #5f7187;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

body.page-details .torrent-quick-comment #editorouter input[type="button"]:hover,
body.page-details .torrent-quick-comment #editorouter select.codebuttons:hover {
    border-color: rgba(177, 195, 215, 0.95);
    background: rgba(244, 248, 252, 0.96);
    color: #4d6278;
}

body.page-details .torrent-quick-comment .forum-compose__action-row {
    display: flex;
    justify-content: center;
    padding: 8px 0 2px;
    border-top: 0;
}

body.page-details .torrent-quick-comment .forum-compose__buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

body.page-details .torrent-quick-comment .forum-compose__btn--primary {
    border-color: rgba(202, 145, 83, 0.52);
    background: linear-gradient(180deg, rgba(255, 247, 235, 0.98), rgba(255, 239, 219, 0.96));
    color: #7a4d1b !important;
}

body.page-details .torrent-quick-comment .torrent-comment-advanced-link {
    border-color: rgba(202, 214, 228, 0.78);
    background: rgba(255, 255, 255, 0.68);
    color: #5f7187 !important;
    box-shadow: none;
}

body.page-details .torrent-quick-comment .torrent-comment-advanced-link:hover {
    border-color: rgba(177, 195, 215, 0.95);
    background: rgba(244, 248, 252, 0.96);
    color: #4d6278 !important;
}

body.page-details .torrent-quick-comment .forum-compose__qr-options {
    display: flex;
    width: 100%;
    margin-top: 10px;
}

body.page-details .torrent-quick-comment .forum-compose__qr-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid rgba(220, 210, 196, 0.7);
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.6);
    color: #6a5b49;
    font-size: 13px;
    cursor: pointer;
}

body.page-details .torrent-quick-comment .forum-compose__qr-checkbox:hover {
    border-color: rgba(202, 145, 83, 0.55);
    background: rgba(255, 239, 219, 0.6);
}

body.page-details .torrent-quick-comment .forum-compose__qr-checkbox input {
    margin: 0;
}

/* details.php 快速评论复用 forum_compose_body_editor()，表情面板也应像 viewtopic 快回一样默认折叠。 */
body.page-details .torrent-quick-comment .forum-compose__card #editorouter:not(.is-emoji-open)
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter:not(.is-emoji-open)
    > table > tr:has(> td > textarea.bbcode) > td:last-child {
    display: none !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter.is-emoji-open
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter.is-emoji-open
    > table > tr:has(> td > textarea.bbcode) > td:last-child {
    margin-top: 4px !important;
    padding: 8px 10px !important;
    border: 1px dashed rgba(218, 150, 70, 0.45) !important;
    border-radius: 10px !important;
    background: rgba(255, 250, 244, 0.78) !important;
}

/* details.php 快速评论对齐 viewtopic 快速回复的最终形态。 */
body.page-details .torrent-quick-comment {
    box-sizing: border-box !important;
    width: auto !important;
    padding: 18px 20px 20px !important;
    margin-bottom: 120px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: rgba(255, 253, 250, 0.95) !important;
    background-image: none !important;
    box-shadow:
        0 1px 2px rgba(45, 36, 25, 0.035),
        0 8px 22px rgba(45, 36, 25, 0.045) !important;
}

body.page-details .torrent-quick-comment h2.forum-quick-reply__title {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: min(100%, 1100px);
    margin: 0 auto 12px !important;
    padding: 0 0 10px !important;
    border-bottom: 1px dashed rgba(220, 227, 236, 0.72) !important;
    background: transparent !important;
    color: #5f4e3e !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: left !important;
}

body.page-details .torrent-quick-comment h2.forum-quick-reply__title::before {
    content: none !important;
}

body.page-details .torrent-quick-comment .forum-quick-reply__title-icon {
    color: #b85d22 !important;
    font-size: 13px !important;
}

body.page-details .torrent-quick-comment form {
    width: min(100%, 1100px);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px !important;
    justify-items: stretch !important;
    margin: 0 auto;
}

body.page-details .torrent-quick-comment .forum-compose__card--quickreply {
    width: 100% !important;
}

body.page-details .torrent-quick-comment .forum-compose__action-row {
    grid-column: 1 / -1;
    justify-content: center !important;
    padding: 8px 0 2px !important;
}

body.page-details .torrent-quick-comment .forum-compose__buttons {
    justify-content: center !important;
}

body.page-details .torrent-quick-comment .forum-compose__editor textarea.bbcode {
    width: 100% !important;
    min-height: 168px !important;
    height: 168px !important;
    padding: 14px 16px !important;
    border-color: rgba(220, 210, 196, 0.9) !important;
    border-radius: 0 0 12px 12px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #3f3022 !important;
    font-size: 13.5px !important;
    box-shadow:
        inset 0 1px 2px rgba(45, 36, 25, 0.03),
        0 8px 18px rgba(45, 36, 25, 0.03) !important;
}

body.page-details .torrent-quick-comment .forum-compose__editor textarea.bbcode:focus {
    border-color: rgba(202, 145, 83, 0.74) !important;
    box-shadow:
        inset 0 1px 2px rgba(45, 36, 25, 0.04),
        0 0 0 3px rgba(227, 160, 108, 0.12) !important;
}

body.page-details .torrent-quick-comment .forum-compose__editor textarea.bbcode::placeholder {
    color: #9c9080 !important;
    opacity: 0.9;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tr {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr > td,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tr > td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tr:not(:has(> td > textarea.bbcode)) > td > table,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 8px 11px 7px !important;
    border: 1px solid rgba(220, 210, 196, 0.46) !important;
    border-radius: 10px 10px 0 0 !important;
    background: rgba(255, 252, 247, 0.54) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset !important;
    overflow: visible !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr > td.embedded,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr > td.embedded {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode),
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tr:has(> td > textarea.bbcode) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter.is-emoji-open
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter.is-emoji-open
    > table > tr:has(> td > textarea.bbcode) > td:last-child {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    text-align: center !important;
}

body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table,
body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody,
body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr,
body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td {
    padding: 6px 10px !important;
    border: 1px solid rgba(222, 218, 210, 0.82) !important;
    border-bottom: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 248, 244, 0.9)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td,
body.page-details .torrent-quick-comment .forum-compose__card #editorouter > table > tr:not(:has(> td > textarea.bbcode)) > td {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:first-child,
body.page-details .torrent-quick-comment #editorouter > table > tr:has(> td > textarea.bbcode) > td:first-child {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr > td.embedded,
body.page-details .torrent-quick-comment #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr > td.embedded {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[type="button"]) {
    position: relative !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    border-color: rgba(220, 210, 196, 0.7) !important;
    background: transparent !important;
    color: #675747 !important;
    overflow: visible !important;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[type="button"]):hover {
    border-color: rgba(202, 145, 83, 0.62) !important;
    background: rgba(255, 248, 238, 0.96) !important;
    color: #8a5518 !important;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[type="button"]) > input[type="button"] {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background: transparent !important;
    color: inherit !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="b"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="i"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="u"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="s"]) > input {
    font-size: 16px !important;
    font-weight: 700 !important;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="i"]) > input { font-style: italic !important; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="u"]) > input { text-decoration: underline !important; text-decoration-thickness: 1.5px !important; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="s"]) > input { text-decoration: line-through !important; text-decoration-thickness: 1.5px !important; }

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="center"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="url"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="IMG"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="list"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="quote"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="code"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="hide"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="Mediainfo"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="tagcount"]) > input,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="_emojitoggle"]) > input {
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="center"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="url"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="IMG"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="list"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="quote"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="code"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="hide"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="Mediainfo"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="tagcount"])::before,
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="_emojitoggle"])::before {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
    font-size: 12.5px;
    line-height: 1;
    color: inherit;
    pointer-events: none;
}

body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="center"])::before      { content: "\f037"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="url"])::before         { content: "\f0c1"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="IMG"])::before         { content: "\f03e"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="list"])::before        { content: "\f03a"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="quote"])::before       { content: "\f10e"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="code"])::before        { content: "\f121"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="hide"])::before        { content: "\f070"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="Mediainfo"])::before   { content: "\f15c"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="tagcount"])::before    { content: "\f057"; }
body.page-details .torrent-quick-comment #editorouter td.embedded:has(> input[name="_emojitoggle"])::before { content: "\f118"; }

body.page-details .torrent-quick-comment .forum-compose__btn {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 5px 18px !important;
    border: 1px solid rgba(222, 210, 193, 0.84) !important;
    border-radius: 999px !important;
    background: rgba(255, 247, 235, 0.94) !important;
    color: #8a5518 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.page-details .torrent-quick-comment .forum-compose__btn:hover {
    border-color: rgba(208, 186, 152, 0.94) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    transform: translateY(-1px) !important;
}

body.page-details .torrent-quick-comment .torrent-comment-advanced-link {
    border-color: rgba(220, 210, 196, 0.72) !important;
    background: rgba(255, 255, 255, 0.72) !important;
    color: #7e6f60 !important;
}

.torrent-comment-add-link {
    margin: 12px 0 0;
    text-align: center;
}

body.page-forums .forum-viewtopic-reply-link {
    margin: 10px 0 0;
    text-align: center;
}

body.page-forums .forum-viewtopic-reply-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 16px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518 !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-forums .forum-viewtopic-reply-link a:hover {
    border-color: rgba(208, 186, 152, 0.94);
    background: #fff7eb;
    color: #7a572d !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell {
    width: 100%;
    max-width: none;
    margin: 10px auto 0;
}

:is(body.page-forums, body.page-details) .forum-post-head {
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: rgba(255, 255, 255, 0.35);
}

:is(body.page-forums, body.page-details) .forum-post-head td {
    padding: 7px 12px !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__meta {
    color: #6f6255;
    font-size: 12px;
    line-height: 1.5;
}

:is(body.page-forums, body.page-details) .forum-post-head__primary,
:is(body.page-forums, body.page-details) .forum-post-head__actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    vertical-align: middle;
}

:is(body.page-forums, body.page-details) .forum-post-head__primary {
    margin-right: 8px;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions {
    opacity: 0.82;
}

:is(body.page-forums, body.page-details) .forum-post-head__anchor {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
    font-weight: 700;
    text-decoration: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__label,
:is(body.page-forums, body.page-details) .forum-post-head__separator {
    color: #aaa096;
}

:is(body.page-forums, body.page-details) .forum-post-head__time {
    color: #928270;
    font-weight: 500;
}

:is(body.page-forums, body.page-details) .forum-post-head__filter {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border: 1px solid rgba(220, 227, 236, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    color: #8b7867 !important;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-head__filter:hover {
    border-color: rgba(208, 186, 152, 0.9);
    background: rgba(255, 247, 235, 0.9);
    color: #7a572d !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__floor {
    text-align: right;
}

:is(body.page-forums, body.page-details) .forum-post-floor {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: #8b7867;
    font-size: 12px;
    white-space: nowrap;
}

:is(body.page-forums, body.page-details) .forum-post-floor b {
    color: #7a572d;
    font-size: 15px;
}

:is(body.page-forums, body.page-details) .forum-post-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-height: 22px;
    margin-left: 8px;
    padding: 0;
    border: 1px solid rgba(220, 227, 236, 0.7);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.54);
    color: #8b7867 !important;
    font-size: 0;
    line-height: 1;
    text-decoration: none !important;
    vertical-align: middle;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-top::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M12 19V5M5 12l7-7 7 7'/></svg>") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M12 19V5M5 12l7-7 7 7'/></svg>") no-repeat center / contain;
}

:is(body.page-forums, body.page-details) .forum-post-top:hover {
    border-color: rgba(208, 186, 152, 0.9);
    background: rgba(255, 247, 235, 0.9);
    color: #7a572d !important;
    transform: translateY(-1px);
}

:is(body.page-forums, body.page-details) .forum-post-top img {
    display: none;
}

:is(body.page-forums, body.page-details) .forum-post-card {
    width: 100% !important;
    max-width: none;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 1px solid rgba(220, 227, 236, 0.82) !important;
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.035);
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td {
    border-color: rgba(220, 227, 236, 0.62) !important;
}

:is(body.page-forums, body.page-details) .forum-post-author {
    width: 130px !important;
    padding: 10px 8px !important;
    background: linear-gradient(180deg, rgba(255, 250, 244, 0.78), rgba(250, 253, 255, 0.62)) !important;
    text-align: center;
    color: #6f6255;
    font-size: 11px;
    line-height: 1.45;
}

:is(body.page-forums, body.page-details) .forum-post-author img {
    max-width: 96px;
    height: auto;
    vertical-align: middle;
}

:is(body.page-forums, body.page-details) .forum-post-author > img:first-child {
    display: block;
    width: 58px;
    height: 58px;
    margin: 0 auto 7px;
    padding: 3px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 5px 14px rgba(49, 66, 96, 0.055);
    object-fit: cover;
}

:is(body.page-forums, body.page-details) .forum-post-author--anonymous {
    background: linear-gradient(180deg, rgba(246, 249, 252, 0.82), rgba(255, 250, 244, 0.56)) !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__anonymous-name {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 0 8px;
    border: 1px solid rgba(220, 227, 236, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: #7e6f60;
    font-size: 11px;
    font-weight: 700;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
    margin: 5px 0;
    padding: 5px;
    border: 1px solid rgba(220, 227, 236, 0.56);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.42);
}

:is(body.page-forums, body.page-details) .forum-post-author__medals:empty {
    display: none;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals img {
    max-width: 42px;
    max-height: 42px;
}

:is(body.page-forums, body.page-details) .forum-post-author__class {
    display: block;
    max-width: 66px;
    margin: 0 auto 5px;
    border-radius: 0;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
    margin: 5px auto 0;
    padding: 5px;
    border: 1px solid rgba(229, 214, 191, 0.68);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    text-align: left;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats span {
    display: inline-flex;
    align-items: center;
    min-height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 250, 244, 0.8);
    color: #7e6f60;
    white-space: nowrap;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats--anonymous {
    padding: 5px;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats--anonymous span {
    background: rgba(246, 249, 252, 0.88);
    color: #8b7867;
}

:is(body.page-forums, body.page-details) .forum-post-body {
    min-height: 62px;
    padding: 12px 17px !important;
    background: rgba(255, 255, 255, 0.68) !important;
    color: #4f4438;
    font-size: 13px;
    line-height: 1.7;
}

:is(body.page-forums, body.page-details) .forum-post-body--first {
    min-height: 104px;
    padding: 15px 18px !important;
}

:is(body.page-forums, body.page-details) .forum-post-body__content {
    min-height: 20px;
}

:is(body.page-forums, body.page-details) .forum-post-body--first .forum-post-body__content {
    min-height: 72px;
}

:is(body.page-forums, body.page-details) .forum-post-signature {
    margin: 10px 0 0;
    color: #8d8175;
    font-size: 12px;
    line-height: 1.55;
}

:is(body.page-forums, body.page-details) .forum-post-contact {
    padding: 7px 9px !important;
    background: rgba(255, 250, 244, 0.66) !important;
    text-align: center;
}

:is(body.page-forums, body.page-details) .forum-post-tools {
    padding: 7px 12px !important;
    background: rgba(255, 255, 255, 0.35) !important;
}

:is(body.page-forums, body.page-details) .forum-post-contact,
:is(body.page-forums, body.page-details) .forum-post-tools {
    line-height: 1;
}

:is(body.page-forums, body.page-details) .forum-post-contact .f_online,
:is(body.page-forums, body.page-details) .forum-post-contact .f_offline {
    margin: 0 5px 0 0;
    vertical-align: middle;
}

:is(body.page-forums, body.page-details) .forum-post-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin: 0 0 0 5px;
    padding: 0 10px;
    border: 1px solid rgba(202, 214, 228, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #5f7187 !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    vertical-align: middle;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-action::before {
    content: attr(data-label);
}

:is(body.page-forums, body.page-details) .forum-post-action:hover {
    border-color: rgba(177, 195, 215, 0.95);
    background: rgba(244, 248, 252, 0.96);
    color: #4d6278 !important;
}

:is(body.page-forums, body.page-details) .forum-post-action--danger {
    border-color: rgba(214, 168, 152, 0.7);
    color: #a05a45 !important;
}

:is(body.page-forums, body.page-details) .forum-post-action--danger:hover {
    border-color: rgba(203, 139, 118, 0.86);
    background: rgba(255, 246, 242, 0.96);
    color: #8d4835 !important;
}

:is(body.page-forums, body.page-details) .forum-post-action img {
    display: none;
}

body.page-forums .forum-topic-badge,
body.page-forums .forum-topic-new,
body.page-forums .forum-topic-pages {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

body.page-forums .forum-topic-badge,
body.page-forums .forum-topic-new {
    min-height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none !important;
}

body.page-forums .forum-topic-badge--sticky {
    position: relative;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
}

body.page-forums .forum-topic-badge--sticky::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.72;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

body.page-forums .forum-topic-badge--sticky-10 {
    color: #c9a16d;
}

body.page-forums .forum-topic-badge--sticky-50 {
    color: #9aa8b8;
}

body.page-forums .forum-topic-badge--sticky-100 {
    color: #c6aa55;
}

body.page-forums .forum-topic-badge--sticky-150 {
    color: #d0965b;
}

body.page-forums .forum-topic-badge--sticky-200 {
    color: #c77545;
}

body.page-forums .forum-topic-badge--sticky-220 {
    color: #bb6f65;
}

body.page-forums .forum-topic-badge--sticky-220::before {
    width: 10px;
    height: 10px;
    opacity: 0.82;
}

body.page-forums .forum-topic-new {
    border: 1px solid rgba(218, 150, 70, 0.72);
    background: rgba(255, 241, 222, 0.96);
    color: #b15d12 !important;
}

body.page-forums .forum-topic-pages {
    gap: 3px;
    color: #aaa096;
    font-size: 10.5px;
}

body.page-forums .forum-topic-pages a,
body.page-forums .forum-topic-pages span {
    color: #8c7a68 !important;
    text-decoration: none !important;
}

body.page-forums .forum-topic-card__author,
body.page-forums .forum-topic-card__last {
    min-width: 0;
    color: #756858;
    font-size: 11.5px;
    line-height: 1.45;
}

body.page-forums .forum-topic-card__author {
    grid-area: author;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

body.page-forums .forum-topic-card__author a,
body.page-forums .forum-topic-card__last a {
    text-decoration: none !important;
}

body.page-forums .forum-topic-card__date,
body.page-forums .forum-topic-card__last-time,
body.page-forums .forum-topic-card__last-author {
    display: block;
    color: #9d9082;
}

body.page-forums .forum-topic-card__date,
body.page-forums .forum-topic-card__last-time {
    color: #928270;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
}

body.page-forums .forum-topic-card__author .forum-last-post__author-user {
    justify-content: center;
}

body.page-forums .forum-topic-card__last-author .forum-last-post__author-user {
    justify-content: center;
}

body.page-forums .forum-topic-card__last-author {
    margin-top: 3px;
}

body.page-forums .forum-topic-card__date--new {
    color: #a78f78;
    font-weight: 500;
}

body.page-forums .forum-topic-card__stats {
    grid-area: stats;
    display: inline-flex;
    justify-content: center;
    gap: 4px;
    color: #a79d92;
    white-space: nowrap;
}

body.page-forums .forum-topic-card__stats span {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

body.page-forums .forum-topic-card__stats span + span::before {
    content: "/";
    margin-right: 4px;
    color: #d6ccc1;
    font-size: 11px;
    font-weight: 400;
}

body.page-forums .forum-topic-card__stats strong {
    color: #74695f;
    font-size: 12px;
    font-weight: 500;
}

body.page-forums .forum-topic-card__stats em {
    color: #aaa096;
    font-size: 10.5px;
    font-style: normal;
}

body.page-forums .forum-topic-card__last {
    grid-area: last;
    padding-left: 12px;
    border-left: 1px solid rgba(220, 227, 236, 0.72);
    text-align: center;
}

body.page-forums .forum-view__search {
    display: flex;
    align-items: center;
    flex: 0 0 154px;
    width: 154px;
    min-width: 138px;
    max-width: 154px;
    margin: 0;
}

body.page-forums .forum-view__search-main {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 28px;
    border: 1px solid rgba(220, 227, 236, 0.88);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 6px 14px rgba(49, 66, 96, 0.035);
}

body.page-forums .forum-view__search-main:focus-within {
    border-color: rgba(208, 186, 152, 0.92);
    box-shadow: 0 0 0 3px rgba(229, 164, 79, 0.08), 0 6px 14px rgba(49, 66, 96, 0.04);
}

body.page-forums .forum-view__search-submit {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9f8765;
    cursor: pointer;
    z-index: 2;
    transition: color 0.16s ease, opacity 0.16s ease;
}

body.page-forums .forum-view__search-submit:hover,
body.page-forums .forum-view__search-submit:focus {
    outline: none;
    color: #7a572d;
}

body.page-forums .forum-view__search-icon {
    display: inline-flex;
    pointer-events: none;
}

body.page-forums .forum-view__search-input {
    box-sizing: border-box;
    width: 100%;
    height: 28px;
    padding: 0 10px 0 30px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4d4030;
    font-size: 11px;
    outline: none;
}

body.page-forums .forum-view__search-input::placeholder {
    color: #b6aa9b;
}

/* 版块页排序 dropdown 现已迁到全站通用 ui-dropdown 组件
 * （include/functions_dropdown.php 的 render_dropdown_link，
 *  视觉在 custom.css [Dropdown component]）。
 * 这里保留 .forum-view__sort-menu 作为 alias，只补两个本页面特化：
 *   1. flex 父容器里不要被挤
 *   2. 浮层从默认 left:0 改回 right:0（避免溢出搜索框右边）
 *   3. 预留通用菜单项 hover 的 2px padding-left 动效，避免右对齐浮层横跳 */
body.page-forums .forum-view__sort-menu {
    flex: 0 0 auto;
}
body.page-forums .forum-view__sort-menu > .ui-dropdown-list {
    left: auto;
    right: 0;
    width: 178px;
    min-width: 178px;
}

@media (max-width: 900px) {
    body.page-forums {
        overflow-x: hidden;
    }

    body.page-forums .site-head.site-head--with-banner,
    body.page-forums .site-mainouter.site-mainouter--with-banner,
    body.page-forums table.mainouter {
        width: 133.333vw !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        zoom: 0.75;
        transform-origin: 0 0;
    }

    body.page-forums #outer > table.main {
        width: 100% !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        table-layout: auto !important;
    }

    body.page-forums #outer > table.main > tbody > tr > td.embedded {
        padding-left: var(--site-content-inline-gap, 26px) !important;
        padding-right: var(--site-content-inline-gap, 26px) !important;
        overflow: visible;
    }

    body.page-forums .forum-topic-section__head,
    body.page-forums .forum-topic-card {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr);
        grid-template-areas:
            "topic topic"
            "author stats"
            "last last";
        align-items: start;
    }

    body.page-forums .forum-topic-section__head {
        display: none;
    }

    body.page-forums .forum-topic-card__author {
        text-align: left;
    }

    body.page-forums .forum-topic-card__stats {
        justify-content: flex-end;
    }

    body.page-forums .forum-topic-card__last {
        padding-top: 8px;
        padding-left: 0;
        border-top: 1px solid rgba(220, 227, 236, 0.72);
        border-left: 0;
    }

    body.page-forums .forum-view__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    body.page-forums .forum-view__toolbar {
        justify-content: flex-start;
        width: 100%;
    }

    body.page-forums .forum-view__search {
        flex: 0 0 154px;
    }
}

@media (max-width: 520px) {
    body.page-forums .site-head.site-head--with-banner,
    body.page-forums .site-mainouter.site-mainouter--with-banner,
    body.page-forums table.mainouter {
        width: 263.158vw !important;
        zoom: 0.38;
    }
}

/* ============================================================
 * 主题帖（viewtopic）桌面端体验优化
 * ============================================================ */

/* 楼层卡片：统一基底底色（消除左右栏割裂感） */
:is(body.page-forums, body.page-details) .forum-post-card {
    background: rgba(252, 250, 247, 0.78) !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author,
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body {
    background: transparent !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author {
    border-right: 1px solid rgba(220, 227, 236, 0.62) !important;
}

/* 作者栏：收紧宽度、内边距、头像 */
:is(body.page-forums, body.page-details) .forum-post-author {
    width: 112px !important;
    padding: 10px 6px !important;
    font-size: 11px;
    line-height: 1.4;
}

:is(body.page-forums, body.page-details) .forum-post-author > img:first-child {
    width: 52px;
    height: 52px;
    margin: 0 auto 6px;
    padding: 2px;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(49, 66, 96, 0.04);
}

:is(body.page-forums, body.page-details) .forum-post-author__class {
    max-width: 60px;
    margin: 0 auto 4px;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals {
    gap: 2px;
    margin: 4px 0;
    padding: 3px;
    border-radius: 8px;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals img {
    max-width: 32px;
    max-height: 32px;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats {
    gap: 2px;
    margin: 4px auto 0;
    padding: 4px;
    border-radius: 8px;
    font-size: 10.5px;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats span {
    min-height: 16px;
    padding: 0 4px;
    font-size: 10.5px;
}

/* 正文区：收紧 padding 与 min-height */
:is(body.page-forums, body.page-details) .forum-post-body {
    min-height: 0 !important;
    padding: 10px 14px !important;
    font-size: 13px;
    line-height: 1.65;
}

:is(body.page-forums, body.page-details) .forum-post-body--first {
    min-height: 0 !important;
    padding: 12px 16px !important;
}

:is(body.page-forums, body.page-details) .forum-post-body--first .forum-post-body__content {
    min-height: 0 !important;
}

/* 头部条紧凑 */
:is(body.page-forums, body.page-details) .forum-post-head {
    margin-top: 8px;
}

:is(body.page-forums, body.page-details) .forum-post-head td {
    padding: 4px 10px !important;
}

/* 接触栏 & 工具栏：合并为底部紧凑条 */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-contact,
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-tools {
    padding: 4px 10px !important;
    background: rgba(247, 245, 240, 0.78) !important;
    border-top: 1px solid rgba(220, 227, 236, 0.6) !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-contact {
    width: 112px !important;
    border-right: 1px solid rgba(220, 227, 236, 0.6) !important;
}

:is(body.page-forums, body.page-details) .forum-post-action {
    min-height: 20px;
    margin: 0 0 0 4px;
    padding: 0 8px;
    font-size: 10.5px;
}

/* 爆米花奖励行紧凑化 */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell,
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell-label {
    background: rgba(247, 245, 240, 0.62) !important;
    border-top: 1px solid rgba(220, 227, 236, 0.55) !important;
    padding: 6px 12px !important;
    color: #6f6255;
    font-size: 11.5px;
    line-height: 1.5;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell-label {
    width: 112px !important;
    border-right: 1px solid rgba(220, 227, 236, 0.55) !important;
    color: #aaa096;
    font-size: 10.5px;
    font-weight: 700;
    text-align: center !important;
    white-space: nowrap;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell > div {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    height: auto !important;
    margin: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell ul.magic {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell ul.magic li {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border: 1px solid rgba(220, 200, 168, 0.78);
    border-radius: 999px;
    background: rgba(255, 248, 234, 0.92);
    color: #a86a1f;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell ul.magic li:hover {
    border-color: rgba(208, 168, 110, 0.96);
    background: #fff3df;
    color: #8a5418;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell ul.magic li font {
    padding: 0 !important;
    font-size: 10.5px !important;
    color: inherit !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell input.btn[type="button"][disabled] {
    height: 20px;
    padding: 0 9px;
    border: 1px solid rgba(220, 227, 236, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: #8b7867;
    font-size: 10.5px;
    cursor: default;
    box-shadow: none;
}

/* 管理工具栏：label 作为顶部 caption，避免拥挤换行 */
body.page-forums .forum-viewtopic-admin {
    padding: 8px !important;
}

body.page-forums .forum-viewtopic-admin__groups {
    gap: 6px;
}

body.page-forums .forum-viewtopic-admin__regular {
    gap: 6px;
}

body.page-forums .forum-viewtopic-admin__group {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 0;
    padding: 6px 10px;
    border-radius: 9px;
}

body.page-forums .forum-viewtopic-admin__label {
    align-self: flex-start;
    color: #b3a89d;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.page-forums .forum-viewtopic-admin__form {
    gap: 4px;
    flex-wrap: nowrap;
}

body.page-forums .forum-viewtopic-admin__form select,
body.page-forums .forum-viewtopic-admin__form input[type="text"] {
    min-height: 24px;
    padding: 2px 22px 2px 8px;
    font-size: 11px;
}

body.page-forums .forum-viewtopic-admin__form input[type="submit"],
body.page-forums .forum-viewtopic-admin__form button {
    min-height: 24px;
    padding: 2px 10px;
    font-size: 11px;
}

/* 楼层壳间距 */
:is(body.page-forums, body.page-details) .forum-post-shell {
    margin: 8px auto 0;
}

:is(body.page-forums, body.page-details) .forum-post-shell--first {
    margin-top: 0;
}

/* 快速回复：BBCode 简易工具栏 */
body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    width: min(100%, 1100px);
    padding: 5px 9px;
    border: 1px solid rgba(220, 227, 236, 0.72);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: rgba(252, 250, 247, 0.86);
}

body.page-forums .forum-quick-reply__bbtoolbar + textarea, body.page-collection_view .forum-quick-reply__bbtoolbar + textarea {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

body.page-forums .forum-quick-reply__bbbtn, body.page-collection_view .forum-quick-reply__bbbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid rgba(220, 227, 236, 0.78);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #5f4e3e !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

body.page-forums .forum-quick-reply__bbbtn:hover, body.page-collection_view .forum-quick-reply__bbbtn:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d !important;
    transform: translateY(-1px);
}

body.page-forums .forum-quick-reply__bbbtn--bold, body.page-collection_view .forum-quick-reply__bbbtn--bold { font-weight: 900; }
body.page-forums .forum-quick-reply__bbbtn--italic, body.page-collection_view .forum-quick-reply__bbbtn--italic { font-style: italic; }
body.page-forums .forum-quick-reply__bbbtn--underline, body.page-collection_view .forum-quick-reply__bbbtn--underline { text-decoration: underline !important; }
body.page-forums .forum-quick-reply__bbbtn--strike, body.page-collection_view .forum-quick-reply__bbbtn--strike { text-decoration: line-through !important; }

body.page-forums .forum-quick-reply__bbsep, body.page-collection_view .forum-quick-reply__bbsep {
    width: 1px;
    height: 16px;
    margin: 0 4px;
    background: rgba(220, 227, 236, 0.78);
}

/* 底部页码紧凑 */
body.page-forums .forum-viewtopic-pager--bottom {
    margin: 8px 0 0;
}

body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    margin-top: 10px;
}

body.page-forums .forum-viewtopic-reply-link {
    margin-top: 6px;
}

/* ============================================================
 * 与 index.php / torrents.php 内容栅格对齐（width=1516 L=82）
 * ============================================================ */

/* 1) viewtopic 内 begin_main_frame() 输出的 td.text 默认 padding 归零，
 *    避免在已有 td.embedded(26px) 后再次缩进，让 post-shell / post-card
 *    和 hero / toolbar 在同一垂直边线 (L=82) */
body.page-forums #outer > table.main > tbody > tr > td.embedded > table > tbody > tr > td.text {
    padding: 0 !important;
}

/* 1.5) 干掉 NexusPHP 老皮肤的两层 1px solid #ccc 直角灰边
 *      —— 在 page-forums 上的影响：
 *
 *      源头：BlasphemyOrange/theme.css 里有一条
 *          td { border-right/-top/-left/-bottom: #cccccc 1px solid }
 *      旧时代"给所有 td 画格子"的全局规则。这条规则只在两个顶层独立的 td
 *      上真正显形（其它 td 要么被更具体的 .embedded / .rowfollow 等 class
 *      把 border 取消、要么被外层 <table cellspacing=0> 的 border collapse
 *      行为吞掉），但被显形的这两个 td 在 page-forums 上恰好极其碍眼：
 *
 *        (a) #outer：整页主容器，灰直角围出一个老式硬边框；
 *            紧贴里面是 16px 圆角的现代毛玻璃卡片（hero / index-card /
 *            forum-topic-section / quick-reply / forum-post-card），
 *            "现代家具塞进旧木盒"。
 *
 *        (b) viewtopic 上 begin_frame() 输出的 `<table border="1">` 内部的
 *            那个 td.text：把 4 张暖白纸感 + 暖棕阴影 + 下半圆 12px 的
 *            forum-post-card 圈在一圈灰直角框里，并且和 #outer 完全同款灰直角，
 *            视觉上是"两层冗余描边"（最外一圈灰 + 往里 32px 又一圈灰）。
 *
 *      只在 page-forums 上 reset：torrents / staff / admanage / faq 等
 *      老式表单页的 #outer 灰直角和它们内部 colhead / rowhead / rowfollow
 *      老式 td 同时代，内外协调，不动。
 */
body.page-forums #outer,
body.page-forums #outer > table.main > tbody > tr > td.embedded > table > tbody > tr > td.text {
    border: 0 !important;
}

/* 2) viewtopic 中位于 main 之外的 pager / quick-reply / reply-link
 *    与内部 hero (L=82, w=1516) 对齐：
 *    它们的父级是 td#outer (w=1632)，hero 父级是 td.embedded (w=1568) 再减 26 padding。
 *    所以这三个外置容器需要在 td#outer 内向内缩 26+26=52px。 */
body.page-forums .forum-viewtopic-pager,
body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply,
body.page-forums .forum-viewtopic-reply-link {
    box-sizing: border-box;
    width: auto !important;
    max-width: none !important;
    margin-left: calc(var(--site-content-inline-gap, 26px) * 2) !important;
    margin-right: calc(var(--site-content-inline-gap, 26px) * 2) !important;
}

/* ============================================================
 * viewtopic 视觉精修（v2）
 * - hero 主题信息卡片：标题 + 元数据条
 * - 楼层卡片：头部条层级、底部接触/工具栏紧凑
 * - 色调中性化、按钮主操作样式
 * ============================================================ */

/* —— hero 主题信息卡 —— */
body.page-forums .forum-viewtopic-hero {
    padding: 16px 20px 14px !important;
    background: linear-gradient(135deg, rgba(252, 250, 247, 0.86), rgba(248, 250, 252, 0.72)) !important;
}

body.page-forums .forum-viewtopic-crumbs {
    margin-bottom: 8px;
    color: #aaa096;
    font-size: 11px;
    line-height: 1.4;
}

body.page-forums .forum-viewtopic-crumbs a {
    color: #8b7867 !important;
    text-decoration: none !important;
}

body.page-forums .forum-viewtopic-crumbs a:hover {
    color: #5f4e3e !important;
}

body.page-forums .forum-viewtopic-crumbs span {
    margin: 0 6px;
    color: #c8bdb0;
}

body.page-forums .forum-viewtopic-title {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: #2d2419 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.01em;
}

body.page-forums .forum-viewtopic-title__text {
    min-width: 0;
}

body.page-forums .forum-viewtopic-title .forum-topic-sticky-icons,
body.page-forums .forum-viewtopic-title .forum-topic-lock-icon {
    transform: translateY(1px);
}

body.page-forums .forum-viewtopic-title .forum-topic-sticky-icons .forum-topic-sticky-icon,
body.page-forums .forum-viewtopic-title .forum-topic-lock-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
}

body.page-forums .forum-viewtopic-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(220, 227, 236, 0.66);
}

body.page-forums .forum-viewtopic-meta__item {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: #6f6255;
    font-size: 12px;
    line-height: 1.4;
}

body.page-forums .forum-viewtopic-meta__icon {
    color: #aaa096;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.04em;
}

body.page-forums .forum-viewtopic-meta__item b {
    color: #4f4438;
    font-size: 13px;
    font-weight: 700;
}

body.page-forums .forum-viewtopic-meta__item--views b { color: #5f7187; }
body.page-forums .forum-viewtopic-meta__item--replies b { color: #8a5518; }
body.page-forums .forum-viewtopic-meta__item--posts b { color: #4f4438; }

body.page-forums .forum-viewtopic-meta__tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

body.page-forums .forum-viewtopic-meta__tag--sticky {
    border: 1px solid rgba(218, 150, 70, 0.58);
    background: rgba(255, 241, 222, 0.84);
    color: #b15d12;
}

body.page-forums .forum-viewtopic-meta__tag--locked {
    border: 1px solid rgba(202, 132, 112, 0.56);
    background: rgba(255, 240, 234, 0.88);
    color: #a05a45;
}

body.page-forums .forum-viewtopic-meta__spacer {
    flex: 1 1 auto;
}

body.page-forums .forum-viewtopic-meta__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* hero 内的回复 / 订阅按钮 */
body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 12px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518 !important;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a:hover {
    border-color: rgba(208, 186, 152, 0.94);
    background: #fff7eb;
    color: #7a572d !important;
    transform: translateY(-1px);
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a img {
    display: none;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-subscribe--active {
    border-color: rgba(167, 198, 168, 0.86) !important;
    background: rgba(238, 250, 240, 0.92) !important;
    color: #3a7a45 !important;
}

/* —— 隐藏旧的 forum-viewtopic-toolbar（已被 hero 内的 meta 取代）—— */
body.page-forums .forum-viewtopic-toolbar {
    display: none !important;
}

/* —— 页码紧凑化 —— */
body.page-forums .forum-viewtopic-pager--top {
    margin: 6px auto;
}

body.page-forums .forum-viewtopic-pager .forum-viewtopic-page,
body.page-forums .forum-viewtopic-pager .pageinator,
body.page-forums .forum-viewtopic-pager strong {
    display: inline-flex;
    align-items: center;
    height: 22px;
    margin: 0 2px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
}

/* —— 楼层卡片头部：层级化 —— */
:is(body.page-forums, body.page-details) .forum-post-head {
    display: block;
    background: transparent !important;
    border: 0 !important;
    overflow: visible;
}

:is(body.page-forums, body.page-details) .forum-post-head td {
    padding: 6px 12px !important;
    border: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__meta {
    background: transparent !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__primary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
}

:is(body.page-forums, body.page-details) .forum-post-head__anchor {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 7px;
    border-radius: 6px;
    background: rgba(220, 227, 236, 0.34);
    color: #8b7867 !important;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1;
}

:is(body.page-forums, body.page-details) .forum-post-head__anchor:hover {
    background: rgba(208, 186, 152, 0.32);
    color: #5f4e3e !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__primary > .nowrap,
:is(body.page-forums, body.page-details) .forum-post-head__primary a:not(.forum-post-head__anchor):not(.forum-post-head__filter) {
    color: #4f4438;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__primary a:not(.forum-post-head__anchor):not(.forum-post-head__filter):hover {
    color: #2d2419;
    text-decoration: underline !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__label {
    color: #b3a89d;
    font-size: 11px;
    font-weight: 400;
}

:is(body.page-forums, body.page-details) .forum-post-head__time {
    color: #aaa096;
    font-size: 11px;
}

:is(body.page-forums, body.page-details) .forum-post-head__filter {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 7px;
    border: 1px solid rgba(220, 227, 236, 0.62);
    border-radius: 999px;
    background: transparent;
    color: #8b7867 !important;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-head__filter:hover {
    border-color: rgba(202, 145, 83, 0.62);
    background: rgba(255, 247, 235, 0.7);
    color: #8a5518 !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__floor {
    text-align: right;
}

:is(body.page-forums, body.page-details) .forum-post-floor {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: #b3a89d;
    font-size: 10.5px;
    line-height: 1;
}

:is(body.page-forums, body.page-details) .forum-post-floor b {
    color: #c77545;
    font-size: 14px;
    font-weight: 800;
}

:is(body.page-forums, body.page-details) .forum-post-top {
    margin-left: 6px;
}

:is(body.page-forums, body.page-details) .forum-post-top img.top {
    display: none;
}

/* —— 楼层卡片：边框圆角与头部融合 —— */
:is(body.page-forums, body.page-details) .forum-post-card {
    border-radius: 12px !important;
    border: 1px solid rgba(220, 227, 236, 0.78) !important;
    box-shadow: 0 6px 16px rgba(49, 66, 96, 0.04);
    background: rgba(252, 250, 247, 0.86) !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell {
    margin-bottom: 12px;
}

/* —— 作者栏：进一步收紧 —— */
:is(body.page-forums, body.page-details) .forum-post-author {
    width: 108px !important;
    padding: 12px 6px !important;
    background: rgba(248, 246, 242, 0.46) !important;
    border-right: 1px solid rgba(220, 227, 236, 0.5) !important;
}

:is(body.page-forums, body.page-details) .forum-post-author > img:first-child {
    width: 56px;
    height: 56px;
    margin: 0 auto 6px;
    padding: 2px;
    border: 1px solid rgba(220, 227, 236, 0.72);
    border-radius: 50%;
    background: #fff;
}

:is(body.page-forums, body.page-details) .forum-post-author__class {
    max-width: 56px;
    margin: 0 auto 4px;
}

/* 作者栏 medal/stats 完整展示 */
:is(body.page-forums, body.page-details) .forum-post-author__medals {
    max-height: none;
    overflow: visible;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals img {
    max-width: 22px !important;
    max-height: 22px !important;
}

/* —— 正文区：不再被作者栏拉高 —— */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author,
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body {
    vertical-align: top !important;
}

:is(body.page-forums, body.page-details) .forum-post-body {
    padding: 12px 16px !important;
    color: #3f3022;
    font-size: 13px;
    line-height: 1.7;
}

:is(body.page-forums, body.page-details) .forum-post-body--first {
    padding: 14px 18px !important;
}

/* 正文段落最大可读宽度限制（对超长一行帮助大；
   不影响嵌入图片/表格/引用块） */
:is(body.page-forums, body.page-details) .forum-post-body__content > p,
:is(body.page-forums, body.page-details) .forum-post-body__content > div:not(.bbcode-list):not(.quote):not(.code) {
    max-width: 86ch;
}

/* —— 接触栏 + 工具栏：合并为底部一条 —— */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-contact,
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-tools {
    padding: 5px 12px !important;
    background: rgba(248, 246, 242, 0.42) !important;
    border-top: 1px solid rgba(220, 227, 236, 0.5) !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-contact {
    width: 108px !important;
    border-right: 1px solid rgba(220, 227, 236, 0.5) !important;
    text-align: left !important;
}

:is(body.page-forums, body.page-details) .forum-post-action {
    display: inline-flex !important;
    align-items: center;
    height: 22px;
    margin: 0 0 0 4px;
    padding: 0 9px;
    border: 1px solid rgba(220, 227, 236, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #6f6255 !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-action:hover {
    border-color: rgba(202, 145, 83, 0.6);
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518 !important;
}

:is(body.page-forums, body.page-details) .forum-post-action--danger {
    border-color: rgba(214, 168, 152, 0.6);
    color: #a05a45 !important;
}

:is(body.page-forums, body.page-details) .forum-post-contact .f_online,
:is(body.page-forums, body.page-details) .forum-post-contact .f_offline {
    margin: 0;
    vertical-align: middle;
}

/* —— 爆米花奖励：极简弱化 —— */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell-label {
    color: #c8bdb0 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    background: rgba(248, 246, 242, 0.4) !important;
    border-top: 1px dashed rgba(220, 227, 236, 0.5) !important;
    border-right: 1px solid rgba(220, 227, 236, 0.5) !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell {
    background: rgba(248, 246, 242, 0.4) !important;
    border-top: 1px dashed rgba(220, 227, 236, 0.5) !important;
    color: #aaa096 !important;
    font-size: 11px !important;
    padding: 5px 12px !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell-label::before {
    content: "🍿 ";
    margin-right: 3px;
}

:is(body.page-forums, body.page-details) .forum-post-magic-line {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 !important;
    height: auto !important;
}

:is(body.page-forums, body.page-details) .forum-post-magic-line--records {
    margin-left: 8px !important;
}

:is(body.page-forums, body.page-details) .forum-post-magic-tax {
    color: #c8bdb0;
    font-size: 10.5px;
}

/* —— 管理工具栏：整合到独立卡片 —— */
body.page-forums .forum-viewtopic-admin {
    margin-top: 8px !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(220, 227, 236, 0.62) !important;
    border-radius: 12px;
    background: rgba(252, 250, 247, 0.62) !important;
}

/* —— 快速回复区：现代化主操作样式 —— */
body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    background: rgba(252, 250, 247, 0.78) !important;
    padding: 16px 20px !important;
}

body.page-forums .forum-quick-reply h2, body.page-collection_view .forum-quick-reply h2 {
    margin-bottom: 14px;
}

body.page-forums .forum-quick-reply h2::before, body.page-collection_view .forum-quick-reply h2::before {
    background: linear-gradient(180deg, #c77545, #a05a45) !important;
}

/* 提交按钮：主操作样式（橙色填充） */
body.page-forums .forum-quick-reply input[type="submit"], body.page-collection_view .forum-quick-reply input[type="submit"],
body.page-forums .forum-quick-reply button[type="submit"], body.page-collection_view .forum-quick-reply button[type="submit"] {
    min-width: 120px !important;
    min-height: 34px !important;
    padding: 6px 22px !important;
    border: 1px solid #b15d12 !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #d68042, #b15d12) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(177, 93, 18, 0.18) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease !important;
}

body.page-forums .forum-quick-reply input[type="submit"]:hover, body.page-collection_view .forum-quick-reply input[type="submit"]:hover,
body.page-forums .forum-quick-reply button[type="submit"]:hover, body.page-collection_view .forum-quick-reply button[type="submit"]:hover {
    background: linear-gradient(180deg, #d8884c, #a55811) !important;
    box-shadow: 0 6px 18px rgba(177, 93, 18, 0.28) !important;
    transform: translateY(-1px);
}

/* 匿名回帖复选框紧凑 */
body.page-forums .forum-quick-reply div[align="left"], body.page-collection_view .forum-quick-reply div[align="left"] {
    margin: 4px auto 0;
    color: #8b7867;
    font-size: 11.5px;
}

/* —— 底部"回复主题"链接弱化（已有 textarea 提交，避免重复主操作）—— */
body.page-forums .forum-viewtopic-reply-link a {
    height: 22px !important;
    min-height: 0 !important;
    padding: 0 14px !important;
    background: transparent !important;
    border: 1px dashed rgba(220, 227, 236, 0.78) !important;
    color: #8b7867 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

body.page-forums .forum-viewtopic-reply-link a:hover {
    border-color: rgba(202, 145, 83, 0.62) !important;
    color: #8a5518 !important;
    background: transparent !important;
}

/* —— BBCode 工具栏：图标化与统一色调 —— */
body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    background: rgba(248, 246, 242, 0.62) !important;
    border-color: rgba(220, 227, 236, 0.72) !important;
}

body.page-forums .forum-quick-reply__bbbtn, body.page-collection_view .forum-quick-reply__bbbtn {
    border-color: rgba(220, 227, 236, 0.62) !important;
    background: #fff !important;
}

body.page-forums .forum-quick-reply__bbbtn:hover, body.page-collection_view .forum-quick-reply__bbbtn:hover {
    border-color: rgba(202, 145, 83, 0.62) !important;
    background: rgba(255, 247, 235, 0.94) !important;
}

/* —— 全局色调中性化：覆盖过暖的米黄色 —— */
:is(body.page-forums, body.page-details) .forum-post-head__floor,
body.page-forums .forum-viewtopic-pager,
body.page-forums .forum-viewtopic-reply-link {
    color: #6f6255;
}

/* ============================================================
 * viewtopic v2 微调
 * ============================================================ */

/* hero 右上"回复"按钮文字回退（图标 hidden 后按钮就空了） */
body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a[href*="action=reply"]::before {
    content: "✎ 回复";
    font-weight: 700;
}

/* 隐藏空 head__label（PHP 在 anonymous 模式下输出空标签） */
:is(body.page-forums, body.page-details) .forum-post-head__label:empty {
    display: none;
}

/* 头部 by/at 之间的"by"/"at" 文本，匿名时往往为空，给非空时加细微间距 */
:is(body.page-forums, body.page-details) .forum-post-head__primary .nowrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 修正 .forum-post-head__primary 中 i 标签的样式（"匿名"等身份） */
:is(body.page-forums, body.page-details) .forum-post-head__primary > i {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    border-radius: 4px;
    background: rgba(220, 227, 236, 0.45);
    color: #6f6255;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* 作者栏 stats（上传/下载/分享率）紧凑 */
:is(body.page-forums, body.page-details) .forum-post-author__stats {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 6px 4px 0;
    padding: 5px 6px;
    border: 1px solid rgba(220, 227, 236, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.42);
}

:is(body.page-forums, body.page-details) .forum-post-author__stats span {
    width: 100%;
    background: transparent !important;
    color: #8b7867 !important;
    font-size: 10px !important;
    text-align: center;
    padding: 0 !important;
    min-height: 0 !important;
}

/* 接触栏的 PM/Report 按钮间距收紧 + chip 化 */
:is(body.page-forums, body.page-details) .forum-post-contact .f_pm,
:is(body.page-forums, body.page-details) .forum-post-contact .f_report {
    display: none;
}

:is(body.page-forums, body.page-details) .forum-post-contact .forum-post-action::before {
    margin-right: 0;
}

/* "ON 短讯 举报" 第一组左侧的"ON/OFF"在线状态 */
:is(body.page-forums, body.page-details) .forum-post-contact .f_online,
:is(body.page-forums, body.page-details) .forum-post-contact .f_offline {
    width: 24px;
    height: 14px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
}

/* 兜底：让"ON/OFF"图标如果没图就显示文字 */
:is(body.page-forums, body.page-details) .forum-post-contact > * {
    vertical-align: middle;
}

/* 楼层头部更紧凑 */
:is(body.page-forums, body.page-details) .forum-post-shell {
    margin: 10px auto;
}

:is(body.page-forums, body.page-details) .forum-post-shell--first {
    margin-top: 4px;
}

/* hero 元数据条的 chip 视觉强化 */
body.page-forums .forum-viewtopic-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 10px;
    border: 1px solid rgba(220, 227, 236, 0.62);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
}

body.page-forums .forum-viewtopic-meta__item--views {
    border-color: rgba(177, 195, 215, 0.5);
    background: rgba(244, 248, 252, 0.78);
}

body.page-forums .forum-viewtopic-meta__item--replies {
    border-color: rgba(222, 210, 193, 0.62);
    background: rgba(255, 247, 235, 0.7);
}

body.page-forums .forum-viewtopic-meta__item--posts {
    border-color: rgba(208, 221, 210, 0.5);
    background: rgba(244, 252, 246, 0.7);
}

/* 引用按钮（quote）作为主要交互，比删除/编辑更醒目 */
:is(body.page-forums, body.page-details) .forum-post-tools .forum-post-action[href*="quotepost"] {
    border-color: rgba(202, 145, 83, 0.58) !important;
    background: rgba(255, 247, 235, 0.86) !important;
    color: #8a5518 !important;
    font-weight: 700;
}

:is(body.page-forums, body.page-details) .forum-post-tools .forum-post-action[href*="quotepost"]:hover {
    border-color: rgba(177, 93, 18, 0.74) !important;
    background: #fff3df !important;
    color: #7a4711 !important;
}

/* 隐藏空的 forum-quick-reply h2 上 "" 装饰小条对齐 */
body.page-forums .forum-quick-reply h2, body.page-collection_view .forum-quick-reply h2 {
    font-size: 13px;
}

/* ============================================================
 * viewtopic v2 微调（追加）
 * - 接触栏（PM/举报/在线状态）水平 flex
 * - 在线/离线状态用圆点指示器替代 sprite 图
 * ============================================================ */

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-contact {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 6px 10px !important;
}

/* 替换 f_online/f_offline sprite 图标为简洁状态点 */
:is(body.page-forums, body.page-details) .forum-post-contact .f_online,
:is(body.page-forums, body.page-details) .forum-post-contact .f_offline {
    width: 7px !important;
    height: 7px !important;
    background: rgba(255, 247, 235, 0.92) !important;
    border-radius: 50%;
    flex: 0 0 7px;
    margin: 0 2px 0 0 !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.78);
}

:is(body.page-forums, body.page-details) .forum-post-contact .f_online {
    background-color: #5db075 !important;
}

:is(body.page-forums, body.page-details) .forum-post-contact .f_offline {
    background-color: #c8bdb0 !important;
}

/* 接触栏的 PM 与 Report 按钮 */
:is(body.page-forums, body.page-details) .forum-post-contact .forum-post-action {
    margin: 0 !important;
}

/* 工具栏右侧动作按钮组：右对齐 + 紧凑 */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-tools {
    text-align: right !important;
}

/* 让正文 td 的 vertical-align 改为 top + 高度自适应缩到内容 */
:is(body.page-forums, body.page-details) .forum-post-card {
    height: auto !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr {
    height: auto !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author {
    vertical-align: top !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body {
    vertical-align: top !important;
}

/* 当作者栏过高（多勋章）时，正文区不再被强行拉到等高，而是
 * 让作者栏内 stats 行可以"溢出"挤压（已有 overflow: hidden on medals） */
:is(body.page-forums, body.page-details) .forum-post-author {
    max-height: 220px;
    overflow: hidden;
}

/* —— 头部条 SysOp 名字标签美化 —— */
:is(body.page-forums, body.page-details) .forum-post-head__primary .nowrap b.SysOp_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary .nowrap b.Sysop_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary .nowrap b.Admin_Name {
    color: #c77545 !important;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ============================================================
 * 楼层底部接触/工具栏 → 头部右侧（迁移后样式）
 * ============================================================ */

/* head__actions 不再整体淡化，让按钮按本身色阶展示 */
:is(body.page-forums, body.page-details) .forum-post-head__actions {
    opacity: 1 !important;
    gap: 6px !important;
}

/* head 内的 action 按钮：和原来 forum-post-tools 内一致的紧凑 chip */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action {
    display: inline-flex !important;
    align-items: center;
    height: 22px;
    margin: 0;
    padding: 0 9px;
    border: 1px solid rgba(220, 227, 236, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #6f6255 !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action:hover {
    border-color: rgba(202, 145, 83, 0.6);
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518 !important;
}

/* 引用按钮（主操作）：橙色 highlight */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action[href*="quotepost"] {
    border-color: rgba(202, 145, 83, 0.58) !important;
    background: rgba(255, 247, 235, 0.86) !important;
    color: #8a5518 !important;
    font-weight: 700;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action[href*="quotepost"]:hover {
    border-color: rgba(177, 93, 18, 0.74) !important;
    background: #fff3df !important;
    color: #7a4711 !important;
}

/* 删除按钮（危险操作）：红色弱 hint */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--danger {
    border-color: rgba(214, 168, 152, 0.58) !important;
    color: #a05a45 !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--danger:hover {
    border-color: rgba(203, 139, 118, 0.86) !important;
    background: rgba(255, 246, 242, 0.96) !important;
    color: #8d4835 !important;
}

/* 举报按钮：与"只看该作者"分隔，左侧加细分隔线（视觉分组：fitler | actions） */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--report {
    margin-left: 8px;
    position: relative;
}

/* 用 ::after 画左侧细分隔线（::before 已被 attr(data-label) 占用） */
:is(body.page-forums, body.page-details) .forum-post-head__filter + .forum-post-action--report::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    width: 1px;
    height: 12px;
    background: rgba(220, 227, 236, 0.78);
    transform: translateY(-50%);
    pointer-events: none;
}

/* 隐藏 action 内部 sprite img（原来 td.toolbox 的隐藏规则可能不再覆盖到 head） */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action img {
    display: none !important;
}

/* head 右侧 actions 在卡片整体高度变化时，依然紧贴右边 */
:is(body.page-forums, body.page-details) .forum-post-head__meta {
    overflow: visible !important;
}

/* 楼层卡片底部不再有 contact/tools 行，直接到爆米花/无装饰圆角 */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell-label,
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell {
    border-bottom: 0 !important;
}

/* 头部条本身 padding 收紧（容纳更多 action） */
:is(body.page-forums, body.page-details) .forum-post-head td {
    padding: 5px 10px !important;
}

/* head__primary 和 head__actions 之间的间距 */
:is(body.page-forums, body.page-details) .forum-post-head__primary {
    margin-right: 8px !important;
}

/* ============================================================
 * 楼层 hover 时显示的浮动操作区（举报/引用/删除/编辑）
 * 位于正文 td 右下角
 * ============================================================ */

/* 让正文 td 成为定位上下文 */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body {
    position: relative;
}

/* 浮动操作组：单层胶囊容器，内部按钮无 border，hover 才显示底色 */
:is(body.page-forums, body.page-details) .forum-post-actions--floating {
    position: absolute;
    right: 10px;
    bottom: 6px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border: 1px solid rgba(220, 227, 236, 0.62);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px) saturate(1.1);
    -webkit-backdrop-filter: blur(8px) saturate(1.1);
    box-shadow: 0 4px 12px rgba(49, 66, 96, 0.06),
                0 1px 3px rgba(49, 66, 96, 0.04);
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-card:hover .forum-post-actions--floating,
:is(body.page-forums, body.page-details) .forum-post-actions--floating:hover,
:is(body.page-forums, body.page-details) .forum-post-actions--floating:focus-within {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 浮动组内按钮：去 border，纯文字按钮 + hover 底色 */
:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 22px;
    margin: 0 !important;
    padding: 0 11px;
    border: 0 !important;
    border-radius: 999px;
    background: transparent !important;
    color: #6f6255 !important;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    transition: color 0.14s ease, background-color 0.14s ease;
}

:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action::before {
    content: attr(data-label);
}

:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action img {
    display: none !important;
}

/* 按钮之间用细分隔线（仅相邻 button 之间，不影响首尾） */
:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action + .forum-post-action {
    position: relative;
}

:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action + .forum-post-action::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 12px;
    background: rgba(220, 227, 236, 0.78);
    transform: translateY(-50%);
    pointer-events: none;
}

/* hover 时分隔线消失（避免和按钮底色冲突） */
:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action:hover + .forum-post-action::after,
:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action:hover::after {
    opacity: 0;
}

/* 普通按钮 hover：浅米底 + 主色文字 */
:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action:hover {
    background: rgba(248, 246, 242, 0.96) !important;
    color: #3f3022 !important;
}

/* 引用按钮：与其他普通操作保持一致 */
/* 举报按钮：与普通操作保持一致 */
:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action--report {
    color: #6f6255 !important;
}

/* 删除按钮：危险红文字 + hover 红底 */
:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action--danger {
    color: #c45f47 !important;
}

:is(body.page-forums, body.page-details) .forum-post-actions--floating .forum-post-action--danger:hover {
    background: rgba(255, 240, 234, 0.96) !important;
    color: #a05a45 !important;
}

/* 头部 head__actions：现在只剩"只看该作者"，
 * 之前给"举报"加的 ::after 分隔线规则在这里也无害（match 不到） */

/* ============================================================
 * 楼层头部条间距精修
 * 让"用户名 / 时间 / 只看该作者"三段之间有清晰呼吸
 * ============================================================ */

/* 时间、actions 之前加左边距，与前一段分开 */
:is(body.page-forums, body.page-details) .forum-post-head__meta > .forum-post-head__time {
    margin-left: 14px;
}

:is(body.page-forums, body.page-details) .forum-post-head__meta > .forum-post-head__actions {
    margin-left: 14px;
}

/* 让 primary 末尾的 ")"（匿名表达后的右括号）与下一个组也有最小间距，
 * primary 与后续兄弟用 margin-right 隔开 */
:is(body.page-forums, body.page-details) .forum-post-head__meta > .forum-post-head__primary {
    margin-right: 6px;
}

/* primary 内：在用户名链接外的 nowrap span 末尾加细微 margin，让"Sysop) )"与"匿名("分开 */
:is(body.page-forums, body.page-details) .forum-post-head__primary > i + .nowrap,
:is(body.page-forums, body.page-details) .forum-post-head__primary > .nowrap {
    margin: 0 2px;
}

/* "只看该作者" filter 链接如果与 actions 内还有其他元素相邻（理论上无，但保险），
 * 给一个左侧细分隔感 */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter {
    padding: 0 9px;
}

/* ============================================================
 * 管理工具栏（锁定/置顶/移动/高亮/删除）布局精修
 * ============================================================ */

body.page-forums .forum-viewtopic-admin {
    padding: 12px 14px !important;
}

body.page-forums .forum-viewtopic-admin__groups {
    display: flex !important;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

body.page-forums .forum-viewtopic-admin__regular {
    display: flex !important;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

body.page-forums .forum-viewtopic-admin__danger {
    display: flex !important;
    align-items: stretch;
    flex: 0 0 auto;
    margin-left: auto;
}

/* 每组：caption-style label 在顶，控件行在下，统一外观 */
body.page-forums .forum-viewtopic-admin__group {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;
    gap: 6px !important;
    min-height: 0 !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(220, 227, 236, 0.7) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.62) !important;
}

body.page-forums .forum-viewtopic-admin__group--danger {
    border-color: rgba(214, 168, 152, 0.5) !important;
    background: rgba(255, 246, 242, 0.7) !important;
}

body.page-forums .forum-viewtopic-admin__label {
    color: #aaa096 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    line-height: 1 !important;
    white-space: nowrap;
    align-self: flex-start;
}

body.page-forums .forum-viewtopic-admin__form {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    margin: 0;
    white-space: nowrap;
}

/* 统一控件高度 26px、字号 11.5px */
body.page-forums .forum-viewtopic-admin__form select,
body.page-forums .forum-viewtopic-admin__form input[type="text"],
body.page-forums .forum-viewtopic-admin__form input[type="submit"],
body.page-forums .forum-viewtopic-admin__form button {
    height: 26px !important;
    min-height: 26px !important;
    line-height: 1 !important;
    font-size: 11.5px !important;
    box-sizing: border-box !important;
}

body.page-forums .forum-viewtopic-admin__form select {
    max-width: 160px !important;
    padding: 0 22px 0 9px !important;
    color: #4f4438 !important;
}

body.page-forums .forum-viewtopic-admin__form input[type="submit"],
body.page-forums .forum-viewtopic-admin__form button {
    padding: 0 12px !important;
    font-weight: 700 !important;
}

/* —— 高亮 select：chip 化 + 右侧色块指示当前选中色 —— */
/* PHP 把 --hl-current 设为当前色（如 red），CSS 在 select 右侧画一个 8px 圆点 */
body.page-forums .forum-topic-highlight-select {
    background-color: #fff !important;
    color: #4f4438 !important;
    padding: 0 36px 0 10px !important;
    background-image:
        radial-gradient(circle at 50% 50%, var(--hl-current, transparent) 0 4px, transparent 4.5px),
        linear-gradient(45deg, transparent 50%, #8b7867 50%),
        linear-gradient(135deg, #8b7867 50%, transparent 50%) !important;
    background-size: 14px 14px, 5px 5px, 5px 5px !important;
    background-position:
        calc(100% - 22px) center,
        calc(100% - 12px) center,
        calc(100% - 7px) center !important;
    background-repeat: no-repeat !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

/* —— "删除主题"组：危险红 —— */
body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"] {
    border-color: rgba(214, 168, 152, 0.74) !important;
    background: rgba(255, 246, 242, 0.96) !important;
    color: #a05a45 !important;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"]:hover {
    border-color: rgba(203, 139, 118, 0.92) !important;
    background: #fff0ea !important;
    color: #8d4835 !important;
}

/* ============================================================
 * 作者栏勋章展示优化
 * - 去掉装饰性容器边框/背景，与"等级图"一样直接贴在作者栏上
 * - 勋章大小适中（高度 32px），方便辨识
 * - 多勋章自动换行、居中堆叠
 * - hover 单个勋章时放大显示
 * ============================================================ */

:is(body.page-forums, body.page-details) .forum-post-author__medals {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px !important;
    max-height: 76px !important;          /* 最多 2 行 */
    overflow: hidden !important;
    margin: 6px 0 4px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals:empty {
    display: none !important;
}

/* 单个 medalcontainer：去除默认 inline-block 的对齐基线问题 */
:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: transform 0.18s ease;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer a:hover {
    transform: scale(1.4);
    z-index: 2;
    position: relative;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals img {
    max-width: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;                  /* 覆盖 inline style "margin-left: 2pt" */
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(49, 66, 96, 0.12));
}

/* ============================================================
 * [P0] viewtopic 楼层卡片视觉精简（2026-05）
 * 目标：
 *  1) 左侧作者栏「头像/勋章/等级图/stats」4 段去重边框/背景，合并为一块作者卡
 *  2) 头像 56 → 72px，更接近主流论坛规格
 *  3) 等级图（与头部头衔重复）默认隐藏
 *  4) 上传/下载/分享率：去掉外框背景，纯文字小行
 *  5) hero 元数据 chip 与「回复」按钮视觉区分（去操作感）
 *  6) 楼层正文短帖不再被左栏拉高
 *  7) hover-only 浮动操作改为常驻半透明
 * ============================================================ */

/* —— 作者栏：去多重背景 + 收紧 —— */
:is(body.page-forums, body.page-details) .forum-post-author {
    width: 132px !important;
    padding: 12px 8px !important;
}

/* 头像放大、去多余 padding，统一圆角 */
:is(body.page-forums, body.page-details) .forum-post-author > img:first-child {
    width: 72px !important;
    height: 72px !important;
    margin: 0 auto 8px !important;
    padding: 0 !important;
    border: 1px solid rgba(220, 227, 236, 0.74) !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 4px 10px rgba(49, 66, 96, 0.05) !important;
    object-fit: cover;
}

/* 等级图（已在头部以"维护开发员 Sysop"文字呈现）默认隐藏，避免左栏重复信息 */
:is(body.page-forums, body.page-details) .forum-post-author__class {
    display: none !important;
}

/* 勋章：保持横向排列，去掉背景/边框（与 L3862 的规则一致，这里再强化一次） */
:is(body.page-forums, body.page-details) .forum-post-author__medals {
    margin: 6px 0 4px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* 上传/下载/分享率：纯文字小行，去掉胶囊框 */
:is(body.page-forums, body.page-details) .forum-post-author__stats {
    display: block !important;
    margin: 6px 0 0 !important;
    padding: 6px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-top: 1px dashed rgba(220, 227, 236, 0.7) !important;
    border-radius: 0 !important;
    text-align: center !important;
    color: #8b7867 !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats span {
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: inherit !important;
    white-space: normal !important;
}

/* 匿名楼层：保持灰色徽章，但同样去掉 stats 的胶囊 */
:is(body.page-forums, body.page-details) .forum-post-author__stats--anonymous {
    padding: 6px 0 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats--anonymous span {
    background: transparent !important;
    color: #8b7867 !important;
}

/* —— 短帖最小高度收紧 —— */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author,
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body {
    vertical-align: top !important;
}

:is(body.page-forums, body.page-details) .forum-post-body {
    min-height: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-body--first {
    min-height: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-body__content,
:is(body.page-forums, body.page-details) .forum-post-body--first .forum-post-body__content {
    min-height: 0 !important;
}

/* —— hero 元数据 chip：去操作感（与右上「回复」按钮区分） —— */
body.page-forums .forum-viewtopic-meta__item {
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #8b7867 !important;
}

body.page-forums .forum-viewtopic-meta__item + .forum-viewtopic-meta__item {
    margin-left: 14px;
}

body.page-forums .forum-viewtopic-meta__icon {
    color: #b3a89d !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0;
}

body.page-forums .forum-viewtopic-meta__item b {
    color: #4f4438 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* 维持「置顶 / 锁定」tag 的胶囊效果（这两个仍是状态标记，需要醒目） */
body.page-forums .forum-viewtopic-meta__tag {
    /* 不动 L2781-2803 的样式 */
}

/* —— 浮动操作（引用/编辑/举报/删除）：常驻半透明，hover 时提亮 —— */
:is(body.page-forums, body.page-details) .forum-post-actions--floating {
    opacity: 0.5;
    transform: none;
    pointer-events: auto;
    transition: opacity 0.16s ease, background-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-card:hover .forum-post-actions--floating,
:is(body.page-forums, body.page-details) .forum-post-actions--floating:hover,
:is(body.page-forums, body.page-details) .forum-post-actions--floating:focus-within {
    opacity: 1;
    transform: none;
}

/* —— 奖励信息条：去掉过度灰，提升可读性 —— */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell {
    color: #8b7867 !important;
    font-size: 11.5px !important;
}

:is(body.page-forums, body.page-details) .forum-post-magic-tax {
    color: #c8bdb0 !important;
    font-size: 10.5px !important;
    margin-left: 4px;
}

/* records 行：title tooltip 暗示有"完整名单"信息，光标变 help */
:is(body.page-forums, body.page-details) .forum-post-magic-line--records[title] {
    cursor: help;
}

/* ============================================================
 * [P1+P2] viewtopic 第二轮精修（2026-05）
 *
 *   P1-A 奖励行：colspan=2 合并横条，去掉作者列宽度的视觉割裂
 *   P1-B 主题置顶状态标：outline 风格，与"回复主题"按钮区分权重
 *   P1-C 末楼评分胶囊：让奖励行 label 更醒目，引导操作
 *   P1-D 管理工具栏：label 改 inline 前缀，单行紧凑布局；删除主题用警告红
 *   P1-E 楼层头部锚点 #postid 弱化（"1楼"流水号为视觉主体）
 *   P2-F 作者列收窄 116px + stats 三行紧凑
 *   P2-G/H "返回顶部 / 只看该作者"图标化（hover 显示提示）
 *   P2-I emoji 行折叠（默认收起，🙂 切换）
 * ============================================================ */

/* ---------- P1-A 奖励行：colspan=2 合并横条 ---------- */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-row {
    padding: 6px 12px !important;
    background: rgba(247, 245, 240, 0.5) !important;
    border-top: 1px dashed rgba(220, 227, 236, 0.7) !important;
    color: #8b7867 !important;
}

:is(body.page-forums, body.page-details) .forum-post-magic-row__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

:is(body.page-forums, body.page-details) .forum-post-magic-row__label {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 96px;
    padding: 2px 8px;
    border: 1px solid rgba(220, 200, 168, 0.5);
    border-radius: 999px;
    background: rgba(255, 248, 234, 0.7);
    color: #a86a1f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

:is(body.page-forums, body.page-details) .forum-post-magic-row__label::before {
    content: "🍿";
    margin-right: 4px;
}

:is(body.page-forums, body.page-details) .forum-post-magic-row__content {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    color: #6f6255;
}

/* magic-row__content 内部：firstLine + otherLine 用 flex 自然换行 */
:is(body.page-forums, body.page-details) .forum-post-magic-row .forum-post-magic-line {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 !important;
    line-height: 1.5;
}

:is(body.page-forums, body.page-details) .forum-post-magic-row .forum-post-magic-line--records {
    margin-left: 0 !important;
    color: #a89e92;
    font-size: 11px;
}

/* 还原"伪标签 cell"在旧结构下的样式继承（colspan=2 后只剩一个 td，下面规则避免被旧规则覆盖） */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-row.forum-post-magic-cell {
    width: auto !important;
    border-right: 0 !important;
    text-align: left !important;
}

/* ---------- P1-B 主题置顶状态标：outline 风格 ---------- */
body.page-forums .forum-viewtopic-meta__tag--sticky {
    height: 18px !important;
    padding: 0 8px !important;
    border: 1px dashed rgba(218, 150, 70, 0.6) !important;
    background: transparent !important;
    color: #b15d12 !important;
    font-weight: 600 !important;
}

body.page-forums .forum-viewtopic-meta__tag--locked {
    height: 18px !important;
    padding: 0 8px !important;
    border: 1px dashed rgba(202, 132, 112, 0.6) !important;
    background: transparent !important;
    color: #a05a45 !important;
    font-weight: 600 !important;
}

/* ---------- P1-D 管理工具栏：单行紧凑 + 危险红 ---------- */
body.page-forums .forum-viewtopic-admin {
    padding: 8px 12px !important;
}

body.page-forums .forum-viewtopic-admin__groups {
    align-items: center !important;
    gap: 6px !important;
}

body.page-forums .forum-viewtopic-admin__regular {
    align-items: center !important;
    gap: 6px !important;
}

body.page-forums .forum-viewtopic-admin__danger {
    align-items: center !important;
}

/* group 由 column 改回 row（label 内嵌前缀） */
body.page-forums .forum-viewtopic-admin__group {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.78) !important;
}

body.page-forums .forum-viewtopic-admin__label {
    align-self: center !important;
    color: #8b7867 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

body.page-forums .forum-viewtopic-admin__form {
    gap: 4px !important;
}

body.page-forums .forum-viewtopic-admin__form select,
body.page-forums .forum-viewtopic-admin__form input[type="text"],
body.page-forums .forum-viewtopic-admin__form input[type="submit"],
body.page-forums .forum-viewtopic-admin__form button {
    height: 24px !important;
    min-height: 24px !important;
    font-size: 11px !important;
    padding: 0 10px !important;
}

body.page-forums .forum-viewtopic-admin__form select {
    max-width: 140px !important;
    padding: 0 22px 0 8px !important;
}

/* 危险组：red border + red bg，悬停加深 */
body.page-forums .forum-viewtopic-admin__group--danger {
    border-color: rgba(214, 130, 110, 0.62) !important;
    background: rgba(255, 240, 234, 0.92) !important;
}

body.page-forums .forum-viewtopic-admin__group--danger .forum-viewtopic-admin__label {
    color: #a05a45 !important;
    font-weight: 700 !important;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"] {
    border-color: rgba(192, 100, 78, 0.78) !important;
    background: #fff !important;
    color: #a05a45 !important;
    font-weight: 700 !important;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"]:hover {
    border-color: #b8543c !important;
    background: #b8543c !important;
    color: #fff !important;
}

/* ---------- P1-E 楼层头部锚点 #postid 弱化 ---------- */
:is(body.page-forums, body.page-details) .forum-post-head__anchor {
    height: 18px !important;
    padding: 0 6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #c0b7ad !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    opacity: 0.7;
    transition: opacity 0.15s ease, color 0.15s ease;
}

:is(body.page-forums, body.page-details) .forum-post-head__anchor:hover {
    color: #8b7867 !important;
    opacity: 1;
    text-decoration: underline !important;
}

/* "X楼" 流水号（右上）保持当前视觉权重，作为楼内主要标识 */
:is(body.page-forums, body.page-details) .forum-post-floor {
    color: #4f4438;
    font-weight: 600;
}

:is(body.page-forums, body.page-details) .forum-post-floor b {
    color: #b15d12;
    font-weight: 700;
}

/* ---------- P2-F 作者列收窄 + stats 紧凑 ---------- */
:is(body.page-forums, body.page-details) .forum-post-author {
    width: 124px !important;
    padding: 10px 6px !important;
}

/* 头像：方形 hero，上/左/右三边贴齐作者列实际边界（C 档紧凑版）
 *   - width: calc(100% + 16px) → 覆盖列左右各 8px 的 padding
 *   - margin: -12px -8px 10px → 吃掉列 12px 顶 padding + 8px 左右 padding，保留 10px 底部缓冲
 *   - aspect-ratio: 1/1 → 始终正方形，宽度跟随列宽自动伸缩（PC 136、移动端 108）
 *   - border-radius: 0 → 直角，与卡片顶部直角（卡片 border-radius 仅在下方两角）契合
 *   - max-width: none → 解除 L1737 的 96px 限制，允许 width > 父容器
 *   - 卡片 overflow: hidden 会自然裁剪任何意外溢出
 *   - box-shadow:
 *       inset 0 -10px 18px -10px → 底边过渡到列米色背景，化解"贴图感"
 *       inset 0 0 0 1px → 极淡"相纸边"内描白线，让头像有层次而非平面 */
:is(body.page-forums, body.page-details) .forum-post-author > img:first-child {
    display: block !important;
    width: calc(100% + 16px) !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: -12px -8px 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow:
        inset 0 -10px 18px -10px rgba(70, 50, 30, 0.10),
        inset 0 0 0 1px rgba(255, 255, 255, 0.35) !important;
    object-fit: cover !important;
    object-position: center center !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats {
    margin: 4px 0 0 !important;
    padding: 5px 0 0 !important;
    font-size: 10.5px !important;
    line-height: 1.45 !important;
}

/* 数字加深，标签淡化，更易扫读 */
:is(body.page-forums, body.page-details) .forum-post-author__stats span {
    color: #8b7867 !important;
}

/* ---------- P2-G "返回顶部"按钮：默认更弱、hover 才出戏 ---------- */
/* 已有 SVG mask 实现（L1666+），这里只补一个 opacity 渐变，让"每楼都有"的箭头不那么扎眼 */
:is(body.page-forums, body.page-details) .forum-post-top {
    opacity: 0.55;
    transition: opacity 0.16s ease, color 0.16s ease,
                background-color 0.16s ease, border-color 0.16s ease,
                transform 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-top:hover {
    opacity: 1;
}

/* ---------- P2-H "只看该作者"压低视觉权重 ---------- */
/* 已有 compact pill（L2946+）。这里只让默认态淡化、hover 时回到原始色 */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter {
    border-color: rgba(220, 227, 236, 0.4) !important;
    color: #b3a89d !important;
    opacity: 0.78;
    transition: opacity 0.16s ease, color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter:hover {
    border-color: rgba(202, 145, 83, 0.62) !important;
    color: #8a5518 !important;
    opacity: 1;
}

/* ---------- P2-I emoji 行折叠 ---------- */
/* smile_row() 在 .forum-quick-reply 内部输出 <div align="center">...</div>，
 * 这里通过属性选择器精准定位，默认隐藏；JS 切换 .forum-quick-reply--emoji-open 后展开。
 */
body.page-forums .forum-quick-reply__body form > div[align="center"], body.page-collection_view .forum-quick-reply__body form > div[align="center"] {
    display: none;
    margin-top: 10px;
    padding: 6px 10px;
    border: 1px dashed rgba(220, 227, 236, 0.62);
    border-radius: 10px;
    background: rgba(252, 250, 247, 0.62);
}

body.page-forums .forum-quick-reply.forum-quick-reply--emoji-open, body.page-collection_view .forum-quick-reply.forum-quick-reply--emoji-open
    .forum-quick-reply__body form > div[align="center"] {
    display: block;
}

/* emoji toggle 按钮：与 BBCode 工具栏同款胶囊，紧跟在“图片”按钮右侧 */
body.page-forums .forum-quick-reply__bbbtn--emoji, body.page-collection_view .forum-quick-reply__bbbtn--emoji {
    margin-left: 0;
}

body.page-forums .forum-quick-reply__bbbtn--emoji.is-active, body.page-collection_view .forum-quick-reply__bbbtn--emoji.is-active {
    border-color: rgba(218, 150, 70, 0.6) !important;
    background: rgba(255, 241, 222, 0.84) !important;
    color: #a86a1f !important;
}

/* BBCode 工具栏改为 flex，方便按钮自然横向排列 */
body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* ============================================================
 * [P3] viewtopic 第三轮精修（2026-05）
 *
 *   A1  --danger 分组 label 与按钮文案完全重复 → 隐藏 label
 *   D1  快速回复 textarea 默认高度收紧到 96px
 *   D2  emoji 展开面板：暖色 dashed 边框 + 紧贴工具栏，像下拉面板
 *   D3  快速回复存在时底部"回复主题"独立链接显得多余 → 隐藏
 *   E1  奖励胶囊（+50/+100/+200/+500）改 outline，hover 才填充
 *   E2  "（已扣除 20% 税）"改为悬停提示，文本上不再占空间
 *   F1  楼号"X 楼"变成可点击锚点；返顶按钮（↑）opacity 进一步压低
 *   G1  置顶 / 锁定 tag 推到右侧紧贴"回复"按钮（统计 ←→ 状态+CTA 二分）
 * ============================================================ */

/* A1: --danger 分组里 label 与 input value 完全一致（"删除主题 / 删除主题"） */
body.page-forums .forum-viewtopic-admin__group--danger .forum-viewtopic-admin__label {
    display: none !important;
}

/* D1: textarea 默认高度收紧（用户仍可手动拖大） */
body.page-forums .forum-quick-reply__body textarea, body.page-collection_view .forum-quick-reply__body textarea {
    min-height: 96px !important;
    height: 96px !important;
    resize: vertical !important;
}

/* D2: emoji 行展开 = BBCode 工具栏下方的下拉面板（贴近 + 暖色） */
body.page-forums .forum-quick-reply__body form > div[align="center"], body.page-collection_view .forum-quick-reply__body form > div[align="center"] {
    margin-top: 4px !important;
    padding: 8px 10px !important;
    border: 1px dashed rgba(218, 150, 70, 0.45) !important;
    border-radius: 10px !important;
    background: rgba(255, 250, 244, 0.78) !important;
}

/* D3: quick reply 已存在 → 底部"回复主题"独立链接冗余 */
body.page-forums .forum-quick-reply ~ .forum-viewtopic-reply-link, body.page-collection_view .forum-quick-reply ~ .forum-viewtopic-reply-link {
    display: none !important;
}

/* E1: 奖励胶囊改 outline，hover 才填充，避免与右上"回复"按钮撞色 */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell ul.magic li {
    border: 1px solid rgba(220, 200, 168, 0.55) !important;
    background: transparent !important;
    color: #a86a1f !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-cell ul.magic li:hover {
    border-color: rgba(208, 168, 110, 0.96) !important;
    background: rgba(255, 243, 223, 0.92) !important;
    color: #8a5418 !important;
}

/* E2: 已扣 20% 税：不再占据视觉空间，依赖 firstLine title 属性提示 */
:is(body.page-forums, body.page-details) .forum-post-magic-tax {
    display: none !important;
}

/* F1.1: 楼号变 anchor link，去除链接默认色 */
:is(body.page-forums, body.page-details) .forum-post-floor-link {
    color: inherit !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.16s ease, opacity 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-floor-link:hover .forum-post-floor {
    color: #7a572d;
}

:is(body.page-forums, body.page-details) .forum-post-floor-link:hover .forum-post-floor b {
    color: #b15d12;
}

/* F1.2: ↑ 返顶按钮 opacity 进一步压低（每楼都有，太抢眼） */
:is(body.page-forums, body.page-details) .forum-post-top {
    opacity: 0.35 !important;
}

:is(body.page-forums, body.page-details) .forum-post-top:hover {
    opacity: 1 !important;
}

/* G1: 置顶 / 锁定 tag 移到 spacer 右侧、贴 actions */
body.page-forums .forum-viewtopic-meta__spacer  { order: 1; }
body.page-forums .forum-viewtopic-meta__tag     { order: 2; }
body.page-forums .forum-viewtopic-meta__actions { order: 3; }

/* ============================================================
 * [P4] viewtopic 第四轮精修（2026-05）
 *
 *   P0-3  楼层头 #postid：默认极淡，hover 整楼层头时恢复
 *   P1-1  作者列流量统计合并为单行 icon+数字
 *   P1-2  奖励信息条整体收紧为 ribbon-style，"目前发布人已获得"压缩
 *   P1-3  管理工具栏扁平化分组 + 分隔符，删除按钮红色 outline
 *   P2-1  标题左侧色条改 4px 圆角更精致
 *   P2-3  楼层卡片 hover 阴影反馈
 *   P2-4  快速回复：提交按钮右对齐，匿名复选框左对齐
 * ============================================================ */

/* ---------- P0-3 楼层头部 #postid 进一步弱化 ---------- */
:is(body.page-forums, body.page-details) .forum-post-head .forum-post-head__anchor {
    opacity: 0.42 !important;
    font-size: 10.5px !important;
    transition: opacity 0.16s ease, color 0.16s ease !important;
}

:is(body.page-forums, body.page-details) .forum-post-head:hover .forum-post-head__anchor {
    opacity: 1 !important;
}

/* ---------- P1-1 作者列流量统计 紧凑 3 行（图标 + 数字） ---------- */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 6px 0 0 !important;
    padding: 5px 4px 0 !important;
    border: 0 !important;
    border-top: 1px dashed rgba(220, 227, 236, 0.6) !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 10.5px !important;
    line-height: 1.45 !important;
    text-align: center;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-line {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
    white-space: nowrap !important;
    color: #8b7867;
    min-height: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats--compact > .forum-post-author__stat-line {
    display: inline-flex !important;
    width: 7.4em !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-line--ratio {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    color: #6f6255;
    font-weight: 600;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-icon {
    display: inline-flex !important;
    justify-content: center !important;
    width: 1.15em !important;
    flex: 0 0 1.15em !important;
    color: #b3a89d !important;
    font-size: 11px !important;
    font-style: normal !important;
    font-weight: 700;
    line-height: 1;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--up {
    color: #5f7187 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--down {
    color: #b07a55 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--ratio {
    color: #8a9a6a !important;
    font-size: 10px !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-val {
    display: inline-flex !important;
    align-items: center !important;
    color: inherit !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap !important;
}

/* ---------- P1-2 奖励信息条 ribbon 化 ---------- */
:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-row > td.forum-post-magic-cell {
    padding: 6px 14px !important;
}

:is(body.page-forums, body.page-details) .forum-post-magic-row__inner {
    gap: 10px !important;
    align-items: center !important;
}

:is(body.page-forums, body.page-details) .forum-post-magic-row__content {
    gap: 4px !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-row .forum-post-magic-line {
    gap: 4px !important;
    font-size: 11.5px !important;
    line-height: 1.5 !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-row .forum-post-magic-line--records {
    margin-top: 2px !important;
    font-size: 11px !important;
    color: #8b7867 !important;
}

/* ---------- P1-3 管理工具栏扁平化分组 ---------- */
/* __regular 内的常规 4 组：移除独立 card 边框，依靠 dashed 分隔区分语义 */
body.page-forums .forum-viewtopic-admin__regular .forum-viewtopic-admin__group {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 4px 12px !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-viewtopic-admin__regular .forum-viewtopic-admin__group .forum-viewtopic-admin__label {
    align-self: center !important;
    color: #aaa096 !important;
}

/* 在"置顶组"与"移动组"之间加一条 dashed 分隔
 * （状态组：锁定/置顶 | 归属组：移动/高亮 | 危险组：删除） */
body.page-forums .forum-viewtopic-admin__regular .forum-viewtopic-admin__group:nth-child(2) {
    border-right: 1px dashed rgba(220, 227, 236, 0.78) !important;
    padding-right: 16px !important;
    margin-right: 4px;
}

/* 危险组：更明确的红色 outline 区分 */
body.page-forums .forum-viewtopic-admin__group--danger {
    border-color: rgba(214, 100, 88, 0.42) !important;
    background: rgba(255, 240, 236, 0.55) !important;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"] {
    border: 1.5px solid rgba(190, 78, 65, 0.7) !important;
    background: transparent !important;
    color: #a04535 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"]:hover {
    background: rgba(190, 78, 65, 0.92) !important;
    border-color: rgba(170, 60, 50, 0.95) !important;
    color: #fff !important;
}

/* ---------- P2-1 标题左侧色条 ---------- */
body.page-forums .forum-viewtopic-title::before {
    width: 4px !important;
    height: 20px !important;
    flex: 0 0 4px !important;
    border-radius: 3px !important;
    background: linear-gradient(180deg, #d9844e, #b85d22) !important;
    box-shadow: 0 1px 2px rgba(184, 93, 34, 0.18);
}

/* ---------- P2-3 楼层卡片 hover 阴影反馈 ---------- */
:is(body.page-forums, body.page-details) .forum-post-shell .forum-post-card {
    transition: box-shadow 0.18s ease, border-color 0.18s ease !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell:hover .forum-post-card {
    border-color: rgba(208, 186, 152, 0.72) !important;
    box-shadow: 0 8px 24px rgba(157, 103, 42, 0.07),
                0 2px 6px rgba(49, 66, 96, 0.04) !important;
}

/* ---------- P2-4 快速回复 提交右对齐，匿名复选框左对齐 ---------- */
/* form 是 grid（justify-items: center）。submit 与匿名复选框分别置左右两端，省去 br 占位 */
body.page-forums .forum-quick-reply form > input[type="submit"], body.page-collection_view .forum-quick-reply form > input[type="submit"] {
    justify-self: end !important;
    margin: 0 6px 0 0 !important;
}

body.page-forums .forum-quick-reply form > div[align="left"], body.page-collection_view .forum-quick-reply form > div[align="left"] {
    justify-self: start !important;
    width: auto !important;
    margin: 0 0 0 6px !important;
}

/* 隐藏匿名复选框与 submit 之间的 br，让二者紧贴在 grid 上下两行 */
body.page-forums .forum-quick-reply form > div[align="left"] + br, body.page-collection_view .forum-quick-reply form > div[align="left"] + br {
    display: none !important;
}

/* ============================================================
 * [P5] viewtopic 最终一轮整合（2026-05）
 *
 *   P0-A  hero meta：fa-* 真实图标 + 数字 + 单位；chip 中性配色
 *   P0-B  hero 回复 / 订阅按钮：PHP 直出文字 + 图标，去掉 ::before 注入
 *   P0-C  顶部"被查看 X 次"工具条：HTML 已移除，这里把残留 CSS 也清掉
 *   P0-D  单页主题翻页条防御：CSS 兜底，避免单页时漏出
 *   P0-E  楼层头：从 <table> 改为 div + flex；"#postid"完全隐藏
 *   P0-F  楼层头每楼右侧的隐形 <a class="forum-post-top"> 已移除
 *   P1-A  楼层操作 chip（引用/编辑/举报/删除）迁入 head__actions
 *         默认可见、icon + 文字双重表达，去掉"浮层 hover 才出"那一套
 *   P1-B  "只看该作者"chip：进入"只看 X"模式时切到 active 状态
 *   P3-A  作者栏 stats 空数据态：单行"无统计"灰字
 *   P3-B  快速回复存在时，已删除 PHP 端"回复主题"独立链接
 * ============================================================ */

/* ---------- P0-A hero meta：chip 中性化 + 真图标 ---------- */
/* meta__item 改为 中性背景，依靠数字颜色区分；统一字号 12px */
body.page-forums .forum-viewtopic-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border: 1px solid rgba(220, 227, 236, 0.7);
    border-radius: 999px;
    background: rgba(252, 250, 247, 0.78);
    color: #6f6255;
    font-size: 12px;
    line-height: 1;
}

body.page-forums .forum-viewtopic-meta__item--views,
body.page-forums .forum-viewtopic-meta__item--replies,
body.page-forums .forum-viewtopic-meta__item--posts {
    background: rgba(252, 250, 247, 0.78);
    border-color: rgba(220, 227, 236, 0.7);
}

/* fa 图标着色：按维度微差异（信息：冷蓝；互动：暖橙；结构：中性） */
body.page-forums .forum-viewtopic-meta__item .forum-viewtopic-meta__icon.fas {
    width: 14px;
    text-align: center;
    font-size: 11px;
    color: #aaa096;
}

body.page-forums .forum-viewtopic-meta__item--views .forum-viewtopic-meta__icon { color: #6d8aa6; }
body.page-forums .forum-viewtopic-meta__item--replies .forum-viewtopic-meta__icon { color: #b85d22; }
body.page-forums .forum-viewtopic-meta__item--posts .forum-viewtopic-meta__icon { color: #6f6255; }

body.page-forums .forum-viewtopic-meta__item b {
    color: #2d2419;
    font-size: 13px;
    font-weight: 700;
}

body.page-forums .forum-viewtopic-meta__unit {
    color: #8b7867;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ---------- P0-B 回复 / 订阅按钮：用真文字 + 图标 ---------- */
/* PHP 现在直出 <a class="forum-topic-reply"><i><span>回复</span></a>，
 * 不再通过 ::before 注入文字；清掉旧的伪元素注入规则。 */
body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a[href*="action=reply"]::before {
    content: none !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a {
    gap: 5px;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a > i {
    display: inline-flex;
    width: 13px;
    justify-content: center;
    font-size: 11px;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions > a > span {
    font-size: 12px;
    font-weight: 700;
}

/* ---------- P0-C 旧 toolbar 残留：HTML 已移除 ---------- */
/* 注：上面 L1234+ 的 .forum-viewtopic-toolbar 规则现在不会再 match 任何节点；
 * 保留但加注释，提醒后人在下次清理 CSS 时可整块删除 */

/* ---------- P0-D 单页翻页条防御 ---------- */
/* 即便 PHP 端因为某些路径漏出，单页时整组也被 CSS 兜底隐藏 */
body.page-forums .forum-viewtopic-pager:not(:has(.forum-viewtopic-page--current)):not(:has(a[href])) {
    display: none !important;
}
/* fallback for browsers without :has(): 单条 ".forum-viewtopic-pages" 内只剩一个 disabled prev + current "1" + disabled next 时，整段视觉占位极小，
 * 直接缩到无 margin（保留可访问性，但不再视觉抢眼） */
body.page-forums .forum-viewtopic-pager--bottom .forum-viewtopic-pages:only-child {
    margin: 0;
}

/* ---------- P0-E 楼层头：div + flex（不再依赖 <table>） ---------- */
:is(body.page-forums, body.page-details) .forum-post-head {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 8px 14px !important;
    background: transparent;
    border: 0;
}

:is(body.page-forums, body.page-details) .forum-post-head__meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__floor {
    flex: 0 0 auto;
    text-align: right;
}

/* #postid（数据库主键）：完全隐藏。永久链接走 "N 楼" chip 上的 title 提示 */
:is(body.page-forums, body.page-details) .forum-post-head__anchor {
    display: none !important;
}

/* ---------- P0-F head__actions chip 组（含 P1-A、P1-B） ---------- */
:is(body.page-forums, body.page-details) .forum-post-head__actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: auto;
}

/* head__actions 内的 chip 公共风格 */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter,
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 9px;
    border: 1px solid rgba(220, 227, 236, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: #6f6255 !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    opacity: 1 !important;
    transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter > i,
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action > i {
    width: 11px;
    text-align: center;
    font-size: 10px;
    color: #aaa096;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter:hover,
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action:hover {
    border-color: rgba(202, 145, 83, 0.6);
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518 !important;
}

:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter:hover > i,
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action:hover > i {
    color: #b15d12;
}

/* "引用"作为讨论核心动作，默认就有暖色 outline */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--quote {
    border-color: rgba(202, 145, 83, 0.55) !important;
    background: rgba(255, 247, 235, 0.74) !important;
    color: #8a5518 !important;
}
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--quote > i {
    color: #b15d12 !important;
}
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--quote:hover {
    border-color: rgba(177, 93, 18, 0.78) !important;
    background: #fff3df !important;
    color: #7a4711 !important;
}

/* "删除"危险动作：红 outline */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--danger {
    border-color: rgba(214, 168, 152, 0.6) !important;
    color: #a05a45 !important;
}
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--danger > i {
    color: #a05a45 !important;
}
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action--danger:hover {
    border-color: rgba(190, 78, 65, 0.8) !important;
    background: rgba(255, 240, 234, 0.92) !important;
    color: #8a3b2a !important;
}

/* P1-B "只看该作者"激活态：进入单作者模式时凸显 */
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter--active {
    border-color: rgba(177, 93, 18, 0.72) !important;
    background: rgba(255, 232, 200, 0.7) !important;
    color: #7a4711 !important;
}
:is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter--active > i {
    color: #b15d12 !important;
}

/* 旧的"floating actions"浮层容器：HTML 现在已无 ↓ 这个节点；
 * 但页面缓存 / 个别外部脚本里可能仍残留旧 DOM，统一让它不再视觉占位。 */
:is(body.page-forums, body.page-details) .forum-post-actions--floating {
    display: none !important;
}

/* ---------- 旧 forum-post-top 一组：HTML 已不输出，CSS 也兜底隐藏 ---------- */
:is(body.page-forums, body.page-details) .forum-post-top {
    display: none !important;
}

/* ---------- P3-A 作者栏 stats 空数据态 ---------- */
:is(body.page-forums, body.page-details) .forum-post-author__stats--empty {
    border-top: 1px dashed rgba(220, 227, 236, 0.6);
    padding-top: 6px !important;
    color: #c8bdb0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats--empty .forum-post-author__stat-line--empty {
    display: inline-block;
    width: 100%;
    text-align: center;
    color: #c8bdb0 !important;
    font-size: 10.5px !important;
    letter-spacing: 0.06em;
}

/* ---------- 楼号 chip：纯靠右、提示语包含永久链接 ---------- */
:is(body.page-forums, body.page-details) .forum-post-floor-link {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-floor-link:hover {
    background: rgba(248, 246, 242, 0.7);
}

/* ---------- 兜底：旧的"forum-post-head__label"在简体语言下输出空字符 ---------- */
:is(body.page-forums, body.page-details) .forum-post-head__primary > .forum-post-head__label:empty {
    display: none;
}

/* ============================================================
 * P6  楼层操作 chip 重新分组（2026-05-21）— v2 精简
 * --------------------------------------------------------------
 * v1（chip 横条）的问题：4 个带描边 chip 紧贴爆米花奖励行，看起来
 * 像两条独立工具栏叠在一起，视觉上抢戏；右下角 chip 飘在大片
 * 空白里没有视觉锚点。
 * v2 解法：把动作从「chip 按钮」**降级为纯文字链接**——
 *   - 无边框、无背景、无虚线分割线
 *   - 极小图标（10px）+ 文字 inline，色调和正文 .small / 灰字一致
 *   - 用 ::after 中点 `·` 做分隔符，整体看起来像「帖子末尾的脚注」
 *     而不是「工具栏」（参考 Hacker News / Discourse 末行 actions）
 *   - hover 才出现下划线 + 暖色，强化"可点"反馈但默认低调
 * 头部首行只保留「只看该作者」筛选 chip（属于"视图切换"，
 * 和元信息相容），4 个动作（引用/编辑/举报/删除）全部下移至底部。
 * ============================================================ */

/* 楼层底部操作条 cell：作为表格内最后一行（colspan=2），
 * 完全透明、无分隔线——让它视觉上"消失"，不再像独立 toolbar */
:is(body.page-forums, body.page-details) .forum-post-foot-cell {
    padding: 2px 14px 6px !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    min-height: 18px;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #b3a899;
}

/* 底部 action：纯文字链接（无边框、无背景），靠中点 `·` 分隔 */
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 0 !important;
    background: transparent !important;
    color: #9c9080 !important;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none !important;
    opacity: 1 !important;
    transition: color 0.16s ease;
    position: relative;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action > i {
    width: 10px;
    text-align: center;
    font-size: 10px;
    color: #c0b6a8;
    transition: color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action > span {
    transition: color 0.16s ease, text-decoration 0.16s ease;
}

/* 中点分隔符：放在每个 action 后，最后一个不显示 */
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action + .forum-post-action::before {
    content: "·";
    position: absolute;
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    color: #d8cfc1;
    pointer-events: none;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action:hover {
    color: #8a5518 !important;
}
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action:hover > i {
    color: #b15d12;
}
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action:hover > span {
    text-decoration: underline;
    text-decoration-color: rgba(177, 93, 18, 0.4);
    text-underline-offset: 2px;
}

/* 「删除」hover 时切换到危险色（其它状态仍保持灰字，避免持续抢眼） */
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--danger:hover {
    color: #a05a45 !important;
}
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--danger:hover > i {
    color: #a05a45;
}
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--danger:hover > span {
    text-decoration-color: rgba(160, 90, 69, 0.45);
}

/* 头部 actions：动作 chip 都已下移，现在仅剩 1 个筛选 chip。
 * 若极少数情况下整段为空（如完全未授权），整体折叠不留空隙。 */
:is(body.page-forums, body.page-details) .forum-post-head__actions:empty {
    display: none !important;
}

/* 头部里残留的旧 .forum-post-action--quote / --danger 等规则（P5 块）
 * 现已不再 match 真实 DOM——头部不再输出这些类，仅保留是为了万一
 * 缓存里还有旧 HTML 也能渲染得不那么离谱，可在下次 CSS 大清理时整段删除 */

/* ============================================================
 * P7  「打赏爆米花」chip + hover popover （2026-05-21）
 * --------------------------------------------------------------
 * 把原来贴在每个楼层底部的「爆米花奖励」整条横条折叠成
 * 底部操作条里的一个 chip：
 *   - 默认态：🌽 爆米花奖励 [40]  （[40] = 已收总额徽章；0 时显示为灰色）
 *   - hover/focus 弹出 popover：
 *       统计行 → 数额按钮（+50 / +100 / ...）→ 最近打赏记录
 * - 当没人打赏 + 本人也无法打赏时整个 chip 不输出（避免冷 chip）
 * - 复用旧的 saveMagicValue() AJAX + 5 个固定 ID
 *   （magic_add_X / listNumber_X / spanSumAll_X / count_user_spa_X /
 *   current_user_magic_X）都仍在 popover 内，不破坏现有 JS
 * ============================================================ */

/* 旧 .forum-post-magic-row / .forum-post-magic-cell 横条 cell 现已不再输出，
 * 但若个别缓存 HTML 仍带它，让它折叠不占位 */
:is(body.page-forums, body.page-details) .forum-post-magic-row,
body.page-forums tr > td.forum-post-magic-cell,
body.page-forums tr > td.forum-post-magic-row {
    display: none !important;
}

/* chip 容器：基本继承底部 action 的纯文字风格，并作为 popover 的定位锚点。 */
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic {
    position: relative;
    cursor: pointer;
    /* 把 popover 弹出空间预留，hover 时整段 chip 区域要保持响应区 */
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic > i {
    color: #d59440; /* 爆米花的暖黄棕 —— 比其它 action 稍亮一档，提示这是个"特殊动作" */
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:hover > i,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:focus > i,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:focus-within > i {
    color: #b15d12;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic .forum-post-action__label {
    color: inherit;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic .forum-post-action__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    margin-left: 3px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 226, 178, 0.85);
    color: #8a5518;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic .forum-post-action__badge--zero {
    background: rgba(240, 235, 228, 0.85);
    color: #9c9080;
}

/* hover/focus 时 chip 文字进入暖色 */
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:hover,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:focus,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:focus-within {
    color: #8a5518 !important;
}

/* ---------- popover 主容器 ---------- */
:is(body.page-forums, body.page-details) .forum-post-magic-popover {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: auto;
    z-index: 30;
    width: 320px;
    max-width: calc(100vw - 32px);
    padding: 12px 14px 10px;
    background: #fffdf8;
    border: 1px solid rgba(220, 200, 170, 0.55);
    border-radius: 10px;
    box-shadow: 0 10px 32px rgba(45, 36, 25, 0.14), 0 2px 6px rgba(45, 36, 25, 0.06);
    color: #4a3f30;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    visibility: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    pointer-events: none;
    cursor: default;
}

/* hover/focus 桥接：chip 和 popover 之间留了 8px 视觉空隙，这里用透明 ::before
 * 把那 8px 也变成 hover 响应区，避免鼠标过去时 popover 闪关 */
:is(body.page-forums, body.page-details) .forum-post-magic-popover::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
    background: transparent;
}

/* 一个小三角指向 chip */
:is(body.page-forums, body.page-details) .forum-post-magic-popover::after {
    content: "";
    position: absolute;
    left: 28px;
    right: auto;
    top: 100%;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-top-color: #fffdf8;
    /* 上层用相同 trick 画 border outline */
    filter: drop-shadow(0 1px 0 rgba(220, 200, 170, 0.55));
}

:is(body.page-forums, body.page-details) .forum-post-action--magic:hover .forum-post-magic-popover,
:is(body.page-forums, body.page-details) .forum-post-action--magic:focus .forum-post-magic-popover,
:is(body.page-forums, body.page-details) .forum-post-action--magic:focus-within .forum-post-magic-popover {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---------- popover 统计行 ---------- */
:is(body.page-forums, body.page-details) .forum-post-magic-popover__stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(220, 200, 170, 0.5);
    font-size: 12px;
    color: #6f5a38;
    cursor: default;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover__stats > i {
    font-size: 14px;
    color: #d59440;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover__stats b {
    color: #2d2419;
    font-weight: 700;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover__stats--empty {
    color: #8a7d6d;
}

/* ---------- popover 数额按钮组 ---------- */
:is(body.page-forums, body.page-details) .forum-post-magic-popover__action {
    margin: 6px 0 8px;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover ul.magic.forum-post-magic-popover__amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover ul.magic.forum-post-magic-popover__amounts li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 28px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid rgba(202, 145, 83, 0.45);
    border-radius: 6px;
    background: rgba(255, 247, 235, 0.85);
    color: #8a5518;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.06s ease;
    /* 复用旧 ul.magic li 的 onclick="saveMagicValue(...)" */
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover ul.magic.forum-post-magic-popover__amounts li:hover {
    background: #fde6c4;
    border-color: rgba(177, 93, 18, 0.7);
    color: #7a4711;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover ul.magic.forum-post-magic-popover__amounts li:active {
    transform: translateY(1px);
}

/* 旧版按钮 li 内部那段 <font style="font-size:8pt;padding-right:5px;">+50</font> 的内联样式
 * 在 popover 里反而把数字推到一边——这里直接覆盖回归正常 */
:is(body.page-forums, body.page-details) .forum-post-magic-popover ul.magic.forum-post-magic-popover__amounts li font {
    padding: 0 !important;
    font-size: 12px !important;
    color: inherit !important;
}

/* 禁用态按钮（爆米花不足 / 已打赏 N 粒 / 已赠送爆米花）：纯文字行 */
:is(body.page-forums, body.page-details) .forum-post-magic-popover__btn-disabled {
    display: block;
    width: 100%;
    min-height: 28px;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px dashed rgba(200, 189, 176, 0.7);
    border-radius: 6px;
    background: rgba(248, 245, 240, 0.7);
    color: #9c9080;
    font-size: 11.5px;
    line-height: 1.4;
    text-align: center;
    cursor: not-allowed;
}

/* "你是楼主，无法给自己打赏"特例：保持禁用风格，但用轻微的暖色提示语 */
:is(body.page-forums, body.page-details) .forum-post-magic-popover__hint-self {
    color: #8a7d6d;
    font-style: italic;
}

/* ---------- popover 记录区 ---------- */
:is(body.page-forums, body.page-details) .forum-post-magic-popover__records {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(220, 200, 170, 0.5);
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover__records-label {
    margin-bottom: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: #8a7d6d;
    letter-spacing: 0.04em;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover__records-body {
    max-height: 84px;
    overflow-y: auto;
    font-size: 11.5px;
    line-height: 1.6;
    color: #6f5a38;
    word-break: break-all;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover__records-body a {
    text-decoration: none;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover__records-body a:hover {
    text-decoration: underline;
}

/* popover 在窄视口可能会溢出，限制宽度并保持从 chip 左侧展开。 */
@media (max-width: 700px) {
    :is(body.page-forums, body.page-details) .forum-post-magic-popover {
        left: 0;
        right: auto;
        width: min(320px, calc(100vw - 32px));
    }
}

/* ============================================================
 * P8  全页观感收尾（2026-05-21）
 * --------------------------------------------------------------
 * 上一轮整页 review 后剩余的 6 项视觉问题集中处理：
 * P0-1  楼层卡片之间增加 14-16px 间距 + 极轻投影，每楼独立成"卡"
 * P0-2  moderation 工具条加 section header「主题管理」+ 容器分组
 * P1-1  快速回复区与上方分隔；section title 加粗、加图标、加上方间距
 * P1-2  hero meta「回复主题」改为锚点链接（弱化为文本链接 ↓ 写回复）
 * P2-1  hero meta chip 三个图标色调统一（不再蓝/橙/灰各一色）
 * P2-2  「N 楼」字号字重降级，不再比左侧元信息抢眼
 * ============================================================ */

/* ---------- P0-1 楼层卡片间距 + 阴影 ---------- */

/* 楼层之间 = shell 的 margin-top；之前 10px 太挤，拉到 16px */
:is(body.page-forums, body.page-details) .forum-post-shell {
    margin-top: 16px !important;
}

/* 第一楼额外抵消一些 hero meta 之后的间距，避免上方过密 */
:is(body.page-forums, body.page-details) .forum-post-shell.forum-post-shell--first {
    margin-top: 6px !important;
}

/* 楼层卡片本体（table.forum-post-card）：轻量阴影 + 圆角 */
:is(body.page-forums, body.page-details) table.main.forum-post-card {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.04),
                0 0 0 1px rgba(220, 227, 236, 0.4) inset;
    overflow: hidden;
    border-collapse: separate;
}

/* 楼层头部继续顶圆角与下方 table 的圆角对接 */
:is(body.page-forums, body.page-details) .forum-post-head {
    border-radius: 12px 12px 0 0 !important;
    box-shadow: 0 -1px 0 rgba(220, 227, 236, 0) inset;
}

/* ---------- P0-2 moderation 工具条：section header + 容器 ---------- */

/* 整体 admin cell 加更明显的背景 / 圆角 / 阴影，与上方楼层卡片做明确视觉分组 */
body.page-forums td.toolbox.forum-viewtopic-admin {
    margin-top: 18px !important;
    padding: 14px 16px 12px !important;
    background: rgba(248, 246, 242, 0.78) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.04);
}

/* section header 行：图标 + 标题 + 灰色提示 */
body.page-forums .forum-viewtopic-admin__header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(220, 227, 236, 0.72);
    text-align: left;
}

body.page-forums .forum-viewtopic-admin__header-icon {
    color: #b85d22;
    font-size: 13px;
}

body.page-forums .forum-viewtopic-admin__header-title {
    color: #5f4e3e;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.page-forums .forum-viewtopic-admin__header-hint {
    margin-left: auto;
    color: #aaa096;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* 「删除主题」分组：把整个 group 强调为危险色 outline + 浅红底，权重高于其它管理动作 */
body.page-forums .forum-viewtopic-admin__group--danger {
    border-color: rgba(190, 110, 95, 0.55) !important;
    background: rgba(255, 242, 238, 0.86) !important;
}

body.page-forums .forum-viewtopic-admin__group--danger .forum-viewtopic-admin__label {
    color: #a05a45 !important;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"] {
    border-color: rgba(190, 110, 95, 0.72) !important;
    background: rgba(255, 232, 224, 0.95) !important;
    color: #8d4835 !important;
    font-weight: 700 !important;
}

body.page-forums .forum-viewtopic-admin__group--danger input[type="submit"]:hover {
    border-color: rgba(160, 80, 65, 0.88) !important;
    background: rgba(255, 220, 210, 0.98) !important;
    color: #7a352a !important;
}

/* ---------- P1-1 快速回复区视觉分隔 + section title ---------- */

/* 上方多给 24-28px 空气；之前 14px 紧贴 mod 工具条，看起来像在同一个区域 */
body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    margin-top: 28px !important;
    padding: 16px 18px 14px !important;
}

/* 自定义 title（PHP 已改为输出 .forum-quick-reply__title with icon + span） */
body.page-forums .forum-quick-reply h2.forum-quick-reply__title, body.page-collection_view .forum-quick-reply h2.forum-quick-reply__title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px dashed rgba(220, 227, 236, 0.72);
    background: transparent !important;
    color: #5f4e3e !important;
    font-size: 14px !important;
    font-weight: 700;
    text-align: left;
}

body.page-forums .forum-quick-reply h2.forum-quick-reply__title::before, body.page-collection_view .forum-quick-reply h2.forum-quick-reply__title::before {
    content: none !important;
}

body.page-forums .forum-quick-reply__title-icon, body.page-collection_view .forum-quick-reply__title-icon {
    color: #b85d22;
    font-size: 13px;
}

/* ---------- P1-2 hero meta「↓ 写回复」改为锚点链接（弱化） ---------- */

/* anchor 形态的回复按钮：去掉填充背景，改为透明 + 暖色文字 + 下划线 hover */
body.page-forums .forum-topic-reply.forum-topic-reply--anchor {
    height: 24px !important;
    padding: 0 10px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #b15d12 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor > i {
    color: #b15d12;
    font-size: 11px;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor:hover {
    background: rgba(255, 240, 220, 0.6) !important;
    border-color: rgba(202, 145, 83, 0.4) !important;
    color: #8a5518 !important;
    transform: none !important;
}

/* hero 内订阅按钮维持现有的"小型 chip"风格，不动 */

/* ---------- P2-1 hero meta chip 图标统一为中性灰 ---------- */
/* 之前 views=蓝 / replies=橙 / posts=灰 做色调维度区分，但放在一行 chip 里
 * 仍稍显花哨；统一为中性灰，靠数字粗细做信息层级 */
body.page-forums .forum-viewtopic-meta__item--views .forum-viewtopic-meta__icon,
body.page-forums .forum-viewtopic-meta__item--replies .forum-viewtopic-meta__icon,
body.page-forums .forum-viewtopic-meta__item--posts .forum-viewtopic-meta__icon {
    color: #9c9080 !important;
}

/* 数字色也统一回单色（保留 hover 时按维度上浮的余地，目前未做交互） */
body.page-forums .forum-viewtopic-meta__item--views b,
body.page-forums .forum-viewtopic-meta__item--replies b,
body.page-forums .forum-viewtopic-meta__item--posts b {
    color: #2d2419 !important;
}

/* ---------- P2-2 「N 楼」字号字重降级 ---------- */
/* 之前 "N 楼" 中的 <b>N</b> 是 15px 加粗，比左侧"由 X 发表于 Y"还大；
 * 它本质是楼号锚点（次级元信息），不该比时间戳更突出 */
:is(body.page-forums, body.page-details) .forum-post-floor {
    font-size: 11.5px;
    color: #9c9080;
}

:is(body.page-forums, body.page-details) .forum-post-floor b {
    font-size: 12px;
    font-weight: 600;
    color: #7a6b56;
}

/* floor-link 整体淡化 */
:is(body.page-forums, body.page-details) .forum-post-floor-link {
    padding: 2px 6px;
    opacity: 0.78;
    transition: opacity 0.16s ease, background-color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-floor-link:hover {
    opacity: 1;
    background: rgba(248, 246, 242, 0.7);
}

/* ============================================================
 * P9  细节打磨第二轮（2026-05-21）
 * --------------------------------------------------------------
 * P0-1  用户头衔从 "(中文)English" 改为 "中文 · English" 两段中点分隔
 * P0-2  mod 工具条 label 精简（2 字）+ button 文案统一（应用/锁定/解锁/删除主题）
 * P0-3  「无统计」字号 + letter-spacing 进一步降级
 * P1-4  面包屑字号 + 与标题间距
 * P1-5  「最后被 X 编辑于 Y」改为 small 灰字 + 编辑图标
 * P1-6  极短帖（< 40 字符）启用 compact 楼层：avatar 缩小 / stats 不显示 / 整楼变矮
 * P2-7  快速回复 textarea 加 placeholder
 * P2-8  hero meta "↓ 写回复" 加轻量描边，让锚点链接"在场感"略增强
 * ============================================================ */

/* ---------- P0-1 用户头衔 两段式 "· 分隔" 渲染 ---------- */

/* 旧 DOM：username (维护开发员)Sysop  → 文字直接拼
 * 新 DOM：<span class="forum-user-title">
 *           <span class="forum-user-title__name"><b>维护开发员</b></span>
 *           <span class="forum-user-title__class">Sysop</span>
 *         </span>
 * 两段中间通过 ::before 注入暗灰 `·` 分隔符
 */
:is(body.page-forums, body.page-details) .forum-user-title {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    margin-left: 6px;
    white-space: nowrap;
}

:is(body.page-forums, body.page-details) .forum-user-title__name {
    /* 头衔本身（中文）颜色由父级 *_Name 控制；这里只补内边距 */
    padding: 0 4px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

:is(body.page-forums, body.page-details) .forum-user-title__name::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.72;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.58);
}

:is(body.page-forums, body.page-details) .forum-user-title__name b {
    font-weight: 600;
}

/* 楼层头作者信息稍微降一档字重：保留可读性，但不让作者元信息抢过正文。 */
:is(body.page-forums, body.page-details) .forum-post-head__primary .nowrap > a > b,
:is(body.page-forums, body.page-details) .forum-post-head__primary .anon-admin-reveal__body .nowrap > a > b {
    font-weight: 600 !important;
}

/* 第二段 English class name：更淡的次级灰，比头衔中文低半档 */
:is(body.page-forums, body.page-details) .forum-user-title__class {
    padding: 0 0 0 8px;
    color: #b3a899;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
}

/* "·" 分隔符通过 ::before 注入 */
:is(body.page-forums, body.page-details) .forum-user-title__class::before {
    content: "·";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #d8cfc1;
    font-weight: 400;
    pointer-events: none;
}

/* ---------- P0-2 mod 工具条紧凑化辅助 ---------- */
/* PHP 已把 label 精简到 2 字，CSS 这里再压一档 letter-spacing
 * 和最小宽度，让整行 5 个 group 排在一行不易换行 */
body.page-forums .forum-viewtopic-admin__label {
    letter-spacing: 0;
}

/* group 之间的 gap 再压一点（之前 8px，现在用 6px） */
body.page-forums .forum-viewtopic-admin__regular {
    gap: 6px;
}

/* ---------- P0-3 「无统计」继续弱化 ---------- */
:is(body.page-forums, body.page-details) .forum-post-author__stats--empty {
    border-top: 0 !important;
    padding-top: 2px !important;
    color: #d8d2c8 !important;
    opacity: 0.7;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats--empty .forum-post-author__stat-line--empty {
    font-size: 9.5px !important;
    letter-spacing: 0 !important;
    font-weight: 400;
}

/* ---------- P1-4 面包屑字号 + 间距 ---------- */
body.page-forums .forum-viewtopic-crumbs {
    margin-bottom: 12px !important;
    color: #b8aea0 !important;
    font-size: 10.5px !important;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

body.page-forums .forum-viewtopic-crumbs a {
    color: #998b78 !important;
}

body.page-forums .forum-viewtopic-crumbs span {
    color: #d8cfc1 !important;
}

/* ---------- P1-5 编辑痕迹小灰字 ---------- */
:is(body.page-forums, body.page-details) .forum-post-edited-note {
    margin: 12px 0 0 !important;
    padding: 0;
    color: #b3a899;
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
    opacity: 0.85;
}

:is(body.page-forums, body.page-details) .forum-post-edited-note .forum-post-edited-note__icon {
    margin-right: 4px;
    color: #c8bdb0;
    font-size: 10px;
}

:is(body.page-forums, body.page-details) .forum-post-edited-note a {
    color: #998b78 !important;
}

/* ---------- P2-7 quickreply textarea placeholder 样式 ---------- */
body.page-forums .forum-quick-reply textarea::placeholder, body.page-collection_view .forum-quick-reply textarea::placeholder {
    color: #c8bdb0;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    font-style: italic;
}

/* ---------- P2-8 ↓ 写回复 增强（极轻 chip 描边） ---------- */
body.page-forums .forum-topic-reply.forum-topic-reply--anchor {
    border-color: rgba(220, 200, 170, 0.55) !important;
    background: rgba(255, 248, 235, 0.45) !important;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor:hover {
    border-color: rgba(202, 145, 83, 0.7) !important;
    background: rgba(255, 240, 220, 0.85) !important;
}

/* ============================================================
 * P11  viewtopic 第十一轮精修（2026-05-22）
 * --------------------------------------------------------------
 *   #8   hero 中「写回复」从锚点 link 升级为实心 CTA（橙底白字），
 *        浏览/回复/楼层三个 meta chip 维持当前中性灰
 *   #10  楼层 head + card 用整圈描边 + 外阴影包成一张卡片，
 *        楼层之间间距 16 → 22px，视觉切片更明确
 *   #11  楼层底部操作条不再用中点 `·` 串联，靠 6px 横向 gap 区分
 *   #12  「只看该作者」filter 默认 opacity:0 + 不占交互，hover 楼层时浮出；
 *        触屏（无 hover）保持现状一直可见；--active（已进入只看模式）一直可见
 *   #14  「最后被 X 编辑于 Y」抽出正文容器后的独立样式
 *   #15  BBCode 工具栏与 textarea 视觉合体（整体一张编辑器卡片 + 阴影）
 *   #21  论坛主题置顶图标专属命名 forum-topic-sticky-icon
 * ============================================================ */

/* ---------- #8 hero 写回复升级为实心 CTA ---------- */
body.page-forums .forum-topic-reply.forum-topic-reply--anchor {
    height: 28px !important;
    padding: 0 14px !important;
    border: 1px solid #b85d22 !important;
    background: linear-gradient(180deg, #d97924, #b85d22) !important;
    color: #fff !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 2px rgba(177, 93, 18, 0.18),
                0 0 0 3px rgba(255, 224, 188, 0) !important;
    text-decoration: none !important;
    transition: background-color 0.16s ease, box-shadow 0.16s ease,
                transform 0.12s ease, border-color 0.16s ease !important;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor > i {
    color: #fff !important;
    font-size: 11px;
    margin-right: 2px;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor:hover {
    border-color: #a04d18 !important;
    background: linear-gradient(180deg, #e08a3a, #c2671e) !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(177, 93, 18, 0.28),
                0 0 0 3px rgba(255, 224, 188, 0.65) !important;
    transform: translateY(-1px);
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(122, 60, 14, 0.28) inset !important;
}

/* ---------- #10 楼层卡片整体描边 + 阴影 ---------- */
/* shell 只包 head（card 是后续 sibling），所以 head + card 各自加一圈描边和阴影，
 * 在视觉接缝处通过 box-shadow 的偏移方向把外框拼成一张卡片 */
:is(body.page-forums, body.page-details) .forum-post-shell {
    margin-top: 22px !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell.forum-post-shell--first {
    margin-top: 8px !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell .forum-post-head {
    background: linear-gradient(180deg, rgba(252, 250, 247, 0.92), rgba(248, 246, 242, 0.88)) !important;
    box-shadow:
        0 0 0 1px rgba(208, 200, 188, 0.55),
        0 -1px 0 rgba(255, 255, 255, 0.85) inset,
        0 -4px 10px rgba(45, 36, 25, 0.04) !important;
}

:is(body.page-forums, body.page-details) table.main.forum-post-card {
    border-radius: 0 0 12px 12px !important;
    box-shadow:
        0 0 0 1px rgba(208, 200, 188, 0.55),
        0 4px 12px rgba(45, 36, 25, 0.06),
        0 1px 2px rgba(45, 36, 25, 0.04) !important;
}

/* ---------- #11 底部操作条不再用 `·` 串联 ---------- */
/* 取消由 ::before 注入的中点；外加 6px gap 让 chip 之间有呼吸 */
:is(body.page-forums, body.page-details) .forum-post-foot__actions {
    gap: 6px !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action + .forum-post-action::before {
    content: none !important;
}

/* ---------- #12 「只看该作者」hover 浮出 ---------- */
/* 桌面（有 hover）：默认隐藏 filter chip，hover 整个楼层时再淡入；
 * 触屏（无 hover）：保持一直可见，避免用户在手机上找不到。
 * --active（已在只看模式下显示的 "退出只看作者"）始终可见，方便快速退出。 */
@media (hover: hover) and (pointer: fine) {
    :is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter:not(.forum-post-head__filter--active) {
        opacity: 0 !important;
        pointer-events: none;
        transform: translateY(-2px);
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    /* hover 时浮出：filter 节点在 .forum-post-shell 内（位于 .forum-post-head__actions），
     * 而正文是 sibling table.forum-post-card。用 :has() 让 hover 在 card 上时也能
     * 反向激活上方 shell 内的 filter（Chrome 105+ / Safari 15.4+ / Firefox 121+）。 */
    :is(body.page-forums, body.page-details) .forum-post-shell:hover .forum-post-head__filter:not(.forum-post-head__filter--active),
    :is(body.page-forums, body.page-details) .forum-post-shell:focus-within .forum-post-head__filter:not(.forum-post-head__filter--active),
    :is(body.page-forums, body.page-details) .forum-post-shell:has(+ table.forum-post-card:hover) .forum-post-head__filter:not(.forum-post-head__filter--active),
    :is(body.page-forums, body.page-details) .forum-post-head:hover .forum-post-head__filter:not(.forum-post-head__filter--active),
    :is(body.page-forums, body.page-details) .forum-post-head__actions:hover .forum-post-head__filter:not(.forum-post-head__filter--active),
    :is(body.page-forums, body.page-details) .forum-post-head__actions:focus-within .forum-post-head__filter:not(.forum-post-head__filter--active) {
        opacity: 1 !important;
        pointer-events: auto;
        transform: translateY(0);
    }
}

/* ---------- #14 编辑标记独立成"楼层附注" ---------- */
/* PHP 已把节点移出 .forum-post-body__content；这里给它独立的视觉权重：
 * 与正文之间靠 12px margin + 顶部 1px 虚线分隔，文字仍保持小灰字 */
:is(body.page-forums, body.page-details) .forum-post-edited {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 12px 0 0 !important;
    padding: 8px 0 0;
    border-top: 1px dashed rgba(220, 213, 200, 0.6);
    color: #b3a899;
    font-size: 11px;
    line-height: 1.4;
    opacity: 0.88;
}

:is(body.page-forums, body.page-details) .forum-post-edited .forum-post-edited__icon {
    color: #c8bdb0;
    font-size: 10px;
}

:is(body.page-forums, body.page-details) .forum-post-edited .forum-post-edited__text {
    color: #a89e8f;
}

:is(body.page-forums, body.page-details) .forum-post-edited a {
    color: #998b78 !important;
}

/* ---------- #15 BBCode 工具栏 + textarea 视觉合体 ---------- */
/* 之前工具栏只是浮在 textarea 上方、背景几乎透明，看不出"这是一个编辑器"。
 * 现在用更明显的米底 + 与 textarea 共享的外框阴影，把两者拼成一张卡片，
 * 焦点态时整张卡片描边变橙，体感和现代 rich-text 编辑器一致 */
body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    /* 与下方 textarea 同宽（之前 width:min(100%,1100px) 在窄屏下居中导致
     * 工具栏比 textarea 窄，看上去像没贴在一起；强制 100% 直接对齐 */
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 7px 12px !important;
    border: 1px solid rgba(208, 200, 188, 0.78) !important;
    border-bottom: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    background: linear-gradient(180deg, rgba(252, 248, 240, 0.96), rgba(248, 243, 233, 0.92)) !important;
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6) inset !important;
}

body.page-forums .forum-quick-reply__body textarea, body.page-collection_view .forum-quick-reply__body textarea {
    width: 100% !important;
    border: 1px solid rgba(208, 200, 188, 0.78) !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.04) !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease !important;
}

/* 焦点态：整张"工具栏 + textarea"卡片描边升级为暖橙，体现 active 编辑器 */
body.page-forums .forum-quick-reply__body:focus-within .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__body:focus-within .forum-quick-reply__bbtoolbar {
    border-color: rgba(202, 145, 83, 0.7) !important;
    background: linear-gradient(180deg, rgba(255, 246, 232, 0.98), rgba(252, 240, 222, 0.95)) !important;
}

body.page-forums .forum-quick-reply__body textarea:focus, body.page-collection_view .forum-quick-reply__body textarea:focus {
    border-color: rgba(202, 145, 83, 0.78) !important;
    outline: none !important;
    box-shadow:
        0 0 0 3px rgba(255, 224, 188, 0.55),
        0 1px 2px rgba(45, 36, 25, 0.06) !important;
}

/* ---------- #21 论坛主题置顶图标专属命名 ---------- */
/* 用法与原 .torrent-sticky-icon 视觉等价，但和种子模块完全独立：
 *  - 改种子置顶时不再误伤论坛主题；反之亦然
 *  - 自定义色变量也独立：--forum-topic-sticky-icon-*（fallback 到原 torrent-* 变量，
 *    这样存量用户在 user-settings 里只调过种子置顶色时论坛也能跟着变） */
.forum-topic-sticky-icons {
    display: inline-flex;
    align-items: center;
    margin-right: 5px;
    vertical-align: middle;
}

.forum-topic-sticky-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    line-height: 1;
    opacity: 0.78;
    vertical-align: middle;
}

.forum-topic-sticky-icon i {
    font-size: 11px;
    line-height: 1;
}

.forum-topic-sticky-icon--normal {
    color: var(--forum-topic-sticky-icon-normal, var(--torrent-sticky-icon-normal, #c24a32));
}

.forum-topic-sticky-icon--global {
    color: var(--forum-topic-sticky-icon-top, var(--torrent-sticky-icon-top, #c98514));
}

/* ============================================================
 * P12  viewtopic 第十二轮精修（2026-05-22）
 * --------------------------------------------------------------
 *   N1   BBCode 工具栏与 textarea 真正合体（抹掉 form grid 留下的 9px row-gap）
 *   N2   爆米花奖励 chip 在 0 打赏时只剩文案 + popover，不再展示干瘪的 "0"
 *   N5   匿名回帖切换器升级为带状态的 pill：默认弱描边，勾选后实心暖橙 + 文案改成"匿名中"
 *   N10  触屏（无 hover）下「只看该作者」chip 一直可见 + 24px → 28px 拉满拇指可点
 * ============================================================ */

/* ---------- N1 工具栏紧贴 textarea ----------
 * .forum-quick-reply form 是 display:grid + gap:9px（见 forums.css 早期声明），
 * 所有 grid 子项之间都会被插入 9px 行间隙。toolbar 与 textarea 之间的 9px 缝
 * 就来自这里。给紧跟 toolbar 的 textarea 一个 -9px margin-top 把它再拉回来，
 * 既不动 form 的整体 grid 间距（smile_row / 匿名 chip / 提交按钮之间仍保持 9px 呼吸），
 * 又能让"工具栏 + 文本框"在视觉上严丝合缝拼成一张编辑器卡片。 */
body.page-forums .forum-quick-reply__bbtoolbar + textarea, body.page-collection_view .forum-quick-reply__bbtoolbar + textarea {
    margin-top: -9px !important;
}

/* ---------- N2 隐藏 "爆米花奖励 0" 角标 ----------
 * empty 状态下 popover 已经有"暂无打赏 · 给楼主撒一把爆米花？"做提示，
 * 再在 chip 上挂一个 0 反而让"无人打赏"看着像"已被打赏 0 次"的负面计数。
 * 直接把 --zero 修饰的 badge 去掉，chip 仅剩"🍿 爆米花奖励"，邀请意味更纯净。 */
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic .forum-post-action__badge--zero {
    display: none !important;
}

/* ---------- N5 匿名回帖切换器：从灰复选框升级为状态 pill ----------
 * HTML 是 quickreply_with_checkbox() 输出的裸 <div align="left"><input>匿名回帖</div>，
 * 在 BBJS 里用 JS 给它套上 .forum-quick-reply__anon 容器和 <label>，
 * 这里只负责视觉：
 *   - 默认：浅描边 pill + "匿名回帖" 文案，视觉权重略弱于"提交"
 *   - hover：描边升级暖橙，告诉用户"我可点"
 *   - 勾选后：填充暖橙 + 文案切到"匿名中"，让用户清楚自己现在的发帖身份
 * 用 :has() 处理勾选态（Chrome 105+ / Safari 15.4+ / Firefox 121+ 全覆盖，
 * 老浏览器降级为不切换文案、仍能用，不影响功能） */
body.page-forums .forum-quick-reply__anon, body.page-collection_view .forum-quick-reply__anon {
    margin: 0;
    /* 父级 form 是 grid + justify-items: center；强制 grid item 靠左，
     * 与下方右对齐的"提交"按钮形成"设置在左 · 主动作在右"的常见表单分工。 */
    justify-self: start !important;
    text-align: left;
}

body.page-forums .forum-quick-reply__anon-label, body.page-collection_view .forum-quick-reply__anon-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 12px 0 8px;
    border: 1px solid rgba(208, 200, 188, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: #8b8174;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.16s ease, background-color 0.16s ease,
                color 0.16s ease, box-shadow 0.16s ease;
}

body.page-forums .forum-quick-reply__anon-label input[type="checkbox"], body.page-collection_view .forum-quick-reply__anon-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #b85d22;
}

body.page-forums .forum-quick-reply__anon-label:hover, body.page-collection_view .forum-quick-reply__anon-label:hover {
    border-color: rgba(202, 145, 83, 0.55);
    background: rgba(255, 247, 235, 0.7);
    color: #6f6255;
}

body.page-forums .forum-quick-reply__anon-text, body.page-collection_view .forum-quick-reply__anon-text {
    display: inline;
}

body.page-forums .forum-quick-reply__anon-active, body.page-collection_view .forum-quick-reply__anon-active {
    display: none;
    font-weight: 600;
}

body.page-forums .forum-quick-reply__anon-active::before, body.page-collection_view .forum-quick-reply__anon-active::before {
    content: "\1F977";
    margin-right: 2px;
    font-size: 13px;
    line-height: 1;
}

body.page-forums .forum-quick-reply__anon:has(input:checked) .forum-quick-reply__anon-label, body.page-collection_view .forum-quick-reply__anon:has(input:checked) .forum-quick-reply__anon-label {
    border-color: rgba(177, 93, 18, 0.7);
    background: linear-gradient(180deg, rgba(255, 238, 211, 0.95), rgba(255, 226, 188, 0.95));
    color: #7a4711;
    box-shadow: 0 1px 3px rgba(177, 93, 18, 0.22),
                inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

body.page-forums .forum-quick-reply__anon:has(input:checked) .forum-quick-reply__anon-text, body.page-collection_view .forum-quick-reply__anon:has(input:checked) .forum-quick-reply__anon-text {
    display: none;
}

body.page-forums .forum-quick-reply__anon:has(input:checked) .forum-quick-reply__anon-active, body.page-collection_view .forum-quick-reply__anon:has(input:checked) .forum-quick-reply__anon-active {
    display: inline;
}

/* ---------- N10 触屏可达性：默认就可见 + 拉满拇指可点 ----------
 * P11 里的 hover-only 隐藏规则被 @media (hover: hover) and (pointer: fine) 圈起来，
 * 触屏（hover:none + pointer:coarse）天然落入 line 4836 的 default opacity:1，
 * 实际已可见。这里加一组显式声明，目的有二：
 *   1) 把"触屏永远可见"的契约写进 CSS，未来重排 P 系列时不至于被误改成全隐藏
 *   2) 触屏下把 chip 的高度从 22px 抬到 28px、左右 padding 加大，避免拇指误点旁边的「举报」
 * 用逗号分隔 hover:none 和 pointer:coarse 两个条件做"或"，覆盖 stylus / 笔触等情况。 */
@media (hover: none), (pointer: coarse) {
    :is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter:not(.forum-post-head__filter--active) {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    :is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-head__filter,
    :is(body.page-forums, body.page-details) .forum-post-head__actions .forum-post-action {
        height: 28px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
    }
}

/* ============================================================
 * P13  viewtopic「写回复 / 提交」按钮回归站点风格（2026-05-22）
 * --------------------------------------------------------------
 * 反馈：之前 P3 / P11 把这两颗按钮做成了纯橙 CTA（白字 + 重阴影），
 * 与全站其它按钮（shoutbox-panel / usercp 等）使用的暖米渐变 pill
 * 风格完全脱节，视觉上突兀且偏重。
 *
 * 改回 NexusPHP × Audiences 已有的设计语言：
 *   - 暖米渐变背景 + 1px 暖色描边 + 微阴影 + 内白色高光，
 *     与 `.shoutbox-panel button` 同源（custom.css 6496-6512）
 *   - 比常规按钮略大、略粗，以体现它是页面主操作（primary）
 *   - hover：暖色加深 + 抬升 1px；active：下沉 1px + 内阴影
 *   - 提交（submit）比写回复（hero 锚点）多 min-width + 略粗字重，
 *     做出"主操作 vs 副操作"的微梯度
 * ============================================================ */

/* ---------- 通用基底：写回复 + 提交共用 ----------
 * 写回复锚点会被 `.forum-viewtopic-meta__actions .forum-topic-actions > a`
 * (custom.css 中的旧规则，特异度 3 类 + 2 型) 用 #8a5518 覆盖文字色，
 * 因此 hero 锚点选择器特意再叠一个 .forum-topic-reply--anchor 进 :is()，
 * 把特异度抬到同等以上（4 类 + 1 型），让 P13 文字色稳定生效。 */
body.page-forums a.forum-topic-reply.forum-topic-reply--anchor.forum-topic-reply--anchor,
body.page-forums .forum-quick-reply input[type="submit"], body.page-collection_view .forum-quick-reply input[type="submit"],
body.page-forums .forum-quick-reply button[type="submit"], body.page-collection_view .forum-quick-reply button[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 247, 235, 0.9) !important;
    background-image: none !important;
    color: #8a5518 !important;
    border: 1px solid rgba(229, 214, 191, 0.85) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    cursor: pointer;
    text-decoration: none !important;
    text-shadow: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.08s ease !important;
}

body.page-forums a.forum-topic-reply.forum-topic-reply--anchor.forum-topic-reply--anchor:hover,
body.page-forums .forum-quick-reply input[type="submit"]:hover, body.page-collection_view .forum-quick-reply input[type="submit"]:hover,
body.page-forums .forum-quick-reply button[type="submit"]:hover, body.page-collection_view .forum-quick-reply button[type="submit"]:hover {
    background: #fff7eb !important;
    color: #7a572d !important;
    border-color: rgba(208, 186, 152, 1) !important;
    box-shadow: none !important;
    outline: none !important;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor:active,
body.page-forums .forum-quick-reply input[type="submit"]:active, body.page-collection_view .forum-quick-reply input[type="submit"]:active,
body.page-forums .forum-quick-reply button[type="submit"]:active, body.page-collection_view .forum-quick-reply button[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: none !important;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor:focus-visible,
body.page-forums .forum-quick-reply input[type="submit"]:focus-visible, body.page-collection_view .forum-quick-reply input[type="submit"]:focus-visible,
body.page-forums .forum-quick-reply button[type="submit"]:focus-visible, body.page-collection_view .forum-quick-reply button[type="submit"]:focus-visible {
    outline: none !important;
    box-shadow:
        0 0 0 3px rgba(255, 224, 188, 0.55) !important;
}

/* ---------- 写回复（hero 锚点）：副操作，稍紧凑 ---------- */
body.page-forums .forum-topic-reply.forum-topic-reply--anchor {
    min-height: 28px !important;
    height: auto !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    line-height: 1.5;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor > i {
    color: currentColor !important;
    font-size: 11px;
    margin-right: 4px;
}

body.page-forums .forum-topic-reply.forum-topic-reply--anchor:hover > i {
    color: currentColor !important;
}

/* ---------- 提交（快速回复主按钮）：主操作，稍大稍粗 ---------- */
body.page-forums .forum-quick-reply input[type="submit"], body.page-collection_view .forum-quick-reply input[type="submit"],
body.page-forums .forum-quick-reply button[type="submit"], body.page-collection_view .forum-quick-reply button[type="submit"] {
    min-width: 90px !important;
    min-height: 32px !important;
    height: auto !important;
    padding: 4px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.5;
}

/* ============================================================
 * P14  viewtopic 可读性收尾（2026-05-22）
 * - 楼层操作区提高默认对比度
 * - 编辑记录从正文弱文本升级为独立附注
 * - 主题管理按语义分组，减少一行内拥挤感
 * - 快速回复收紧编辑器与底部操作区
 * ============================================================ */

/* ---------- 楼层操作区：默认弱化，hover 时再恢复清晰 ---------- */
:is(body.page-forums, body.page-details) .forum-post-foot-cell {
    padding: 4px 14px 8px !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot {
    min-height: 24px !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions {
    gap: 8px !important;
    color: #7e7163 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action {
    padding: 3px 7px !important;
    color: #9c9080 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    opacity: 0.78 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action > i {
    color: #c0b6a8 !important;
    font-size: 10px !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--quote,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--report {
    color: #9c9080 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--quote > i,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--report > i,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic > i {
    color: #c0b6a8 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--danger {
    color: #a05a45 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action:hover {
    color: #7a4711 !important;
    border-radius: 999px !important;
    background: rgba(255, 246, 232, 0.9) !important;
    box-shadow: inset 0 0 0 1px rgba(209, 155, 82, 0.28) !important;
    opacity: 1 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action:hover > i {
    color: #b15d12 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action:hover > span {
    text-decoration: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--danger:hover {
    background: rgba(255, 241, 237, 0.95) !important;
    box-shadow: inset 0 0 0 1px rgba(160, 90, 69, 0.28) !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic .forum-post-action__badge {
    background: rgba(240, 235, 228, 0.85) !important;
    color: #9c9080 !important;
    font-weight: 600 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:hover .forum-post-action__badge,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:focus .forum-post-action__badge,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic:focus-within .forum-post-action__badge {
    background: rgba(255, 226, 178, 0.85) !important;
    color: #8a5518 !important;
}

:is(body.page-forums, body.page-details) table.main.forum-post-card:has(.forum-post-action--magic),
:is(body.page-forums, body.page-details) table.main.forum-post-card:has(.forum-post-action--magic) > tbody,
:is(body.page-forums, body.page-details) table.main.forum-post-card:has(.forum-post-action--magic) > tbody > tr,
:is(body.page-forums, body.page-details) table.main.forum-post-card:has(.forum-post-action--magic) > tbody > tr > td {
    overflow: visible !important;
}

:is(body.page-forums, body.page-details) table.main.forum-post-card:has(.forum-post-action--magic:hover),
:is(body.page-forums, body.page-details) table.main.forum-post-card:has(.forum-post-action--magic:focus),
:is(body.page-forums, body.page-details) table.main.forum-post-card:has(.forum-post-action--magic:focus-within) {
    position: relative;
    z-index: 20;
}

:is(body.page-forums, body.page-details) .forum-post-foot-cell,
:is(body.page-forums, body.page-details) .forum-post-foot,
:is(body.page-forums, body.page-details) .forum-post-foot__actions,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic {
    overflow: visible !important;
}

:is(body.page-forums, body.page-details) .forum-post-magic-popover {
    z-index: 1000 !important;
}

/* ---------- 楼层底部操作条：固定单行高度 ----------
 * 爆米花 chip 文案、徽章或后续操作按钮较多时，不能把整行撑成两行；
 * popover 仍通过 absolute + overflow: visible 浮在外层，不参与行高计算。
 */
:is(body.page-forums, body.page-details) .forum-post-foot-cell {
    padding-top: 3px !important;
    padding-bottom: 7px !important;
    height: 34px !important;
    vertical-align: bottom !important;
    box-sizing: border-box !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

:is(body.page-forums, body.page-details) .forum-post-card:hover .forum-post-body,
:is(body.page-forums, body.page-details) .forum-post-card:hover > tbody > tr > td.forum-post-body {
    transform: none !important;
    transition: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions {
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 100% !important;
    max-height: 24px !important;
    line-height: 1 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action {
    flex: 0 0 auto !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action__label,
:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action > span {
    white-space: nowrap !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic {
    overflow: visible !important;
    color: #7a4711 !important;
    opacity: 1 !important;
    filter: none !important;
    margin-right: auto !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic > i {
    color: #d59440 !important;
}

:is(body.page-forums, body.page-details) .forum-post-foot__actions .forum-post-action--magic .forum-post-action__badge {
    background: rgba(255, 226, 178, 0.85) !important;
    color: #8a5518 !important;
    font-weight: 700 !important;
}

/* ---------- 编辑记录：正文附属信息，左对齐更贴近阅读流 ---------- */
:is(body.page-forums, body.page-details) .forum-post-edited {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    width: fit-content;
    max-width: 100%;
    margin: 18px 0 0 !important;
    padding: 4px 8px !important;
    border: 0 !important;
    border-radius: 6px;
    background: rgba(248, 246, 242, 0.58);
    color: #9a8d7b !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    opacity: 1 !important;
}

:is(body.page-forums, body.page-details) .forum-post-edited__icon {
    color: #c8a875 !important;
    font-size: 10px !important;
}

:is(body.page-forums, body.page-details) .forum-post-edited__text {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 4px;
    color: #9a8d7b !important;
}

:is(body.page-forums, body.page-details) .forum-post-edited__label,
:is(body.page-forums, body.page-details) .forum-post-edited__time {
    color: #9a8d7b !important;
}

:is(body.page-forums, body.page-details) .forum-post-edited__user a,
:is(body.page-forums, body.page-details) .forum-post-edited a {
    color: #7f6a4b !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-edited__user a:hover,
:is(body.page-forums, body.page-details) .forum-post-edited a:hover {
    color: #7a4711 !important;
    text-decoration: underline !important;
}

/* ---------- 主题管理：状态 / 内容调整 / 危险操作 三段分组 ---------- */
body.page-forums td.toolbox.forum-viewtopic-admin {
    padding: 14px 16px !important;
}

body.page-forums .forum-viewtopic-admin__groups {
    align-items: stretch !important;
    gap: 12px !important;
}

body.page-forums .forum-viewtopic-admin__regular {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    min-width: 0;
}

body.page-forums .forum-viewtopic-admin__cluster {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgba(220, 227, 236, 0.62);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
}

body.page-forums .forum-viewtopic-admin__cluster--status::before,
body.page-forums .forum-viewtopic-admin__cluster--content::before {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 6px;
    color: #9c9080;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

body.page-forums .forum-viewtopic-admin__cluster--status::before {
    content: "状态";
}

body.page-forums .forum-viewtopic-admin__cluster--content::before {
    content: "调整";
}

body.page-forums .forum-viewtopic-admin__regular .forum-viewtopic-admin__group,
body.page-forums .forum-viewtopic-admin__group {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-viewtopic-admin__regular .forum-viewtopic-admin__group:nth-child(2) {
    border-right: 0 !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
}

body.page-forums .forum-viewtopic-admin__label {
    color: #6f6255 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

body.page-forums .forum-viewtopic-admin__form {
    gap: 5px !important;
}

body.page-forums .forum-viewtopic-admin__form select {
    max-width: 168px !important;
}

body.page-forums .forum-viewtopic-admin__group--move select {
    width: 170px !important;
}

body.page-forums .forum-viewtopic-admin__group--highlight select {
    width: 136px !important;
}

body.page-forums .forum-viewtopic-admin__danger {
    align-items: center !important;
    margin-left: auto !important;
}

body.page-forums .forum-viewtopic-admin__danger .forum-viewtopic-admin__group--danger {
    padding: 6px 10px !important;
    border: 1px solid rgba(190, 110, 95, 0.52) !important;
    border-radius: 12px !important;
    background: rgba(255, 242, 238, 0.8) !important;
}

body.page-forums .forum-viewtopic-admin__group--danger .forum-viewtopic-admin__label {
    display: inline-flex !important;
    color: #a05a45 !important;
}

/* ---------- 快速回复：编辑器成组，底部设置/提交同一行 ---------- */
body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    padding: 14px 18px 16px !important;
}

body.page-forums .forum-quick-reply form, body.page-collection_view .forum-quick-reply form {
    width: min(100%, 1100px);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px !important;
    justify-items: stretch !important;
    margin: 0 auto;
}

body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar,
body.page-forums .forum-quick-reply__body textarea, body.page-collection_view .forum-quick-reply__body textarea,
body.page-forums .forum-quick-reply__body form > div[align="center"], body.page-collection_view .forum-quick-reply__body form > div[align="center"] {
    grid-column: 1 / -1;
}

body.page-forums .forum-quick-reply__body textarea, body.page-collection_view .forum-quick-reply__body textarea {
    min-height: 108px !important;
    height: 108px !important;
    padding: 12px 14px !important;
    color: #3f3022 !important;
    background: rgba(255, 255, 255, 0.94) !important;
}

body.page-forums .forum-quick-reply textarea::placeholder, body.page-collection_view .forum-quick-reply textarea::placeholder {
    color: #9c9080 !important;
    opacity: 0.9;
}

body.page-forums .forum-quick-reply__anon, body.page-collection_view .forum-quick-reply__anon,
body.page-forums .forum-quick-reply form > div[align="left"], body.page-collection_view .forum-quick-reply form > div[align="left"] {
    grid-column: 1;
    grid-row: 4;
    justify-self: start !important;
    margin: 0 !important;
}

body.page-forums .forum-quick-reply form > br, body.page-collection_view .forum-quick-reply form > br {
    display: none !important;
}

body.page-forums .forum-quick-reply form > input[type="submit"], body.page-collection_view .forum-quick-reply form > input[type="submit"] {
    grid-column: 2;
    grid-row: 4;
    justify-self: end !important;
    margin: 0 !important;
}

body.page-forums .forum-quick-reply form:not(:has(.forum-quick-reply__anon)):not(:has(div[align="left"])) > input[type="submit"], body.page-collection_view .forum-quick-reply form:not(:has(.forum-quick-reply__anon)):not(:has(div[align="left"])) > input[type="submit"] {
    grid-column: 1 / -1;
}

body.page-forums .forum-viewtopic-admin__danger .forum-viewtopic-admin__label {
    display: none !important;
}

/* ---------- 楼层作者名：保留用户等级对应颜色 ----------
 * forums.css 在 theme.css/custom.css 之后加载，楼层头部的通用作者链接色会覆盖
 * Rainbow_Name 这类没有 !important 的等级效果；这里把作者名的等级色在论坛页
 * 重新声明一次，确保作者名和其它页面保持一致。
 */
:is(body.page-forums, body.page-details) .forum-post-head__primary .StaffLeader_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.StaffLeader_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.StaffLeader_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.StaffLeader_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.StaffLeader_Name { color: #9b3a3a !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .SysOp_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.SysOp_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.SysOp_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.SysOp_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.SysOp_Name { color: #a86b3f !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Administrator_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Administrator_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Administrator_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Administrator_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Administrator_Name { color: #6b5b9a !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Moderator_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Moderator_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Moderator_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Moderator_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Moderator_Name { color: #5f7eb0 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .ForumModerator_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.ForumModerator_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.ForumModerator_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.ForumModerator_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.ForumModerator_Name { color: #6f6db8 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Retiree_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Retiree_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Retiree_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Retiree_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Retiree_Name { color: #5fa8b0 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Uploader_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Uploader_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Uploader_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Uploader_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Uploader_Name { color: #c4583e !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Helper_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Helper_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Helper_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Helper_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Helper_Name { color: #8e6cb8 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Seeder_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Seeder_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Seeder_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Seeder_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Seeder_Name { color: #c47878 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Transferrer_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Transferrer_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Transferrer_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Transferrer_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Transferrer_Name { color: #b056a0 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .TorrentManager_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.TorrentManager_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.TorrentManager_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.TorrentManager_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.TorrentManager_Name { color: #5f5fb0 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Coder_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Coder_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Coder_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Coder_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Coder_Name { color: #5959a3 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .VIP_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.VIP_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.VIP_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.VIP_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.VIP_Name { color: #4f8a4f !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .NexusMaster_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.NexusMaster_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.NexusMaster_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.NexusMaster_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.NexusMaster_Name { color: #5fa3c7 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .UltimateUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.UltimateUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.UltimateUser_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.UltimateUser_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.UltimateUser_Name { color: #4f8556 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .ExtremeUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.ExtremeUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.ExtremeUser_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.ExtremeUser_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.ExtremeUser_Name { color: #c08349 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .VeteranUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.VeteranUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.VeteranUser_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.VeteranUser_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.VeteranUser_Name { color: #5f5780 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .InsaneUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.InsaneUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.InsaneUser_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.InsaneUser_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.InsaneUser_Name { color: #8d4a9b !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .CrazyUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.CrazyUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.CrazyUser_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.CrazyUser_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.CrazyUser_Name { color: #4fa0c4 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .EliteUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.EliteUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.EliteUser_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.EliteUser_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.EliteUser_Name { color: #4f8a8a !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .PowerUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.PowerUser_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.PowerUser_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.PowerUser_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.PowerUser_Name { color: #b89554 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .User_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.User_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.User_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.User_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.User_Name { color: #4a4a52 !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Peasant_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Peasant_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Peasant_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Peasant_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary b.Peasant_Name { color: #8b7e6e !important; }

:is(body.page-forums, body.page-details) .forum-post-head__primary .Rainbow_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Rainbow_Name,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Rainbow_Name:link,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Rainbow_Name:visited,
:is(body.page-forums, body.page-details) .forum-post-head__primary a.Rainbow_Name b {
    background: linear-gradient(90deg, #D84315, #FF6D00, #FFD600, #64DD17, #00B8D4, #0091EA, #6200EA) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    animation: rainbow_animation 6s ease-in-out infinite;
    background-size: 400% 100% !important;
}

/* ============================================================
 * [P2] viewtopic 楼层作者列重构（2026-05）
 * 目标：
 *   A. 勋章放大并集中陈列（40px，flex 横向排）
 *   B. 作者列与正文列加可见暖色分隔 + 内边距
 *   D. 统计行三色图标统一为单色低彩，去花色感
 *   F. 楼主用户名旁加橙色「楼主」chip
 *   H. 职务图标节点（pic/sysop.gif）已在 forums.php 删除
 * ============================================================ */

/* —— A. 勋章「裸陈列」：横向优先排列，每行 3 枚，不满整行靠左对齐 ——
 *   勋章很多时（如周年纪念全套），原来的 flex-direction:column 会让所有勋章纵向堆叠成一列，
 *   占据头像下方很长的空白。改为 row + wrap，按列宽自动满行换行，更紧凑也更协调。
 *   列内容区 ≈132px，单枚勋章 40×40 + gap 4px，可放 3 枚/行。 */
:is(body.page-forums, body.page-details) .forum-post-author__medals {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    max-height: none !important;
    margin: 8px auto 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals:empty {
    display: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
}

/* 勋章「裸陈列」：88×88 固定槽位，无任何可见框（C 档紧凑版）
 *   - 88×88 让勋章与 136px 头像比例 1 : 0.65，三档里最协调
 *   - aspect-ratio: 1 + 固定宽高：让所有勋章不论原图形状都占同一规格槽位
 *   - object-fit: contain 在 img 上做：保持原图比例，竖长条勋章自然居中
 *   - 透明 bg + 无 border：纯靠勋章本身视觉冲击
 *   - hover 1.3× 缩放（88 → 114px，仍小于列内容区 104+8 padding 容差） */
:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 88px !important;
    height: 88px !important;
    aspect-ratio: 1 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    line-height: 0 !important;
    transition: transform 0.18s ease;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer a:hover {
    transform: scale(1.3);
    z-index: 2;
    position: relative;
}

/* 勋章 img：填满 a 框（contain 保持原图比例，竖长条勋章会居中显示，不会变形） */
:is(body.page-forums, body.page-details) .forum-post-author__medals img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(49, 66, 96, 0.14));
}

/* —— B. 作者列：暖底 + 暖色右分隔 + 「身份展示卡」尺寸（站内米色系唯一权威规则）——
 *   width 160 + padding 14×10 → 总宽 184px（含右 1px border）
 *   方向：从「紧凑列」升级到「身份展示卡」——头像 96 + 勋章 56 + 统计 12px 字号
 *   选择器特异性（card > tbody > tr > td.author）压住前面所有低特异 width 规则
 *   ⚠️ forums.css 里另有 6 条 .forum-post-author { width: ... !important } 是历史遗留，
 *      不生效但占行数；下一次代码体检时统一删除（见 P2.5 注释）。
 *   📱 ≤900px 走文末 @media 降级回 108px 紧凑版，避免移动端被挤爆。 */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author {
    width: 120px !important;
    padding: 12px 8px !important;
    background: rgba(248, 243, 234, 0.85) !important;
    border-right: 1px solid rgba(196, 178, 152, 0.42) !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.45);
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body {
    padding: 14px 18px !important;
}

/* —— D. 统计行三色图标统一为低彩中性色 —— */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact {
    gap: 2px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px dashed rgba(196, 178, 152, 0.35) !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

/* 每行统计「居中」呈现，覆盖前面 .forum-post-author__stat-line 的 flex-start */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact > .forum-post-author__stat-line {
    width: 7.6em !important;
    gap: 6px !important;
    justify-content: center !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-icon,
:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--up,
:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--down,
:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--ratio {
    color: #a89784 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    transition: color 0.16s ease;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--ratio {
    font-size: 10px !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-line:hover .forum-post-author__stat-icon {
    color: #c98842 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-val {
    color: #6f6255 !important;
    font-weight: 500;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-line--ratio .forum-post-author__stat-val {
    color: #4a4035 !important;
    font-weight: 700;
}

/* —— 头像微调（2026-05 P2 续）——
 *   1) 边框颜色跟着米色暖底走，不再用冷蓝灰
 *   2) 默认头像本身已是「圆角矩形 + 灰人剪影」，去掉外层 border/background/shadow 避免「框中框」
 */
:is(body.page-forums, body.page-details) .forum-post-author > img:first-child {
    border-color: rgba(196, 178, 152, 0.35) !important;
}

/* 默认头像降权：C 档下列宽缩到 120，头像本体已减到 136×136 不再"压顶"，
 * dimming 适度回调，让"请上传头像"的提示语义稍强。
 *   - opacity 0.45 → 剪影清晰可辨但仍弱于真实头像
 *   - grayscale(0.3) + brightness(1.06) → 轻度去饱和并提亮，与列米底色融合 */
:is(body.page-forums, body.page-details) .forum-post-author > img:first-child[src*="default_avatar"] {
    opacity: 0.45 !important;
    filter: grayscale(0.3) brightness(1.06) !important;
    box-shadow: none !important;
}

/* —— F. 楼主 chip：橙色胶囊，紧贴用户名 / 头衔后 —— */
body.page-forums .forum-user-flag {
    display: inline-flex;
    align-items: center;
    height: 18px;
    margin-left: 6px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

body.page-forums .forum-user-flag--op {
    background: linear-gradient(135deg, #f6c270, #e89248) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(202, 119, 43, 0.32);
    text-shadow: 0 1px 0 rgba(140, 70, 12, 0.18);
}

/* ============================================================
 * [P2.1] 楼层卡片细节打磨（2026-05）
 *   #8  「N 楼」chip：去整体 .78 opacity、字色加深半档、楼号粗黑
 *   #9  把作者列暖底向上延伸到头部条左侧 132px，与下方暖底连成 L 型
 *   #10 「最后被 xxx 编辑于」chip 在正文末尾右对齐，纵向与右上「N 楼」对齐
 * ============================================================ */

/* —— #8 N楼 chip：去 opacity，加深主体颜色 —— */
:is(body.page-forums, body.page-details) .forum-post-floor-link {
    opacity: 1 !important;
}

:is(body.page-forums, body.page-details) .forum-post-floor {
    color: #7a6b56 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

:is(body.page-forums, body.page-details) .forum-post-floor b {
    color: #5a4226 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}

:is(body.page-forums, body.page-details) .forum-post-floor-link:hover .forum-post-floor {
    color: #5a4226 !important;
}

:is(body.page-forums, body.page-details) .forum-post-floor-link:hover .forum-post-floor b {
    color: #a8540c !important;
}

/* —— #9 头部条左侧暖底变体历史（2026-05 已弃用） ——
 * v1：bg + border-right → 1px 暖竖线把头部一行切成两段不同色（被吐槽）
 * v2：整段去掉 → 作者列上边缘出现"硬色阶台阶"
 * v3：保留 bg、去掉 border-right（"软 L 型"）
 * v4：用户选择移除，头部完全平铺。
 *     原因：132px 写死无法跟随作者列在窄屏下的 112/108px 变化，
 *     窄屏会出现 20+px 的错位；且整体已用暖色页底，
 *     头部不再需要额外区分背景。 */

/* —— #10 编辑记录回到正文流：左对齐，作为操作栏上方的次级状态信息 —— */
:is(body.page-forums, body.page-details) .forum-post-edited {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* ============================================================
 * [P2.2] 主题头 / BBCode / 管理工具栏 / 作者列细节 / 按钮统一
 *   #4  breadcrumb + 主题元数据加深 + 间距
 *   #6  BBCode B/I/U/S 加强格式可视化
 *   #7  主题管理：3 段细分隔线 + cluster label 加大加粗 + 应用图标按钮
 *   #10 作者列 stats 顶部虚线 → 实线 + 更淡
 *   #12 「提交」按钮风格统一为浅橙描边 + 棕字（与「写回复」一致）
 * ============================================================ */

/* —— #4 breadcrumb + 元数据 chip 加深 + 间距 —— */
body.page-forums .forum-viewtopic-crumbs {
    margin-bottom: 12px !important;
    color: #7a6b56 !important;
    font-size: 12px !important;
}

body.page-forums .forum-viewtopic-crumbs a {
    color: #5a4226 !important;
    font-weight: 600 !important;
}

body.page-forums .forum-viewtopic-crumbs a:hover {
    color: #a8540c !important;
}

body.page-forums .forum-viewtopic-crumbs span {
    color: #a89784 !important;
}

body.page-forums .forum-viewtopic-meta__item {
    color: #5a4a36 !important;
    font-size: 12.5px !important;
}

body.page-forums .forum-viewtopic-meta__icon {
    color: #7a6b56 !important;
    font-size: 11.5px !important;
}

body.page-forums .forum-viewtopic-meta__item b {
    color: #2d2419 !important;
    font-size: 13.5px !important;
}

body.page-forums .forum-viewtopic-meta__item--views b { color: #4a5a72 !important; }
body.page-forums .forum-viewtopic-meta__item--replies b { color: #7a4711 !important; }
body.page-forums .forum-viewtopic-meta__item--posts b { color: #2d2419 !important; }

/* —— #6 BBCode B/I/U/S 加强格式可视化 —— */
body.page-forums .forum-quick-reply__bbbtn--bold, body.page-collection_view .forum-quick-reply__bbbtn--bold {
    font-weight: 800 !important;
    font-size: 14px !important;
    color: #2d2419 !important;
}

body.page-forums .forum-quick-reply__bbbtn--italic, body.page-collection_view .forum-quick-reply__bbbtn--italic {
    font-style: italic !important;
    font-family: "Times New Roman", Georgia, serif !important;
    font-size: 14px !important;
    color: #2d2419 !important;
}

body.page-forums .forum-quick-reply__bbbtn--underline, body.page-collection_view .forum-quick-reply__bbbtn--underline {
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    text-decoration-thickness: 1.5px !important;
    color: #2d2419 !important;
}

body.page-forums .forum-quick-reply__bbbtn--strike, body.page-collection_view .forum-quick-reply__bbbtn--strike {
    text-decoration: line-through !important;
    text-decoration-thickness: 1.5px !important;
    color: #2d2419 !important;
}

/* —— #7 主题管理工具栏：3 段卡片 → 3 段透明 + 竖向分隔线 + 加粗 section label + 应用图标按钮 —— */

/* cluster 卡片化样式弱化为"段"，由竖向 1px 暖线分组 */
body.page-forums .forum-viewtopic-admin__cluster {
    padding: 4px 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-viewtopic-admin__cluster + .forum-viewtopic-admin__cluster {
    border-left: 1px solid rgba(196, 178, 152, 0.42) !important;
}

/* cluster section label：原 10.5px / 700 / #9c9080 → 12px / 800 / 深棕 */
body.page-forums .forum-viewtopic-admin__cluster--status::before,
body.page-forums .forum-viewtopic-admin__cluster--content::before,
body.page-forums .forum-viewtopic-admin__cluster--highlight::before {
    display: inline-flex !important;
    align-items: center !important;
    height: 24px !important;
    margin-right: 8px;
    padding: 0 8px !important;
    border-radius: 6px;
    background: rgba(248, 243, 234, 0.6);
    color: #5a4226 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
}

body.page-forums .forum-viewtopic-admin__cluster--status::before {
    content: "状态" !important;
}

body.page-forums .forum-viewtopic-admin__cluster--content::before {
    content: "内容调整" !important;
}

body.page-forums .forum-viewtopic-admin__cluster--highlight::before {
    content: "醒目高亮" !important;
}

/* 应用按钮：纯图标 ✓，36×26 圆角胶囊，暖底深棕字 */
body.page-forums button.forum-viewtopic-admin__apply {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    width: 30px !important;
    height: 26px !important;
    padding: 0 !important;
    border: 1px solid rgba(196, 178, 152, 0.55) !important;
    border-radius: 999px !important;
    background: rgba(255, 247, 235, 0.92) !important;
    color: #8a5518 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

body.page-forums button.forum-viewtopic-admin__apply:hover {
    border-color: rgba(202, 145, 83, 0.7) !important;
    background: #fff2dc !important;
    color: #7a4711 !important;
}

body.page-forums button.forum-viewtopic-admin__apply i {
    font-size: 11px !important;
    line-height: 1 !important;
}

/* —— #10 作者列 stats 顶部虚线 → 极淡实线 —— */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact {
    border-top: 1px solid rgba(196, 178, 152, 0.22) !important;
}

/* —— #12 「提交」按钮风格统一（浅橙底 + 深橙字 + 1px 橙边，与「写回复」一致）—— */
body.page-forums .forum-quick-reply input[type="submit"], body.page-collection_view .forum-quick-reply input[type="submit"],
body.page-forums .forum-quick-reply button[type="submit"], body.page-collection_view .forum-quick-reply button[type="submit"] {
    min-width: 96px !important;
    min-height: 30px !important;
    padding: 0 18px !important;
    border: 1px solid rgba(222, 210, 193, 0.94) !important;
    border-radius: 999px !important;
    background: rgba(255, 247, 235, 0.92) !important;
    color: #8a5518 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease !important;
}

body.page-forums .forum-quick-reply input[type="submit"]:hover, body.page-collection_view .forum-quick-reply input[type="submit"]:hover,
body.page-forums .forum-quick-reply button[type="submit"]:hover, body.page-collection_view .forum-quick-reply button[type="submit"]:hover {
    border-color: rgba(208, 186, 152, 0.96) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    box-shadow: none !important;
    transform: translateY(-1px) !important;
}

/* ============================================================
 * [P2.3] 楼层节奏 + 右侧对齐 + admin label 等宽 + chip 间距
 *        + 高亮指示器色样 + BBCode 工具栏边框统一（2026-05）
 *   #4  楼层之间额外呼吸感（22 → 32px）
 *   #6  floor chip 与 edit chip 共用右侧 14px 隐形竖线
 *   #7  状态 / 内容调整 / 醒目高亮 三个 label pill 等宽
 *   #9  楼主 chip 与时间文字之间补 6px 间距
 *   #10 高亮 select 当前色指示器：圆点 → 暖描边色样小方块
 *   #11 BBCode 工具栏按钮边框换成暖色调，让"表情"按钮可见
 * ============================================================ */

/* —— #4 楼层之间额外呼吸感：22 → 32px 让 2/3/4 楼有节奏感 —— */
:is(body.page-forums, body.page-details) .forum-post-shell {
    margin-top: 32px !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell.forum-post-shell--first {
    margin-top: 8px !important;
}

/* —— #6 floor chip & edit chip 右侧对齐 ——
 * head padding-right = 14px，body td padding-right 从 18px 收到 14px，
 * 两个 chip 同时贴齐离卡片右边 14px 的隐形竖线 */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body {
    padding-right: 14px !important;
}

/* —— #7 admin cluster label pill 等宽（4 字幅度 + 居中） —— */
body.page-forums .forum-viewtopic-admin__cluster--status::before,
body.page-forums .forum-viewtopic-admin__cluster--content::before,
body.page-forums .forum-viewtopic-admin__cluster--highlight::before {
    box-sizing: border-box !important;
    min-width: 60px !important;
    justify-content: center !important;
    text-align: center !important;
}

/* —— #9 楼主 chip 后面补 6px 间距，避免紧贴时间文字 —— */
body.page-forums .forum-user-flag--op {
    margin-right: 6px !important;
}

/* —— #10 高亮 select 当前色指示器：圆点 → 圆角小方块色样 + 1px 暖描边 ——
 * 旧实现：14×14 radial-gradient 圆点
 * 新实现：10×10 色样块 + 12×12 暖描边层（叠在下层）
 *   两层中线对齐：色样 right: 23px / 描边 right: 22px，
 *   描边在右边露 1px、上下各 1px，呈现"色片镶嵌"感。 */
body.page-forums .forum-topic-highlight-select {
    background-image:
        linear-gradient(var(--hl-current, transparent), var(--hl-current, transparent)),
        linear-gradient(rgba(196, 178, 152, 0.78), rgba(196, 178, 152, 0.78)),
        linear-gradient(45deg, transparent 50%, #8b7867 50%),
        linear-gradient(135deg, #8b7867 50%, transparent 50%) !important;
    background-size:
        10px 10px,
        12px 12px,
        5px 5px,
        5px 5px !important;
    background-position:
        right 23px center,
        right 22px center,
        right 12px center,
        right 7px center !important;
    background-repeat: no-repeat !important;
}

/* 高亮颜色 dropdown：颜色作为左侧色块展示，与 trigger ::before 色块同尺寸/同圆角同侧，
 * 菜单行本身保持中性 —— hover 时仍使用通用暖色底，不会和色块自身的颜色叠加成脏色。 */
body.page-forums .forum-viewtopic-admin__group--highlight .ui-dropdown[style*="--hl-color"] .ui-dropdown-trigger {
    background: rgba(255, 255, 255, 0.72) !important;
    color: #6f5437 !important;
    border-color: rgba(196, 178, 152, 0.62) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42) !important;
}

body.page-forums .forum-viewtopic-admin__group--highlight .ui-dropdown[style*="--hl-color"] .ui-dropdown-trigger::before {
    content: "";
    order: 2;
    width: 10px;
    height: 10px;
    margin-left: 6px;
    margin-right: 0;
    border: 1px solid rgba(80, 60, 40, 0.24);
    border-radius: 3px;
    background: var(--hl-color);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

body.page-forums .forum-viewtopic-admin__group--highlight .ui-dropdown[style*="--hl-color"] .ui-dropdown-trigger .ui-dropdown-trigger__text {
    order: 1;
}

body.page-forums .forum-viewtopic-admin__group--highlight .ui-dropdown[style*="--hl-color"] .ui-dropdown-trigger::after {
    order: 3;
}

body.page-forums .forum-viewtopic-admin__group--highlight .ui-dropdown-list li a[style*="--hl-color"] {
    padding-left: 14px !important;
    padding-right: 32px !important;
}

body.page-forums .forum-viewtopic-admin__group--highlight .ui-dropdown-list li a[style*="--hl-color"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: auto;
    right: 14px;
    width: 10px;
    height: 10px;
    border: 1px solid rgba(80, 60, 40, 0.24);
    border-radius: 3px;
    background: var(--hl-color);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.34),
        0 1px 2px rgba(80, 60, 40, 0.12);
    transform: translateY(-50%);
    pointer-events: none;
}

/* —— #11 BBCode 工具栏按钮边框换成暖米色 + 微微加深，
 *      让"🙂 表情"在视觉上不再被周围色块淹没 —— */
body.page-forums .forum-quick-reply__bbbtn, body.page-collection_view .forum-quick-reply__bbbtn {
    border-color: rgba(196, 178, 152, 0.58) !important;
}

body.page-forums .forum-quick-reply__bbbtn:hover, body.page-collection_view .forum-quick-reply__bbbtn:hover {
    border-color: rgba(202, 145, 83, 0.62) !important;
}

/* "表情"按钮显式重申同款边框，避免因 .is-active / 子选择器特异性丢失 */
body.page-forums .forum-quick-reply__bbbtn--emoji, body.page-collection_view .forum-quick-reply__bbbtn--emoji {
    border-color: rgba(196, 178, 152, 0.58) !important;
}

body.page-forums .forum-quick-reply__bbbtn--emoji.is-active, body.page-collection_view .forum-quick-reply__bbbtn--emoji.is-active {
    border-color: rgba(218, 150, 70, 0.72) !important;
}

/* ============================================================
 * [P2.4] 整页底色暖化（2026-05）
 *   统一全站外侧留白区域为低饱和暖米底，避免论坛页和其它页面
 *   在主内容左右两侧出现不同的背景色 / 旧主题背景图。
 * ============================================================ */
html,
body {
    background: #F8F5F0 !important;
}

/* —— 楼层卡再亮一档：原 0.86 → 0.95，与暖米底拉出 ~10 个亮度单位的色差，
 *   卡片从"贴底"变为"低浮起"，扫页面时阅读焦点更聚焦在卡内。 */
:is(body.page-forums, body.page-details) .forum-post-card {
    background: rgba(255, 253, 250, 0.95) !important;
}

/* ============================================================
 * 响应式降级（2026-05，C 档紧凑版）
 *   PC 端作者列已经是 120px 紧凑版，移动端只需要：
 *   - 列再窄一档（108px）避免极窄屏正文塌陷
 *   - 勋章按比例缩到 64×64（≈ 0.59× 移动端头像 108）
 *   - stats 字号微缩
 *   头像规则继承 PC（width/margin/border-radius 全部复用），不重写。
 * ============================================================ */
@media (max-width: 900px) {
    :is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author {
        width: 108px !important;
    }
    :is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer a {
        width: 64px !important;
        height: 64px !important;
    }
    :is(body.page-forums, body.page-details) .forum-post-author__medals {
        gap: 6px !important;
        max-height: 208px !important;
        margin: 6px auto 4px !important;
    }
    :is(body.page-forums, body.page-details) .forum-post-author__stats--compact {
        font-size: 11px !important;
    }
}

/* ============================================================
 * [P2.5] viewtopic quick reply polish
 * ============================================================ */
body.page-forums #quickreply {
    scroll-margin-top: 24px;
}

body.page-forums .forum-viewtopic-admin {
    margin-top: 10px !important;
    padding: 0 !important;
    border-color: rgba(220, 227, 236, 0.42) !important;
    background: rgba(252, 250, 247, 0.42) !important;
    box-shadow: none !important;
}

body.page-forums .forum-viewtopic-admin__details {
    display: block;
}

body.page-forums .forum-viewtopic-admin__header {
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px !important;
    border-bottom: 0 !important;
    color: #8b7867;
    cursor: pointer;
    list-style: none;
    text-align: left;
}

body.page-forums .forum-viewtopic-admin__header::-webkit-details-marker {
    display: none;
}

body.page-forums .forum-viewtopic-admin__header::after {
    content: "\f078";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: #a89684;
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 11px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

body.page-forums .forum-viewtopic-admin__header:hover::after {
    color: #8b5518;
    background: rgba(255, 247, 235, 0.92);
}

body.page-forums .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__header {
    border-bottom: 1px dashed rgba(220, 227, 236, 0.58) !important;
}

body.page-forums .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__header::after {
    transform: rotate(180deg);
}

body.page-forums .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__groups {
    padding: 10px 12px 12px;
}

body.page-forums .forum-viewtopic-admin__header-icon {
    color: #b8a48e !important;
}

body.page-forums .forum-viewtopic-admin__header-title {
    color: #6f6255 !important;
}

body.page-forums .forum-viewtopic-admin__header-hint {
    margin-left: auto !important;
}

body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    padding: 18px 20px 20px !important;
}

body.page-forums .forum-quick-reply form, body.page-collection_view .forum-quick-reply form {
    gap: 10px 14px !important;
}

body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    gap: 6px !important;
    padding: 7px 10px !important;
    border-color: rgba(222, 205, 181, 0.78) !important;
    background: linear-gradient(180deg, rgba(255, 249, 241, 0.94), rgba(248, 240, 228, 0.86)) !important;
}

body.page-forums .forum-quick-reply__bbbtn, body.page-collection_view .forum-quick-reply__bbbtn {
    min-width: 32px !important;
    height: 28px !important;
    padding: 0 11px !important;
    border-radius: 8px !important;
    border-color: rgba(210, 194, 171, 0.78) !important;
    color: #5f4e3e !important;
    font-size: 12px !important;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.04);
}

body.page-forums .forum-quick-reply__bbbtn:hover, body.page-collection_view .forum-quick-reply__bbbtn:hover,
body.page-forums .forum-quick-reply__bbbtn.is-active, body.page-collection_view .forum-quick-reply__bbbtn.is-active {
    border-color: rgba(202, 145, 83, 0.72) !important;
    background: rgba(255, 243, 226, 0.98) !important;
    color: #8a5518 !important;
}

body.page-forums .forum-quick-reply__bbsep, body.page-collection_view .forum-quick-reply__bbsep {
    height: 22px !important;
    margin: 0 2px !important;
}

body.page-forums .forum-quick-reply__body textarea, body.page-collection_view .forum-quick-reply__body textarea {
    min-height: 168px !important;
    height: 168px !important;
    padding: 14px 16px !important;
    font-size: 13.5px !important;
}

body.page-forums .forum-quick-reply__body form > div[align="center"], body.page-collection_view .forum-quick-reply__body form > div[align="center"] {
    display: none;
    box-sizing: border-box;
    width: min(100%, 1100px);
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid rgba(222, 205, 181, 0.66) !important;
    border-radius: 12px !important;
    background: rgba(255, 253, 250, 0.86) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    text-align: left !important;
}

body.page-forums .forum-quick-reply.forum-quick-reply--emoji-open, body.page-collection_view .forum-quick-reply.forum-quick-reply--emoji-open
    .forum-quick-reply__body form > div[align="center"] {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 6px;
}

body.page-forums .forum-quick-reply__body form > div[align="center"] a, body.page-collection_view .forum-quick-reply__body form > div[align="center"] a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    transition: background-color 0.16s ease, transform 0.16s ease;
}

body.page-forums .forum-quick-reply__body form > div[align="center"] a:hover, body.page-collection_view .forum-quick-reply__body form > div[align="center"] a:hover {
    background: rgba(255, 243, 226, 0.96);
    transform: translateY(-1px);
}

body.page-forums .forum-quick-reply__body form > div[align="center"] img, body.page-collection_view .forum-quick-reply__body form > div[align="center"] img {
    max-width: 24px !important;
    max-height: 24px !important;
}

body.page-forums .forum-quick-reply__anon, body.page-collection_view .forum-quick-reply__anon,
body.page-forums .forum-quick-reply form > div[align="left"], body.page-collection_view .forum-quick-reply form > div[align="left"] {
    align-self: center;
}

body.page-forums .forum-quick-reply form > input[type="submit"], body.page-collection_view .forum-quick-reply form > input[type="submit"] {
    align-self: center;
}

body.page-forums .forum-quick-reply__bbdialog[hidden], body.page-collection_view .forum-quick-reply__bbdialog[hidden] {
    display: none !important;
}

body.page-forums .forum-quick-reply__bbdialog, body.page-collection_view .forum-quick-reply__bbdialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
}

body.page-forums .forum-quick-reply__bbdialog-backdrop, body.page-collection_view .forum-quick-reply__bbdialog-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

body.page-forums .forum-quick-reply__bbdialog-panel, body.page-collection_view .forum-quick-reply__bbdialog-panel {
    position: relative;
    box-sizing: border-box;
    width: min(92vw, 430px);
    padding: 18px;
    border: 1px solid rgba(222, 205, 181, 0.82);
    border-radius: 18px;
    background: rgba(255, 253, 250, 0.98);
    box-shadow: 0 22px 60px rgba(45, 36, 25, 0.18),
                0 8px 20px rgba(45, 36, 25, 0.08);
}

body.page-forums .forum-quick-reply__bbdialog-head, body.page-collection_view .forum-quick-reply__bbdialog-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

body.page-forums .forum-quick-reply__bbdialog-icon, body.page-collection_view .forum-quick-reply__bbdialog-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(222, 205, 181, 0.74);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 249, 241, 0.98), rgba(248, 240, 228, 0.9));
    color: #b15d12;
    font-size: 16px;
}

body.page-forums .forum-quick-reply__bbdialog-copy, body.page-collection_view .forum-quick-reply__bbdialog-copy {
    min-width: 0;
    text-align: left;
}

body.page-forums .forum-quick-reply__bbdialog-title, body.page-collection_view .forum-quick-reply__bbdialog-title {
    color: #3f3022;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

body.page-forums .forum-quick-reply__bbdialog-hint, body.page-collection_view .forum-quick-reply__bbdialog-hint {
    margin-top: 2px;
    color: #8b7867;
    font-size: 12px;
    line-height: 1.5;
}

body.page-forums .forum-quick-reply__bbdialog-field, body.page-collection_view .forum-quick-reply__bbdialog-field {
    display: grid;
    gap: 7px;
    color: #6f6255;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

body.page-forums .forum-quick-reply__bbdialog-input, body.page-collection_view .forum-quick-reply__bbdialog-input {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(202, 214, 228, 0.9);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.96);
    color: #3f3022;
    font-size: 13px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

body.page-forums .forum-quick-reply__bbdialog-input:focus, body.page-collection_view .forum-quick-reply__bbdialog-input:focus {
    border-color: rgba(202, 145, 83, 0.74);
    box-shadow: 0 0 0 3px rgba(227, 160, 108, 0.14);
}

body.page-forums .forum-quick-reply__bbdialog-actions, body.page-collection_view .forum-quick-reply__bbdialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

body.page-forums .forum-quick-reply__bbdialog-actions button, body.page-collection_view .forum-quick-reply__bbdialog-actions button {
    height: 32px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

body.page-forums .forum-quick-reply__bbdialog-cancel, body.page-collection_view .forum-quick-reply__bbdialog-cancel {
    border: 1px solid rgba(220, 227, 236, 0.82);
    background: rgba(255, 255, 255, 0.78);
    color: #7e6f60;
}

body.page-forums .forum-quick-reply__bbdialog-submit, body.page-collection_view .forum-quick-reply__bbdialog-submit {
    min-width: 58px !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 18px !important;
    border: 1px solid rgba(222, 210, 193, 0.94) !important;
    border-radius: 999px !important;
    background: rgba(255, 247, 235, 0.92) !important;
    color: #8a5518 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: transform 0.16s ease, color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease !important;
}

body.page-forums .forum-quick-reply__bbdialog-submit:hover, body.page-collection_view .forum-quick-reply__bbdialog-submit:hover {
    border-color: rgba(208, 186, 152, 0.94) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

body.page-forums .forum-quick-reply__bbdialog-actions button:hover, body.page-collection_view .forum-quick-reply__bbdialog-actions button:hover {
    transform: translateY(-1px);
}

/* 作者栏勋章：完整展示为紧凑勋章墙，避免单枚勋章过大压过正文。 */
:is(body.page-forums, body.page-details) .forum-post-author__medals {
    gap: 4px !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 8px auto 6px !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer a {
    width: 40px !important;
    height: 40px !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__medals .medalcontainer a:hover {
    transform: scale(1.2);
}

:is(body.page-forums, body.page-details) .forum-post-author__medals img {
    max-width: 38px !important;
    max-height: 38px !important;
}

/* 作者栏头像：独立居中完整显示，避免原先放大后裁切头像主体。 */
:is(body.page-forums, body.page-details) .forum-post-author {
    width: 132px !important;
    max-height: none;
    overflow: visible;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author {
    width: 132px !important;
    max-height: none;
    overflow: visible;
}

:is(body.page-forums, body.page-details) .forum-post-author > img:first-child {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto 8px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow: 0 4px 10px rgba(49, 66, 96, 0.05) !important;
    object-fit: contain !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__avatar-frame {
    width: 96px;
    height: 96px;
    margin: 0 auto 8px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 4px 10px rgba(49, 66, 96, 0.05);
}

:is(body.page-forums, body.page-details) .forum-post-author__avatar-frame img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    object-fit: contain !important;
    object-position: center center !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__avatar-frame img[src*="default_avatar"] {
    opacity: 0.45 !important;
    filter: grayscale(0.3) brightness(1.06) !important;
}

/* 作者栏统计：保留三行，只弱化为补充信息，避免形成独立信息面板。 */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact {
    gap: 1px !important;
    margin: 5px 0 0 !important;
    padding: 5px 4px 0 !important;
    border-top: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.34 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stats--compact > .forum-post-author__stat-line {
    width: 7.2em !important;
    gap: 4px !important;
    justify-content: flex-start !important;
    color: #8a7f72 !important;
    font-weight: 400 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-icon,
:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--up,
:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--down,
:is(body.page-forums, body.page-details) .forum-post-author__stat-icon--ratio,
:is(body.page-forums, body.page-details) .forum-post-author__stat-line:hover .forum-post-author__stat-icon {
    color: #b8aca0 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
}

:is(body.page-forums, body.page-details) .forum-post-author__stat-val,
:is(body.page-forums, body.page-details) .forum-post-author__stat-line--ratio .forum-post-author__stat-val {
    color: #7f7367 !important;
    font-weight: 500 !important;
}

/* ---------------------------------------------------------------------------
 * 楼层卡片现代化（2026-05 调整）
 *  - shell（头部 meta）与 card（正文）拼成一张完整卡：12px 圆角
 *  - 去掉两者各自的 1px 描边 / outline-shadow / 硬分隔线
 *  - 改用单条极淡 drop-shadow（卡片底部）
 *  - 拉开楼层间距，hover 改成极轻微的下沉
 * ------------------------------------------------------------------------- */
:is(body.page-forums, body.page-details) .forum-post-shell {
    margin: 24px auto 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell.forum-post-shell--first {
    margin-top: 6px !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell .forum-post-head {
    margin: 0 !important;
    padding: 9px 16px !important;
    background: rgba(252, 250, 247, 0.86) !important;
    border: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    box-shadow: none !important;
}

:is(body.page-forums, body.page-details) table.main.forum-post-card,
:is(body.page-forums, body.page-details) .forum-post-card {
    margin: 0 auto 0 !important;
    background: rgba(255, 253, 250, 0.95) !important;
    border: 0 !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow:
        0 1px 2px rgba(45, 36, 25, 0.035),
        0 8px 22px rgba(45, 36, 25, 0.045) !important;
    overflow: hidden !important;
    transition: box-shadow 0.22s ease, transform 0.22s ease !important;
}

:is(body.page-forums, body.page-details) .forum-post-shell:hover + .forum-post-card,
:is(body.page-forums, body.page-details) .forum-post-card:hover {
    box-shadow:
        0 1px 2px rgba(45, 36, 25, 0.05),
        0 14px 30px rgba(45, 36, 25, 0.07) !important;
}

/* 卡片内部硬边框清理：左作者列、右正文列、底部 magic-row 都不再画 1px 分隔线 */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author,
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-body,
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-foot-cell {
    border: 0 !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author {
    background: rgba(248, 243, 234, 0.55) !important;
}

:is(body.page-forums, body.page-details) .forum-post-card .forum-post-magic-row {
    border-top: 0 !important;
    background: transparent !important;
}

/* ---------------------------------------------------------------------------
 * 快速回复 BBCode 工具条：轻量编辑器操作条
 *   - B/I/U/S 保留文本 chip，读起来像格式开关
 *   - 插入类按钮（引用/代码/隐藏/链接/图片/表情）图标优先，hover 给 tooltip
 *   - 去掉每个按钮的控件感，整体更贴近当前论坛卡片语言
 * ------------------------------------------------------------------------- */
body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    padding: 8px 11px 7px !important;
    border-color: rgba(220, 210, 196, 0.46) !important;
    background: rgba(255, 252, 247, 0.54) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset !important;
    gap: 4px !important;
}

body.page-forums .forum-quick-reply__body:focus-within .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__body:focus-within .forum-quick-reply__bbtoolbar {
    border-color: rgba(202, 145, 83, 0.52) !important;
    background: rgba(255, 249, 240, 0.72) !important;
}

body.page-forums .forum-quick-reply__bbbtn, body.page-collection_view .forum-quick-reply__bbbtn {
    position: relative !important;
    box-sizing: border-box !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #655647 !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: visible !important;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease !important;
}

body.page-forums .forum-quick-reply__bbbtn:hover, body.page-collection_view .forum-quick-reply__bbbtn:hover,
body.page-forums .forum-quick-reply__bbbtn.is-active, body.page-collection_view .forum-quick-reply__bbbtn.is-active {
    background: rgba(255, 238, 216, 0.82) !important;
    color: #8a5518 !important;
    transform: none !important;
}

body.page-forums .forum-quick-reply__bbbtn::before, body.page-collection_view .forum-quick-reply__bbbtn::before {
    font-family: "Font Awesome 5 Pro" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-size: 14.5px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 格式按钮：保留 B/I/U/S 文本，用更轻的小 chip 表达状态开关。 */
body.page-forums .forum-quick-reply__bbbtn--bold, body.page-collection_view .forum-quick-reply__bbbtn--bold,
body.page-forums .forum-quick-reply__bbbtn--italic, body.page-collection_view .forum-quick-reply__bbbtn--italic,
body.page-forums .forum-quick-reply__bbbtn--underline, body.page-collection_view .forum-quick-reply__bbbtn--underline,
body.page-forums .forum-quick-reply__bbbtn--strike, body.page-collection_view .forum-quick-reply__bbbtn--strike {
    width: 28px !important;
    min-width: 28px !important;
    height: 26px !important;
    border: 1px solid rgba(214, 202, 185, 0.46) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.54) !important;
    color: #5f4e3e !important;
    font-size: 12px !important;
    line-height: 26px !important;
    text-align: center !important;
}

body.page-forums .forum-quick-reply__bbbtn--bold:hover, body.page-collection_view .forum-quick-reply__bbbtn--bold:hover,
body.page-forums .forum-quick-reply__bbbtn--italic:hover, body.page-collection_view .forum-quick-reply__bbbtn--italic:hover,
body.page-forums .forum-quick-reply__bbbtn--underline:hover, body.page-collection_view .forum-quick-reply__bbbtn--underline:hover,
body.page-forums .forum-quick-reply__bbbtn--strike:hover, body.page-collection_view .forum-quick-reply__bbbtn--strike:hover,
body.page-forums .forum-quick-reply__bbbtn--bold.is-active, body.page-collection_view .forum-quick-reply__bbbtn--bold.is-active,
body.page-forums .forum-quick-reply__bbbtn--italic.is-active, body.page-collection_view .forum-quick-reply__bbbtn--italic.is-active,
body.page-forums .forum-quick-reply__bbbtn--underline.is-active, body.page-collection_view .forum-quick-reply__bbbtn--underline.is-active,
body.page-forums .forum-quick-reply__bbbtn--strike.is-active, body.page-collection_view .forum-quick-reply__bbbtn--strike.is-active {
    border: 1px solid rgba(202, 145, 83, 0.48) !important;
    border-color: rgba(202, 145, 83, 0.48) !important;
    background: rgba(255, 239, 219, 0.9) !important;
}

body.page-forums .forum-quick-reply__bbbtn--bold::before, body.page-collection_view .forum-quick-reply__bbbtn--bold::before,
body.page-forums .forum-quick-reply__bbbtn--italic::before, body.page-collection_view .forum-quick-reply__bbbtn--italic::before,
body.page-forums .forum-quick-reply__bbbtn--underline::before, body.page-collection_view .forum-quick-reply__bbbtn--underline::before,
body.page-forums .forum-quick-reply__bbbtn--strike::before, body.page-collection_view .forum-quick-reply__bbbtn--strike::before {
    content: none !important;
}

body.page-forums .forum-quick-reply__bbbtn--bold, body.page-collection_view .forum-quick-reply__bbbtn--bold {
    font-weight: 800 !important;
}

body.page-forums .forum-quick-reply__bbbtn--italic, body.page-collection_view .forum-quick-reply__bbbtn--italic {
    font-style: italic !important;
}

body.page-forums .forum-quick-reply__bbbtn--underline, body.page-collection_view .forum-quick-reply__bbbtn--underline {
    text-decoration: underline !important;
    text-decoration-thickness: 1.5px !important;
}

body.page-forums .forum-quick-reply__bbbtn--strike, body.page-collection_view .forum-quick-reply__bbbtn--strike {
    text-decoration: line-through !important;
    text-decoration-thickness: 1.5px !important;
}

/* 图标 codepoints（FA 5 Pro Solid） */
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="quote"]::before, body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="quote"]::before { content: "\f10e"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="code"]::before , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="code"]::before  { content: "\f121"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="hide"]::before , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="hide"]::before  { content: "\f070"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="url"]::before  , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="url"]::before   { content: "\f0c1"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="img"]::before  , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="img"]::before   { content: "\f03e"; }
body.page-forums .forum-quick-reply__bbbtn--emoji::before      , body.page-collection_view .forum-quick-reply__bbbtn--emoji::before       { content: "\f118"; }

/* 自定义 tooltip：::after + 文字 + 下方小三角 */
body.page-forums .forum-quick-reply__bbbtn::after, body.page-collection_view .forum-quick-reply__bbbtn::after {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(2px);
    padding: 5px 9px;
    background: rgba(35, 28, 20, 0.92);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 40;
}

body.page-forums .forum-quick-reply__bbbtn:hover::after, body.page-collection_view .forum-quick-reply__bbbtn:hover::after,
body.page-forums .forum-quick-reply__bbbtn:focus-visible::after, body.page-collection_view .forum-quick-reply__bbbtn:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.page-forums .forum-quick-reply__bbbtn--bold::after       , body.page-collection_view .forum-quick-reply__bbbtn--bold::after        { content: "粗体"; }
body.page-forums .forum-quick-reply__bbbtn--italic::after     , body.page-collection_view .forum-quick-reply__bbbtn--italic::after      { content: "斜体"; }
body.page-forums .forum-quick-reply__bbbtn--underline::after  , body.page-collection_view .forum-quick-reply__bbbtn--underline::after   { content: "下划线"; }
body.page-forums .forum-quick-reply__bbbtn--strike::after     , body.page-collection_view .forum-quick-reply__bbbtn--strike::after      { content: "删除线"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="quote"]::after, body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="quote"]::after { content: "引用"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="code"]::after , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="code"]::after  { content: "代码"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="hide"]::after , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="hide"]::after  { content: "隐藏内容"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="url"]::after  , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="url"]::after   { content: "链接"; }
body.page-forums .forum-quick-reply__bbbtn[data-bbcode="img"]::after  , body.page-collection_view .forum-quick-reply__bbbtn[data-bbcode="img"]::after   { content: "图片"; }
body.page-forums .forum-quick-reply__bbbtn--emoji::after      , body.page-collection_view .forum-quick-reply__bbbtn--emoji::after       { content: "表情"; }

/* 分隔符更含蓄一点 */
body.page-forums .forum-quick-reply__bbsep, body.page-collection_view .forum-quick-reply__bbsep {
    width: 1px !important;
    height: 20px !important;
    margin: 0 10px !important;
    background: rgba(196, 178, 152, 0.32) !important;
}

body.page-forums .forum-quick-reply__bbtoolbar + textarea, body.page-collection_view .forum-quick-reply__bbtoolbar + textarea,
body.page-forums .forum-quick-reply__body textarea, body.page-collection_view .forum-quick-reply__body textarea {
    border-top-color: rgba(208, 200, 188, 0.28) !important;
}

/* 工具栏容器：不剪裁 tooltip，间距更紧凑（图标按钮变小后） */
body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    overflow: visible !important;
    gap: 5px !important;
}

/* ============================================================
 * [P4] 角色名去重：默认隐藏英文 class 段（Sysop / TManager …）
 *   旧 DOM 把"维护开发员 · Sysop"双重渲染，配上 ::before 注入的 "·"
 *   分隔符，是典型老 BBS 双重身份徽章做法。现代风格只保留中文头衔，
 *   中文为空（缺翻译）时再 fallback 到英文段。
 * ============================================================ */
:is(body.page-forums, body.page-details) .forum-user-title__class {
    display: none !important;
}

/* fallback：中文头衔的 <b> 为空（缺翻译）时，仍然展示英文段 */
:is(body.page-forums, body.page-details) .forum-user-title:has(.forum-user-title__name b:empty) .forum-user-title__class,
:is(body.page-forums, body.page-details) .forum-user-title:not(:has(.forum-user-title__name)) .forum-user-title__class {
    display: inline !important;
}

/* 中文头衔右侧 padding 收回（原本是给 "·" 让位的，现在不需要） */
:is(body.page-forums, body.page-details) .forum-user-title:not(:has(.forum-user-title__class[style*="inline"])) .forum-user-title__name {
    padding-right: 0 !important;
}

/* ============================================================
 * [P5 v6] 作者列统计：上下两行（2026-05）
 *   v5 横排实拍后改竖排。理由（实拍验证后）：
 *     1. 数字纵向对齐 → 真正的 "data table" 感
 *        ↑  1.200 TB
 *        ↓  856.00 GB        都左对齐到 icon 列，单位 TB/GB 上下对齐
 *     2. 整组跟头像同轴居中 → 整列垂直对称更稳
 *     3. 垂直空间是免费的 → 不会撑长 card（作者列底部本来就有 whitespace）
 *
 *   只保留 上传 / 下载（隐藏分享率）。
 *   样式保持 v5 的"低调小数字"基调：11px / 500 / #7a6d5e 暖深灰，
 *   无 border / bg / padding。形态从"横向 status row"变成"垂直 mini block"。
 *
 *   不展示中文标签（"上传/下载"）—— 箭头本身就是符号，加文字
 *   会把"低调小数字"重新变成"带标签的 stat 模块"，重蹈 B 覆辙。
 * ============================================================ */

/* 容器：竖排 2 行、整组居中（width: max-content + margin: auto 实现居中）。
 * align-items: flex-start —— 两行左边缘对齐到容器左边，icon 列垂直对齐；
 * 用 center 会让两行各自水平居中，因数字宽度不同导致 icon 浮动错位。 */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    width: max-content !important;
    margin: 6px auto 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #7a6d5e !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    font-variant-numeric: tabular-nums !important;
}

/* 每行：icon + 数值 inline；6px 间距把两者贴近成一组 */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact > .forum-post-author__stat-line {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    cursor: default;
}

/* 图标：固定 12px 宽、左对齐 —— 让上下两行的箭头列垂直对齐 */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact .forum-post-author__stat-icon {
    display: inline-flex !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    width: 12px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    line-height: 1 !important;
    text-align: left !important;
    transition: none !important;
}
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact .forum-post-author__stat-icon--up    { color: #6a9a55 !important; }
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact .forum-post-author__stat-icon--down  { color: #4c7fb8 !important; }

/* 数值：暖深灰、500 字重 */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact .forum-post-author__stat-val,
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact .forum-post-author__stat-line--ratio .forum-post-author__stat-val {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #7a6d5e !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
}

/* 隐藏分享率（用复合选择子提权，必须放在 display: inline-flex 规则之后） */
:is(body.page-forums, body.page-details) .forum-post-author__stats--compact > .forum-post-author__stat-line.forum-post-author__stat-line--ratio {
    display: none !important;
}

/* 响应式：作者列变窄时字号缩一档；竖排本身不挤，不动 gap */
@media (max-width: 900px) {
    :is(body.page-forums, body.page-details) .forum-post-author__stats--compact {
        font-size: 10.5px !important;
    }
    :is(body.page-forums, body.page-details) .forum-post-author__stats--compact .forum-post-author__stat-val {
        font-size: 10.5px !important;
    }
}
/* ============================================================
 * [P9] 主题管理：折叠条 chip 化（2026-05）
 *   把 1755px 全宽米色 bar 改成居中的小药丸按钮：
 *     [盾牌] 主题管理 仅版主可见  [chevron]
 *   折叠状态：pill 居中、无外框占位
 *   展开状态：pill 仍在顶部 + 下方独立圆角卡承载表单
 * ============================================================ */

/* 外层容器：不再画背景/边框，只做"水平居中容器" */
body.page-forums .forum-viewtopic-admin {
    margin: 14px auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
}

/* details 容器：居中、auto 宽 */
body.page-forums .forum-viewtopic-admin__details {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    text-align: left !important;
}

/* 折叠状态：让 details 整体宽度等于 pill */
body.page-forums .forum-viewtopic-admin__details:not([open]) {
    display: inline-flex !important;
    align-items: center !important;
}

/* 展开状态：details 宽度撑开承载下方 panel */
body.page-forums .forum-viewtopic-admin__details[open] {
    display: block !important;
    width: 100% !important;
    max-width: 1100px !important;
}

/* 折叠条本体：ghost dashed pill —— 跟 .anon-admin-reveal 同一套 admin
 * utility 语言。透明底 + 暖琥珀虚线边 = "内部管理入口、非公开按钮"，
 * 让它从"全页色温最强的元素"降级为"次弱的低调入口"，
 * 跟语义重要性（折叠的次要管理工具）匹配。 */
body.page-forums .forum-viewtopic-admin__header {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 5px 14px 5px 12px !important;
    border: 1px dashed rgba(180, 140, 90, 0.45) !important;
    border-radius: 4px !important;
    background: transparent !important;
    color: #8b7867 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
}

body.page-forums .forum-viewtopic-admin__header:hover {
    background: rgba(245, 230, 200, 0.25) !important;
    border-color: rgba(180, 140, 90, 0.75) !important;
    color: #6f6255 !important;
    box-shadow: none !important;
}

/* 展开状态：跟折叠态共用 ghost dashed 语言，只是 hover-like 加深一档 */
body.page-forums .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__header {
    margin-bottom: 10px !important;
    border: 1px dashed rgba(180, 140, 90, 0.75) !important;
    background: rgba(245, 230, 200, 0.25) !important;
    color: #6f6255 !important;
}

/* 盾牌 icon：muted amber，跟 anon-admin-reveal__icon 同色同强度 */
body.page-forums .forum-viewtopic-admin__header-icon {
    color: #b8895a !important;
    font-size: 10.5px !important;
    opacity: 0.85 !important;
}

/* 标题 */
body.page-forums .forum-viewtopic-admin__header-title {
    color: inherit !important;
    font-weight: 500 !important;
}

/* 提示"仅版主可见"：弱化为 muted small */
body.page-forums .forum-viewtopic-admin__header-hint {
    margin-left: 4px !important;
    color: rgba(139, 120, 103, 0.65) !important;
    font-size: 10.5px !important;
    font-weight: 400 !important;
}

/* chevron：缩小、贴右边 */
body.page-forums .forum-viewtopic-admin__header::after {
    width: 16px !important;
    height: 16px !important;
    margin-left: 6px !important;
    background: transparent !important;
    color: #b8a48e !important;
    font-size: 9.5px !important;
}
body.page-forums .forum-viewtopic-admin__header:hover::after {
    color: #8b5518 !important;
    background: transparent !important;
}

/* 展开后的管理表单 panel：独立圆角卡 */
body.page-forums .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__groups {
    padding: 14px 16px !important;
    border: 1px solid rgba(220, 211, 198, 0.55) !important;
    border-radius: 12px !important;
    background: rgba(252, 250, 247, 0.85) !important;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.04) !important;
}

/* ============================================================
 * 论坛辅助页现代化：搜索 / 未读 / 完整发帖 / 管理页
 * ============================================================ */

body.page-forums .forum-utility,
body.page-forummanage .forum-admin-page,
body.page-moforums .forum-admin-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #4f4438;
    text-align: left;
}

body.page-forums .forum-utility__hero {
    margin-bottom: 12px;
}

body.page-forums .forum-utility__title a,
body.page-forums .forum-utility__title span {
    color: inherit !important;
    text-decoration: none !important;
}

body.page-forums .forum-utility__title span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

body.page-forums .forum-utility__title span::before {
    content: "/";
    margin: 0 2px 0 1px;
    color: #c9b8a6;
    font-weight: 500;
}

body.page-forums .forum-utility-search {
    display: flex;
    justify-content: flex-end;
    flex: 0 1 360px;
    min-width: 220px;
    margin: 0;
}

body.page-forums .forum-utility-section {
    overflow: hidden;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forums .forum-utility-section__head,
body.page-forums .forum-utility-card {
    display: grid;
    align-items: center;
    gap: 14px;
}

body.page-forums .forum-utility-section__head {
    grid-template-columns: minmax(360px, 1fr) minmax(180px, 0.35fr);
    padding: 9px 16px 8px;
    border-bottom: 1px solid rgba(210, 221, 234, 0.72);
    background: rgba(255, 255, 255, 0.35);
    color: #aaa096;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
}

body.page-forums .forum-utility-section__head--search {
    grid-template-columns: minmax(360px, 1fr) minmax(160px, 0.25fr) minmax(220px, 0.36fr);
}

body.page-forums .forum-utility-card {
    grid-template-columns: minmax(360px, 1fr) minmax(180px, 0.35fr);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(220, 227, 236, 0.62);
    background: rgba(255, 255, 255, 0.56);
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.page-forums .forum-utility-card--search {
    grid-template-columns: minmax(360px, 1fr) minmax(160px, 0.25fr) minmax(220px, 0.36fr);
}

body.page-forums .forum-utility-card:last-child {
    border-bottom: 0;
}

body.page-forums .forum-utility-card:hover {
    background: rgba(255, 250, 244, 0.84);
    box-shadow: inset 3px 0 0 rgba(218, 158, 82, 0.32);
    transform: translateY(-1px);
}

body.page-forums .forum-utility-card__main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

body.page-forums .forum-utility-card__copy {
    min-width: 0;
}

body.page-forums .forum-utility-card__title {
    display: -webkit-box;
    overflow: hidden;
    color: #3f3022 !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

body.page-forums .forum-utility-card__title:hover {
    color: #9a5a13 !important;
}

body.page-forums .forum-utility-card__aside,
body.page-forums .forum-utility-card__meta {
    min-width: 0;
    color: #8c7a68;
    font-size: 11px;
    line-height: 1.35;
}

body.page-forums .forum-utility-card__aside a {
    color: #8a5518 !important;
    font-weight: 600;
    text-decoration: none !important;
}

body.page-forums .forum-utility-card__meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

body.page-forums .forum-utility-card__post-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(220, 227, 236, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: #8b7867;
    font-size: 11px;
    font-weight: 700;
}

body.page-forums .forum-utility-result-summary {
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    color: #756858;
    font-size: 12px;
    line-height: 1.5;
}

body.page-forums .forum-utility-result-summary b {
    margin: 0 4px;
    color: #8a5518;
}

body.page-forums .forum-utility-actions {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

body.page-forums .forum-utility-actions form {
    margin: 0;
}

body.page-forums .forum-utility-actions input[type="submit"] {
    min-height: 28px;
    padding: 4px 16px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

body.page-forums .forum-compose {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.page-forums .forum-compose > form {
    margin: 0;
}

/* 注：旧版 `.forum-compose h1` / `.forum-compose h1::before` 已删除：
   它们和新版 `.forum-compose__title` 双重命中同一个 <h1>，且具有更高
   元素类型权重 (1 type + 2 class)，会强制把 title 拉回 15px，造成 18px/20px
   完全失效。新版 hero 标题统一由 `.forum-compose__title` 提供样式。 */

body.page-forums .forum-compose table.main {
    width: 100% !important;
    overflow: hidden;
    border: 1px solid rgba(220, 227, 236, 0.82) !important;
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.56);
}

body.page-forums .forum-compose table.main td {
    border-color: rgba(220, 227, 236, 0.62) !important;
}

body.page-forums .forum-compose td.colhead {
    padding: 10px 14px !important;
    border-color: rgba(210, 221, 234, 0.72) !important;
    background: rgba(255, 255, 255, 0.42) !important;
    background-image: none !important;
    color: #8b7867 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.35;
    text-align: left !important;
}

body.page-forums .forum-compose .rowhead {
    width: 118px;
    padding: 12px 14px !important;
    background: rgba(255, 250, 244, 0.76) !important;
    color: #7e6f60;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

body.page-forums .forum-compose .rowfollow {
    padding: 12px 14px !important;
    background: rgba(255, 255, 255, 0.62) !important;
}

body.page-forums .forum-compose input[type="text"],
body.page-forums .forum-compose textarea,
body.page-forums .forum-compose select {
    box-sizing: border-box;
    max-width: 100%;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    color: #4f4438;
    outline: none;
}

body.page-forums .forum-compose input[type="text"] {
    min-height: 32px;
    padding: 6px 10px;
}

body.page-forums .forum-compose textarea {
    padding: 11px 13px;
    line-height: 1.65;
}

body.page-forums .forum-compose input[type="submit"],
body.page-forums .forum-compose input[type="button"],
body.page-forummanage #outer input[type="submit"],
body.page-moforums #outer input[type="submit"] {
    min-height: 28px;
    padding: 4px 16px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.92);
    color: #8a5518;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

body.page-forums .topic-reply-requirements,
body.page-forums .topic-reply-condition,
body.page-forums .topic-reply-rule-group {
    border-color: rgba(220, 227, 236, 0.82) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.62) !important;
}

body.page-forummanage #outer > table.main,
body.page-moforums #outer > table.main {
    width: calc(100% - (var(--site-content-inline-gap, 26px) * 2)) !important;
    max-width: none !important;
}

body.page-forummanage #outer > table.main > tbody > tr > td.embedded,
body.page-moforums #outer > table.main > tbody > tr > td.embedded {
    padding-right: var(--site-content-inline-gap, 26px) !important;
    padding-left: var(--site-content-inline-gap, 26px) !important;
}

body.page-forummanage #outer h1,
body.page-forummanage #outer h2.transparentbg,
body.page-moforums #outer h2.transparentbg {
    margin: 0 0 14px !important;
    padding: 16px 20px 14px !important;
    border: 1px solid rgba(220, 227, 236, 0.82) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, rgba(252, 250, 247, 0.86), rgba(248, 250, 252, 0.72)) !important;
    color: #2d2419 !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forummanage #outer table,
body.page-moforums #outer table {
    max-width: 100%;
}

body.page-forummanage #outer td.colhead,
body.page-moforums #outer td.colhead {
    padding: 9px 14px !important;
    border-color: rgba(210, 221, 234, 0.72) !important;
    background: rgba(255, 255, 255, 0.42) !important;
    color: #aaa096 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.35;
}

body.page-forummanage #outer table td,
body.page-moforums #outer table td {
    border-color: rgba(220, 227, 236, 0.62) !important;
}

body.page-forummanage #outer input[type="text"],
body.page-forummanage #outer select,
body.page-moforums #outer input[type="text"],
body.page-moforums #outer select {
    box-sizing: border-box;
    min-height: 30px;
    max-width: 100%;
    padding: 4px 10px;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #4f4438;
    outline: none;
}

/* ============================================================
 * 新版撰写表单（newtopic / reply / quotepost / editpost）
 *
 * 与 .forum-compose 容器搭配，去除老 begin_frame 的"新撰写"橙条；
 * 内部彻底放弃 <table class="main"> + rowhead/rowfollow 双列布局，
 * 改用纯 div 字段堆叠（label 在上，控件在下），消除：
 *   - 左侧 148px "两字标签列"对横向空间的浪费
 *   - colspan 行（选项 / 提交）与上方左对齐错位 ~150px
 *   - "卡片包旧表格再包卡片"的视觉嵌套混乱
 * ============================================================ */

body.page-forums .forum-compose__hero {
    /* 与 .forum-viewtopic-hero 同一身段：crumbs → title → meta 三段纵向堆叠，
       padding 收紧至 16/20/14 与 viewtopic 完全对齐，避免轻顶重脚。 */
    display: block;
    margin: 0 0 14px;
    padding: 16px 20px 14px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(252, 250, 247, 0.86), rgba(248, 250, 252, 0.72));
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
    text-align: left;
}

/* 顶部面包屑：与 viewtopic .forum-viewtopic-crumbs 字号/色系完全统一 */
body.page-forums .forum-compose__crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 12px;
    /* 与 viewtopic .forum-viewtopic-crumbs 完全对齐：同色系 + 同 0.02em 字距，
     * 否则两页面包屑虽然字号/粗细相同，仍会因 letter-spacing/配色不同而显得不一致。 */
    color: #7a6b56;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    min-width: 0;
}

body.page-forums .forum-compose__crumbs a {
    color: #5a4226 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

body.page-forums .forum-compose__crumbs a:hover {
    color: #a8540c !important;
    text-decoration: underline !important;
}

body.page-forums .forum-compose__crumbs span {
    color: #a89784;
}

/* 主标题：完全对齐 viewtopic（20px / 700 / 28px）。
   <h1> 与 body 上的 h1 默认规则会产生类型权重冲突，因此提高到
   body.page-forums h1.forum-compose__title 形式，确保 20px 始终生效。 */
body.page-forums h1.forum-compose__title,
body.page-forums .forum-compose__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    color: #2d2419;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: 0;
}

/* 标题左侧 3px 竖条：与 viewtopic 主题号 ★ 图标担当同一视觉锚点角色 */
body.page-forums .forum-compose__title::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

/* 标题前的 FA 行动图标（fa-pen-to-square / fa-reply / fa-pen 等）：
   小号、橙色，与标题文本基线对齐 */
body.page-forums .forum-compose__title-icon {
    color: #c78340;
    font-size: 15px;
    line-height: 1;
}

body.page-forums .forum-compose__title-text {
    color: inherit;
}

body.page-forums .forum-compose__title a,
body.page-forums .forum-compose__title span {
    color: inherit !important;
    text-decoration: none !important;
}

/* ------------------------------------------------------------
 * Hero meta 行：1:1 镜像 viewtopic-hero 的 .forum-viewtopic-meta
 * 结构：[icon + value + unit] × N + spacer + [action 按钮]
 * 顶部一条 dashed 分隔线把 meta 与 title 区分开，但不破坏卡片整体感
 * ------------------------------------------------------------ */
body.page-forums .forum-compose__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px dashed rgba(220, 227, 236, 0.66);
    color: #5a4a36;
    font-size: 12.5px;
    line-height: 1;
}

body.page-forums .forum-compose__meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #756f66;
    min-width: 0;
    max-width: 100%;
}

body.page-forums .forum-compose__meta__item b {
    font-weight: 700;
    color: #2d2419;
    /* 长主题名 / 长板块名时显示省略号，避免 meta 行被拉爆 */
    max-width: 38ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-forums .forum-compose__meta__icon {
    color: #9c9080;
    font-size: 11.5px;
    line-height: 1;
}

body.page-forums .forum-compose__meta__unit {
    color: #9c9080;
    font-size: 12px;
}

/* spacer 占满中间剩余空间，把 actions 推到最右侧（与 viewtopic 一致） */
body.page-forums .forum-compose__meta__spacer {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-forums .forum-compose__meta__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

/* meta 行右侧的"返回"按钮：复用 viewtopic "写回复" 按钮的小号 pill 视觉 */
body.page-forums .forum-compose__meta-action,
body.page-forums .forum-compose__meta__actions > a,
body.page-forums .forum-compose__meta__actions > button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 3px 12px;
    border: 1px solid rgba(199, 131, 64, 0.35);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 244, 228, 0.85), rgba(252, 232, 206, 0.78));
    color: #8a5518 !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(199, 131, 64, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

body.page-forums .forum-compose__meta-action:hover,
body.page-forums .forum-compose__meta__actions > a:hover,
body.page-forums .forum-compose__meta__actions > button:hover {
    background: linear-gradient(180deg, rgba(255, 235, 207, 0.95), rgba(248, 218, 178, 0.88));
    border-color: rgba(199, 131, 64, 0.55);
    color: #6e4111 !important;
}

body.page-forums .forum-compose__meta-action:active,
body.page-forums .forum-compose__meta__actions > a:active,
body.page-forums .forum-compose__meta__actions > button:active {
    transform: translateY(1px);
}

body.page-forums .forum-compose__meta-action i,
body.page-forums .forum-compose__meta__actions i {
    font-size: 11px;
    color: currentColor;
}

body.page-forums .forum-compose__card {
    margin: 0 0 12px;
    padding: 18px 20px 20px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(252, 250, 247, 0.78);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

/* ------------------------------------------------------------
 * 字段块容器：所有字段（主题/正文/选项/回帖条件 …）垂直堆叠，
 * 统一 gap 控制纵向节奏，彻底取代 <table class="main"> 双列布局
 * ------------------------------------------------------------ */
body.page-forums .forum-compose__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

body.page-forums .forum-compose__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* label 风格：小号、灰底色、字重加粗、轻微间距 —— 退到"辅助元素"位置，
   把视觉焦点交还给下面的输入控件。 */
body.page-forums .forum-compose__field-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #7c6953;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

/* 字段标签前的暖色竖条：和 hero 标题图标同一抹琥珀，给"主题/正文/选项/回帖条件"
 * 一个统一的小节标记，强化层次又不喧宾夺主。 */
body.page-forums .forum-compose__field-label::before {
    content: "";
    flex: 0 0 auto;
    width: 3px;
    height: 11px;
    border-radius: 2px;
    background: linear-gradient(180deg, #e3a85f, #c97f3f);
}

/* 字段控件区：默认透传，特定字段可单独控制 */
body.page-forums .forum-compose__field-control {
    min-width: 0;
}

/* 主题输入框：全宽自适应，覆盖任何遗留的 inline width: 650px。
   保留 max-width 让超宽屏幕下不至于一条横线过长难读。 */
body.page-forums .forum-compose__field--subject input.forum-compose__field-input {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #4f4438;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-forums .forum-compose__field--subject input.forum-compose__field-input:focus {
    border-color: rgba(199, 131, 64, 0.65);
    box-shadow: 0 0 0 3px rgba(199, 131, 64, 0.14);
}

/* ------------------------------------------------------------
 * 动作行（提交/预览 + 标签/表情帮助药丸）
 * 现代约定：主操作居左，辅助药丸居右；窄屏自动换行
 * ------------------------------------------------------------ */
body.page-forums .forum-compose__action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
    padding: 14px 0 2px;
    border-top: 1px dashed rgba(222, 210, 193, 0.55);
}

body.page-forums .forum-compose__buttons {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

body.page-forums .forum-compose__btn,
body.page-details .forum-admin-modal .forum-compose__btn,
body.page-forummanage .forum-compose__btn,
body.page-moforums .forum-compose__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 18px;
    border: 1px solid rgba(222, 210, 193, 0.84) !important;
    border-radius: 999px !important;
    background: rgba(255, 247, 235, 0.92) !important;
    color: #8a5518 !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-forums .forum-compose__btn:hover,
body.page-details .forum-admin-modal .forum-compose__btn:hover,
body.page-forummanage .forum-compose__btn:hover,
body.page-moforums .forum-compose__btn:hover {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
}

body.page-forums .forum-compose__btn--primary,
body.page-forummanage .forum-compose__btn--primary,
body.page-moforums .forum-compose__btn--primary {
    border-color: rgba(199, 131, 64, 0.7) !important;
    background: linear-gradient(135deg, rgba(244, 191, 138, 0.95), rgba(218, 158, 82, 0.88)) !important;
    color: #4a2c0a !important;
    box-shadow: 0 4px 10px rgba(199, 131, 64, 0.16);
}

body.page-forums .forum-compose__btn--primary:hover,
body.page-forummanage .forum-compose__btn--primary:hover,
body.page-moforums .forum-compose__btn--primary:hover {
    border-color: rgba(180, 116, 50, 0.85) !important;
    background: linear-gradient(135deg, rgba(245, 196, 145, 1), rgba(212, 149, 70, 1)) !important;
    color: #3a1f06 !important;
}

body.page-forums .forum-compose__help {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 0;
    line-height: 1.4;
}

body.page-forums .forum-compose__help-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px 3px 8px;
    border: 1px solid rgba(222, 210, 193, 0.65) !important;
    border-radius: 999px !important;
    background: rgba(255, 251, 243, 0.7) !important;
    color: #8a5518 !important;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.16s ease, background-color 0.16s ease,
                border-color 0.16s ease, box-shadow 0.16s ease,
                transform 0.16s ease;
}

body.page-forums .forum-compose__help-pill:hover {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff4e1 !important;
    color: #7a572d !important;
    box-shadow: 0 2px 6px rgba(199, 131, 64, 0.12);
    transform: translateY(-1px);
}

body.page-forums .forum-compose__help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(244, 191, 138, 0.42);
    color: #7a572d;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

body.page-forums .forum-compose__help-pill:hover .forum-compose__help-icon {
    background: rgba(244, 191, 138, 0.72);
    color: #4a2c0a;
}

body.page-forums .forum-compose__help-text {
    white-space: nowrap;
}

/* ----------------------------------------------------------------
 * 正文 BBCode 编辑器布局修复
 *
 * 历史原因：textbbcode() 把 <textarea> 与"快捷表情面板"放在同一行
 * 的两个 <td> 内（左 td: textarea style="width:650px"，右 td: 4×8 表情格）；
 * 工具栏单独是另一行，内部嵌套一张不允许换行的按钮 <table>。
 *
 * 新版重排（无 JS）：把所有 tr/td 改成 block，让 textarea 占满全宽，
 * 表情面板用 flex-wrap 横排在 textarea 下方居中，工具栏改为 flex-wrap
 * 多行而非横向滚动，从根上消除"工具栏溢出"问题。
 * ---------------------------------------------------------------- */

/* editor 外壳：让内部 table 整体退化为块级布局 */
body.page-forums .forum-compose__card #editorouter > table,
body.page-forums .forum-compose__card #editorouter > table > tbody {
    display: block;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr,
body.page-forums .forum-compose__card #editorouter > table > tr {
    display: block;
    width: 100% !important;
    margin: 0;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:last-child,
body.page-forums .forum-compose__card #editorouter > table > tr:last-child {
    margin-bottom: 0;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr > td,
body.page-forums .forum-compose__card #editorouter > table > tr > td {
    display: block;
    width: 100% !important;
    padding: 0 !important;
    text-align: left !important;
    /* 主题 theme.css 里有一条 `td { border: 1px solid #ccc }` 全局规则，
     * 会让工具栏 td 和 textarea td 在编辑器内部画出两个灰色方角外框，
     * 与新版圆角卡片视觉冲突。这里整体 reset，让所有装饰回归子元素
     * （textarea 自带 10px 圆角描边、工具栏 tr 自带 7px 暖色 chip 容器） */
    border: 0 !important;
    background: transparent !important;
}

/* 嵌套层：工具栏内部的 chip <table>/<tbody>/<tr>/<td.embedded> 也都来自
 * 同样的 td { border: 1px #ccc } 规则。chip 自己已经有圆角 + 边框 +
 * 背景了，再叠一层方角灰描边会形成"方框包圆角"的双层视觉。统一关掉。 */
body.page-forums .forum-compose__card #editorouter table,
body.page-forums .forum-compose__card #editorouter td {
    border: 0 !important;
}

/* ----- 工具栏：flex-wrap 多行，按钮自然换行而非溢出/横向滚动 ----- */
body.page-forums .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table,
body.page-forums .forum-compose__card #editorouter > table > tr:not(:has(> td > textarea.bbcode)) > td > table,
body.page-forums .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr,
body.page-forums .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* 底色/描边/box-shadow/padding/gap 与 .forum-quick-reply__bbtoolbar 完全一致 */
    gap: 5px;
    box-sizing: border-box;
    width: 100%;
    padding: 8px 11px 7px;
    border: 1px solid rgba(220, 210, 196, 0.46);
    border-radius: 10px 10px 0 0;
    background: rgba(255, 252, 247, 0.54);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
    overflow: visible;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

/* textarea 聚焦时高亮工具栏，行为与 .forum-quick-reply__body:focus-within 一致 */
body.page-forums .forum-compose__card #editorouter:focus-within > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr,
body.page-forums .forum-compose__card #editorouter:focus-within > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr {
    border-color: rgba(202, 145, 83, 0.52);
    background: rgba(255, 249, 240, 0.72);
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr > td.embedded,
body.page-forums .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr > td.embedded {
    display: inline-flex;
    align-items: center;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* --------------------------------------------------------------------
 * 工具栏按钮：1:1 镜像 .forum-quick-reply__bbtoolbar 的 chip 视觉
 *
 * 设计差异 vs 旧版"pill + 文字"：
 *   - 旧版每个按钮都是 "圆角 pill + 文字 label"，整条工具栏被文字撑得
 *     很宽，和快回工具栏 "迷你图标 + 悬浮 tooltip" 风格差异明显。
 *   - 新版：B/I/U/S 是 28×26 文字 chip（保留字母 + 格式样式），其余
 *     action 按钮一律是 28×28 纯图标 chip，hover 时浅黄高亮，悬浮显示
 *     深色 tooltip。和 viewtopic 快回完全同款。
 *
 * 技术细节：
 *   - `<input type="button">` 不响应 ::before / ::after（被浏览器当作
 *     替换元素），因此所有 icon / tooltip 都挂在父级 `<td.embedded>` 上，
 *     用 `:has(input[name="X"])` 精确选中每一类按钮，再绝对定位覆盖。
 *   - 图标层 pointer-events:none，click 仍穿透到 input，sav 旧 JS
 *     (simpletag / tag_url / tag_image / closeall 等) 完全无感。
 *   - "Close all tags"（name="tagcount"）value 由 JS 动态改写，因此保留
 *     文字 chip（自适应宽度），不做 icon-only 转换。
 * -------------------------------------------------------------------- */

/* 1) 按钮槽位：所有 td.embedded（仅含 input[type=button] 的）改为 chip 容器 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[type="button"]) {
    position: relative !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #655647 !important;
    overflow: visible !important;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease !important;
}

/* 1.1) 图标按钮 hover：浅黄背景 + 暖棕字色（对应 .forum-quick-reply__bbbtn:hover） */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="center"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="url"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="list"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="quote"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="code"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="hide"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"]):hover {
    background: rgba(255, 238, 216, 0.82) !important;
    color: #8a5518 !important;
}

/* 1.2) B/I/U/S 文字 chip：与图标按钮完全同规格（28×28 / 7px / 透明底 / hover 浅黄），
 *      只靠字母字形（粗/斜/下划线/删除线）区分，避免"带框小方块 vs 裸图标"的大小不一。 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="b"]),
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="i"]),
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="u"]),
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="s"]) {
    width: 28px !important;
    height: 28px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #655647 !important;
}

body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="b"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="i"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="u"]):hover,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="s"]):hover {
    background: rgba(255, 238, 216, 0.82) !important;
    color: #8a5518 !important;
}

/* 2) input 本体：撑满 td、去除老 3D 边框、文字承袭 td 的格式 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[type="button"]) > input[type="button"] {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background: transparent !important;
    color: inherit !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* 2.1) B/I/U/S：统一字号(14px)+字重(700)，逼近 14.5px 图标的视觉重量，消除"字母组 vs
 *      图标组"以及"B 比 I/U/S 更粗"的大小/粗细不一致；斜体/下划线/删除线只做形态区分。 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="b"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="i"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="u"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="s"]) > input {
    font-size: 16px !important;
    font-weight: 700 !important;
}
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="i"]) > input { font-style: italic !important; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="u"]) > input { text-decoration: underline !important; text-decoration-thickness: 1.5px !important; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="s"]) > input { text-decoration: line-through !important; text-decoration-thickness: 1.5px !important; }

/* 2.2) 图标按钮：把 value 文字（URL / IMG / List…）隐藏，让 ::before icon 上场 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="center"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="url"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="list"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="quote"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="code"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="hide"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"]) > input,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"]) > input {
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

/* 3) FA 5 Pro Solid 图标层：绝对定位居中、click 穿透到 input */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="center"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="url"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="list"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="quote"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="code"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="hide"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"])::before,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"])::before {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
    font-style: normal;
    font-size: 12.5px;
    line-height: 1;
    color: inherit;
    pointer-events: none;
}

/* 各 action 按钮的 FA codepoint（与快回的 quote / code / hide / url / img 一致） */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="center"])::before      { content: "\f037"; }   /* align-center */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="url"])::before         { content: "\f0c1"; }   /* link        */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"])::before         { content: "\f03e"; }   /* image       */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="list"])::before        { content: "\f03a"; }   /* list        */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="quote"])::before       { content: "\f10e"; }   /* quote-right */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="code"])::before        { content: "\f121"; }   /* code        */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="hide"])::before        { content: "\f070"; }   /* eye-slash   */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"])::before   { content: "\f15c"; }   /* file-alt    */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"])::before { content: "\f118"; }   /* smile        */

/* 4) Tooltip ::after：和 .forum-quick-reply__bbbtn::after 完全同款 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[type="button"])::after {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(2px);
    padding: 5px 9px;
    background: rgba(35, 28, 20, 0.92);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 40;
}

body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[type="button"]):hover::after,
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[type="button"]):focus-within::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* tooltip 文案 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="b"])::after         { content: "粗体"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="i"])::after         { content: "斜体"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="u"])::after         { content: "下划线"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="s"])::after         { content: "删除线"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="center"])::after    { content: "居中"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="url"])::after       { content: "链接"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"])::after       { content: "图片"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="list"])::after      { content: "列表"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="quote"])::after     { content: "引用"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="code"])::after      { content: "代码"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="hide"])::after      { content: "隐藏内容"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"])::after { content: "Mediainfo"; }
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"])::after  { content: "关闭所有标签"; }

/* 5) "Close all tags"（tagcount）：与其余按钮统一为 X-circle 图标 chip
 *    （value 文字由 JS 动态改写，这里隐藏文字只留图标 + ::after tooltip）。
 *    快回 / 发新帖 / 回复 / 编辑 共用同一外观；tooltip 文案见上方 9293 行。 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"]) {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #655647 !important;
}

body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"]) > input {
    padding: 0 !important;
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    line-height: 1 !important;
    overflow: hidden !important;
}

body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"])::before {
    content: "\f057";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 12.5px;
    line-height: 1;
    color: inherit;
    pointer-events: none;
}

body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"]):hover {
    border: 0 !important;
    background: rgba(255, 238, 216, 0.82) !important;
    color: #8a5518 !important;
}

/* 6) compose 页所有 <select> 统一改为 "主题管理（forum-viewtopic-admin__form）" 同款
 *    chevron pill 样式：1:1 复刻 .forum-viewtopic-admin__form select。
 *
 *    覆盖范围（所有页面上能见到的下拉）：
 *      a) BBCode 工具栏：color / font / size（.codebuttons）
 *      b) 回帖条件 builder：
 *         - 根/嵌套条件组的 "且/或" logic select（无 class，在 .topic-reply-rule-main 内）
 *         - 字段 select（.topic-reply-field-select）
 *         - 运算符 select（.topic-reply-operator-select）
 *         - 枚举值 select（在 .topic-reply-condition 内，无 class）
 *
 *    设计点：
 *      - appearance:none 移除浏览器原生箭头，自绘三角形 chevron（两条 45/135 度渐变）
 *      - 26px 高度 / pill 圆角 / 半透明白底 / 暖灰文字
 *      - hover/focus：边框转暖橙 + 极淡橙色光晕，和 .forum-viewtopic-admin__form select:focus 完全同款
 */

/* 6.0) 工具栏 color/font/size 下拉槽位（td.embedded）：现在装的是 ui-dropdown
 *      组件（与"主题管理"置顶/颜色下拉同款），槽位不做 chip 约束，让 dropdown
 *      自由展开。
 *      order:1 把三个下拉浮到工具栏末尾，使表情按钮（DOM 在下拉之后、order:0）
 *      回到左侧图标群里，避免表情按钮被三个下拉隔开后孤零零地落在最右端。 */
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card #editorouter td.embedded:has(> .ui-dropdown) {
    width: auto !important;
    min-width: 0 !important;
    height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    order: 1 !important;
}

/* 6.0b) 三个下拉 trigger：plain 变体 —— 只展示"文字 + ▾"，始终无边框、无底色，
 *       和左侧无边框的图标字形同一种"裸控件"语言。高度 24px、去竖直 padding。
 *       hover/focus 不加任何底色，仅文字转暖棕色作为可点提示，且不做 plain 默认的
 *       translateY 位移，保持与图标行基线对齐。 */
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card #editorouter .forum-compose__toolbar-dd .ui-dropdown-trigger {
    min-height: 24px !important;
    height: 24px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /* 裸控件无边框/无底色，左右大留白纯属浪费且会把三个下拉撑得过开；
     * 收到 6px，让"颜色/字体/字号"之间维持紧凑的视觉分组节奏。 */
    padding-left: 6px !important;
    padding-right: 6px !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    /* trigger 本身是 <button>，发新帖页用 ui-dropdown 基线（11px/650），快回页则被
     * .forum-quick-reply button 的 pill 规则染成 12px/700/#8a5518。统一取"大字版"，
     * 两页都钉成 12px/700/#8a5518，保持完全一致。 */
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #8a5518 !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card #editorouter .forum-compose__toolbar-dd:hover .ui-dropdown-trigger,
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card #editorouter .forum-compose__toolbar-dd:focus-within .ui-dropdown-trigger,
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card #editorouter .forum-compose__toolbar-dd .ui-dropdown-trigger:hover,
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card #editorouter .forum-compose__toolbar-dd .ui-dropdown-trigger:focus {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #7a572d !important;
    transform: none !important;
}

/* ------------------------------------------------------------------
 * ui-dropdown 浮层：论坛页暖化覆盖
 *   render_dropdown_form() 给浮层挂了全站约定类 .ddsubmenustyle，拿到的是
 *   冷蓝灰描边 + 冷投影（rgba(220,227,236) / rgba(49,66,96)，与首页 .index-card
 *   冷色卡同源）。这在已整体暖化的论坛页显得突兀。
 *   这里只在 body.page-forums 范围内、且只命中我们组件的 .ui-dropdown-list，
 *   把描边/投影换成暖棕族 —— 一次性覆盖工具栏(颜色/字体/字号)与主题管理(置顶颜色/
 *   置顶级别/移动板块)的所有浮层，但不影响主导航的 .ddsubmenustyle 冷色菜单。
 * ------------------------------------------------------------------ */
body.page-forums .ui-dropdown-list {
    border-color: rgba(226, 210, 188, 0.95) !important;
    box-shadow:
        0 14px 32px rgba(157, 103, 42, 0.13),
        0 4px 10px rgba(157, 103, 42, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

/* 6.1) compose 页全部 select 的统一 pill 视觉 */
body.page-forums .forum-compose__card select,
body.page-forums .forum-compose__card #editorouter select.codebuttons,
body.page-forums .forum-compose__card .topic-reply-rule-main select,
body.page-forums .forum-compose__card .topic-reply-condition select,
body.page-forums .forum-compose__card .topic-reply-field-select,
body.page-forums .forum-compose__card .topic-reply-operator-select {
    box-sizing: border-box !important;
    margin: 0 !important;
    min-height: 24px !important;
    height: 24px !important;
    /* 对齐工具栏 ui-dropdown trigger：裸控件无边框/无底色，只留右侧给 chevron。 */
    padding: 0 18px 0 6px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background-color: transparent !important;
    /* 同工具栏"颜色/字体/字号"：11px / 700 / 暖棕 #8a5518。 */
    color: #8a5518 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    outline: none !important;
    cursor: pointer !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    /* 自绘 chevron：两条对角渐变拼出一个朝下的小三角，染成与文字同族的暖棕。 */
    background-image: linear-gradient(45deg, transparent 50%, #b07e36 50%),
                      linear-gradient(135deg, #b07e36 50%, transparent 50%) !important;
    background-position: calc(100% - 10px) 9px, calc(100% - 5px) 9px !important;
    background-repeat: no-repeat, no-repeat !important;
    background-size: 5px 5px, 5px 5px !important;
    transition: color 0.16s ease, background-image 0.16s ease !important;
}

/* 6.2) 工具栏 color / font / size 三个下拉统一固定宽度，保证三者大小一致，
 *      不再随选项文字长短各自拉宽。 */
body.page-forums .forum-compose__card #editorouter select.codebuttons {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

/* 6.3) 回帖条件 builder 内 select 的内置最小宽度，复用旧版语义 */
body.page-forums .forum-compose__card .topic-reply-field-select { min-width: 130px !important; }
body.page-forums .forum-compose__card .topic-reply-operator-select { min-width: 64px !important; }
body.page-forums .forum-compose__card .topic-reply-condition select { max-width: 220px !important; }
/* "且/或" 紧凑：裸控件下让箭头紧贴文字（对齐工具栏 trigger 的 hug-content 效果），
 *  不再用 58px 固定宽撑出大空档。 */
body.page-forums .forum-compose__card .topic-reply-rule-main select { min-width: 0 !important; }

/* 6.4) hover / focus：边框转暖橙 + 极淡橙光晕，和主题管理完全同款 */
body.page-forums .forum-compose__card select:hover,
body.page-forums .forum-compose__card #editorouter select.codebuttons:hover,
body.page-forums .forum-compose__card .topic-reply-rule-main select:hover,
body.page-forums .forum-compose__card .topic-reply-condition select:hover {
    border-color: rgba(202, 145, 83, 0.6) !important;
    background-color: rgba(255, 252, 247, 0.94) !important;
}

body.page-forums .forum-compose__card select:focus,
body.page-forums .forum-compose__card #editorouter select.codebuttons:focus,
body.page-forums .forum-compose__card .topic-reply-rule-main select:focus,
body.page-forums .forum-compose__card .topic-reply-condition select:focus {
    border-color: rgba(202, 145, 83, 0.74) !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 0 0 3px rgba(227, 160, 108, 0.12) !important;
}

/* 6.5) 条件 builder 内的 select：对齐工具栏 ui-dropdown trigger 的 hover/focus —
 *      只做"文字转更深暖棕 + chevron 同步加深"，不要边框/底色/光晕（裸控件效果）。
 *      比上面的通用 select:hover/:focus 更具体且更靠后，故覆盖之。 */
body.page-forums .forum-compose__card .topic-reply-rule-main select:hover,
body.page-forums .forum-compose__card .topic-reply-condition select:hover,
body.page-forums .forum-compose__card .topic-reply-field-select:hover,
body.page-forums .forum-compose__card .topic-reply-operator-select:hover,
body.page-forums .forum-compose__card .topic-reply-rule-main select:focus,
body.page-forums .forum-compose__card .topic-reply-condition select:focus,
body.page-forums .forum-compose__card .topic-reply-field-select:focus,
body.page-forums .forum-compose__card .topic-reply-operator-select:focus {
    border-color: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #7a572d !important;
    background-image: linear-gradient(45deg, transparent 50%, #8a5518 50%),
                      linear-gradient(135deg, #8a5518 50%, transparent 50%) !important;
}

/* 6.6) 条件 builder 的 select 被 common.js 皮肤化成 ui-dropdown 组件后（为了让
 *      展开的浮层也跟工具栏"颜色/字体/字号"一致——原生 select 弹层无法 CSS 化），
 *      这里把它的 trigger 对齐工具栏 .forum-compose__toolbar-dd：裸控件、11px/700/
 *      暖棕 #8a5518、暖棕 caret，hover/focus 仅文字转深、无底色/无位移。
 *      浮层本身复用 body.page-forums .ui-dropdown-list 的暖化覆盖，自动一致。 */
body.page-forums .forum-compose__card .forum-compose__cond-dd {
    vertical-align: middle;
}
body.page-forums .forum-compose__card .forum-compose__cond-dd .ui-dropdown-trigger {
    min-height: 24px;
    padding: 0 4px 0 6px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #8a5518;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    transform: none;
}
body.page-forums .forum-compose__card .forum-compose__cond-dd .ui-dropdown-trigger::after {
    margin-left: 5px;
    color: #b07e36;
    transform: translateY(1px);
}
body.page-forums .forum-compose__card .forum-compose__cond-dd:hover .ui-dropdown-trigger,
body.page-forums .forum-compose__card .forum-compose__cond-dd:focus-within .ui-dropdown-trigger,
body.page-forums .forum-compose__card .forum-compose__cond-dd .ui-dropdown-trigger:hover,
body.page-forums .forum-compose__card .forum-compose__cond-dd .ui-dropdown-trigger:focus {
    color: #7a572d;
    background: transparent;
    box-shadow: none;
    transform: none;
}
body.page-forums .forum-compose__card .forum-compose__cond-dd:hover .ui-dropdown-trigger::after,
body.page-forums .forum-compose__card .forum-compose__cond-dd:focus-within .ui-dropdown-trigger::after {
    color: #8a5518;
}

/* 7) 工具栏按钮间距：全部交给 flex 容器的 gap:5px 统一控制，不再为
 *    center / url / quote / tagcount / select / emoji 追加 margin-left，
 *    避免出现 5px / 10px 交替的不均匀间距。 */

/* ----- textarea + 表情：textarea 上、表情面板下，居中可换行 ----- */
body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode),
body.page-forums .forum-compose__card #editorouter > table > tr:has(> td > textarea.bbcode) {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

/* textarea：自适应满宽，覆盖 inline style="width:650px;" */
body.page-forums .forum-compose__card #editorouter textarea.bbcode {
    width: 100% !important;
    box-sizing: border-box;
    min-height: 180px;
    height: 220px !important;
    padding: 11px 13px;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 0 0 10px 10px;
    background: rgba(255, 255, 255, 0.94);
    color: #4f4438;
    font-size: 13px;
    line-height: 1.65;
    outline: none;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-forums .forum-compose__card #editorouter textarea.bbcode:focus {
    border-color: rgba(199, 131, 64, 0.65);
    box-shadow: 0 0 0 3px rgba(199, 131, 64, 0.14);
}

/* 表情面板：把内嵌的 table 拍扁，所有表情 flex-wrap 排成一条宽行，
   彻底告别"窄列贴在 textarea 下方"的尴尬 4 列布局 */
body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-forums .forum-compose__card #editorouter > table > tr:has(> td > textarea.bbcode) > td:last-child {
    box-sizing: border-box;
    text-align: center !important;
    padding: 10px 12px !important;
    border: 1px dashed rgba(222, 210, 193, 0.55);
    border-radius: 10px;
    background: rgba(252, 248, 240, 0.42);
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child > table,
body.page-forums .forum-compose__card #editorouter > table > tr:has(> td > textarea.bbcode) > td:last-child > table {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* tbody 变成横向 flex-wrap 容器，所有 32 个 emoji 整体流动；
   tr 用 display: contents 让自己"消失"，把 td 直接交给 tbody。 */
body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child > table > tbody,
body.page-forums .forum-compose__card #editorouter > table > tr:has(> td > textarea.bbcode) > td:last-child > table > tbody {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child > table > tbody > tr,
body.page-forums .forum-compose__card #editorouter > table > tr:has(> td > textarea.bbcode) > td:last-child > table > tr {
    display: contents !important;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child > table td.embedded {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child img {
    display: block;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child a {
    color: #8a5518;
    font-size: 11.5px;
    text-decoration: none;
}

body.page-forums .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child a:hover {
    color: #6e4111;
    text-decoration: underline;
}

/* ----------------------------------------------------------------
 * P5 表情面板"折叠 + 工具栏 toggle"——对齐 viewtopic 快速回复
 *
 * 行为：表情面板默认折叠（display:none），工具栏右侧加 emoji 笑脸 chip，
 *      点击后 #editorouter 上添加 is-emoji-open，面板才显示，并以暖色 dashed
 *      边框 + 浅橙背景出现，视觉与 .forum-quick-reply--emoji-open 完全同款。
 *
 * 与 viewtopic quick-reply 的差异：
 *   - 这里没有 .forum-quick-reply__bbbtn--emoji 那种 <a> 链接 chip，而是把
 *     toggle 注入到老 textbbcode 的 input[type=button] chip 体系里
 *     （input[name="_emojitoggle"]），所以共享既有的 28x28 圆角 chip 样式
 *     + ::before icon + ::after tooltip + hover/active。
 *   - 表情面板 td 还保留在 textarea 的同一 <tr> 里（已被 :has flex-column
 *     重排为 textarea 下方），切换只是控制其 display。
 * ---------------------------------------------------------------- */

/* 1) 默认折叠：未展开时直接 display:none，避免占用空间 */
body.page-forums .forum-compose__card #editorouter:not(.is-emoji-open)
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-forums .forum-compose__card #editorouter:not(.is-emoji-open)
    > table > tr:has(> td > textarea.bbcode) > td:last-child {
    display: none !important;
}

/* 2) 展开后：暖色 dashed 边框 + 浅橙背景（与 .forum-quick-reply--emoji-open 同源） */
body.page-forums .forum-compose__card #editorouter.is-emoji-open
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-forums .forum-compose__card #editorouter.is-emoji-open
    > table > tr:has(> td > textarea.bbcode) > td:last-child {
    margin-top: 4px !important;
    padding: 8px 10px !important;
    border: 1px dashed rgba(218, 150, 70, 0.45) !important;
    border-radius: 10px !important;
    background: rgba(255, 250, 244, 0.78) !important;
    animation: forum-compose-emoji-pop 0.18s ease-out;
}

@keyframes forum-compose-emoji-pop {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 3) 折叠态把"更多表情"链接挪进折叠面板里，并改为暖色 chip 风格。
 *    注意 :not(:has(img))：每个表情本身也是 <a><img></a>，若不排除，emoji
 *    会被这条 pill 规则包成胶囊按钮。这里只命中纯文字的"更多表情"链接。 */
body.page-forums .forum-compose__card #editorouter.is-emoji-open
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child a:not(:has(img)) {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 3px 11px;
    border: 1px solid rgba(218, 150, 70, 0.42);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.86);
    color: #8a5518 !important;
    font-size: 11px;
    line-height: 1.4;
    text-decoration: none !important;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

body.page-forums .forum-compose__card #editorouter.is-emoji-open
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child a:not(:has(img)):hover {
    border-color: rgba(202, 145, 83, 0.6);
    background: #fff5e6;
    color: #6e4111 !important;
}

/* 4) emoji toggle chip 语义补充：
 *    底层 28×28 chip / hide-text / FA 笑脸 ::before 已经在上面 (1.x / 2.2 / 3) 的
 *    名字列表里登记了 input[name="_emojitoggle"]，所以这里只补：
 *      - ::after tooltip 文案
 *      - .is-active 展开态高亮（同 .forum-quick-reply__bbbtn--emoji.is-active 配色）
 *    （间距统一由工具栏 flex gap:5px 控制，不再追加 margin-left）
 */
body.page-forums .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"])::after {
    content: "表情";
}

body.page-forums .forum-compose__card #editorouter td.embedded.is-active:has(> input[name="_emojitoggle"]) {
    border-color: rgba(218, 150, 70, 0.62) !important;
    background: rgba(255, 241, 222, 0.86) !important;
    color: #a86a1f !important;
}

body.page-forums .forum-compose__card #editorouter td.embedded.is-active:has(> input[name="_emojitoggle"])::before {
    color: #a86a1f !important;
}

/* 5) "更多表情"：面板内就地展开/收起（取代旧 moresmilies.php 独立弹窗）。
 *    button 沿用上面"更多表情"链接的暖色 chip；展开后在面板内出现全部其余表情的
 *    可滚动网格。emojiTd 上由 JS 切换 .is-allemoji-open。 */
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 3px 11px;
    border: 1px solid rgba(218, 150, 70, 0.42);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.86);
    color: #8a5518;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-more:hover {
    border-color: rgba(202, 145, 83, 0.6);
    background: #fff5e6;
    color: #6e4111;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-more::after {
    content: "\25BE";
    font-size: 0.85em;
    line-height: 1;
    transition: transform 0.18s ease;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel.is-allemoji-open .forum-compose__emoji-more::after {
    transform: rotate(180deg);
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel > table {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel > table > tbody {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel > table > tbody > tr {
    display: contents !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel > table td.embedded {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 2px !important;
    border: 0 !important;
    border-radius: 6px;
    background: transparent !important;
    transition: background-color 0.12s ease;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel > table td.embedded:hover {
    background: rgba(255, 235, 207, 0.75) !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel img {
    display: block;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-all {
    display: none;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-panel.is-allemoji-open .forum-compose__emoji-all {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-height: 200px;
    margin-top: 8px;
    padding-top: 8px;
    overflow-y: auto;
    border-top: 1px dashed rgba(218, 150, 70, 0.3);
    animation: forum-compose-emoji-pop 0.18s ease-out;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-all::-webkit-scrollbar {
    width: 8px;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-all::-webkit-scrollbar-thumb {
    background: rgba(202, 145, 83, 0.45);
    border-radius: 999px;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-all::-webkit-scrollbar-track {
    background: transparent;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-all a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 6px;
    line-height: 0;
    transition: background-color 0.12s ease;
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-all a:hover {
    background: rgba(255, 235, 207, 0.75);
}
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload) .forum-compose__card .forum-compose__emoji-all img {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* 公共 BBCode 图标按钮：由 textbbcode() 的公共脚本给旧 input 包一层语义化类。 */
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon {
    position: relative !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #655647 !important;
    overflow: visible !important;
    transition: background 0.16s ease, color 0.16s ease !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon:hover,
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon.is-active {
    background: rgba(255, 238, 216, 0.82) !important;
    color: #8a5518 !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon > input[type="button"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
    opacity: 0 !important;
    text-indent: -9999px !important;
    cursor: pointer !important;
    z-index: 2 !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon::before {
    content: none !important;
    display: none !important;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter .forum-compose__bbcode-icon-glyph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 12.5px;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon::after {
    content: attr(data-bbcode-label) !important;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(2px);
    padding: 5px 9px;
    border-radius: 6px;
    background: rgba(35, 28, 20, 0.92);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 40;
}

:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon:hover::after,
:is(body.page-forums, body.page-details, body.page-comment, body.page-upload)
    .forum-compose__card #editorouter td.embedded.forum-compose__bbcode-icon:focus-within::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------------------------------------------------------------------------
 * comment.php 独立评论编辑页
 * 复用 forum_compose_start() 的结构，但页面 body 是 .page-comment，不应套用
 * 整个 .page-forums。这里仅补齐评论编辑器需要的 hero/card/editor 样式。
 * ------------------------------------------------------------------------- */
body.page-comment .forum-compose {
    box-sizing: border-box;
    width: auto;
    max-width: none;
    margin: 0 calc(var(--site-content-inline-gap, 26px) * 2) 18px;
    padding: 0;
    border: 0;
    background: transparent;
}

body.page-comment .forum-compose > form {
    margin: 0;
}

body.page-comment .forum-compose__hero {
    display: block;
    margin: 0 0 14px;
    padding: 16px 20px 14px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(252, 250, 247, 0.86), rgba(248, 250, 252, 0.72));
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow:
        0 8px 20px rgba(49, 66, 96, 0.045),
        0 2px 6px rgba(49, 66, 96, 0.025);
    text-align: left;
}

body.page-comment .forum-compose__crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 12px;
    color: #7a6b56;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

body.page-comment .forum-compose__crumbs a {
    color: #5a4226 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

body.page-comment .forum-compose__crumbs a:hover {
    color: #a8540c !important;
    text-decoration: underline !important;
}

body.page-comment .forum-compose__crumbs span {
    color: #a89784;
}

body.page-comment h1.forum-compose__title,
body.page-comment .forum-compose__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    color: #2d2419;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: 0;
}

body.page-comment .forum-compose__title::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

body.page-comment .forum-compose__title-icon {
    color: #c78340;
    font-size: 15px;
    line-height: 1;
}

body.page-comment .forum-compose__title a,
body.page-comment .forum-compose__title span {
    color: inherit !important;
    text-decoration: none !important;
}

body.page-comment .forum-compose__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px dashed rgba(220, 227, 236, 0.66);
    color: #5a4a36;
    font-size: 12.5px;
    line-height: 1;
}

body.page-comment .forum-compose__meta__spacer {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-comment .forum-compose__meta__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

body.page-comment .forum-compose__meta-action,
body.page-comment .forum-compose__meta__actions > a,
body.page-comment .forum-compose__meta__actions > button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 3px 12px;
    border: 1px solid rgba(199, 131, 64, 0.35);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 244, 228, 0.85), rgba(252, 232, 206, 0.78));
    color: #8a5518 !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(199, 131, 64, 0.08);
}

body.page-comment .forum-compose__card {
    margin: 0 0 12px;
    padding: 18px 20px 20px;
    border: 0 !important;
    border-radius: 16px;
    background: rgba(255, 253, 250, 0.95);
    box-shadow:
        0 1px 2px rgba(45, 36, 25, 0.035),
        0 8px 22px rgba(45, 36, 25, 0.045);
}

body.page-comment .forum-compose__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(100%, 1100px);
    margin: 0 auto;
    min-width: 0;
}

body.page-comment .forum-compose__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

body.page-comment .forum-compose__field-label {
    color: #7e6f60;
    font-size: 12px;
    font-weight: 700;
}

body.page-comment .forum-compose__editor,
body.page-comment #editorouter {
    box-sizing: border-box;
    width: 100%;
}

body.page-comment .forum-compose__card #editorouter > table,
body.page-comment .forum-compose__card #editorouter > table > tbody {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.page-comment .forum-compose__card #editorouter > table > tbody > tr,
body.page-comment .forum-compose__card #editorouter > table > tr {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

body.page-comment .forum-compose__card #editorouter > table > tbody > tr > td,
body.page-comment .forum-compose__card #editorouter > table > tr > td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
}

body.page-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table,
body.page-comment .forum-compose__card #editorouter > table > tr:not(:has(> td > textarea.bbcode)) > td > table,
body.page-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

body.page-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr,
body.page-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 8px 11px 7px !important;
    border: 1px solid rgba(220, 210, 196, 0.46) !important;
    border-radius: 10px 10px 0 0 !important;
    background: rgba(255, 252, 247, 0.54) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset !important;
    overflow: visible !important;
}

body.page-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tbody > tr > td.embedded,
body.page-comment .forum-compose__card #editorouter > table > tbody > tr:not(:has(> td > textarea.bbcode)) > td > table > tr > td.embedded {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-comment .forum-compose__card #editorouter > table > tbody > tr:has(> td > textarea.bbcode),
body.page-comment .forum-compose__card #editorouter > table > tr:has(> td > textarea.bbcode) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
}

body.page-comment .forum-compose__editor textarea.bbcode {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 180px;
    height: 220px !important;
    padding: 11px 13px;
    border: 1px solid rgba(202, 214, 228, 0.88);
    border-radius: 0 0 10px 10px;
    background: rgba(255, 255, 255, 0.94);
    color: #4f4438;
    font-size: 13px;
    line-height: 1.65;
    outline: none;
    resize: vertical;
}

body.page-comment .forum-compose__editor textarea.bbcode:focus {
    border-color: rgba(199, 131, 64, 0.65);
    box-shadow: 0 0 0 3px rgba(199, 131, 64, 0.14);
}

body.page-comment .forum-compose__card #editorouter:not(.is-emoji-open)
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-comment .forum-compose__card #editorouter:not(.is-emoji-open)
    > table > tr:has(> td > textarea.bbcode) > td:last-child {
    display: none !important;
}

body.page-comment .forum-compose__card #editorouter.is-emoji-open
    > table > tbody > tr:has(> td > textarea.bbcode) > td:last-child,
body.page-comment .forum-compose__card #editorouter.is-emoji-open
    > table > tr:has(> td > textarea.bbcode) > td:last-child {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin-top: 4px !important;
    padding: 8px 10px !important;
    border: 1px dashed rgba(218, 150, 70, 0.45) !important;
    border-radius: 10px !important;
    background: rgba(255, 250, 244, 0.78) !important;
    text-align: center !important;
    animation: forum-compose-emoji-pop 0.18s ease-out;
}

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[type="button"]) {
    position: relative !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #655647 !important;
    overflow: visible !important;
}

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[type="button"]):hover {
    background: rgba(255, 238, 216, 0.82) !important;
    color: #8a5518 !important;
}

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[type="button"]) > input {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="center"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="url"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="list"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="quote"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="code"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="hide"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"]) > input {
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="b"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="i"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="u"]) > input,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="s"]) > input {
    color: #4e3f31 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-indent: 0 !important;
}

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="i"]) > input { font-style: italic !important; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="u"]) > input { text-decoration: underline !important; text-decoration-thickness: 1.5px !important; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="s"]) > input { text-decoration: line-through !important; text-decoration-thickness: 1.5px !important; }

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="center"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="url"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="list"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="quote"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="code"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="hide"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"])::before,
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"])::before {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
    font-size: 12.5px;
    line-height: 1;
    color: inherit;
    pointer-events: none;
}

body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="center"])::before      { content: "\f037"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="url"])::before         { content: "\f0c1"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="IMG"])::before         { content: "\f03e"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="list"])::before        { content: "\f03a"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="quote"])::before       { content: "\f10e"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="code"])::before        { content: "\f121"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="hide"])::before        { content: "\f070"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="Mediainfo"])::before   { content: "\f15c"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="tagcount"])::before    { content: "\f057"; }
body.page-comment .forum-compose__card #editorouter td.embedded:has(> input[name="_emojitoggle"])::before { content: "\f118"; }

body.page-comment .forum-compose__card #editorouter td.embedded.is-active:has(> input[name="_emojitoggle"]) {
    background: rgba(255, 241, 222, 0.86) !important;
    color: #a86a1f !important;
}

body.page-comment .forum-compose__action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(220, 210, 196, 0.7);
}

body.page-comment .forum-compose__buttons,
body.page-comment .forum-compose__help {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

body.page-comment .forum-compose__btn,
body.page-comment .forum-compose__help-pill {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 18px;
    border: 1px solid rgba(222, 210, 193, 0.84);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.94);
    color: #8a5518 !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}

body.page-comment .forum-compose__btn--primary {
    border-color: rgba(202, 145, 83, 0.52);
    background: linear-gradient(180deg, rgba(255, 247, 235, 0.98), rgba(255, 239, 219, 0.96));
    color: #7a4d1b !important;
}

body.page-comment .forum-compose__toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

body.page-comment .forum-compose__toggle {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(220, 210, 196, 0.7);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

body.page-comment .forum-compose__toggle-input {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-content: center;
    width: 15px;
    height: 15px;
    margin: 1px 0 0;
    border: 1px solid rgba(199, 131, 64, 0.6);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
}

body.page-comment .forum-compose__toggle-input:checked {
    border-color: rgba(199, 131, 64, 0.95);
    background-color: #d8923f;
}

body.page-comment .forum-compose__toggle-input:checked::after {
    content: "";
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

body.page-comment .forum-compose__toggle-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

body.page-comment .forum-compose__toggle-label {
    color: #4a2c0a;
    font-size: 13px;
    font-weight: 700;
}

body.page-comment .forum-compose__toggle-hint {
    color: #8c7a68;
    font-size: 11.5px;
    line-height: 1.4;
}

/* ----------------------------------------------------------------
 * 回帖条件 builder 布局修复
 *
 * 历史问题：
 *   1. .topic-reply-requirements 自带 border / background / padding，
 *      在新版 .forum-compose__card 内部形成"卡中卡"视觉冗余；
 *   2. .topic-reply-rule-group-header 用 justify-content: space-between，
 *      在宽容器中被撑到满宽，"添加条件 / 添加条件组" 按钮飞到远处。
 *
 * 修复：彻底剥掉 builder 自身的卡片样式（边框/背景/内边距），让它直接
 * 嵌入字段块；同时限制最大宽度避免按钮飞出。
 * ---------------------------------------------------------------- */

body.page-forums .forum-compose__card .topic-reply-requirements {
    max-width: 760px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-compose__card .topic-reply-rule-group.depth-1 {
    margin: 0;
}

body.page-forums .forum-compose__card .topic-reply-rule-group-header {
    justify-content: flex-start !important;
    gap: 12px;
}

body.page-forums .forum-compose__card .topic-reply-rule-actions {
    margin-left: auto;
}

/* 覆盖旧 .topic-reply-requirements 那条全局 .forum-compose 规则的圆角描边，
   保留更具体的字段块视觉规则。 */
body.page-forums .forum-compose .topic-reply-requirements {
    border-color: transparent !important;
    background: transparent !important;
}

/* ----------------------------------------------------------------
 * 撰写表单选项行（匿名发帖 / 隐藏回帖 / 回帖通知 / 匿名回帖）
 * 新版结构：作为 .forum-compose__field 直接嵌入字段堆叠
 * ---------------------------------------------------------------- */

body.page-forums .forum-compose__toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

/* toggle 卡片：统一描边底色；选中态只改"勾选框颜色 + 极细微的左色条"，
   不再用整卡渐变高亮 —— 避免默认勾选的"回帖通知"视觉权重压过其他选项。 */
body.page-forums .forum-compose__toggle {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(220, 227, 236, 0.78);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

body.page-forums .forum-compose__toggle:hover {
    border-color: rgba(208, 186, 152, 0.85);
    background: rgba(255, 250, 242, 0.94);
}

body.page-forums .forum-compose__toggle.is-on,
body.page-forums .forum-compose__toggle:has(.forum-compose__toggle-input:checked) {
    border-color: rgba(199, 131, 64, 0.45);
    background: rgba(255, 251, 244, 0.96);
}

/* 自绘复选框：取代浏览器原生 checkbox（appearance:auto 只能靠 accent-color 染色，
 * 仍是系统默认外观）。这里 appearance:none 后画成暖色圆角小方框，选中时填暖色渐变 +
 * 白色对勾，和全站暖色控件语言一致。 */
body.page-forums .forum-compose__toggle-input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    margin: 1px 0 0;
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-content: center;
    border: 1.5px solid rgba(199, 152, 99, 0.7);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.05);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease,
                box-shadow 0.16s ease;
}

body.page-forums .forum-compose__toggle:hover .forum-compose__toggle-input {
    border-color: rgba(199, 131, 64, 0.85);
}

body.page-forums .forum-compose__toggle-input:checked {
    border-color: rgba(199, 131, 64, 0.95);
    background-color: #d8923f;
    background-image: linear-gradient(180deg, #e3a85f, #c97f3f);
    box-shadow: 0 2px 5px rgba(157, 103, 42, 0.28);
}

/* 白色对勾：appearance:none 的 checkbox 支持伪元素；用 place-content:center 居中，
 * 旋转的对勾视觉重心偏低，靠 translateY 微调回正中。 */
body.page-forums .forum-compose__toggle-input:checked::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

body.page-forums .forum-compose__toggle-input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 160, 108, 0.25);
}

body.page-forums .forum-compose__toggle-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.45;
}

body.page-forums .forum-compose__toggle-label {
    color: #4a2c0a;
    font-size: 13px;
    font-weight: 700;
}

body.page-forums .forum-compose__toggle-hint {
    color: #8c7a68;
    font-size: 11.5px;
    word-break: break-word;
}

@media (max-width: 600px) {
    body.page-forums .forum-compose__toggle-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    body.page-forums .forum-compose__field--subject input.forum-compose__field-input {
        max-width: 100%;
    }
}

/* ============================================================
 * 论坛管理 & 分区管理（forummanage.php / moforums.php）
 * hero + 卡片化列表，沿用 .forum-utility / .forum-compose 类
 * ============================================================ */

body.page-forummanage .forum-admin__hero,
body.page-moforums .forum-admin__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 14px;
    padding: 13px 18px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66));
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forummanage .forum-admin__hero--sub,
body.page-moforums .forum-admin__hero--sub {
    margin-top: 22px;
}

body.page-forummanage .forum-admin__title,
body.page-moforums .forum-admin__title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: #3f3022;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

body.page-forummanage .forum-admin__title::before,
body.page-moforums .forum-admin__title::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}

body.page-forummanage .forum-admin__title a,
body.page-forummanage .forum-admin__title span,
body.page-moforums .forum-admin__title a,
body.page-moforums .forum-admin__title span {
    color: inherit !important;
    text-decoration: none !important;
}

body.page-forummanage .forum-admin__title span,
body.page-moforums .forum-admin__title span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

body.page-forummanage .forum-admin__title span::before,
body.page-moforums .forum-admin__title span::before {
    content: "/";
    margin: 0 6px 0 2px;
    color: #c9b8a6;
    font-weight: 500;
}

body.page-forummanage .forum-admin__actions,
body.page-moforums .forum-admin__actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.page-forummanage .forum-admin__action,
body.page-moforums .forum-admin__action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 0;
    padding: 2px 2px;
    border: 0;
    border-radius: 0;
    background: none;
    color: #8a5518 !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    box-shadow: none;
    transition: color 0.16s ease;
}

body.page-forummanage .forum-admin__action:hover,
body.page-moforums .forum-admin__action:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d !important;
}

body.page-forummanage .forum-admin__action--primary,
body.page-moforums .forum-admin__action--primary {
    min-height: 30px;
    padding: 5px 18px;
    border: 1px solid rgba(199, 131, 64, 0.7);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(244, 191, 138, 0.95), rgba(218, 158, 82, 0.88));
    color: #4a2c0a !important;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(199, 131, 64, 0.14);
}

body.page-forummanage .forum-admin__action--primary:hover,
body.page-moforums .forum-admin__action--primary:hover {
    border-color: rgba(180, 116, 50, 0.85);
    background: linear-gradient(135deg, rgba(245, 196, 145, 1), rgba(212, 149, 70, 1));
    color: #3a1f06 !important;
}

body.page-forummanage .forum-admin-section,
body.page-moforums .forum-admin-section {
    overflow: hidden;
    margin: 0 0 12px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forummanage .forum-admin-section__head,
body.page-forummanage .forum-admin-card {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.7fr) minmax(78px, 0.5fr) minmax(78px, 0.5fr) minmax(78px, 0.5fr) minmax(120px, 0.75fr) minmax(140px, 0.75fr);
    align-items: center;
    gap: 12px;
}

body.page-moforums .forum-admin-section__head--moforums,
body.page-moforums .forum-admin-card--moforums {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(120px, 0.6fr) minmax(140px, 0.75fr);
    align-items: center;
    gap: 12px;
}

body.page-forummanage .forum-admin-section__head,
body.page-moforums .forum-admin-section__head {
    padding: 9px 16px 8px;
    border-bottom: 1px solid rgba(210, 221, 234, 0.72);
    background: rgba(255, 255, 255, 0.35);
    color: #aaa096;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
}

body.page-forummanage .forum-admin-card,
body.page-moforums .forum-admin-card {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(220, 227, 236, 0.62);
    background: rgba(255, 255, 255, 0.56);
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.page-forummanage .forum-admin-card:last-child,
body.page-moforums .forum-admin-card:last-child {
    border-bottom: 0;
}

body.page-forummanage .forum-admin-card:hover,
body.page-moforums .forum-admin-card:hover {
    background: rgba(255, 250, 244, 0.84);
    box-shadow: inset 3px 0 0 rgba(218, 158, 82, 0.32);
    transform: translateY(-1px);
}

body.page-forummanage .forum-admin-card__name,
body.page-moforums .forum-admin-card__name {
    min-width: 0;
    line-height: 1.4;
}

body.page-forummanage .forum-admin-card__title,
body.page-moforums .forum-admin-card__title {
    display: block;
    overflow: hidden;
    color: #3f3022 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-forummanage a.forum-admin-card__title:hover,
body.page-moforums a.forum-admin-card__title:hover {
    color: #9a5a13 !important;
}

body.page-forummanage .forum-admin-card__desc,
body.page-moforums .forum-admin-card__desc {
    margin: 2px 0 0;
    overflow: hidden;
    color: #8c7a68;
    font-size: 11px;
    line-height: 1.45;
    text-overflow: ellipsis;
}

body.page-forummanage .forum-admin-card__cell,
body.page-moforums .forum-admin-card__cell {
    min-width: 0;
    color: #5f4e3e;
    font-size: 12px;
    line-height: 1.4;
}

body.page-forummanage .forum-admin-card__cell--mods,
body.page-moforums .forum-admin-card__cell--mods {
    color: #8a5518;
    font-weight: 600;
}

body.page-forummanage .forum-admin-card__cell--ops,
body.page-moforums .forum-admin-card__cell--ops {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.page-forummanage .forum-admin__btn,
body.page-moforums .forum-admin__btn {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 12px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-forummanage .forum-admin__btn:hover,
body.page-moforums .forum-admin__btn:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d !important;
}

/* viewtopic 顶部主题信息卡：从偏米暖调收回到论坛列表同源的冷中性面板。 */
body.page-forums .forum-viewtopic-hero {
    border-color: rgba(220, 224, 228, 0.84) !important;
    background: linear-gradient(135deg, rgba(255, 254, 252, 0.86), rgba(252, 249, 244, 0.78)) !important;
}

body.page-forums .forum-viewtopic-meta {
    border-top-color: rgba(220, 224, 228, 0.72) !important;
}

body.page-forums .forum-viewtopic-crumbs,
body.page-forums .forum-viewtopic-meta__item,
body.page-forums .forum-viewtopic-meta__unit {
    color: #756f66 !important;
}

body.page-forums .forum-viewtopic-crumbs a {
    color: #6a5b49 !important;
}

body.page-forums .forum-viewtopic-crumbs a:hover {
    color: #8a5518 !important;
}

body.page-forums .forum-viewtopic-crumbs span,
body.page-forums .forum-viewtopic-meta__icon {
    color: #a49a8f !important;
}

body.page-forums a.forum-topic-reply.forum-topic-reply--anchor.forum-topic-reply--anchor {
    border-color: rgba(229, 214, 191, 0.85) !important;
    background: rgba(255, 247, 235, 0.9) !important;
    color: #8a5518 !important;
}

body.page-forums a.forum-topic-reply.forum-topic-reply--anchor.forum-topic-reply--anchor:hover {
    border-color: rgba(208, 186, 152, 1) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
}

/* 楼层作者栏：降低米色饱和度，减弱左栏和正文白底之间的拼接感。 */
:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author {
    background: rgba(247, 247, 245, 0.52) !important;
}

:is(body.page-forums, body.page-details) .forum-post-card > tbody > tr > td.forum-post-author--anonymous {
    background: rgba(246, 248, 249, 0.58) !important;
}

/* 快速回复：用白色内卡和轻微高光提升精致度，避免大片米色显得发闷。 */
body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    padding: 16px 20px 18px !important;
    border-color: rgba(218, 224, 232, 0.88) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 248, 244, 0.82)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 14px 34px rgba(49, 66, 96, 0.05),
        0 2px 8px rgba(49, 66, 96, 0.025) !important;
}

body.page-forums .forum-quick-reply:focus-within, body.page-collection_view .forum-quick-reply:focus-within {
    border-color: rgba(215, 189, 153, 0.88) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 16px 38px rgba(49, 66, 96, 0.055),
        0 0 0 3px rgba(202, 145, 83, 0.08) !important;
}

body.page-forums .forum-quick-reply h2, body.page-collection_view .forum-quick-reply h2 {
    margin-bottom: 12px !important;
    color: #4f4032 !important;
    letter-spacing: 0.01em;
}

body.page-forums .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__bbtoolbar {
    padding: 6px 10px !important;
    border-color: rgba(222, 218, 210, 0.82) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 248, 244, 0.9)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body.page-forums .forum-quick-reply__bbbtn, body.page-collection_view .forum-quick-reply__bbbtn {
    border-color: rgba(220, 224, 228, 0.78) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #675747 !important;
}

body.page-forums .forum-quick-reply__bbbtn:hover, body.page-collection_view .forum-quick-reply__bbbtn:hover {
    border-color: rgba(204, 162, 104, 0.74) !important;
    background: rgba(255, 248, 238, 0.96) !important;
    color: #8a5518 !important;
}

body.page-forums .forum-quick-reply__bbbtn:not(.forum-quick-reply__bbbtn--bold):not(.forum-quick-reply__bbbtn--italic):not(.forum-quick-reply__bbbtn--underline):not(.forum-quick-reply__bbbtn--strike), body.page-collection_view .forum-quick-reply__bbbtn:not(.forum-quick-reply__bbbtn--bold):not(.forum-quick-reply__bbbtn--italic):not(.forum-quick-reply__bbbtn--underline):not(.forum-quick-reply__bbbtn--strike) {
    width: auto !important;
    min-width: 36px !important;
    height: 24px !important;
    padding: 0 9px !important;
    border: 1px solid rgba(220, 224, 228, 0.78) !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
    line-height: 24px !important;
    white-space: nowrap;
}

body.page-forums .forum-quick-reply__bbbtn:not(.forum-quick-reply__bbbtn--bold):not(.forum-quick-reply__bbbtn--italic):not(.forum-quick-reply__bbbtn--underline):not(.forum-quick-reply__bbbtn--strike)::before, body.page-collection_view .forum-quick-reply__bbbtn:not(.forum-quick-reply__bbbtn--bold):not(.forum-quick-reply__bbbtn--italic):not(.forum-quick-reply__bbbtn--underline):not(.forum-quick-reply__bbbtn--strike)::before {
    content: none !important;
}

body.page-forums .forum-quick-reply__bbtoolbar + textarea, body.page-collection_view .forum-quick-reply__bbtoolbar + textarea {
    min-height: 118px !important;
    border-color: rgba(222, 218, 210, 0.82) !important;
    background: linear-gradient(180deg, #ffffff, #fffefd) !important;
    box-shadow:
        inset 0 1px 2px rgba(49, 66, 96, 0.028),
        0 8px 18px rgba(49, 66, 96, 0.028) !important;
}

body.page-forums .forum-quick-reply__body:focus-within .forum-quick-reply__bbtoolbar, body.page-collection_view .forum-quick-reply__body:focus-within .forum-quick-reply__bbtoolbar {
    border-color: rgba(202, 145, 83, 0.54) !important;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(255, 248, 238, 0.9)) !important;
}

body.page-forums .forum-quick-reply input[type="submit"], body.page-collection_view .forum-quick-reply input[type="submit"],
body.page-forums .forum-quick-reply input.btn, body.page-collection_view .forum-quick-reply input.btn,
body.page-forums .forum-quick-reply button, body.page-collection_view .forum-quick-reply button {
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 5px 18px !important;
    border-color: rgba(222, 210, 193, 0.84) !important;
    background: rgba(255, 247, 235, 0.94) !important;
    color: #8a5518 !important;
    box-shadow: 0 4px 10px rgba(157, 103, 42, 0.06) !important;
}

body.page-forums .forum-quick-reply input[type="submit"]:hover, body.page-collection_view .forum-quick-reply input[type="submit"]:hover,
body.page-forums .forum-quick-reply input.btn:hover, body.page-collection_view .forum-quick-reply input.btn:hover,
body.page-forums .forum-quick-reply button:hover, body.page-collection_view .forum-quick-reply button:hover {
    border-color: rgba(208, 186, 152, 0.94) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    box-shadow: 0 4px 10px rgba(157, 103, 42, 0.08) !important;
}

body.page-forummanage .forum-admin__btn--danger,
body.page-moforums .forum-admin__btn--danger {
    border-color: rgba(216, 159, 159, 0.72);
    background: rgba(254, 240, 240, 0.92);
    color: #a64545 !important;
}

body.page-forummanage .forum-admin__btn--danger:hover,
body.page-moforums .forum-admin__btn--danger:hover {
    border-color: rgba(195, 124, 124, 0.86);
    background: rgba(252, 230, 230, 1);
    color: #8a2f2f !important;
}

body.page-forummanage .forum-admin__hint,
body.page-moforums .forum-admin__hint {
    margin-left: 6px;
    color: #8c7a68;
    font-size: 11px;
    line-height: 1.5;
}

body.page-forummanage .forum-admin__hint--tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 5px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b6aa9b;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    vertical-align: text-top;
}

body.page-forummanage .forum-admin__hint--tooltip:hover,
body.page-forummanage .forum-admin__hint--tooltip:focus {
    color: #8a5518;
    outline: none;
}

body.page-forummanage .forum-admin__hint--tooltip::before,
body.page-forummanage .forum-admin__hint--tooltip::after {
    position: absolute;
    left: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 40;
}

body.page-forummanage .forum-admin__hint--tooltip::before {
    content: "";
    top: calc(100% + 3px);
    border: 5px solid transparent;
    border-bottom-color: rgba(255, 253, 250, 0.96);
}

body.page-forummanage .forum-admin__hint--tooltip::after {
    content: attr(data-tooltip);
    top: calc(100% + 12px);
    width: max-content;
    max-width: 260px;
    padding: 7px 10px;
    border: 1px solid rgba(220, 210, 196, 0.9);
    border-radius: 10px;
    background: rgba(255, 253, 250, 0.98);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.08),
                0 2px 6px rgba(49, 66, 96, 0.035);
    color: #6f6256;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    text-align: left;
}

body.page-forummanage .forum-admin__hint--tooltip:hover::before,
body.page-forummanage .forum-admin__hint--tooltip:hover::after,
body.page-forummanage .forum-admin__hint--tooltip:focus::before,
body.page-forummanage .forum-admin__hint--tooltip:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.page-forummanage .forum-admin__muted,
body.page-moforums .forum-admin__muted {
    color: #b1a797;
    font-style: italic;
}

/* 让 .forum-view__empty 在管理后台也能命中 */
body.page-forummanage .forum-view__empty,
body.page-moforums .forum-view__empty {
    margin: 0;
    padding: 16px 16px;
    background: rgba(255, 255, 255, 0.56);
    color: #8c7a68;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

/* 列表卡片在窄屏下回退成竖向堆叠 */
@media (max-width: 720px) {
    body.page-forummanage .forum-admin-section__head,
    body.page-forummanage .forum-admin-card,
    body.page-moforums .forum-admin-section__head--moforums,
    body.page-moforums .forum-admin-card--moforums {
        grid-template-columns: 1fr;
    }
    body.page-forummanage .forum-admin-section__head,
    body.page-moforums .forum-admin-section__head--moforums {
        display: none;
    }
}

/* ============================================================
 * 方案B：hero（主题信息卡）与快速回复卡 统一为楼层卡语言
 *   - 去掉冷灰蓝边框
 *   - 暖白实底（与 .forum-post-card 同色 rgba(255,253,250,.95)）
 *   - 暖棕淡阴影替代冷蓝阴影，靠明度差 + 阴影浮起
 * ============================================================ */
body.page-forums .forum-viewtopic-hero,
body.page-forums .forum-quick-reply, body.page-collection_view .forum-quick-reply {
    border: 0 !important;
    border-radius: 12px !important;
    background: rgba(255, 253, 250, 0.95) !important;
    background-image: none !important;
    box-shadow:
        0 1px 2px rgba(45, 36, 25, 0.035),
        0 8px 22px rgba(45, 36, 25, 0.045) !important;
}

/* 方案B 续：快速回复内部控件去残留冷色，统一暖色调
 *   - textarea 阴影 rgba(49,66,96) 冷蓝 → 暖棕 rgba(45,36,25)
 *   - BBCode 按钮边框 rgba(220,224,228) 冷灰蓝 → 暖灰
 *   - 工具栏/输入框边框轻微暖化，保持一致
 */
body.page-forums .forum-quick-reply__body textarea, body.page-collection_view .forum-quick-reply__body textarea {
    border-color: rgba(220, 210, 196, 0.9) !important;
    box-shadow:
        inset 0 1px 2px rgba(45, 36, 25, 0.03),
        0 8px 18px rgba(45, 36, 25, 0.03) !important;
}

body.page-forums .forum-quick-reply__body textarea:focus, body.page-collection_view .forum-quick-reply__body textarea:focus {
    border-color: rgba(202, 145, 83, 0.74) !important;
    box-shadow:
        inset 0 1px 2px rgba(45, 36, 25, 0.04),
        0 0 0 3px rgba(227, 160, 108, 0.12) !important;
}

body.page-forums .forum-quick-reply__bbbtn, body.page-collection_view .forum-quick-reply__bbbtn {
    border-color: rgba(220, 210, 196, 0.7) !important;
}

body.page-forums .forum-quick-reply__bbbtn:hover, body.page-collection_view .forum-quick-reply__bbbtn:hover {
    border-color: rgba(202, 145, 83, 0.62) !important;
}

/* 正文阅读区降温：楼层卡底色调到接近纯白，作为整页唯一的中性/微冷锚点；
 * hero 与快速回复保持暖白 rgba(255,253,250)，与正文区形成「暖外框 / 净阅读区」层次。
 * 注：楼层卡为 <table class="main forum-post-card">，需用同等特异度选择器覆盖。
 */
:is(body.page-forums, body.page-details) table.main.forum-post-card,
:is(body.page-forums, body.page-details) .forum-post-card {
    background: rgba(255, 255, 255, 0.97) !important;
}

/* ============================================================
 * newtopic / 发帖页（forum-compose）：参照 viewtopic 统一为暖色卡片语言
 *   - hero 信息卡 与 主表单卡：无边框 + 暖白实底 + 暖棕淡阴影
 *   - 标题输入框 / 正文 textarea：冷灰蓝边框 → 暖灰，阴影 / 焦点暖化
 *   - 开关（非激活）、回帖规则组、meta 分隔等冷灰蓝边框 → 暖灰
 * ============================================================ */
body.page-forums .forum-compose__hero,
body.page-forums .forum-compose__card {
    border: 0 !important;
    background: rgba(255, 253, 250, 0.95) !important;
    background-image: none !important;
    box-shadow:
        0 1px 2px rgba(45, 36, 25, 0.035),
        0 8px 22px rgba(45, 36, 25, 0.045) !important;
}

body.page-forums .forum-compose__field-input,
body.page-forums .forum-compose__card textarea.bbcode {
    border-color: rgba(220, 210, 196, 0.9) !important;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.03) !important;
}

body.page-forums .forum-compose__field-input:focus,
body.page-forums .forum-compose__card textarea.bbcode:focus {
    border-color: rgba(202, 145, 83, 0.74) !important;
    box-shadow:
        inset 0 1px 2px rgba(45, 36, 25, 0.04),
        0 0 0 3px rgba(227, 160, 108, 0.12) !important;
}

body.page-forums .forum-compose__toggle:not(.is-on),
body.page-forums .forum-compose__meta,
body.page-forums .topic-reply-rule-group {
    border-color: rgba(220, 210, 196, 0.7) !important;
}

/* 主表单卡单独补一道暖色发丝边 + 略强暖阴影：hero 仍是轻量信息带，
 * 而真正的输入区作为页面焦点明确"浮"起来，卡片感更清晰。 */
body.page-forums .forum-compose__card {
    border: 1px solid rgba(226, 210, 188, 0.95) !important;
    /* 底色去暖：从暖白 rgba(255,253,250)/95% 改成近乎不透明的中性白，
     * 既去掉暖调，又挡住下方暖米色页面背景(#F8F5F0)从 5% 透明度里透上来。 */
    background: rgba(255, 255, 255, 0.985) !important;
    box-shadow:
        0 1px 2px rgba(45, 36, 25, 0.04),
        0 12px 30px rgba(157, 103, 42, 0.085) !important;
}

/* 回帖条件按钮现代化：旧版 .btn2 是 outset 边框 + btnbg.gif 的古老控件，这里在
 *   compose 卡片内整体重做为"药丸按钮"：
 *     · 添加条件 / 添加条件组（.topic-reply-add）：暖描边 + 暖白渐变底 + 前缀"+"，
 *       hover 抬升加深；
 *     · 移除 / 移除条件（.topic-reply-remove）：默认极淡 ghost，hover 转柔和赤陶红
 *       + 前缀"×"。
 *   先给所有 .btn2 一条干净基线（清掉 gif 底 / outset 边 / bold），再分别细化。 */
body.page-forums .forum-compose__card button.btn2 {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 28px !important;
    padding: 0 13px !important;
    border: 1px solid rgba(220, 210, 196, 0.85) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.75) !important;
    background-image: none !important;
    color: #8a5518 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 1px 2px rgba(157, 103, 42, 0.05) !important;
    cursor: pointer !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease,
                background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease !important;
}
body.page-forums .forum-compose__card button.btn2:hover {
    border-color: rgba(202, 145, 83, 0.55) !important;
    color: #6e4111 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(157, 103, 42, 0.12) !important;
}
body.page-forums .forum-compose__card button.btn2:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(157, 103, 42, 0.08) !important;
}

/* 添加类：暖白渐变底 + "+" 前缀 */
body.page-forums .forum-compose__card button.btn2.topic-reply-add {
    padding-left: 11px !important;
    border-color: rgba(202, 145, 83, 0.38) !important;
    background: linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(252, 242, 227, 0.92)) !important;
}
body.page-forums .forum-compose__card button.btn2.topic-reply-add::before {
    content: "\002B";
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: #c2802f;
}
body.page-forums .forum-compose__card button.btn2.topic-reply-add:hover {
    border-color: rgba(202, 145, 83, 0.7) !important;
    background: linear-gradient(180deg, rgba(255, 248, 237, 0.98), rgba(250, 236, 216, 0.96)) !important;
}
body.page-forums .forum-compose__card button.btn2.topic-reply-add:hover::before {
    color: #a8540c;
}

/* 移除类：ghost → hover 柔和赤陶红 + "×" 前缀 */
body.page-forums .forum-compose__card button.btn2.topic-reply-remove {
    padding-left: 11px !important;
    border-color: transparent !important;
    background: transparent !important;
    color: #a3897a !important;
    box-shadow: none !important;
}
body.page-forums .forum-compose__card button.btn2.topic-reply-remove::before {
    content: "\00D7";
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
body.page-forums .forum-compose__card button.btn2.topic-reply-remove:hover {
    border-color: rgba(192, 88, 58, 0.32) !important;
    background: rgba(192, 88, 58, 0.08) !important;
    color: #b1492c !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

/* 禁用态（达到条件上限时"添加"按钮会 disabled）：去掉抬升/阴影、降透明、禁手势。
 *   :disabled:hover 选择器特异性高于 .topic-reply-add:hover，保证 hover 也不再抬升。 */
body.page-forums .forum-compose__card button.btn2:disabled,
body.page-forums .forum-compose__card button.btn2.topic-reply-add:disabled:hover,
body.page-forums .forum-compose__card button.btn2.topic-reply-remove:disabled:hover {
    opacity: 0.42 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 回帖条件空状态提示：从冷灰 #666 改暖灰，弱化但仍属暖色家族。 */
body.page-forums .forum-compose__card .topic-reply-empty {
    color: #9a8a76 !important;
}

/* --------------------------------------------------------------------
 * viewtopic 快速回复：复用 forum_compose_body_editor()（textbbcode 公共组件），
 * 工具栏/按钮功能/chip 视觉/emoji 折叠与 newtopic 完全统一。
 *
 * 外层 .forum-quick-reply 本身已是暖色浮卡，这里把内嵌、仅作为 chip 样式 +
 * emoji toggle 钩子用的 .forum-compose__card--quickreply 还原成"无卡"容器，
 * 避免双层卡片的描边 / 阴影 / 内距叠加。
 * -------------------------------------------------------------------- */
body.page-forums .forum-quick-reply .forum-compose__card--quickreply, body.page-collection_view .forum-quick-reply .forum-compose__card--quickreply {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* textbbcode 给 textarea 写了内联 width:650px，快回容器较窄，强制撑满避免溢出 */
body.page-forums .forum-compose__card--quickreply .forum-compose__editor textarea.bbcode {
    width: 100% !important;
}

/* 快回提交行：去掉 newtopic 的虚线分隔，按钮居中，贴合原快回"提交居中"布局 */
body.page-forums .forum-compose__card--quickreply .forum-compose__action-row {
    justify-content: center;
    border-top: 0;
    padding: 8px 0 2px;
}

/* 匿名回帖选项：轻量可点击 pill（替代旧 quickreply_with_checkbox 的裸 checkbox） */
body.page-forums .forum-compose__qr-options {
    display: flex;
    margin-top: 10px;
}
body.page-forums .forum-compose__qr-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid rgba(220, 210, 196, 0.7);
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.6);
    color: #6a5b49;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}
body.page-forums .forum-compose__qr-checkbox:hover {
    border-color: rgba(202, 145, 83, 0.55);
    background: rgba(255, 239, 219, 0.6);
}
body.page-forums .forum-compose__qr-checkbox input {
    margin: 0;
}

/* ============================================================
 * Viewtopic admin: trigger beside "写回复", panel under meta
 * ============================================================ */

body.page-forums .forum-viewtopic-meta__actions,
body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions,
body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin,
body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__details {
    display: contents !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__header {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: auto !important;
    min-height: 26px !important;
    height: 26px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px dashed rgba(180, 140, 90, 0.58) !important;
    border-radius: 999px !important;
    background: rgba(255, 252, 247, 0.78) !important;
    color: #8b7867 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transform: none !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__header:hover,
body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__header {
    border-color: rgba(180, 140, 90, 0.78) !important;
    background: rgba(255, 247, 235, 0.94) !important;
    color: #7a572d !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__header-icon {
    color: #b8895a !important;
    font-size: 10.5px !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__header-hint {
    display: none !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__header::after {
    width: auto !important;
    height: auto !important;
    margin-left: 1px !important;
    background: transparent !important;
    color: #b8a48e !important;
    font-size: 9px !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__header::after {
    transform: rotate(180deg) !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__details:not([open]) .forum-viewtopic-admin__groups {
    display: none !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__groups {
    flex: 0 0 100% !important;
    order: 20 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 10px !important;
    padding: 14px 16px !important;
    border: 1px solid rgba(220, 211, 198, 0.68) !important;
    border-radius: 14px !important;
    background: rgba(252, 248, 241, 0.9) !important;
    box-shadow: 0 6px 18px rgba(80, 60, 40, 0.035), 0 1px 2px rgba(45, 36, 25, 0.035) !important;
}

/* Recompose the meta row as an explicit grid so admin controls do not drift. */
body.page-forums .forum-viewtopic-meta {
    display: grid !important;
    grid-template-columns: auto auto auto minmax(24px, 1fr) auto auto auto !important;
    align-items: center !important;
    gap: 8px 10px !important;
}

body.page-forums .forum-viewtopic-meta__item--views {
    grid-column: 1 !important;
}

body.page-forums .forum-viewtopic-meta__item--replies {
    grid-column: 2 !important;
}

body.page-forums .forum-viewtopic-meta__item--posts {
    grid-column: 3 !important;
}

body.page-forums .forum-viewtopic-meta__spacer {
    grid-column: 4 !important;
    display: block !important;
    min-width: 0 !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-reply {
    grid-column: 5 !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__header {
    grid-column: 6 !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-subscribe {
    grid-column: 7 !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__groups {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: min(100%, 960px) !important;
    margin-top: 4px !important;
}

/* Final admin layout pass: keep the trigger in the right action group and
   reserve a calm full-width shelf only when the panel is open. */
body.page-forums .forum-viewtopic-meta {
    position: relative !important;
    grid-template-columns: auto auto auto minmax(24px, 1fr) auto !important;
    transition: padding-bottom 0.18s ease !important;
}

body.page-forums .forum-viewtopic-meta:has(.forum-viewtopic-admin__details[open]) {
    padding-bottom: 88px !important;
}

body.page-forums .forum-viewtopic-meta__actions {
    grid-column: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-self: end !important;
    gap: 0 !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin) .forum-viewtopic-meta__actions {
    margin-right: 118px !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin,
body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__details {
    display: block !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-reply,
body.page-forums .forum-viewtopic-meta__actions .forum-topic-subscribe,
body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__header {
    grid-column: auto !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-viewtopic-admin__groups {
    position: absolute !important;
    top: 54px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 4 !important;
    width: min(100%, 960px) !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Admin is a direct meta child: summary shares the top row, panel expands flow. */
body.page-forums .forum-viewtopic-meta {
    padding-bottom: 0 !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) {
    padding-bottom: 0 !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: block !important;
    align-self: start !important;
    justify-self: stretch !important;
    width: 100% !important;
    margin: 0 !important;
    pointer-events: none !important;
}

body.page-forums .forum-viewtopic-meta__item,
body.page-forums .forum-viewtopic-meta__spacer,
body.page-forums .forum-viewtopic-meta__actions {
    grid-row: 1 !important;
    align-self: start !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__details {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    text-align: right !important;
    pointer-events: none !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__header {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: fit-content !important;
    margin-left: auto !important;
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 12px !important;
    border: 1px dashed rgba(180, 140, 90, 0.58) !important;
    border-radius: 999px !important;
    background: rgba(255, 252, 247, 0.78) !important;
    color: #8b7867 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    pointer-events: auto !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__header-hint {
    display: none !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__details:not([open]) .forum-viewtopic-admin__groups {
    display: none !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__groups {
    position: static !important;
    display: flex !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 0 !important;
    text-align: left !important;
    pointer-events: auto !important;
}

/* Keep the two hero action buttons visually equal. */
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin) .forum-viewtopic-meta__actions {
    margin-right: 123px !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-reply.forum-topic-reply--anchor,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__header {
    box-sizing: border-box !important;
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 12px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

body.page-forums .forum-viewtopic-meta__actions .forum-topic-reply.forum-topic-reply--anchor > i,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__header-icon {
    font-size: 10.5px !important;
    margin-right: 0 !important;
}

/* Align stats with the action buttons on the same visual center line. */
body.page-forums .forum-viewtopic-meta__item {
    align-self: start !important;
    align-items: center !important;
    height: 28px !important;
    line-height: 1 !important;
}

body.page-forums .forum-viewtopic-meta__icon,
body.page-forums .forum-viewtopic-meta__item b,
body.page-forums .forum-viewtopic-meta__unit {
    line-height: 1 !important;
}

/* Refine the expanded admin tray so it reads as part of the topic hero. */
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__groups {
    align-items: center !important;
    gap: 12px !important;
    min-height: 52px !important;
    margin-top: 10px !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(222, 210, 193, 0.76) !important;
    border-radius: 12px !important;
    background:
        linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(252, 247, 239, 0.92)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 1px 2px rgba(66, 48, 28, 0.035) !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__regular {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    min-width: 0 !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    min-height: 32px !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster:first-child {
    padding-left: 10px !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster + .forum-viewtopic-admin__cluster {
    border-left: 1px solid rgba(205, 187, 162, 0.46) !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster--status::before,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster--content::before,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster--highlight::before {
    height: 22px !important;
    margin-right: 2px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    background: rgba(247, 239, 226, 0.72) !important;
    color: #7a6042 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__label {
    color: #9b8b78 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__regular .forum-viewtopic-admin__label {
    display: none !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__form input[type="submit"],
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__form button,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .ui-dropdown-trigger {
    min-height: 24px !important;
    height: 24px !important;
    border-radius: 999px !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__danger {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__danger .forum-viewtopic-admin__group--danger {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__group--danger input[type="submit"] {
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 13px !important;
    border-color: rgba(218, 148, 132, 0.72) !important;
    background: rgba(255, 244, 240, 0.94) !important;
    color: #aa5848 !important;
}

/* Expanded admin as an inline tool strip: summary first, controls to its right. */
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin {
    grid-row: 2 !important;
    margin-top: 10px !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__details {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 8px 10px !important;
    border: 1px solid rgba(222, 210, 193, 0.72) !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(252, 247, 239, 0.9)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
    pointer-events: auto !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__header {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__groups {
    flex: 1 1 auto !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster--status::before,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster--content::before,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__cluster--highlight::before {
    display: none !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__regular {
    gap: 8px !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__cluster {
    min-height: 28px !important;
    padding: 0 12px !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__cluster:first-child {
    padding-left: 0 !important;
}

/* User preferred interaction: expand admin controls on the same row as "写回复". */
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) {
    min-height: 0 !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) .forum-viewtopic-meta__actions {
    margin-right: 512px !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin {
    grid-row: 1 !important;
    margin-top: 0 !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__details {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: 100% !important;
    height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__header,
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__groups {
    pointer-events: auto !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__groups {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__regular,
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__groups {
    align-items: center !important;
    gap: 8px !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__cluster,
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__danger {
    padding: 0 !important;
    margin: 0 !important;
}

/* Same-row expansion uses horizontal direction, and controls should read as one strip. */
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__header::after {
    content: "\f054" !important;
    transform: none !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__details[open] .forum-viewtopic-admin__header::after {
    content: "\f053" !important;
    transform: none !important;
}

body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__cluster + .forum-viewtopic-admin__cluster {
    border-left: 0 !important;
}

/* Swap hero actions: admin sits left of reply; expanded controls grow leftward. */
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin) .forum-viewtopic-meta__actions,
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) .forum-viewtopic-meta__actions {
    margin-right: 0 !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__details,
body.page-forums .forum-viewtopic-meta:has(> .forum-viewtopic-admin .forum-viewtopic-admin__details[open]) > .forum-viewtopic-admin .forum-viewtopic-admin__details {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    height: 28px !important;
    padding: 0 96px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__header {
    margin: 0 !important;
}

/* Keep admin dropdown menus above the first post instead of being clipped/covered. */
body.page-forums .forum-viewtopic-hero,
body.page-forums .forum-viewtopic-meta,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__details,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__groups,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .forum-viewtopic-admin__form,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .ui-dropdown {
    overflow: visible !important;
}

body.page-forums .forum-viewtopic-hero:has(.forum-viewtopic-admin__details[open]),
body.page-forums .forum-viewtopic-hero:has(.forum-viewtopic-admin .ui-dropdown:hover),
body.page-forums .forum-viewtopic-hero:has(.forum-viewtopic-admin .ui-dropdown:focus-within) {
    position: relative !important;
    z-index: 1200 !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .ui-dropdown,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .ui-dropdown:hover,
body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .ui-dropdown:focus-within {
    z-index: 1300 !important;
}

body.page-forums .forum-viewtopic-meta > .forum-viewtopic-admin .ui-dropdown > .ui-dropdown-list {
    z-index: 1301 !important;
}

/* Quick reply toolbar: normalize legacy select controls' height to the icon chips.
 * tagcount「关闭所有标签」已在默认 .forum-compose__card 规则里统一图标化（见上方
 * "5) Close all tags"），不再需要 --quickreply 专属覆盖。 */
body.page-forums .forum-compose__card--quickreply #editorouter td.embedded:has(> select.codebuttons),
body.page-forums .forum-compose__card--quickreply #editorouter select.codebuttons {
    height: 28px !important;
    min-height: 28px !important;
}

/* ============================================================
 * 论坛后台管理（forummanage / moforums / modrules）补充改版
 *   1) modrules 复用 forummanage 的新版后台卡片语言（hero/标题/按钮）
 *   2) 三页共用的「卡片内旧版表单」字段现代化（rowhead/rowfollow/输入/下拉/文本域）
 *   3) modrules 版规列表卡片
 *   4) 列表卡片冷灰蓝 → 暖灰，统一论坛新版暖色
 * ============================================================ */

/* ---------- 1) modrules 复用后台容器/hero/标题/按钮 ---------- */
body.page-modrules .forum-admin-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #4f4438;
    text-align: left;
}

body.page-modrules #outer > table.main {
    width: calc(100% - (var(--site-content-inline-gap, 26px) * 2)) !important;
    max-width: none !important;
}
body.page-modrules #outer > table.main > tbody > tr > td.embedded {
    padding-right: var(--site-content-inline-gap, 26px) !important;
    padding-left: var(--site-content-inline-gap, 26px) !important;
}

body.page-modrules .forum-admin__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    min-height: 58px;
    gap: 14px;
    margin: 0 0 14px;
    padding: 13px 18px;
    border: 1px solid rgba(226, 214, 196, 0.9);
    border-radius: 16px;
}
body.page-modrules .forum-admin__title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: #3f3022;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}
body.page-modrules .forum-admin__title::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(227, 160, 108, 0.95), rgba(199, 131, 64, 0.86));
}
body.page-modrules .forum-admin__title a,
body.page-modrules .forum-admin__title span {
    color: inherit !important;
    text-decoration: none !important;
}
body.page-modrules .forum-admin__title span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}
body.page-modrules .forum-admin__title span::before {
    content: "/";
    margin: 0 6px 0 2px;
    color: #c9b8a6;
    font-weight: 500;
}

body.page-modrules #outer > table.main:has(.forum-admin-page--modrules) {
    width: calc(100% - (var(--site-content-inline-gap, 26px) * 2)) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    table-layout: fixed !important;
}

body.page-modrules #outer > table.main:has(.forum-admin-page--modrules) > tbody > tr > td.embedded {
    padding-right: var(--site-content-inline-gap, 26px) !important;
    padding-left: var(--site-content-inline-gap, 26px) !important;
}

body.page-modrules .forum-admin__hero {
    min-height: 58px;
    margin: -1px 0 12px !important;
    padding: 13px 18px !important;
    border-color: rgba(220, 227, 236, 0.82) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66)) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025) !important;
}

body.page-modrules .forum-admin__title {
    color: #5f4e3e !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em;
}

body.page-modrules .forum-admin__title::before {
    display: block !important;
}

body.page-modrules .forum-admin__title span::before {
    margin: 0 2px 0 1px;
}
body.page-modrules .forum-admin__actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}
body.page-modrules .forum-admin__action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 0;
    padding: 2px 2px;
    border: 0;
    border-radius: 0;
    background: none;
    color: #8a5518 !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    box-shadow: none;
    transition: color 0.16s ease;
}
body.page-modrules .forum-admin__action:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d !important;
}
body.page-modrules .forum-admin__action--primary {
    min-height: 30px;
    padding: 5px 18px;
    border: 1px solid rgba(199, 131, 64, 0.7);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(244, 191, 138, 0.95), rgba(218, 158, 82, 0.88));
    color: #4a2c0a !important;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(199, 131, 64, 0.14);
}
body.page-modrules .forum-admin__action--primary:hover {
    border-color: rgba(180, 116, 50, 0.85);
    background: linear-gradient(135deg, rgba(245, 196, 145, 1), rgba(212, 149, 70, 1));
    color: #3a1f06 !important;
}

body.page-modrules .forum-admin__action {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    padding: 2px 10px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    font-size: 11px;
}

body.page-modrules .forum-admin__action:not(.forum-admin__action--primary):hover {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    text-decoration: none !important;
}

body.page-modrules .forum-admin__hero .forum-admin__action:hover,
body.page-modrules .forum-admin__hero .forum-admin__action:focus {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    text-decoration: none !important;
    outline: none;
}
body.page-modrules .forum-admin__btn {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 12px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
body.page-modrules .forum-admin__btn:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d !important;
}
body.page-modrules .forum-admin__btn--danger {
    border-color: rgba(216, 159, 159, 0.72);
    background: rgba(254, 240, 240, 0.92);
    color: #a64545 !important;
}
body.page-modrules .forum-admin__btn--danger:hover {
    border-color: rgba(195, 124, 124, 0.86);
    background: rgba(252, 230, 230, 1);
    color: #8a2f2f !important;
}
body.page-modrules .forum-compose__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-height: 30px;
    padding: 4px 18px;
    border: 1px solid rgba(222, 210, 193, 0.84) !important;
    border-radius: 999px !important;
    background: rgba(255, 247, 235, 0.92) !important;
    color: #8a5518 !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
body.page-modrules .forum-compose__btn:hover {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
}
body.page-modrules .forum-compose__btn--primary {
    border-color: rgba(199, 131, 64, 0.7) !important;
    background: linear-gradient(135deg, rgba(244, 191, 138, 0.95), rgba(218, 158, 82, 0.88)) !important;
    color: #4a2c0a !important;
    box-shadow: 0 4px 10px rgba(199, 131, 64, 0.16);
}
body.page-modrules .forum-compose__btn--primary:hover {
    border-color: rgba(180, 116, 50, 0.85) !important;
    background: linear-gradient(135deg, rgba(245, 196, 145, 1), rgba(212, 149, 70, 1)) !important;
    color: #3a1f06 !important;
}

body.page-modrules .forum-admin-form-dd {
    width: 190px;
    max-width: 100%;
}

body.page-modrules .forum-admin-form-dd .ui-dropdown-trigger {
    box-sizing: border-box;
    justify-content: space-between;
    width: 100%;
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    border-color: rgba(220, 210, 196, 0.9);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #4f4438;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.03);
}

body.page-modrules .forum-admin-form-dd .ui-dropdown-trigger__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-modrules .forum-admin-form-dd:hover .ui-dropdown-trigger,
body.page-modrules .forum-admin-form-dd:focus-within .ui-dropdown-trigger,
body.page-modrules .forum-admin-form-dd .ui-dropdown-trigger:hover,
body.page-modrules .forum-admin-form-dd .ui-dropdown-trigger:focus {
    border-color: rgba(202, 145, 83, 0.74);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.04),
                0 0 0 3px rgba(227, 160, 108, 0.12);
}

body.page-modrules .forum-admin-form-dd .ui-dropdown-list {
    width: max(100%, 220px);
    max-height: 280px;
}
body.page-modrules .forum-view__empty {
    margin: 0;
    padding: 18px 16px;
    border: 1px solid rgba(226, 214, 196, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.56);
    color: #8c7a68;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

/* ---------- 2) 后台表单卡片 + 字段现代化（三页共用） ---------- */
body.page-forummanage .forum-compose__card,
body.page-moforums .forum-compose__card,
body.page-modrules .forum-compose__card {
    margin: 0 0 14px;
    padding: 16px 22px 18px;
    border: 1px solid rgba(226, 210, 188, 0.95) !important;
    border-radius: 16px;
    background: rgba(255, 253, 250, 0.96) !important;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.04),
                0 12px 30px rgba(157, 103, 42, 0.085) !important;
}

body.page-modrules .forum-compose__card {
    background: #fff !important;
}

/* 卡片内旧版 table.main：去原生边框，仅作字段布局容器 */
body.page-forummanage .forum-compose__card table.main,
body.page-moforums .forum-compose__card table.main,
body.page-modrules .forum-compose__card table.main {
    width: 100% !important;
    max-width: none !important;
    border: 0 !important;
    border-collapse: collapse !important;
    background: transparent !important;
}
body.page-forummanage .forum-compose__card table.main td,
body.page-moforums .forum-compose__card table.main td,
body.page-modrules .forum-compose__card table.main td {
    border: 0 !important;
    background: transparent !important;
    vertical-align: top;
}
body.page-forummanage .forum-compose__card table.main tr:not(:last-child) td,
body.page-moforums .forum-compose__card table.main tr:not(:last-child) td,
body.page-modrules .forum-compose__card table.main tr:not(:last-child) td {
    border-bottom: 1px solid rgba(228, 216, 198, 0.5) !important;
}

/* 标签列（rowhead）：暖色弱化、左对齐、固定列宽 */
body.page-forummanage .forum-compose__card table.main td.rowhead,
body.page-moforums .forum-compose__card table.main td.rowhead,
body.page-modrules .forum-compose__card table.main td.rowhead {
    width: 134px !important;
    padding: 13px 16px 13px 2px !important;
    color: #7c6953 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    line-height: 1.55 !important;
    text-align: left !important;
    white-space: nowrap;
}
/* 控件列（rowfollow） */
body.page-forummanage .forum-compose__card table.main td.rowfollow,
body.page-moforums .forum-compose__card table.main td.rowfollow,
body.page-modrules .forum-compose__card table.main td.rowfollow {
    padding: 10px 2px 10px 0 !important;
}

/* 文本输入 / 下拉 / 文本域：暖色现代化 */
body.page-forummanage .forum-compose__card table.main input[type="text"],
body.page-forummanage .forum-compose__card table.main select,
body.page-forummanage .forum-compose__card table.main textarea,
body.page-moforums .forum-compose__card table.main input[type="text"],
body.page-moforums .forum-compose__card table.main select,
body.page-moforums .forum-compose__card table.main textarea,
body.page-modrules .forum-compose__card table.main input[type="text"],
body.page-modrules .forum-compose__card table.main select,
body.page-modrules .forum-compose__card table.main textarea {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-height: 34px !important;
    padding: 7px 12px !important;
    border: 1px solid rgba(220, 210, 196, 0.9) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #4f4438 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.03) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
body.page-forummanage .forum-compose__card table.main select,
body.page-moforums .forum-compose__card table.main select,
body.page-modrules .forum-compose__card table.main select {
    min-width: 190px;
    cursor: pointer !important;
}
body.page-forummanage .forum-compose__card table.main textarea,
body.page-moforums .forum-compose__card table.main textarea,
body.page-modrules .forum-compose__card table.main textarea {
    width: 100% !important;
    min-height: 220px !important;
    resize: vertical !important;
    font-family: inherit !important;
    line-height: 1.7 !important;
}
body.page-forummanage .forum-compose__card table.main input[type="text"]:focus,
body.page-forummanage .forum-compose__card table.main select:focus,
body.page-forummanage .forum-compose__card table.main textarea:focus,
body.page-moforums .forum-compose__card table.main input[type="text"]:focus,
body.page-moforums .forum-compose__card table.main select:focus,
body.page-moforums .forum-compose__card table.main textarea:focus,
body.page-modrules .forum-compose__card table.main input[type="text"]:focus,
body.page-modrules .forum-compose__card table.main select:focus,
body.page-modrules .forum-compose__card table.main textarea:focus {
    border-color: rgba(202, 145, 83, 0.74) !important;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.04),
                0 0 0 3px rgba(227, 160, 108, 0.12) !important;
}

/* 动作行：顶部虚线分隔 + 左对齐按钮组 */
body.page-forummanage .forum-compose__card table.main td.forum-compose__actions,
body.page-moforums .forum-compose__card table.main td.forum-compose__actions,
body.page-modrules .forum-compose__card table.main td.forum-compose__actions {
    padding: 16px 2px 2px 0 !important;
    border-top: 1px dashed rgba(222, 210, 193, 0.6) !important;
}
body.page-forummanage .forum-compose__card .forum-compose__buttons,
body.page-moforums .forum-compose__card .forum-compose__buttons,
body.page-modrules .forum-compose__card .forum-compose__buttons {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* ---------- 3) modrules 版规列表卡片 ---------- */
body.page-modrules .forum-admin-rules {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
body.page-modrules .forum-admin-rule {
    overflow: hidden;
    border: 1px solid rgba(226, 214, 196, 0.9);
    border-radius: 14px;
    background: rgba(255, 253, 250, 0.94);
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.03),
                0 8px 22px rgba(157, 103, 42, 0.05);
}
body.page-modrules .forum-admin-rule__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid rgba(228, 216, 198, 0.6);
    background: linear-gradient(135deg, rgba(255, 250, 243, 0.72), rgba(255, 247, 235, 0.5));
}
body.page-modrules .forum-admin-rule__titlewrap {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}
body.page-modrules .forum-admin-rule__title {
    color: #3f3022;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}
body.page-modrules .forum-admin-rule__lang {
    padding: 1px 9px;
    border-radius: 999px;
    background: rgba(199, 131, 64, 0.12);
    color: #8a5518;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}
body.page-modrules .forum-admin-rule__ops {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
}
body.page-modrules .forum-admin-rule__body {
    padding: 14px 16px 16px;
    color: #5f4e3e;
    font-size: 13px;
    line-height: 1.75;
    word-break: break-word;
}
body.page-modrules .forum-admin-rule__body a {
    color: #a8540c;
    text-decoration: none;
}
body.page-modrules .forum-admin-rule__body a:hover {
    text-decoration: underline;
}

/* ---------- 当前页删除确认弹窗（forums / modrules） ---------- */
body.page-forums .forum-admin-modal,
body.page-details .forum-admin-modal,
body.page-modrules .forum-admin-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100000;
}

body.page-forums .forum-admin-modal.is-open,
body.page-details .forum-admin-modal.is-open,
body.page-modrules .forum-admin-modal.is-open {
    display: flex;
}

body.page-forums .forum-admin-modal__backdrop,
body.page-details .forum-admin-modal__backdrop,
body.page-modrules .forum-admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(38, 26, 14, 0.32);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.page-forums .forum-admin-modal__dialog,
body.page-details .forum-admin-modal__dialog,
body.page-modrules .forum-admin-modal__dialog {
    position: relative;
    width: min(520px, calc(100vw - 48px));
    z-index: 1;
}

body.page-forums .forum-admin-modal__close,
body.page-details .forum-admin-modal__close,
body.page-modrules .forum-admin-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b1a797;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

body.page-forums .forum-admin-modal__close:hover,
body.page-forums .forum-admin-modal__close:focus,
body.page-details .forum-admin-modal__close:hover,
body.page-details .forum-admin-modal__close:focus,
body.page-modrules .forum-admin-modal__close:hover,
body.page-modrules .forum-admin-modal__close:focus {
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518;
    outline: none;
}

body.page-forums .forum-admin-modal .forum-admin-confirm,
body.page-details .forum-admin-modal .forum-admin-confirm,
body.page-modrules .forum-admin-modal .forum-admin-confirm {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 18px 46px 18px 20px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: #fffdf9 !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forums .forum-admin-confirm__icon,
body.page-details .forum-admin-confirm__icon,
body.page-modrules .forum-admin-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(216, 159, 159, 0.72);
    border-radius: 50%;
    background: rgba(254, 240, 240, 0.92);
    color: #a64545;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

body.page-forums .forum-admin-confirm__body,
body.page-details .forum-admin-confirm__body,
body.page-modrules .forum-admin-confirm__body {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-forums .forum-admin-confirm__body h2,
body.page-details .forum-admin-confirm__body h2,
body.page-modrules .forum-admin-confirm__body h2 {
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3f3022;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    box-shadow: none;
}

body.page-forums .forum-admin-confirm__body p,
body.page-details .forum-admin-confirm__body p,
body.page-modrules .forum-admin-confirm__body p {
    margin: 0 0 12px;
    color: #6f6256;
    font-size: 12px;
    line-height: 1.6;
}

body.page-forums .forum-admin-confirm__meta,
body.page-details .forum-admin-confirm__meta,
body.page-modrules .forum-admin-confirm__meta {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 227, 236, 0.62);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.52);
}

body.page-forums .forum-admin-confirm__meta div,
body.page-details .forum-admin-confirm__meta div,
body.page-modrules .forum-admin-confirm__meta div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
}

body.page-forums .forum-admin-confirm__meta dt,
body.page-forums .forum-admin-confirm__meta dd,
body.page-details .forum-admin-confirm__meta dt,
body.page-details .forum-admin-confirm__meta dd,
body.page-modrules .forum-admin-confirm__meta dt,
body.page-modrules .forum-admin-confirm__meta dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

body.page-forums .forum-admin-confirm__meta dt,
body.page-details .forum-admin-confirm__meta dt,
body.page-modrules .forum-admin-confirm__meta dt {
    color: #9d9082;
    font-weight: 600;
}

body.page-forums .forum-admin-confirm__meta dd,
body.page-details .forum-admin-confirm__meta dd,
body.page-modrules .forum-admin-confirm__meta dd {
    color: #4f4438;
    word-break: break-word;
}

body.page-forums .forum-admin-confirm__note,
body.page-details .forum-admin-confirm__note,
body.page-modrules .forum-admin-confirm__note {
    color: #a64545 !important;
}

body.page-forums .forum-admin-confirm__actions,
body.page-details .forum-admin-confirm__actions,
body.page-modrules .forum-admin-confirm__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

body.page-forums .forum-admin-confirm__actions .forum-compose__btn,
body.page-details .forum-admin-confirm__actions .forum-compose__btn,
body.page-modrules .forum-admin-confirm__actions .forum-compose__btn {
    box-sizing: border-box;
    height: 30px;
    min-height: 30px;
    padding: 4px 16px;
    line-height: 1;
}

body.page-forums .forum-compose__btn--danger,
body.page-details .forum-admin-modal .forum-compose__btn--danger,
body.page-modrules .forum-compose__btn--danger {
    border-color: rgba(216, 159, 159, 0.72) !important;
    background: rgba(254, 240, 240, 0.92) !important;
    color: #a64545 !important;
    box-shadow: none;
}

body.page-forums .forum-compose__btn--danger:hover,
body.page-details .forum-admin-modal .forum-compose__btn--danger:hover,
body.page-modrules .forum-compose__btn--danger:hover {
    border-color: rgba(195, 124, 124, 0.86) !important;
    background: rgba(252, 230, 230, 1) !important;
    color: #8a2f2f !important;
}

/* ---------- 4) 列表卡片：冷灰蓝 → 暖灰 ---------- */
body.page-forummanage .forum-admin__hero,
body.page-moforums .forum-admin__hero,
body.page-modrules .forum-admin__hero {
    border-color: rgba(226, 214, 196, 0.9) !important;
    background: linear-gradient(135deg, rgba(255, 253, 250, 0.96), rgba(255, 248, 238, 0.82)) !important;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.035),
                0 8px 22px rgba(157, 103, 42, 0.06) !important;
}
body.page-forummanage .forum-admin-section,
body.page-moforums .forum-admin-section {
    border-color: rgba(226, 214, 196, 0.9) !important;
    background: rgba(255, 253, 250, 0.84) !important;
    box-shadow: 0 1px 2px rgba(45, 36, 25, 0.03),
                0 8px 22px rgba(157, 103, 42, 0.055) !important;
}
body.page-forummanage .forum-admin-section__head,
body.page-moforums .forum-admin-section__head {
    border-bottom-color: rgba(226, 214, 196, 0.7) !important;
    background: rgba(255, 250, 243, 0.5) !important;
    color: #a89784 !important;
}
body.page-forummanage .forum-admin-card,
body.page-moforums .forum-admin-card {
    border-bottom-color: rgba(228, 216, 198, 0.6) !important;
    background: rgba(255, 255, 255, 0.5) !important;
}
body.page-forummanage .forum-admin-card:hover,
body.page-moforums .forum-admin-card:hover {
    background: rgba(255, 250, 242, 0.9) !important;
}

/* 后台 hero：次项是「导航链接」而非按钮；只有主项（添加…）是实心按钮 */
body.page-forummanage .forum-admin__action:not(.forum-admin__action--primary):hover,
body.page-moforums .forum-admin__action:not(.forum-admin__action--primary):hover,
body.page-modrules .forum-admin__action:not(.forum-admin__action--primary):hover {
    border-color: transparent !important;
    background: none !important;
    color: #a8540c !important;
    box-shadow: none !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    transform: none;
}
body.page-forummanage .forum-admin__action--primary:hover,
body.page-moforums .forum-admin__action--primary:hover,
body.page-modrules .forum-admin__action--primary:hover {
    box-shadow: 0 5px 12px rgba(199, 131, 64, 0.22) !important;
    transform: translateY(-1px);
}

body.page-modrules .forum-admin__hero {
    box-sizing: content-box;
    height: 30px;
    min-height: 0;
    margin: 0 0 12px !important;
    padding: 13px 18px !important;
    border-color: rgba(220, 227, 236, 0.82) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66)) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025) !important;
}

body.page-modrules .forum-admin__title {
    color: #5f4e3e !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em;
}

body.page-modrules .forum-admin__hero .forum-admin__action:hover,
body.page-modrules .forum-admin__hero .forum-admin__action:focus {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none;
    outline: none;
}

/* forummanage 列表页贴近版块页：紧凑工具栏 + 浅色行卡片 */
body.page-forummanage {
    background: #F8F5F0 !important;
}

body.page-forummanage .forum-admin__hero {
    align-items: center;
    box-sizing: border-box;
    min-height: 58px;
    margin: -1px 0 12px !important;
    padding: 13px 18px !important;
    border-color: rgba(220, 227, 236, 0.82) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66)) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025) !important;
}

body.page-forummanage #outer h1.forum-admin__title,
body.page-forummanage .forum-admin__title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #5f4e3e !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    line-height: 1.35 !important;
    box-shadow: none !important;
}

body.page-forummanage .forum-admin__actions {
    align-items: center;
    gap: 8px;
}

body.page-forummanage .forum-admin__action {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    padding: 2px 10px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    font-size: 11px;
}

body.page-forummanage .forum-admin__action:not(.forum-admin__action--primary):hover {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    text-decoration: none !important;
}

body.page-forummanage .forum-admin__action--primary {
    box-sizing: border-box;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 10px !important;
    border-color: rgba(229, 214, 191, 0.75) !important;
    background: rgba(255, 247, 235, 0.9) !important;
    color: #8a5518 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

body.page-forummanage .forum-admin__action--primary:hover {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
}

body.page-forummanage .forum-admin-section__head,
body.page-forummanage .forum-admin-card {
    grid-template-columns: minmax(270px, 1fr) minmax(110px, 0.35fr) repeat(3, minmax(84px, 0.28fr)) minmax(90px, 0.28fr) minmax(112px, 0.3fr);
    gap: 12px;
}

body.page-forummanage .forum-admin-section {
    border-color: rgba(220, 227, 236, 0.82) !important;
    background: rgba(255, 255, 255, 0.74) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025) !important;
}

body.page-forummanage .forum-admin-section__head {
    border-bottom-color: rgba(210, 221, 234, 0.72) !important;
    background: rgba(255, 255, 255, 0.35) !important;
}

body.page-forummanage .forum-admin-page--form {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
}

body.page-forummanage #outer > table.main:has(.forum-admin-page--form) {
    width: calc(100% - (var(--site-content-inline-gap, 26px) * 2) - 2px) !important;
    margin-right: var(--site-content-inline-gap, 26px) !important;
    margin-left: var(--site-content-inline-gap, 26px) !important;
    table-layout: fixed !important;
}

body.page-forummanage .forum-admin-page--form .forum-compose__card {
    border-color: rgba(220, 227, 236, 0.82) !important;
    background: rgba(255, 255, 255, 0.74) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025) !important;
}

body.page-forummanage .forum-admin-page--form .forum-compose__buttons {
    align-items: center;
}

body.page-forummanage .forum-admin-page--form .forum-compose__btn {
    box-sizing: border-box;
    height: 30px;
    min-height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1;
}

body.page-forummanage .forum-admin-page--form .forum-admin-form-dd {
    width: 190px;
    max-width: 100%;
}

body.page-forummanage .forum-admin-page--form .forum-admin-form-dd--overforum {
    width: 200px;
}

body.page-forummanage .forum-admin-page--form .forum-admin-form-dd--sort {
    width: 190px;
}

body.page-forummanage .forum-admin-page--form .forum-admin-form-dd .ui-dropdown-trigger {
    box-sizing: border-box;
    justify-content: space-between;
    width: 100%;
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    border-color: rgba(220, 210, 196, 0.9);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #4f4438;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.03);
}

body.page-forummanage .forum-admin-page--form .forum-admin-form-dd .ui-dropdown-trigger__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-forummanage .forum-admin-page--form .forum-admin-form-dd:hover .ui-dropdown-trigger,
body.page-forummanage .forum-admin-page--form .forum-admin-form-dd:focus-within .ui-dropdown-trigger,
body.page-forummanage .forum-admin-page--form .forum-admin-form-dd .ui-dropdown-trigger:hover,
body.page-forummanage .forum-admin-page--form .forum-admin-form-dd .ui-dropdown-trigger:focus {
    border-color: rgba(202, 145, 83, 0.74);
    background: rgba(255, 255, 255, 0.98);
    color: #4a2c0a;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.035),
                0 0 0 3px rgba(227, 160, 108, 0.1);
    transform: none;
}

body.page-forummanage .forum-admin-page--form .forum-admin-form-dd .ui-dropdown-list {
    width: max(100%, 220px);
    max-height: 280px;
    overflow-y: auto;
}

body.page-forummanage .forum-admin-page--confirm {
    width: 100%;
}

body.page-forummanage .forum-admin-confirm {
    display: flex;
    gap: 14px;
    margin: 0 0 12px;
    padding: 18px 20px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
}

body.page-forummanage .forum-admin-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(216, 159, 159, 0.72);
    border-radius: 50%;
    background: rgba(254, 240, 240, 0.92);
    color: #a64545;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

body.page-forummanage .forum-admin-confirm__body {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-forummanage .forum-admin-confirm__body h2 {
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3f3022;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
}

body.page-forummanage .forum-admin-confirm__body p {
    margin: 0 0 12px;
    color: #6f6256;
    font-size: 12px;
    line-height: 1.6;
}

body.page-forummanage .forum-admin-confirm__meta {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 227, 236, 0.62);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.52);
}

body.page-forummanage .forum-admin-confirm__meta div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
}

body.page-forummanage .forum-admin-confirm__meta dt,
body.page-forummanage .forum-admin-confirm__meta dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

body.page-forummanage .forum-admin-confirm__meta dt {
    color: #9d9082;
    font-weight: 600;
}

body.page-forummanage .forum-admin-confirm__meta dd {
    color: #4f4438;
    word-break: break-word;
}

body.page-forummanage .forum-admin-confirm__note {
    color: #a64545 !important;
}

body.page-forummanage .forum-admin-confirm__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

body.page-forummanage .forum-admin-confirm__actions .forum-compose__btn {
    box-sizing: border-box;
    height: 30px;
    min-height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1;
}

body.page-forummanage .forum-compose__btn--danger {
    border-color: rgba(216, 159, 159, 0.72) !important;
    background: rgba(254, 240, 240, 0.92) !important;
    color: #a64545 !important;
    box-shadow: none;
}

body.page-forummanage .forum-compose__btn--danger:hover {
    border-color: rgba(195, 124, 124, 0.86) !important;
    background: rgba(252, 230, 230, 1) !important;
    color: #8a2f2f !important;
}

body.page-forummanage .forum-admin-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100000;
}

body.page-forummanage .forum-admin-modal.is-open {
    display: flex;
}

body.page-forummanage .forum-admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(38, 26, 14, 0.32);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.page-forummanage .forum-admin-modal__dialog {
    position: relative;
    width: min(520px, calc(100vw - 48px));
    z-index: 1;
}

body.page-forummanage .forum-admin-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b1a797;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

body.page-forummanage .forum-admin-modal__close:hover,
body.page-forummanage .forum-admin-modal__close:focus {
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518;
    outline: none;
}

body.page-forummanage .forum-admin-confirm--modal {
    margin: 0;
    padding-right: 46px;
    background: #fffdf9 !important;
}

body.page-forummanage .forum-admin-card__title {
    font-size: 12.5px;
}

body.page-forummanage .forum-admin-card__cell:nth-child(n+3):nth-child(-n+5) {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-forummanage .forum-admin-card__cell--mods {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

body.page-forummanage .forum-admin-card__cell--mods .forum-moderator {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
    white-space: nowrap;
}

body.page-forummanage .forum-admin-card__cell--mods .forum-moderator__avatar {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(244, 238, 231, 0.86);
    box-shadow: 0 0 0 1px rgba(212, 199, 184, 0.72);
}

body.page-forummanage .forum-admin-card__cell--mods a {
    text-decoration: none !important;
}

body.page-forummanage .forum-admin-card__cell--mods a:hover {
    text-decoration: underline !important;
}

/* moforums.php 与 forummanage.php 使用同一套新版管理页语言 */
body.page-moforums {
    background: #F8F5F0 !important;
}

body.page-moforums .forum-admin-page--moforums {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
}

body.page-moforums #outer > table.main:has(.forum-admin-page--moforums) {
    width: calc(100% - (var(--site-content-inline-gap, 26px) * 2) - 2px) !important;
    margin-right: var(--site-content-inline-gap, 26px) !important;
    margin-left: var(--site-content-inline-gap, 26px) !important;
    table-layout: fixed !important;
}

body.page-moforums .forum-admin__hero {
    align-items: center;
    box-sizing: border-box;
    min-height: 58px;
    margin: -1px 0 12px !important;
    padding: 13px 18px !important;
    border-color: rgba(220, 227, 236, 0.82) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 243, 0.66)) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025) !important;
}

body.page-moforums .forum-admin__hero--sub {
    margin-top: 22px !important;
}

body.page-moforums #outer h1.forum-admin__title,
body.page-moforums .forum-admin__title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #5f4e3e !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    line-height: 1.35 !important;
    box-shadow: none !important;
}

body.page-moforums .forum-admin__actions {
    align-items: center;
    gap: 8px;
}

body.page-moforums .forum-admin__action {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    padding: 2px 10px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    font-size: 11px;
}

body.page-moforums .forum-admin__action:not(.forum-admin__action--primary):hover {
    border-color: rgba(208, 186, 152, 0.92) !important;
    background: #fff7eb !important;
    color: #7a572d !important;
    text-decoration: none !important;
}

body.page-moforums .forum-admin-section,
body.page-moforums .forum-compose__card,
body.page-moforums .forum-admin-confirm {
    border-color: rgba(220, 227, 236, 0.82) !important;
    background: rgba(255, 255, 255, 0.74) !important;
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025) !important;
}

body.page-moforums .forum-admin-section__head {
    border-bottom-color: rgba(210, 221, 234, 0.72) !important;
    background: rgba(255, 255, 255, 0.35) !important;
}

body.page-moforums .forum-compose__buttons {
    align-items: center;
}

body.page-moforums .forum-compose__btn {
    box-sizing: border-box;
    height: 30px;
    min-height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1;
}

body.page-moforums .forum-admin-form-dd {
    width: 190px;
    max-width: 100%;
}

body.page-moforums .forum-admin-form-dd .ui-dropdown-trigger {
    box-sizing: border-box;
    justify-content: space-between;
    width: 100%;
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    border-color: rgba(220, 210, 196, 0.9);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #4f4438;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.03);
}

body.page-moforums .forum-admin-form-dd .ui-dropdown-trigger__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-moforums .forum-admin-form-dd:hover .ui-dropdown-trigger,
body.page-moforums .forum-admin-form-dd:focus-within .ui-dropdown-trigger,
body.page-moforums .forum-admin-form-dd .ui-dropdown-trigger:hover,
body.page-moforums .forum-admin-form-dd .ui-dropdown-trigger:focus {
    border-color: rgba(202, 145, 83, 0.74);
    background: rgba(255, 255, 255, 0.98);
    color: #4a2c0a;
    box-shadow: inset 0 1px 2px rgba(45, 36, 25, 0.035),
                0 0 0 3px rgba(227, 160, 108, 0.1);
    transform: none;
}

body.page-moforums .forum-admin-form-dd .ui-dropdown-list {
    width: max(100%, 220px);
    max-height: 280px;
    overflow-y: auto;
}

body.page-moforums .forum-admin__hint--tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 5px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b6aa9b;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    vertical-align: text-top;
}

body.page-moforums .forum-admin__hint--tooltip:hover,
body.page-moforums .forum-admin__hint--tooltip:focus {
    color: #8a5518;
    outline: none;
}

body.page-moforums .forum-admin__hint--tooltip::before,
body.page-moforums .forum-admin__hint--tooltip::after {
    position: absolute;
    left: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 40;
}

body.page-moforums .forum-admin__hint--tooltip::before {
    content: "";
    top: calc(100% + 3px);
    border: 5px solid transparent;
    border-bottom-color: rgba(255, 253, 250, 0.96);
}

body.page-moforums .forum-admin__hint--tooltip::after {
    content: attr(data-tooltip);
    top: calc(100% + 12px);
    width: max-content;
    max-width: 260px;
    padding: 7px 10px;
    border: 1px solid rgba(220, 210, 196, 0.9);
    border-radius: 10px;
    background: rgba(255, 253, 250, 0.98);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.08),
                0 2px 6px rgba(49, 66, 96, 0.035);
    color: #6f6256;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    text-align: left;
}

body.page-moforums .forum-admin__hint--tooltip:hover::before,
body.page-moforums .forum-admin__hint--tooltip:hover::after,
body.page-moforums .forum-admin__hint--tooltip:focus::before,
body.page-moforums .forum-admin__hint--tooltip:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.page-moforums .forum-admin-confirm {
    display: flex;
    gap: 14px;
    margin: 0 0 12px;
    padding: 18px 20px;
    border-radius: 16px;
}

body.page-moforums .forum-admin-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(216, 159, 159, 0.72);
    border-radius: 50%;
    background: rgba(254, 240, 240, 0.92);
    color: #a64545;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

body.page-moforums .forum-admin-confirm__body {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-moforums .forum-admin-confirm__body h2 {
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3f3022;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
}

body.page-moforums .forum-admin-confirm__body p {
    margin: 0 0 12px;
    color: #6f6256;
    font-size: 12px;
    line-height: 1.6;
}

body.page-moforums .forum-admin-confirm__meta {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 227, 236, 0.62);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.52);
}

body.page-moforums .forum-admin-confirm__meta div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
}

body.page-moforums .forum-admin-confirm__meta dt,
body.page-moforums .forum-admin-confirm__meta dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

body.page-moforums .forum-admin-confirm__meta dt {
    color: #9d9082;
    font-weight: 600;
}

body.page-moforums .forum-admin-confirm__meta dd {
    color: #4f4438;
    word-break: break-word;
}

body.page-moforums .forum-admin-confirm__note {
    color: #a64545 !important;
}

body.page-moforums .forum-admin-confirm__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

body.page-moforums .forum-admin-confirm__actions .forum-compose__btn {
    height: 30px;
    min-height: 30px;
}

body.page-moforums .forum-compose__btn--danger {
    border-color: rgba(216, 159, 159, 0.72) !important;
    background: rgba(254, 240, 240, 0.92) !important;
    color: #a64545 !important;
    box-shadow: none;
}

body.page-moforums .forum-compose__btn--danger:hover {
    border-color: rgba(195, 124, 124, 0.86) !important;
    background: rgba(252, 230, 230, 1) !important;
    color: #8a2f2f !important;
}

body.page-moforums .forum-admin-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100000;
}

body.page-moforums .forum-admin-modal.is-open {
    display: flex;
}

body.page-moforums .forum-admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(38, 26, 14, 0.32);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.page-moforums .forum-admin-modal__dialog {
    position: relative;
    width: min(520px, calc(100vw - 48px));
    z-index: 1;
}

body.page-moforums .forum-admin-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b1a797;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

body.page-moforums .forum-admin-modal__close:hover,
body.page-moforums .forum-admin-modal__close:focus {
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518;
    outline: none;
}

body.page-moforums .forum-admin-confirm--modal {
    margin: 0;
    padding-right: 46px;
    background: #fffdf9 !important;
}

/* ---------- 弹层暖色协调补丁 ----------
 * 弹层底色改为暖白 #fffdf9 后，原冷灰蓝的边框/阴影/meta 块会与暖底冲突。
 * 这里把容器与 meta 块统一到 mybonus 暖色族（rgba(229,201,168) 暖边 + rgba(60,40,15) 暖影）。
 * 红色警告图标 / "确认删除"按钮 / "无法恢复"提示属删除危险语义，保持不变。 */
body.page-forums .forum-admin-modal .forum-admin-confirm,
body.page-details .forum-admin-modal .forum-admin-confirm,
body.page-modrules .forum-admin-modal .forum-admin-confirm,
body.page-forummanage .forum-admin-modal .forum-admin-confirm,
body.page-moforums .forum-admin-modal .forum-admin-confirm {
    border-color: rgba(229, 201, 168, 0.7) !important;
    box-shadow: 0 20px 48px rgba(60, 40, 15, 0.16),
                0 4px 12px rgba(60, 40, 15, 0.08) !important;
}
body.page-forums .forum-admin-modal .forum-admin-confirm__meta,
body.page-details .forum-admin-modal .forum-admin-confirm__meta,
body.page-modrules .forum-admin-modal .forum-admin-confirm__meta,
body.page-forummanage .forum-admin-modal .forum-admin-confirm__meta,
body.page-moforums .forum-admin-modal .forum-admin-confirm__meta {
    border-color: rgba(229, 201, 168, 0.5) !important;
    background: rgba(255, 250, 242, 0.6) !important;
}
body.page-forums .forum-admin-modal .forum-admin-confirm__meta dt,
body.page-details .forum-admin-modal .forum-admin-confirm__meta dt,
body.page-modrules .forum-admin-modal .forum-admin-confirm__meta dt,
body.page-forummanage .forum-admin-modal .forum-admin-confirm__meta dt,
body.page-moforums .forum-admin-modal .forum-admin-confirm__meta dt {
    color: #9b8874 !important;
}
body.page-forums .forum-admin-modal .forum-admin-confirm__meta dd,
body.page-details .forum-admin-modal .forum-admin-confirm__meta dd,
body.page-modrules .forum-admin-modal .forum-admin-confirm__meta dd,
body.page-forummanage .forum-admin-modal .forum-admin-confirm__meta dd,
body.page-moforums .forum-admin-modal .forum-admin-confirm__meta dd {
    color: #5f4e3e !important;
}
/* 关闭按钮 hover 用暖色高亮，与暖底一致 */
body.page-forums .forum-admin-modal .forum-admin-modal__close:hover,
body.page-details .forum-admin-modal .forum-admin-modal__close:hover,
body.page-modrules .forum-admin-modal .forum-admin-modal__close:hover,
body.page-forummanage .forum-admin-modal .forum-admin-modal__close:hover,
body.page-moforums .forum-admin-modal .forum-admin-modal__close:hover {
    background: rgba(214, 148, 80, 0.12) !important;
    color: #8f541c !important;
}

/* ============================================================
 * 规则页 rules.php
 * ============================================================ */

body.page-rules .rules-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #4f4438;
    text-align: left;
}

body.page-rules .rules-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
    padding: 18px 20px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 18px;
    background:
        radial-gradient(circle at 16% 16%, rgba(255, 238, 211, 0.72), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 243, 0.76));
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 12px 30px rgba(49, 66, 96, 0.055),
                0 2px 8px rgba(49, 66, 96, 0.028);
}

body.page-rules .rules-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(226, 196, 158, 0.72);
    border-radius: 16px;
    background: rgba(255, 247, 235, 0.88);
    color: #9a5a13;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.page-rules .rules-hero__copy {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-rules .rules-hero__title {
    margin: 0;
    color: #3f3022;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.25;
}

body.page-rules .rules-hero__sub {
    margin: 7px 0 0;
    color: #8c7a68;
    font-size: 12.5px;
    line-height: 1.6;
}

body.page-rules .rules-hero__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

body.page-rules .rules-hero__pill,
body.page-rules .rules-hero__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
}

body.page-rules .rules-hero__action:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
    color: #7a572d !important;
}

body.page-rules .rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.page-rules .rules-card {
    overflow: hidden;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 10px 26px rgba(49, 66, 96, 0.045),
                0 2px 7px rgba(49, 66, 96, 0.025);
}

body.page-rules .rules-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(218, 224, 232, 0.72);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.88), rgba(255, 248, 238, 0.62));
}

/* 防御：若内容中出现未闭合的内联标签（<b>/<i>/<font> 等）被浏览器重建并
 * 包裹到头部，display:contents 让这些包裹层不生成盒子，序号与标题仍按
 * flex 直接排布，不会换行。 */
body.page-rules .rules-card__head > b,
body.page-rules .rules-card__head > i,
body.page-rules .rules-card__head > u,
body.page-rules .rules-card__head > font,
body.page-rules .rules-card__head > span:not(.rules-card__index) {
    display: contents;
}

body.page-rules .rules-card__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(154, 90, 19, 0.1);
    color: #9a5a13;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

body.page-rules .rules-card__title {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #4a3422 !important;
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.35;
}

body.page-rules .rules-card__body {
    padding: 16px 22px 18px;
    color: #514538;
    font-size: 12.5px;
    line-height: 1.78;
}

body.page-rules .rules-card__body b {
    color: #3f3022;
}

body.page-rules .rules-card__body font[color="red"],
body.page-rules .rules-card__body span[style*="red"],
body.page-rules .rules-card__body .striking {
    color: #d13b34 !important;
    font-weight: 700;
}

body.page-rules .rules-card__body .bbcode-list {
    display: block;
    margin: 8px 0 2px;
    line-height: 1.86;
}

body.page-rules .rules-card__body img.listicon {
    width: 6px;
    height: 6px;
    margin: 0 8px 2px 0;
    border-radius: 50%;
    background: #d18a35;
    vertical-align: middle;
}

body.page-rules .rules-card__body img.listicon::before {
    content: none;
}

body.page-rules .rules-card__body a {
    color: #8a5518 !important;
    font-weight: 700;
    text-decoration: none !important;
}

body.page-rules .rules-card__body a:hover {
    color: #7a572d !important;
    text-decoration: underline !important;
}

body.page-rules .rules-empty {
    padding: 22px;
    border: 1px dashed rgba(220, 200, 176, 0.86);
    border-radius: 16px;
    background: rgba(255, 250, 244, 0.72);
    color: #8c7a68;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 720px) {
    body.page-rules .rules-hero {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 16px;
    }

    body.page-rules .rules-hero__meta {
        width: 100%;
        justify-content: flex-start;
    }

    body.page-rules .rules-card__head {
        align-items: flex-start;
        padding: 12px 14px;
    }

    body.page-rules .rules-card__body {
        padding: 14px;
        font-size: 12px;
    }
}

/* ============================================================
 * FAQ faq.php
 * ============================================================ */

body.page-faq .faq-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #4f4438;
    text-align: left;
}

body.page-faq .faq-hero,
body.page-faq .faq-welcome,
body.page-faq .faq-toc,
body.page-faq .faq-section,
body.page-faq .faq-empty {
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 10px 26px rgba(49, 66, 96, 0.045),
                0 2px 7px rgba(49, 66, 96, 0.025);
}

body.page-faq .faq-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
    padding: 18px 20px;
    background:
        radial-gradient(circle at 16% 16%, rgba(255, 238, 211, 0.72), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 243, 0.76));
}

body.page-faq .faq-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(226, 196, 158, 0.72);
    border-radius: 16px;
    background: rgba(255, 247, 235, 0.88);
    color: #9a5a13;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.page-faq .faq-hero__copy {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-faq .faq-hero__title {
    margin: 0;
    color: #3f3022;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.25;
}

body.page-faq .faq-hero__sub {
    margin: 7px 0 0;
    color: #8c7a68;
    font-size: 12.5px;
    line-height: 1.6;
}

body.page-faq .faq-hero__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

body.page-faq .faq-hero__pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
}

body.page-faq .faq-welcome {
    margin: 0 0 14px;
    padding: 18px 20px;
}

body.page-faq .faq-welcome__title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #4a3422 !important;
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.35;
}

body.page-faq .faq-welcome__body,
body.page-faq .faq-item__answer {
    color: #514538;
    font-size: 12.5px;
    line-height: 1.78;
}

body.page-faq .faq-welcome__body a,
body.page-faq .faq-item__answer a,
body.page-faq .faq-toc a {
    color: #8a5518 !important;
    font-weight: 700;
    text-decoration: none !important;
}

body.page-faq .faq-welcome__body a:hover,
body.page-faq .faq-item__answer a:hover,
body.page-faq .faq-toc a:hover {
    color: #7a572d !important;
    text-decoration: underline !important;
}

body.page-faq .faq-toc {
    overflow: hidden;
    margin: 0 0 14px;
}

body.page-faq .faq-toc__head,
body.page-faq .faq-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(218, 224, 232, 0.72);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.88), rgba(255, 248, 238, 0.62));
}

body.page-faq .faq-toc__title,
body.page-faq .faq-section__title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #4a3422 !important;
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.35;
}

body.page-faq .faq-toc__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    padding: 16px 18px 18px;
}

body.page-faq .faq-toc__group {
    padding: 13px 14px;
    border: 1px solid rgba(225, 221, 213, 0.82);
    border-radius: 14px;
    background: rgba(255, 253, 249, 0.68);
}

body.page-faq .faq-toc__category {
    display: inline-flex;
    margin-bottom: 8px;
    color: #4a3422 !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

body.page-faq .faq-toc__items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.page-faq .faq-toc__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-left: 12px;
    color: #6f6256 !important;
    font-size: 12px;
    font-weight: 600 !important;
    line-height: 1.45;
    box-shadow: inset 3px 0 0 rgba(209, 138, 53, 0.28);
}

body.page-faq .faq-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.page-faq .faq-section {
    overflow: hidden;
}

body.page-faq .faq-section__top {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 11px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518 !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
}

body.page-faq .faq-section__top:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: #fff7eb;
}

body.page-faq .faq-items {
    padding: 2px 18px 18px;
}

body.page-faq .faq-item {
    padding: 15px 0;
    border-bottom: 1px solid rgba(220, 227, 236, 0.68);
}

body.page-faq .faq-item:last-child {
    border-bottom: 0;
}

body.page-faq .faq-item__question {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    color: #3f3022;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

body.page-faq .faq-status {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}

body.page-faq .faq-status--new {
    background: rgba(232, 246, 235, 0.9);
    color: #347b45;
}

body.page-faq .faq-status--updated {
    background: rgba(255, 243, 224, 0.95);
    color: #9a5a13;
}

body.page-faq .faq-section__empty,
body.page-faq .faq-empty {
    color: #8c7a68;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

body.page-faq .faq-section__empty {
    padding: 18px;
}

body.page-faq .faq-empty {
    padding: 22px;
    border-style: dashed;
    background: rgba(255, 250, 244, 0.72);
}

@media (max-width: 720px) {
    body.page-faq .faq-hero {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 16px;
    }

    body.page-faq .faq-hero__meta {
        width: 100%;
        justify-content: flex-start;
    }

    body.page-faq .faq-welcome,
    body.page-faq .faq-toc__grid,
    body.page-faq .faq-items {
        padding-right: 14px;
        padding-left: 14px;
    }

    body.page-faq .faq-toc__head,
    body.page-faq .faq-section__head {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 14px;
    }
}


/* ============================================================
 * 捐赠页 donate.php
 * ============================================================ */

body.page-donate .donate-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #4f4438;
    text-align: left;
}

body.page-donate .donate-hero,
body.page-donate .donate-card,
body.page-donate .donate-method {
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 12px 30px rgba(49, 66, 96, 0.055),
                0 2px 8px rgba(49, 66, 96, 0.028);
}

body.page-donate .donate-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
    padding: 18px 20px;
    background:
        radial-gradient(circle at 16% 16%, rgba(255, 238, 211, 0.72), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 250, 243, 0.78));
}

body.page-donate .donate-hero__badge,
body.page-donate .donate-method__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(226, 196, 158, 0.72);
    background: rgba(255, 247, 235, 0.9);
    color: #9a5a13;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.page-donate .donate-hero__badge {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 16px;
    font-size: 17px;
    letter-spacing: 0.04em;
}

body.page-donate .donate-hero__copy {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-donate .donate-hero__title,
body.page-donate .donate-method__title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #3f3022 !important;
    font-weight: 800;
    line-height: 1.35;
}

body.page-donate .donate-hero__title {
    font-size: 20px !important;
    letter-spacing: 0.03em;
}

body.page-donate .donate-hero__sub {
    margin: 7px 0 0;
    color: #8c7a68;
    font-size: 12.5px;
    line-height: 1.6;
}

body.page-donate .donate-hero__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

body.page-donate .donate-hero__pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    background: rgba(255, 247, 235, 0.9);
    color: #8a5518;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
}

body.page-donate .donate-card {
    margin: 0 0 14px;
    padding: 18px 20px;
    color: #514538;
    font-size: 13px;
    line-height: 1.72;
}

body.page-donate .donate-card--notice {
    border-style: dashed;
    background: rgba(255, 250, 244, 0.76);
}

body.page-donate .donate-detail div,
body.page-donate .donate-detail font {
    color: inherit;
    font-size: 13px !important;
    line-height: 1.78 !important;
}

body.page-donate .donate-detail font[color="red"] {
    color: #9f3f2e !important;
}

body.page-donate .donate-detail font[size="4"] {
    display: inline-block;
    margin: 14px 0 6px;
    color: #4a3422 !important;
    font-size: 15px !important;
}

body.page-donate .donate-page a {
    color: #8a5518 !important;
    font-weight: 700;
    text-decoration: none !important;
}

body.page-donate .donate-page a:hover {
    color: #7a572d !important;
    text-decoration: underline !important;
}

body.page-donate .donate-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

body.page-donate .donate-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.9), rgba(255, 248, 238, 0.68));
}

body.page-donate .donate-method__icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 14px;
    font-size: 15px;
}

body.page-donate .donate-method__body {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-donate .donate-method__title {
    font-size: 14px !important;
}

body.page-donate .donate-method__note {
    margin-top: 6px;
    color: #6f6256;
    font-size: 12.5px;
    line-height: 1.65;
}

body.page-donate .donate-method__form {
    margin: 0;
}

body.page-donate .donate-method__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 14px;
    border: 1px solid rgba(214, 177, 128, 0.82);
    border-radius: 999px;
    background: linear-gradient(180deg, #fff6e8, #f4dcc1);
    color: #7a4c1e !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
}

body.page-donate .donate-method__button:hover {
    border-color: rgba(190, 143, 84, 0.92);
    background: linear-gradient(180deg, #fff9ef, #efd1ad);
    text-decoration: none !important;
}

@media (max-width: 720px) {
    body.page-donate .donate-hero,
    body.page-donate .donate-method {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 16px;
    }

    body.page-donate .donate-hero__meta {
        width: 100%;
        justify-content: flex-start;
    }

    body.page-donate .donate-card {
        padding: 16px;
    }

    body.page-donate .donate-method__button,
    body.page-donate .donate-method__form {
        width: 100%;
    }
}
