* {
    box-sizing: border-box;
}

/* PHP accent visual refresh */
body {
    background: #f8f6ff;
    color: #24212d;
}

a,
body.theme-cool-ocean a,
body.theme-cool-mint a,
body.theme-cool-slate a,
body.theme-warm-sand a,
body.theme-warm-rose a,
body.theme-warm-amber a {
    color: #505b93;
}

a:hover {
    color: #383f6a;
}

.site-header,
.card,
.footer,
.friend-links,
.signin-modal-box,
.auth-modal-box,
input,
select,
textarea {
    background: #fff;
    border-color: #dde2ef;
}

.site-header {
    box-shadow: 0 1px 0 rgba(80, 91, 147, .05);
}

.brand,
body.theme-cool-ocean .brand,
body.theme-cool-mint .brand,
body.theme-cool-slate .brand,
body.theme-warm-sand .brand,
body.theme-warm-rose .brand,
body.theme-warm-amber .brand,
h1,
h2,
h3,
.section-title,
.hero h1,
.page-head h1,
.post-title-card h1,
.signin-modal-box h2,
.signin-rank-mini h3 {
    color: #26232f;
}

.brand-mark,
body.theme-cool-ocean .btn,
body.theme-cool-mint .btn,
body.theme-cool-slate .btn,
body.theme-warm-sand .btn,
body.theme-warm-rose .btn,
body.theme-warm-amber .btn,
.btn,
.hero .btn,
.page-head .btn,
.image-badge {
    background: #505b93;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #3f4874;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #eef1f7;
    border-color: #dce0ee;
    color: #505b93 !important;
}

.content-page-nav a.active {
    border-color: #505b93;
    background: #505b93;
}

.nav nav a {
    color: #48425a;
}

.nav nav a:hover,
.nav nav .nav-register-link {
    color: #505b93;
}

.card {
    box-shadow: 0 10px 28px rgba(80, 91, 147, .07);
}

.alert {
    border-color: #ffd4d4;
    background: #fff3f3;
}

.alert.success {
    border-color: #bde8ca;
    background: #f1fff5;
}

body.theme-dark {
    background: #000;
    color: #d8e2f5;
}

body.theme-dark .site-header,
body.theme-dark .card,
body.theme-dark .footer,
body.theme-dark .friend-links,
body.theme-dark .signin-modal-box,
body.theme-dark .auth-modal-box {
    background: #080d17;
    color: #d8e2f5;
    border-color: #17243a;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #0d1524;
    color: #eef4ff;
    border-color: #223455;
}

body.theme-dark .brand,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark .section-title,
body.theme-dark .hero h1,
body.theme-dark .page-head h1,
body.theme-dark .post-title-card h1 {
    color: #f6f9ff;
}

body.theme-dark a,
body.theme-dark .nav nav a,
body.theme-dark .btn-light {
    color: #b9c0dd;
}

body.theme-dark .muted,
body.theme-dark .hero p,
body.theme-dark .page-head p {
    color: #9fb0ca;
}

body.theme-dark .btn,
body.theme-dark .brand-mark {
    background: #505b93;
}

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 31, 45, .38);
    backdrop-filter: blur(8px);
}

.auth-modal-overlay.is-open {
    display: flex;
}

.auth-modal-box {
    position: relative;
    width: 430px;
    max-width: 94vw;
    max-height: 88vh;
    overflow: auto;
    padding: 22px;
    border: 1px solid #dde2ef;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(51, 57, 97, .2);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #eef1f7;
    color: #505b93;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0 42px 18px 0;
    padding: 4px;
    border-radius: 12px;
    background: #eef1f7;
}

.auth-tab {
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #53627a;
    font-weight: 700;
    cursor: pointer;
}

.auth-tab.active {
    background: #fff;
    color: #505b93;
    box-shadow: 0 4px 12px rgba(80, 91, 147, .12);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-panel h2 {
    margin: 0 0 16px;
    color: #26232f;
}

.auth-panel label {
    display: block;
    margin-top: 12px;
}

.auth-submit {
    width: 100%;
    margin-top: 16px;
}

.auth-alert {
    margin: 0 0 14px;
}

body.theme-dark .auth-modal-overlay {
    background: rgba(0, 0, 0, .72);
}

body.theme-dark .auth-modal-close,
body.theme-dark .auth-tabs {
    background: #111b2e;
}

body.theme-dark .auth-tab {
    color: #9fb0ca;
}

body.theme-dark .auth-tab.active {
    background: #18243a;
    color: #c6cce0;
}

body.theme-dark .auth-panel h2 {
    color: #f6f9ff;
}

/* Final shape lock */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.attachment-delete-btn,
.signin-form button,
.signin-done {
    border-radius: 999px !important;
}

.card,
.forum-card,
.thread-card,
.post-title-card,
.post-content-card,
.reply-card,
.list-card,
.user-table tr,
.signin-modal-box,
.auth-modal-box,
.ad-box,
.friend-links,
.attachment-inline-card,
.editor-toolbar,
.captcha-box,
.search input,
input,
select,
textarea {
    border-radius: 6px !important;
}

.brand-mark,
.btn,
.hero .btn,
.page-head .btn,
.image-badge,
body.theme-dark .btn,
body.theme-dark .brand-mark {
    background: #505b93 !important;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #3f4874 !important;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #eef1f7 !important;
}

.settings-test-form {
    margin-top: 14px;
}

/* Final shape lock */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.attachment-delete-btn,
.signin-form button,
.signin-done {
    border-radius: 999px !important;
}

.card,
.forum-card,
.thread-card,
.post-title-card,
.post-content-card,
.reply-card,
.list-card,
.user-table tr,
.signin-modal-box,
.auth-modal-box,
.ad-box,
.friend-links,
.attachment-inline-card,
.editor-toolbar,
.captcha-box,
.search input,
input,
select,
textarea {
    border-radius: 6px !important;
}

.brand-mark,
.btn,
.hero .btn,
.page-head .btn,
.image-badge,
body.theme-dark .btn,
body.theme-dark .brand-mark {
    background: #505b93 !important;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #3f4874 !important;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #eef1f7 !important;
}

.settings-test-form {
    margin-top: 14px;
}

/* Final shape lock */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.attachment-delete-btn,
.signin-form button,
.signin-done {
    border-radius: 999px !important;
}

.card,
.forum-card,
.thread-card,
.post-title-card,
.post-content-card,
.reply-card,
.list-card,
.user-table tr,
.signin-modal-box,
.auth-modal-box,
.ad-box,
.friend-links,
.attachment-inline-card,
.editor-toolbar,
.captcha-box,
.search input,
input,
select,
textarea {
    border-radius: 6px !important;
}

.brand-mark,
.btn,
.hero .btn,
.page-head .btn,
.image-badge,
body.theme-dark .btn,
body.theme-dark .brand-mark {
    background: #505b93 !important;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #3f4874 !important;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #eef1f7 !important;
}

.settings-test-form {
    margin-top: 14px;
}

/* Shape and pure-color final pass */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.attachment-delete-btn,
.signin-form button,
.signin-done {
    border-radius: 999px !important;
}

.card,
.forum-card,
.thread-card,
.post-title-card,
.post-content-card,
.reply-card,
.list-card,
.user-table tr,
.signin-modal-box,
.auth-modal-box,
.ad-box,
.friend-links,
.attachment-inline-card,
.editor-toolbar,
.captcha-box,
.search input,
input,
select,
textarea {
    border-radius: 6px !important;
}

.brand-mark {
    background: #505b93 !important;
}

.btn,
.hero .btn,
.page-head .btn,
.image-badge,
body.theme-dark .btn,
body.theme-dark .brand-mark {
    background: #505b93 !important;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #3f4874 !important;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #eef1f7 !important;
}

.settings-test-form {
    margin-top: 14px;
}

body {
    margin: 0;
    background: #fff;
    color: #243241;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
}

body.theme-dark {
    background: #10161d;
    color: #d7e0ea;
}

body.theme-dark .site-header,
body.theme-dark .card,
body.theme-dark .footer,
body.theme-dark .friend-links,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #151f29;
    color: #d7e0ea;
    border-color: #273646;
}

body.theme-dark .brand,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark .section-title {
    color: #f3f7fb;
}

body.theme-dark a,
body.theme-dark .btn-light {
    color: #7bc4ff;
}

body.theme-dark .btn {
    background: #2e8fd0;
}

body.theme-cool-ocean .btn,
body.theme-cool-ocean .image-badge { background: #146c94; }
body.theme-cool-ocean a,
body.theme-cool-ocean .brand { color: #0f5f82; }
body.theme-cool-ocean { background: #f4fbfd; }

body.theme-cool-mint .btn,
body.theme-cool-mint .image-badge { background: #16876d; }
body.theme-cool-mint a,
body.theme-cool-mint .brand { color: #136f5b; }
body.theme-cool-mint { background: #f5fcf9; }

body.theme-cool-slate .btn,
body.theme-cool-slate .image-badge { background: #4b6478; }
body.theme-cool-slate a,
body.theme-cool-slate .brand { color: #40586c; }
body.theme-cool-slate { background: #f6f8fa; }

body.theme-warm-sand .btn,
body.theme-warm-sand .image-badge { background: #b7793b; }
body.theme-warm-sand a,
body.theme-warm-sand .brand { color: #9a642e; }
body.theme-warm-sand { background: #fffaf3; }

body.theme-warm-rose .btn,
body.theme-warm-rose .image-badge { background: #b45d72; }
body.theme-warm-rose a,
body.theme-warm-rose .brand { color: #9c4d62; }
body.theme-warm-rose { background: #fff7f8; }

body.theme-warm-amber .btn,
body.theme-warm-amber .image-badge { background: #c18417; }
body.theme-warm-amber a,
body.theme-warm-amber .brand { color: #95630e; }
body.theme-warm-amber { background: #fff9ed; }

a {
    color: #505b93;
    text-decoration: none;
}

a:hover {
    color: #3f4874;
}

.wrap {
    width: 1024px;
    max-width: 94%;
    margin: 0 auto;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #edf1f5;
}

.nav {
    min-height: 62px;
    overflow: hidden;
    padding: 14px 0;
}

.brand {
    float: left;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    line-height: 34px;
    font-weight: 800;
    color: #34303f;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 29%;
    clip-path: path("M19 0 C32 0 38 6 38 19 C38 32 32 38 19 38 C6 38 0 32 0 19 C0 6 6 0 19 0Z");
    background: #505b93;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(0, 108, 255, .24);
    font-size: 20px;
    line-height: 1;
}

.brand-mark i {
    color: #fff !important;
    line-height: 1;
}

.brand-name {
    line-height: 34px;
}

.nav nav {
    float: right;
    line-height: 34px;
}

.nav nav a {
    margin-left: 18px;
    color: #5b5568;
}

.signin-form {
    display: inline-block;
    margin: 0 0 0 14px;
}

.signin-form button,
.signin-done {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #cfe0eb;
    border-radius: 999px;
    color: #505b93;
    background: #f3f9fd;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}

.signin-done {
    color: #7a8793;
    background: #f5f7f9;
    cursor: default;
}

.signin-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(45, 41, 58, .22);
}

.signin-modal-box {
    width: 520px;
    max-width: 94vw;
    max-height: 82vh;
    overflow: auto;
    padding: 20px;
    border: 1px solid #d8e3ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(45, 41, 58, .2);
}

.signin-modal-box h2 {
    margin: 0 0 8px;
    color: #34303f;
}

.signin-rank-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
}

.signin-rank-mini h3 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #34303f;
}

.signin-rank-mini ol {
    margin: 0;
    padding-left: 18px;
    color: #6f7f8f;
    font-size: 13px;
    line-height: 1.8;
}

.user-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notification-bell-link {
    font-size: 19px;
    line-height: 1;
}

.bell-icon {
    display: inline-block;
    transform-origin: 50% 0;
    animation: qfBellShake .85s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(229, 57, 53, .25));
}

@keyframes qfBellShake {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(16deg); }
    30% { transform: rotate(-14deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d8e3ec;
    vertical-align: middle;
}

.card {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid #e5edf3;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(42, 80, 110, .06);
    padding: 20px;
    margin-top: 16px;
}

.hero,
.page-head {
    overflow: hidden;
}

.hero h1,
.page-head h1,
.post-title-card h1 {
    margin: 0 0 8px;
    color: #34303f;
}

/* 帖子页：标题、正文、回复使用三个同级独立框 */
.post-title-card .post-meta {
    margin-bottom: 10px;
}

.post-title-card h1 {
    margin: 0;
    line-height: 1.5;
    font-size: 22px;
}

.post-content-card {
    min-height: 260px;
}

.post-content-box {
    padding: 0;
}

.content-page-nav {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}

.content-page-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    margin-right: 6px;
    border: 1px solid #d8e6ef;
    border-radius: 8px;
    background: #fff;
    color: #5b5568;
}

.content-page-nav a.active {
    color: #fff;
    border-color: #505b93;
    background: #505b93;
}

/* 板块页“返回首页”小字链接 */
.page-head h1 .back-home {
    margin-left: 10px;
    font-size: 13px;
    font-weight: normal;
    color: #505b93;
    vertical-align: middle;
}

.page-head h1 .back-home:hover {
    color: #3f4874;
    text-decoration: none;
}

/* 首页“最新帖子”行内手机端发帖按钮：桌面端隐藏 */
.mobile-post-btn {
    display: none !important;
}

/* 首页列表作者信息行里的手机版浏览/回复统计：桌面端隐藏 */
.meta-metrics {
    display: none;
}

.hero p,
.page-head p,
.muted {
    color: #6f7f8f;
}

.hero .btn,
.page-head .btn {
    float: right;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background: #505b93;
    color: #fff !important;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: bold;
}

.btn:hover {
    background: #3f4874;
}

.btn-light {
    background: #eef5fb;
    color: #505b93 !important;
    margin-left: 8px;
}

.btn-light:hover {
    background: #dfeef8;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
    overflow: visible;
}

.grid > section {
    float: none;
    width: auto;
    max-width: 100%;
    min-width: 0;
}

.grid > aside {
    float: none;
    width: auto;
    min-width: 0;
}

.section-title {
    font-size: 18px;
    margin: 22px 0 10px;
    color: #34303f;
}

.latest-title-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.latest-title-filter {
    position: relative;
    display: inline-block;
}

.latest-title-filter .section-title {
    margin-right: auto;
}

.latest-title-trigger {
    cursor: pointer;
}

.latest-title-dropdown {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 30;
    min-width: 128px;
    padding: 8px;
    border: 1px solid #e5edf3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(45, 41, 58, .14);
    transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.latest-title-dropdown a {
    display: block;
    padding: 9px 10px;
    border-radius: 7px;
    color: #5b5568;
    font-size: 14px;
}

.latest-title-dropdown a:hover {
    color: #505b93;
    background: #f1f7fb;
}

.latest-title-filter:hover .latest-title-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.image-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    color: #fff;
    background: #505b93;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.forum-card {
    display: block;
    overflow: hidden;
    color: inherit;
    min-height: 86px;
}

.forum-card > div:first-child {
    float: left;
    width: 70%;
}

.forum-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.forum-card p {
    margin: 0;
    color: #6f7f8f;
}

.stats {
    float: right;
    width: 25%;
    text-align: right;
    color: #6f7f8f;
}

.stats strong {
    display: block;
    margin-left: 0;
    color: #34303f;
    font-size: 18px;
}

.side-forum-card {
    min-height: 0;
    padding: 16px;
}

.side-forum-card > div:first-child,
.side-forum-card .stats {
    float: none;
    width: 100%;
    text-align: left;
}

.side-forum-card .stats {
    margin-top: 10px;
}

.side-forum-card .stats strong {
    display: inline-block;
    margin-right: 4px;
}

.ad-box {
    margin: 14px 0;
    text-align: center;
    overflow: hidden;
}

.ad-box img {
    max-width: 100%;
    height: auto;
    vertical-align: top;
}

.ad-top {
    margin-top: 16px;
}

.ad-sidebar {
    margin: 0 0 12px;
}

.ad-footer {
    margin: 24px 0 0;
}

.ad-preview {
    margin: 10px 0 16px;
    padding: 10px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #fff;
}

.ad-preview img {
    max-width: 100%;
    height: auto;
}

.inline-check {
    width: auto;
    margin-right: 6px;
}

.latest-list .list-row a {
    font-size: 16px;
}

.list-row {
    position: relative;
    overflow: hidden;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.list-row:last-child {
    border-bottom: 0;
}

.list-row a {
    font-weight: bold;
    color: #243241;
}

.list-row p {
    margin: 5px 0 0;
    color: #7a8793;
    font-size: 12px;
}

.list-main {
    float: left;
    width: 78%;
}

.list-metrics {
    float: right;
    width: 20%;
    text-align: right;
    color: #b8c0c8;
    font-size: 13px;
    padding-top: 9px;
    white-space: nowrap;
}

.list-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 14px;
    line-height: 1;
}

.metric svg {
    width: 16px;
    height: 16px;
    stroke: #c3cad1;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-view svg circle {
    fill: none;
}

.thread-list {
    padding: 0;
}

.filter-tabs {
    margin-top: 14px;
    border-bottom: 1px solid #edf2f7;
}

.filter-tabs a {
    display: inline-block;
    padding: 10px 16px;
    margin-right: 4px;
    color: #6f7f8f;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.filter-tabs a.active {
    color: #505b93;
    background: #fff;
    border-color: #edf2f7;
    font-weight: 700;
}

.category-tabs {
    margin-top: 8px;
}

.thread-row {
    overflow: hidden;
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
}

.thread-row:last-child {
    border-bottom: 0;
}

.thread-main {
    float: left;
    width: 75%;
}

.thread-title {
    font-size: 16px;
    font-weight: 700;
    color: #243241;
}

.thread-main p {
    margin: 6px 0 0;
    color: #7a8793;
}

.thread-count {
    float: right;
    width: 20%;
    text-align: right;
    color: #7a8793;
    line-height: 1.7;
}

.tag {
    display: inline-block;
    margin-right: 5px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
}

.tag.red {
    background: #fff1f0;
    color: #c0392b;
}

.tag.good {
    background: #eef1f7;
    color: #1f6fa8;
}

.category-tag {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    color: #6b4b00;
    background: #fff4d6;
    font-size: 12px;
    font-weight: 700;
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

.forum-table th,
.forum-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
    word-break: break-all;
}

.forum-table th {
    color: #6f7f8f;
    font-size: 12px;
    font-weight: 700;
}

.forum-table input[type="text"],
.forum-table input[type="number"] {
    margin: 0;
    padding: 7px 8px;
    font-size: 13px;
}

.forum-name-col {
    width: 118px;
}

.forum-desc-col {
    width: 155px;
}

.forum-category-col {
    width: 255px;
}

.forum-limit-col {
    width: 250px;
}

.forum-order-col {
    width: 60px;
}

.forum-del-col {
    width: 64px;
    text-align: center;
}

.forum-table .forum-order-input {
    width: 48px;
    max-width: 48px;
    padding-left: 6px;
    padding-right: 4px;
    text-align: center;
}

.forum-table .category-cell,
.forum-table .limit-cell {
    width: auto;
}

.forum-admin-table .forum-category-cell input[type="text"] {
    width: 145px;
    min-width: 0;
}

.forum-admin-table .forum-limit-cell input[type="text"] {
    width: 140px;
    min-width: 0;
}

.forum-admin-table .category-inline {
    margin-right: 6px;
    font-size: 12px;
}

.forum-admin-table td:last-child label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    white-space: nowrap;
    font-size: 12px;
}

.add-forum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 80px;
    gap: 14px;
    align-items: end;
}

.category-cell {
    white-space: nowrap;
}

.limit-cell {
    white-space: nowrap;
}

.category-inline {
    display: inline-block;
    margin-right: 8px;
    white-space: nowrap;
}

.category-cell input[type="text"] {
    display: inline-block;
    width: calc(100% - 72px);
    min-width: 150px;
}

.limit-cell input[type="text"] {
    display: inline-block;
    width: calc(100% - 72px);
    min-width: 120px;
}

.ban-form {
    margin-bottom: 18px;
}

.admin-page-title {
    margin-bottom: 6px;
}

.admin-page-title h1 {
    margin: 0;
}

.admin-back-row {
    margin: 4px 0 14px;
}

.user-search {
    margin: 12px 0;
}

.user-table {
    table-layout: fixed;
}

.user-table th:nth-child(1),
.user-table td:nth-child(1) {
    width: 48px;
}

.user-table th:nth-child(2),
.user-table td:nth-child(2) {
    width: 52px;
}

.user-table th:nth-child(3),
.user-table td:nth-child(3) {
    width: 108px;
}

.user-table th:nth-child(4),
.user-table td:nth-child(4) {
    width: 118px;
}

.user-table th:nth-child(5),
.user-table td:nth-child(5) {
    width: 118px;
}

.user-table th:nth-child(6),
.user-table td:nth-child(6) {
    width: 78px;
}

.user-table th:nth-child(7),
.user-table td:nth-child(7) {
    width: 148px;
}

.user-table th:last-child,
.user-table td:last-child {
    width: 320px;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f1f1;
    vertical-align: middle;
}

/* 个人设置 - 头像来源选择 */
.profile-avatar-choose {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 6px 0 10px;
    flex-wrap: wrap;
}
.profile-avatar-choose .profile-avatar-preview {
    margin: 0;
    flex: 0 0 auto;
}
.profile-avatar-sources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-avatar-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}
.profile-avatar-radio input {
    width: auto;
    margin: 0;
}
.profile-avatar-panel {
    margin: 0 0 8px;
    padding: 12px 14px;
    background: #f6f7fb;
    border: 1px solid #e6e8f0;
    border-radius: 8px;
}
.profile-avatar-panel > *:last-child { margin-bottom: 0; }
body.theme-php-dark .profile-avatar-panel { background: #23262e; border-color: #333844; }
body.theme-php-dark .admin-user-avatar { background: #23262e; }

.user-actions form {
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px;
    align-items: center;
    margin: 3px 0;
}

.user-actions .user-action-clear {
    display: block;
}

.user-actions .user-action-clear .btn {
    width: 100%;
}

.user-actions input[type="number"] {
    width: 64px;
    margin: 0;
    padding: 7px 8px;
}

.user-actions input[type="password"] {
    width: 108px;
    margin: 0;
    padding: 7px 8px;
}

.user-actions .btn-small {
    padding: 7px 9px;
    white-space: nowrap;
}

.user-actions .user-action-moderator {
    display: block;
}

.user-actions .user-action-moderator .btn {
    width: 100%;
}

.moderator-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 999px;
    color: #7a4b00;
    background: #fff0c2;
    border: 1px solid #f2d27a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.btn-danger {
    background: #d93025;
}

.btn-danger:hover {
    background: #b42318;
}

.danger-link {
    color: #d93025;
    font-weight: 700;
}

.post-meta {
    color: #7a8793;
    font-size: 13px;
    margin-bottom: 10px;
}

.admin-tools {
    float: right;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    max-width: 100%;
}

.admin-tools a {
    margin-left: 0;
}

.action-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 26px;
    padding: 0;
    color: var(--badge-color, #505b93) !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    background: var(--badge-bg, #eef1f7);
    border: 1px solid var(--badge-border, #dce0ee);
    border-radius: 4px;
    cursor: pointer;
}

.action-badge i {
    font-size: 12px;
    line-height: 1;
}

.action-badge > span {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 20;
    width: max-content;
    max-width: 180px;
    padding: 6px 8px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    background: #111827;
    border-radius: 4px;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity .14s ease, transform .14s ease;
}

.action-badge > span::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 0;
    margin-left: -5px;
    content: "";
    border: 5px solid transparent;
    border-top-color: #111827;
}

.action-badge:hover > span,
.action-badge:focus-visible > span {
    opacity: 1;
    transform: translate(-50%, 0);
}

.action-badge:hover {
    color: var(--badge-hover-color, #fff) !important;
    background: var(--badge-hover-bg, var(--badge-color, #505b93));
    border-color: var(--badge-hover-border, var(--badge-color, #505b93));
}

.action-badge-edit {
    --badge-color: #505b93;
    --badge-bg: #eef1f7;
    --badge-border: #dce0ee;
}

.action-badge-move {
    --badge-color: #0f766e;
    --badge-bg: #ecfdf5;
    --badge-border: #b7ead9;
}

.action-badge-pin {
    --badge-color: #505b93;
    --badge-bg: #eef1f7;
    --badge-border: #dce0ee;
}

.action-badge-feature {
    --badge-color: #ca8a04;
    --badge-bg: #fffbeb;
    --badge-border: #fde68a;
}

.action-badge-reply {
    --badge-color: #505b93;
    --badge-bg: #eef1f7;
    --badge-border: #dce0ee;
}

.action-badge-danger {
    --badge-color: #d93025;
    --badge-bg: #fff1f0;
    --badge-border: #ffd0cc;
}

.action-badge-muted,
.action-badge-static {
    --badge-color: #64748b;
    --badge-bg: #f6f8fb;
    --badge-border: #e2e8f0;
}

.action-badge-static {
    cursor: default;
    --badge-hover-color: #64748b;
    --badge-hover-bg: #f6f8fb;
    --badge-hover-border: #e2e8f0;
}

button.action-badge {
    font-family: inherit;
}

.action-badge-static {
    width: auto;
    min-width: 0;
    padding: 0 8px;
}

.action-badge-static > span {
    position: static;
    width: auto;
    max-width: none;
    padding: 0;
    color: inherit;
    background: transparent;
    opacity: 1;
    transform: none;
}

.action-badge-static > span::after {
    display: none;
}

.move-thread-form {
    display: inline-block;
    margin-left: 8px;
}

.move-thread-form select {
    width: 96px;
    padding: 2px 4px;
    margin: 0 3px 0 0;
    font-size: 12px;
}

.move-thread-form button {
    padding: 0;
    border: 0;
    background: none;
    color: #505b93;
    cursor: pointer;
    font-size: 12px;
}

.content {
    line-height: 1.9;
    font-size: 15px;
    word-break: break-word;
}

.content-link {
    color: #505b93;
    border-bottom: 1px dashed rgba(31, 120, 180, .45);
    font-weight: 600;
}

.content-link:hover {
    color: #3f4874;
    border-bottom-style: solid;
}

.remote-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 8px;
}

.content img,
.attachment-img,
.remote-img {
    transition: max-width .18s ease, transform .18s ease, box-shadow .18s ease;
}

.content img:hover,
.attachment-img:hover,
.remote-img:hover {
    position: relative;
    z-index: 20;
    max-width: 900px;
    height: auto;
    transform: scale(1.02);
    box-shadow: 0 12px 36px rgba(45, 41, 58, .22);
}

.footer-friend-links {
    color: #7a8793;
}

.footer-friend-links a {
    margin-left: 8px;
    color: #7a8793;
}

.attachment-list {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
    overflow: hidden;
}

.reply-attachments {
    margin-top: 10px;
    padding-top: 10px;
}

.attachment-list h3 {
    margin: 0 0 12px;
    color: #34303f;
}

.attachment-img {
    display: inline-block;
    width: 480px;
    max-width: 100%;
    height: auto;
    margin: 0 12px 12px 0;
    border-radius: 8px;
    border: 1px solid #e5edf3;
    vertical-align: top;
}

.reply-attachments .attachment-img {
    display: inline-block;
    width: 220px;
    max-width: 100%;
}

.attachment-file {
    display: block;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #e5edf3;
    border-radius: 8px;
    background: #fff;
}

.attachment-inline-card {
    display: block;
    max-width: 560px;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #dce0ee;
    border-radius: 10px;
    background: #f8f6ff;
    color: #5b5568;
}

.attachment-inline-link {
    display: block;
    color: inherit;
}

.attachment-inline-card strong,
.attachment-inline-card span {
    display: block;
}

.attachment-inline-card strong {
    color: #34303f;
    font-size: 15px;
}

.attachment-inline-card span {
    margin-top: 4px;
    color: #6f7f8f;
    font-size: 12px;
}

.attachment-delete-form {
    display: inline-block;
    margin: 6px 0 10px;
}

.attachment-inline-card .attachment-delete-form {
    display: block;
    margin: 8px 0 0;
}

.attachment-delete-btn {
    border: 0;
    border-radius: 999px;
    background: #d64b4b;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
}

.attachment-delete-btn:hover {
    background: #b93636;
}

.reply {
    padding: 14px 0;
    border-bottom: 1px solid #edf2f7;
}

.floor-replies {
    margin: 6px 0 0;
    padding: 0;
    border-left: 0;
    background: transparent;
    border-radius: 0;
}

.floor-reply {
    padding: 4px 0 4px 18px;
    color: #5b5568;
    font-size: 13px;
}

.floor-reply span {
    color: #9aa8b5;
    font-size: 12px;
}

.floor-reply-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-left: 18px;
}

.floor-label {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef6fb;
    color: #505b93;
    font-size: 12px;
}

.floor-icon {
    margin-left: 3px;
    font-size: 13px;
}

.floor-reply-actions {
    float: right;
}

.floor-reply-toggle,
.floor-reply-submit {
    vertical-align: middle;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 16px;
}

.notification-actions form {
    margin: 0;
}

.floor-reply-form input {
    flex: 1;
    margin: 0;
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-item {
    display: block;
    padding: 12px 14px;
    border: 1px solid #e5edf3;
    border-radius: 10px;
    background: #fff;
}

.notification-item span {
    display: block;
    margin-top: 4px;
    color: #9aa8b5;
    font-size: 12px;
}

.reply:last-child {
    border-bottom: 0;
}

.narrow,
.narrow-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.auth-passkey {
    width: 100%;
    margin-top: 10px;
}

.passkey-card h2 {
    margin-top: 0;
}

.passkey-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.passkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5edf5;
    border-radius: 6px;
    background: #fff;
}

.passkey-item p {
    margin: 4px 0 0;
}

body.theme-dark .passkey-item {
    border-color: #273142;
    background: #111827;
}

label {
    display: block;
    margin: 12px 0 6px;
    color: #5b5568;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    padding: 11px 12px;
    outline: none;
    font-size: 14px;
    background: #fff;
}

textarea {
    resize: vertical;
}

.post-form-card {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.post-content-textarea {
    min-height: 320px;
    line-height: 1.8;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #d8e3ec;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f7f8fc;
}

.editor-toolbar button,
.editor-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #cfe0eb;
    border-radius: 6px;
    color: #5b5568;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.editor-toolbar button:hover,
.editor-upload-button:hover {
    color: #505b93;
    border-color: #c6cce0;
    background: #eef1f7;
}

.editor-upload-button input {
    display: none;
}

.editor-help-button {
    width: 32px !important;
    padding: 0 !important;
}

.editor-toolbar + textarea {
    border-radius: 0 0 8px 8px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #8791c4;
    box-shadow: 0 0 0 3px rgba(34, 116, 165, .12);
}

.captcha-box {
    margin: 12px 0;
}

.captcha-row {
    overflow: hidden;
}

.captcha-row input {
    float: left;
    width: 220px;
    max-width: calc(100% - 176px);
}

.captcha-row img {
    float: left;
    width: 160px;
    height: 52px;
    margin-left: 12px;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    cursor: pointer;
    background: #f5f9fc;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.upload-captcha-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 12px 0 18px;
}

.captcha-col {
    flex: 1;
}

.upload-col {
    width: 150px;
    text-align: center;
    position: relative;
    padding-top: 12px;
}

.upload-icon-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 92px;
    height: auto;
    margin: 0;
    color: #505b93;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.upload-icon-box input {
    display: none;
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 52px;
    border: 1px dashed #c6cce0;
    border-radius: 10px;
    background: #f7f8fc;
}

.upload-icon svg {
    fill: none;
    stroke: #5b5568;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-text {
    display: block;
    margin-top: 5px;
    color: #5b5568;
    font-size: 13px;
    line-height: 1.2;
}

.upload-help {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-left: 4px;
    vertical-align: top;
    padding: 0;
    border: 1px solid #cfe0eb;
    border-radius: 50%;
    color: #6f7f8f;
    background: #fff;
    cursor: pointer;
}

.upload-tip {
    display: none;
    position: absolute;
    right: 0;
    top: 92px;
    z-index: 5;
    width: 260px;
    padding: 10px 12px;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(45, 41, 58, .12);
    text-align: left;
}

.upload-status {
    margin: 8px 0 0;
    font-size: 12px;
}

.editor-upload-tip {
    position: static;
    width: auto;
    margin: 8px 0;
    box-shadow: none;
}

.editor-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 1140;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 31, 45, .38);
    backdrop-filter: blur(8px);
}

.editor-dialog-overlay.is-open {
    display: flex;
}

.editor-dialog-box {
    position: relative;
    width: 430px;
    max-width: 94vw;
    padding: 22px;
    background: #fff;
    border: 1px solid #dde2ef;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(51, 57, 97, .2);
}

.editor-dialog-box h2 {
    margin: 0 42px 16px 0;
    color: #26232f;
}

.editor-dialog-box label {
    display: block;
    margin: 10px 0 8px;
}

.editor-dialog-box input {
    width: 100%;
}

.editor-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    color: #505b93;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
    background: #eef1f7;
    border: 0;
    border-radius: 50%;
}

.editor-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.qf-upload-progress {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1150;
    width: 280px;
    max-width: calc(100vw - 36px);
    padding: 12px;
    color: #26232f;
    background: #fff;
    border: 1px solid #dde2ef;
    border-radius: 6px;
    box-shadow: 0 18px 44px rgba(51, 57, 97, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease;
}

.qf-upload-progress.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.qf-upload-progress-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.qf-upload-progress-name {
    margin-top: 8px;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qf-upload-progress-track {
    height: 6px;
    margin-top: 10px;
    overflow: hidden;
    background: #eef1f7;
    border-radius: 999px;
}

.qf-upload-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: #505b93;
    transition: width .14s ease;
}

.qf-upload-progress-text {
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

.qf-upload-progress.is-done .qf-upload-progress-track span {
    background: #0f766e;
}

.qf-upload-progress.is-error .qf-upload-progress-track span {
    background: #d93025;
}

body.theme-dark .editor-dialog-box,
body.theme-dark .qf-upload-progress {
    color: #d8e2f5;
    background: #080d17;
    border-color: #17243a;
}

body.theme-dark .editor-dialog-box h2 {
    color: #f6f9ff;
}

body.theme-dark .editor-dialog-close {
    color: #b9c0dd;
    background: #111827;
}

.rank-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-avatar-preview {
    margin: 12px 0;
}

.profile-avatar-preview img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d8e3ec;
    background: #f5f9fc;
}

form .btn {
    margin-top: 14px;
}

.forum-edit-form {
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.forum-edit-form:last-child {
    border-bottom: 0;
}

.forum-edit-form input {
    margin-bottom: 8px;
}

.alert {
    background: #fff5e6;
    color: #9a5a00;
    border: 1px solid #ffdfaa;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 12px 0;
}

.success {
    color: #187447;
}

.danger {
    color: #b42318;
}

.search {
    overflow: hidden;
}

.search input {
    float: left;
    width: 80%;
}

.search .btn {
    float: right;
    width: 18%;
    margin-top: 0;
}

.footer {
    margin-top: 30px;
    padding: 22px 0;
    color: #7a8793;
    border-top: 1px solid #edf1f5;
}

.footer-links {
    text-align: left;
}

@media (max-width: 860px) {
    .wrap {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .site-header .wrap.nav {
        padding-left: 24px;
        padding-right: 24px;
    }

    .nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        min-height: 0;
        overflow: visible;
        padding: 18px 0 14px;
    }

    .brand,
    .nav nav,
    .grid > section,
    .grid > aside,
    .forum-card > div:first-child,
    .stats,
    .thread-main,
    .list-main,
    .search input,
    .search .btn {
        float: none;
        width: 100%;
    }

    .brand {
        line-height: 1.2;
    }

    .nav nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
        line-height: 1.4;
    }

    .nav nav a {
        display: inline-flex;
        align-items: center;
        margin: 0;
    }

    .signin-form {
        margin: 0;
    }

    .user-mini {
        max-width: 120px;
    }

    .user-mini span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stats {
        text-align: left;
        margin-top: 10px;
    }

    .thread-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .thread-main {
        flex: 1;
        min-width: 0;
    }

    .thread-count {
        flex: 0 0 auto;
        float: none;
        width: auto;
        text-align: right;
        margin-top: 0;
        padding-top: 0;
        white-space: nowrap;
    }

    /* 手机端：首页帖子统计放到作者信息浅色文字这一行，避免挡住标题 */
    .list-row {
        display: block;
    }

    .list-main {
        width: 100%;
    }

    .latest-list .list-row a {
        display: block;
        padding-right: 0;
    }

    .list-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .meta-text {
        flex: 1;
        min-width: 0;
    }

    .list-metrics {
        display: none;
    }

    .meta-metrics {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
        margin-left: auto;
        color: #b8c0c8;
        white-space: nowrap;
        vertical-align: middle;
    }

    .meta-metrics .metric {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        line-height: 1;
    }

    .meta-metrics svg {
        width: 14px;
        height: 14px;
    }

    /* 手机端：隐藏 hero 区的“发布新帖”按钮，改用最新帖子行内按钮 */
    .hero .btn,
    .page-head .btn {
        display: none;
    }

    .hero,
    .page-head {
        text-align: left;
    }

    .mobile-post-btn {
        display: inline-block !important;
        margin-left: auto;
        padding: 6px 12px;
        font-size: 12px;
    }

    .latest-title-menu {
        flex-wrap: nowrap;
    }

    .admin-tools {
        float: none;
        display: block;
        margin-top: 6px;
    }

    .search .btn {
        margin-top: 10px;
    }

    .attachment-list {
        overflow: hidden;
    }

    .attachment-list a {
        display: block;
        max-width: 100%;
    }

    .attachment-img,
    .reply-attachments .attachment-img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        margin-right: 0;
    }

    .rank-grid {
        display: block;
    }

    .admin-stack {
        display: block;
    }

    .admin-stack .card {
        padding: 18px 14px;
        overflow: hidden;
    }

    .admin-stack .btn,
    .card > p .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
        text-align: center;
    }

    .add-forum-grid {
        display: block;
    }

    .category-cell,
    .limit-cell {
        display: block;
    }

    .category-inline {
        display: inline-flex;
        align-items: center;
        width: auto;
    }

    .mobile-admin-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 手机端后台版块表格：卡片化显示，电脑版保持原表格 */
    .admin-stack .forum-table {
        display: block;
        overflow-x: visible;
        white-space: normal;
        border-collapse: separate;
    }

    .forum-admin-table tr:first-child {
        display: none;
    }

    .forum-admin-table tr {
        display: block;
        margin: 12px 0;
        padding: 12px;
        border: 1px solid #edf2f7;
        border-radius: 12px;
        background: #fff;
    }

    .forum-admin-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border-bottom: 0;
    }

    .forum-admin-table td::before {
        display: block;
        margin-bottom: 5px;
        color: #6f7f8f;
        font-size: 12px;
        font-weight: 700;
    }

    .forum-admin-table td:nth-child(1)::before { content: "名称"; }
    .forum-admin-table td:nth-child(2)::before { content: "简介"; }
    .forum-admin-table td:nth-child(3)::before { content: "主题分类"; }
    .forum-admin-table td:nth-child(4)::before { content: "指定用户ID发帖"; }
    .forum-admin-table td:nth-child(5)::before { content: "排序"; }
    .forum-admin-table td:nth-child(6)::before { content: "删除"; }

    .admin-stack .forum-table input[type="text"],
    .admin-stack .forum-table input[type="number"],
    .forum-admin-table .forum-category-cell input[type="text"],
    .forum-admin-table .forum-limit-cell input[type="text"] {
        width: 100%;
        min-width: 0;
    }

    .forum-table .forum-order-input {
        max-width: 100%;
    }

    .forum-table:not(.forum-admin-table) {
        overflow-x: auto;
        white-space: nowrap;
    }

    .floor-reply-form {
        display: flex;
        align-items: center;
    }

    .user-table tr:first-child {
        display: none;
    }

    .user-table tr {
        display: block;
        margin: 12px 0;
        padding: 12px;
        border: 1px solid #edf2f7;
        border-radius: 12px;
        background: #fff;
    }

    .user-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border-bottom: 0;
        white-space: normal;
    }

    .user-table td:nth-child(1)::before { content: "ID"; }
    .user-table td:nth-child(2)::before { content: "用户名"; }
    .user-table td:nth-child(3)::before { content: "昵称"; }
    .user-table td:nth-child(4)::before { content: "状态"; }
    .user-table td:nth-child(5)::before { content: "权限"; }
    .user-table td:nth-child(6)::before { content: "注册时间"; }
    .user-table td:nth-child(7)::before { content: "操作"; }

    .user-table td::before {
        display: block;
        margin-bottom: 5px;
        color: #6f7f8f;
        font-size: 12px;
        font-weight: 700;
    }

    .user-actions form,
    .user-actions input,
    .user-actions button {
        display: block;
        width: 100%;
        margin: 6px 0;
    }
}

/* Final theme overrides */
body {
    background: #f8f6ff;
    color: #24212d;
}

a,
body.theme-cool-ocean a,
body.theme-cool-mint a,
body.theme-cool-slate a,
body.theme-warm-sand a,
body.theme-warm-rose a,
body.theme-warm-amber a {
    color: #505b93;
}

a:hover {
    color: #383f6a;
}

.site-header,
.card,
.footer,
.friend-links,
.signin-modal-box,
.auth-modal-box,
input,
select,
textarea {
    background: #fff;
    border-color: #dde2ef;
}

.brand,
body.theme-cool-ocean .brand,
body.theme-cool-mint .brand,
body.theme-cool-slate .brand,
body.theme-warm-sand .brand,
body.theme-warm-rose .brand,
body.theme-warm-amber .brand,
h1,
h2,
h3,
.section-title,
.hero h1,
.page-head h1,
.post-title-card h1,
.signin-modal-box h2,
.signin-rank-mini h3 {
    color: #26232f;
}

.brand-mark,
.btn,
.hero .btn,
.page-head .btn,
.image-badge,
body.theme-cool-ocean .btn,
body.theme-cool-mint .btn,
body.theme-cool-slate .btn,
body.theme-warm-sand .btn,
body.theme-warm-rose .btn,
body.theme-warm-amber .btn {
    background: #505b93;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #3f4874;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #eef1f7;
    border-color: #dce0ee;
    color: #505b93 !important;
}

.content-page-nav a.active {
    border-color: #505b93;
    background: #505b93;
}

.nav nav a {
    color: #48425a;
}

.nav nav a:hover,
.nav nav .nav-register-link {
    color: #505b93;
}

.card {
    box-shadow: 0 10px 28px rgba(80, 91, 147, .07);
}

body.theme-dark {
    background: #000;
    color: #d8e2f5;
}

body.theme-dark .site-header,
body.theme-dark .card,
body.theme-dark .footer,
body.theme-dark .friend-links,
body.theme-dark .signin-modal-box,
body.theme-dark .auth-modal-box {
    background: #080d17;
    color: #d8e2f5;
    border-color: #17243a;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #0d1524;
    color: #eef4ff;
    border-color: #223455;
}

body.theme-dark .brand,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark .section-title,
body.theme-dark .hero h1,
body.theme-dark .page-head h1,
body.theme-dark .post-title-card h1 {
    color: #f6f9ff;
}

body.theme-dark a,
body.theme-dark .nav nav a,
body.theme-dark .btn-light {
    color: #b9c0dd;
}

body.theme-dark .muted,
body.theme-dark .hero p,
body.theme-dark .page-head p {
    color: #9fb0ca;
}

body.theme-dark .btn,
body.theme-dark .brand-mark {
    background: #505b93;
}

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 31, 45, .38);
    backdrop-filter: blur(8px);
}

.auth-modal-overlay.is-open {
    display: flex;
}

.auth-modal-box {
    position: relative;
    width: 430px;
    max-width: 94vw;
    max-height: 88vh;
    overflow: auto;
    padding: 22px;
    border: 1px solid #dde2ef;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(51, 57, 97, .2);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #eef1f7;
    color: #505b93;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0 42px 18px 0;
    padding: 4px;
    border-radius: 12px;
    background: #eef1f7;
}

.auth-tab {
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #53627a;
    font-weight: 700;
    cursor: pointer;
}

.auth-tab.active {
    background: #fff;
    color: #505b93;
    box-shadow: 0 4px 12px rgba(80, 91, 147, .12);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-panel h2 {
    margin: 0 0 16px;
    color: #26232f;
}

.auth-panel label {
    display: block;
    margin-top: 12px;
}

.auth-submit {
    width: 100%;
    margin-top: 16px;
}

.auth-alert {
    margin: 0 0 14px;
}

body.theme-dark .auth-modal-overlay {
    background: rgba(0, 0, 0, .72);
}

body.theme-dark .auth-modal-close,
body.theme-dark .auth-tabs {
    background: #111b2e;
}

body.theme-dark .auth-tab {
    color: #9fb0ca;
}

body.theme-dark .auth-tab.active {
    background: #18243a;
    color: #c6cce0;
}

body.theme-dark .auth-panel h2 {
    color: #f6f9ff;
}

/* Final shape lock EOF */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.attachment-delete-btn,
.signin-form button,
.signin-done {
    border-radius: 999px !important;
}

.card,
.forum-card,
.thread-card,
.post-title-card,
.post-content-card,
.reply-card,
.list-card,
.user-table tr,
.signin-modal-box,
.auth-modal-box,
.ad-box,
.friend-links,
.attachment-inline-card,
.editor-toolbar,
.captcha-box,
.search input,
input,
select,
textarea {
    border-radius: 6px !important;
}

.brand-mark,
.btn,
.hero .btn,
.page-head .btn,
.image-badge,
body.theme-dark .btn,
body.theme-dark .brand-mark {
    background: #505b93 !important;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #3f4874 !important;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #eef1f7 !important;
}

.settings-test-form {
    margin-top: 14px;
}

/* Three-palette theme lock */
body.theme-light,
body.theme-cool-ocean,
body.theme-cool-mint,
body.theme-cool-slate,
body.theme-warm-sand,
body.theme-warm-rose,
body.theme-warm-amber {
    background: #f3f5f9;
    color: #111827;
}

body.theme-light .site-header,
body.theme-light .card,
body.theme-light .footer,
body.theme-light .friend-links,
body.theme-light .signin-modal-box,
body.theme-light .auth-modal-box,
body.theme-cool-ocean .site-header,
body.theme-cool-ocean .card,
body.theme-cool-ocean .footer,
body.theme-cool-ocean .friend-links,
body.theme-cool-ocean .signin-modal-box,
body.theme-cool-ocean .auth-modal-box,
body.theme-cool-mint .site-header,
body.theme-cool-mint .card,
body.theme-cool-mint .footer,
body.theme-cool-mint .friend-links,
body.theme-cool-mint .signin-modal-box,
body.theme-cool-mint .auth-modal-box,
body.theme-cool-slate .site-header,
body.theme-cool-slate .card,
body.theme-cool-slate .footer,
body.theme-cool-slate .friend-links,
body.theme-cool-slate .signin-modal-box,
body.theme-cool-slate .auth-modal-box,
body.theme-warm-sand .site-header,
body.theme-warm-sand .card,
body.theme-warm-sand .footer,
body.theme-warm-sand .friend-links,
body.theme-warm-sand .signin-modal-box,
body.theme-warm-sand .auth-modal-box,
body.theme-warm-rose .site-header,
body.theme-warm-rose .card,
body.theme-warm-rose .footer,
body.theme-warm-rose .friend-links,
body.theme-warm-rose .signin-modal-box,
body.theme-warm-rose .auth-modal-box,
body.theme-warm-amber .site-header,
body.theme-warm-amber .card,
body.theme-warm-amber .footer,
body.theme-warm-amber .friend-links,
body.theme-warm-amber .signin-modal-box,
body.theme-warm-amber .auth-modal-box {
    background: #ffffff;
    color: #111827;
    border-color: #e5e7eb;
}

body.theme-light a,
body.theme-light .brand,
body.theme-light .section-title,
body.theme-light .nav nav .nav-register-link,
body.theme-cool-ocean a,
body.theme-cool-ocean .brand,
body.theme-cool-ocean .section-title,
body.theme-cool-ocean .nav nav .nav-register-link,
body.theme-cool-mint a,
body.theme-cool-mint .brand,
body.theme-cool-mint .section-title,
body.theme-cool-mint .nav nav .nav-register-link,
body.theme-cool-slate a,
body.theme-cool-slate .brand,
body.theme-cool-slate .section-title,
body.theme-cool-slate .nav nav .nav-register-link,
body.theme-warm-sand a,
body.theme-warm-sand .brand,
body.theme-warm-sand .section-title,
body.theme-warm-sand .nav nav .nav-register-link,
body.theme-warm-rose a,
body.theme-warm-rose .brand,
body.theme-warm-rose .section-title,
body.theme-warm-rose .nav nav .nav-register-link,
body.theme-warm-amber a,
body.theme-warm-amber .brand,
body.theme-warm-amber .section-title,
body.theme-warm-amber .nav nav .nav-register-link {
    color: #505b93;
}

body.theme-light .btn,
body.theme-light .brand-mark,
body.theme-light .image-badge,
body.theme-cool-ocean .btn,
body.theme-cool-ocean .brand-mark,
body.theme-cool-ocean .image-badge,
body.theme-cool-mint .btn,
body.theme-cool-mint .brand-mark,
body.theme-cool-mint .image-badge,
body.theme-cool-slate .btn,
body.theme-cool-slate .brand-mark,
body.theme-cool-slate .image-badge,
body.theme-warm-sand .btn,
body.theme-warm-sand .brand-mark,
body.theme-warm-sand .image-badge,
body.theme-warm-rose .btn,
body.theme-warm-rose .brand-mark,
body.theme-warm-rose .image-badge,
body.theme-warm-amber .btn,
body.theme-warm-amber .brand-mark,
body.theme-warm-amber .image-badge {
    background: #505b93 !important;
}

body.theme-litenote {
    background: #f0eee9;
    color: #1a1a1a;
}

body.theme-litenote .site-header,
body.theme-litenote .card,
body.theme-litenote .footer,
body.theme-litenote .friend-links,
body.theme-litenote .signin-modal-box,
body.theme-litenote .auth-modal-box {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #e5e2de;
    box-shadow: 0 4px 16px rgba(26, 26, 26, .06);
}

body.theme-litenote input,
body.theme-litenote select,
body.theme-litenote textarea {
    background: #fbf9f6;
    color: #1a1a1a;
    border-color: #e5e2de;
}

body.theme-litenote a,
body.theme-litenote .brand,
body.theme-litenote .section-title,
body.theme-litenote .nav nav .nav-register-link {
    color: #e65a4c;
}

body.theme-litenote a:hover {
    color: #c24032;
}

body.theme-litenote .btn,
body.theme-litenote .brand-mark,
body.theme-litenote .image-badge {
    background: #e65a4c !important;
}

body.theme-litenote .btn:hover {
    background: #c24032 !important;
}

body.theme-litenote .btn-light,
body.theme-litenote .signin-form button,
body.theme-litenote .signin-done {
    background: #fff4f1 !important;
    border-color: #f4d0c9;
    color: #c24032 !important;
}

body.theme-litenote .muted,
body.theme-litenote .hero p,
body.theme-litenote .page-head p {
    color: #8b8680;
}

body.theme-litenote .content-page-nav a.active {
    border-color: #e65a4c;
    background: #e65a4c;
}

body.theme-dark {
    background: #000;
    color: #d7dee9;
}

body.theme-dark .site-header,
body.theme-dark .card,
body.theme-dark .footer,
body.theme-dark .friend-links,
body.theme-dark .signin-modal-box,
body.theme-dark .auth-modal-box {
    background: #0b0f17;
    color: #d7dee9;
    border-color: #1b2432;
    box-shadow: none;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #111827;
    color: #f3f6fb;
    border-color: #2a3546;
}

body.theme-dark a,
body.theme-dark .brand,
body.theme-dark .section-title,
body.theme-dark .nav nav a {
    color: #b9c0dd;
}

body.theme-dark .btn,
body.theme-dark .brand-mark,
body.theme-dark .image-badge {
    background: #505b93 !important;
}

body.theme-dark .btn-light,
body.theme-dark .signin-form button,
body.theme-dark .signin-done {
    background: #111827 !important;
    border-color: #2a3546;
    color: #b9c0dd !important;
}

body.theme-dark .muted,
body.theme-dark .hero p,
body.theme-dark .page-head p {
    color: #8a93a3;
}

/* Dynamic font application */
body {
    font-family: var(--qf-content-font, "Microsoft YaHei", "PingFang SC", Arial, sans-serif);
}

.brand,
.brand-name,
h1,
h2,
h3,
.section-title,
.hero h1,
.page-head h1,
.post-title-card h1,
.latest-title-trigger,
.forum-card h2,
.thread-title,
.list-main h2,
.auth-panel h2,
.signin-modal-box h2,
.signin-rank-mini h3,
.admin-page-title h1 {
    font-family: var(--qf-title-font, var(--qf-content-font, "Microsoft YaHei", "PingFang SC", Arial, sans-serif));
}

.post-content-box,
.thread-main,
.list-main,
.card,
input,
select,
textarea,
button {
    font-family: var(--qf-content-font, "Microsoft YaHei", "PingFang SC", Arial, sans-serif);
}

body.use-system-page-font,
body.use-system-page-font .brand,
body.use-system-page-font .brand-name,
body.use-system-page-font h1,
body.use-system-page-font h2,
body.use-system-page-font h3,
body.use-system-page-font .section-title,
body.use-system-page-font .hero h1,
body.use-system-page-font .page-head h1,
body.use-system-page-font .post-title-card h1,
body.use-system-page-font .latest-title-trigger,
body.use-system-page-font .forum-card h2,
body.use-system-page-font .thread-title,
body.use-system-page-font .list-main h2,
body.use-system-page-font .auth-panel h2,
body.use-system-page-font .signin-modal-box h2,
body.use-system-page-font .signin-rank-mini h3,
body.use-system-page-font .admin-page-title h1,
body.use-system-page-font .post-content-box,
body.use-system-page-font .thread-main,
body.use-system-page-font .list-main,
body.use-system-page-font .card,
body.use-system-page-font input,
body.use-system-page-font select,
body.use-system-page-font textarea,
body.use-system-page-font button {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

/* LiteNote-style navigation */
body {
    padding-top: 82px;
}

.site-nav-bar {
    position: fixed;
    top: 14px;
    left: 0;
    z-index: 900;
    display: flex;
    justify-content: center;
    width: 100%;
    pointer-events: none;
}

.site-nav-bar .nav-pill {
    width: max-content;
    max-width: calc(100vw - 32px);
    overflow: visible;
    background: #050505;
    border: 1px solid #1d1d1d;
    border-radius: 999px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
    pointer-events: auto;
}

.site-nav-bar .nav-row {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 54px;
    padding: 6px 8px;
}

.site-nav-bar .nav-identity-orb,
.site-nav-bar .nav-actions {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-nav-bar .nav-actions {
    gap: 4px;
}

.site-nav-bar .nav-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
}

.site-nav-bar .nav-avatar .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
    box-shadow: none;
}

.site-nav-bar .nav-avatar-home {
    position: absolute;
    inset: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #505b93;
    border-radius: 999px;
    opacity: 0;
    transition: opacity .16s ease;
}

.site-nav-bar .nav-avatar:hover .nav-avatar-home,
.site-nav-bar .nav-avatar.active .nav-avatar-home {
    opacity: 1;
}

.site-nav-bar .nav-link,
.site-nav-bar .nav-cta,
.site-nav-bar .nav-more-toggle {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-width: 0;
    padding: 0 12px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.site-nav-bar .nav-link i,
.site-nav-bar .nav-cta i,
.site-nav-bar .nav-more-toggle i {
    color: rgba(255, 255, 255, .62);
    font-size: 15px;
}

.site-nav-bar .nav-link:hover,
.site-nav-bar .nav-link.active,
.site-nav-bar .nav-more-toggle:hover,
.site-nav-bar .nav-more-toggle.is-open {
    color: #fff;
    background: #151515;
}

.site-nav-bar .nav-link:hover i,
.site-nav-bar .nav-link.active i,
.site-nav-bar .nav-more-toggle:hover i,
.site-nav-bar .nav-more-toggle.is-open i {
    color: #fff;
}

.site-nav-bar .nav-cta {
    color: #fff;
    background: #505b93;
}

.site-nav-bar .nav-cta:hover,
.site-nav-bar .nav-cta.active {
    color: #fff;
    background: #3f4874;
}

.site-nav-bar .nav-cta i,
.site-nav-bar .nav-cta:hover i,
.site-nav-bar .nav-cta.active i {
    color: #fff;
}

.site-nav-bar .nav-cta-mobile-icon,
.site-nav-bar .nav-more-close {
    display: none;
}

.site-nav-bar .nav-more-toggle.is-open .nav-more-bars {
    display: none;
}

.site-nav-bar .nav-more-toggle.is-open .nav-more-close {
    display: inline-block;
}

.site-nav-bar .nav-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 3;
    display: none;
    min-width: 168px;
    padding: 6px;
    background: #050505;
    border: 1px solid #1d1d1d;
    border-radius: 6px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .3);
}

.site-nav-bar .nav-more-menu.is-open {
    display: block;
}

.site-nav-bar .nav-more-item,
.site-nav-bar .nav-more-form .nav-more-item {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 6px;
}

.site-nav-bar .nav-more-form {
    display: block;
    margin: 0;
}

.site-nav-bar .nav-more-item i {
    width: 18px;
    color: rgba(255, 255, 255, .64);
    text-align: center;
}

.site-nav-bar .nav-more-item:hover,
.site-nav-bar .nav-more-form .nav-more-item:hover {
    color: #fff;
    background: #151515;
}

.site-nav-bar .nav-more-item:hover i {
    color: #fff;
}

.site-nav-bar .nav-more-item.is-static {
    cursor: default;
}

body.theme-litenote .site-nav-bar .nav-cta,
body.theme-litenote .site-nav-bar .nav-avatar-home {
    background: #e65a4c;
}

body.theme-litenote .site-nav-bar .nav-cta:hover,
body.theme-litenote .site-nav-bar .nav-cta.active {
    background: #c24032;
}

body.theme-dark .site-nav-bar .nav-pill,
body.theme-dark .site-nav-bar .nav-more-menu {
    background: #050505;
    border-color: #202632;
}

@media (max-width: 768px) {
    body {
        padding-top: 0;
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .site-nav-bar {
        top: auto;
        right: 0;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        left: 0;
        align-items: flex-end;
        padding: 0 10px;
    }

    .site-nav-bar .nav-pill {
        width: min(100%, 560px);
        max-width: 100%;
        border-radius: 22px;
    }

    .site-nav-bar .nav-row {
        gap: 0;
        min-height: 56px;
        padding: 4px 0;
    }

    .site-nav-bar .nav-identity-orb {
        flex: 1 1 0;
    }

        flex: 2 1 0;
        justify-content: space-between;
        gap: 0;
    }

    .site-nav-bar .nav-actions {
        flex: 2 1 0;
        justify-content: space-between;
        gap: 0;
    }

        display: none;
    }

    .site-nav-bar .nav-avatar,
    .site-nav-bar .nav-link,
    .site-nav-bar .nav-cta,
    .site-nav-bar .nav-more-toggle {
        flex: 1 1 0;
        flex-direction: column;
        gap: 4px;
        width: auto;
        height: 48px;
        padding: 5px 1px;
        border-radius: 6px;
    }

    .site-nav-bar .nav-avatar .brand-mark {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .site-nav-bar .nav-avatar-home {
        display: none;
    }

    .site-nav-bar .nav-link span,
    .site-nav-bar .nav-cta span,
    .site-nav-bar .nav-more-toggle span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-nav-bar .nav-link i,
    .site-nav-bar .nav-cta i,
    .site-nav-bar .nav-more-toggle i {
        font-size: 18px;
    }

    .site-nav-bar .nav-cta {
        color: rgba(255, 255, 255, .72);
        background: transparent;
    }

    .site-nav-bar .nav-cta.active,
    .site-nav-bar .nav-cta:hover {
        color: #fff;
        background: #151515;
    }

    .site-nav-bar .nav-activity-bars {
        display: none;
    }

    .site-nav-bar .nav-cta-mobile-icon {
        display: inline-block;
    }

    .site-nav-bar .nav-more-menu {
        top: auto;
        right: 0;
        bottom: calc(100% + 10px);
        min-width: 156px;
    }
}

@media (max-width: 380px) {
    .site-nav-bar {
        padding: 0 6px;
    }

    .site-nav-bar .nav-row {
        min-height: 52px;
    }

    .site-nav-bar .nav-avatar,
    .site-nav-bar .nav-link,
    .site-nav-bar .nav-cta,
    .site-nav-bar .nav-more-toggle {
        height: 46px;
    }

    .site-nav-bar .nav-link span,
    .site-nav-bar .nav-cta span,
    .site-nav-bar .nav-more-toggle span {
        font-size: 9px;
    }
}

/* LiteNote-style toast */
.alert:not(.auth-alert) {
    display: none;
}

/* Toast：与 LiteNote 后台 toast 样式完全一致 */
.qf-toast-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    width: auto;
    max-width: calc(100vw - 48px);
    pointer-events: none;
}

.qf-toast {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    pointer-events: auto;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    animation: toast-in 0.2s ease-out;
}

.qf-toast > i {
    display: inline-grid;
    flex: 0 0 20px;
    place-items: center;
    width: 20px;
    height: 20px;
    font-size: 16px;
    transform: translateY(-1px);
}

.qf-toast > .qf-toast-message {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: #fff;
    overflow-wrap: anywhere;
}

.qf-toast-success {
    background: #0f172a;
    border-color: rgba(15, 23, 42, 0.1);
}

.qf-toast-success > i {
    color: #22c55e;
}

.qf-toast-error {
    background: #0f172a;
    border-color: rgba(15, 23, 42, 0.1);
}

.qf-toast-error > i {
    color: #ef4444;
}

.qf-toast.is-leaving {
    animation: toast-out 0.18s ease-in forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* Admin storage tabs */
.storage-settings-tabs {
    margin: 18px 0;
    padding: 12px;
    background: #f7f8fc;
    border: 1px solid #dde2ef;
    border-radius: 6px;
}

.storage-tabs-head {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #dde2ef;
    border-radius: 999px;
}

.storage-tab-btn {
    width: auto;
    min-height: 34px;
    padding: 0 14px;
    margin: 0;
    color: #5b5568;
    font-size: 14px;
    font-weight: 800;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.storage-tab-btn.active {
    color: #fff;
    background: #505b93;
}

.storage-tab-panel {
    display: none;
}

.storage-tab-panel.active {
    display: block;
}

.storage-tab-panel h2 {
    margin-top: 2px;
}

body.theme-litenote .storage-settings-tabs {
    background: #fffdf8;
    border-color: #f4d0c9;
}

body.theme-litenote .storage-tabs-head {
    border-color: #f4d0c9;
}

body.theme-litenote .storage-tab-btn.active {
    background: #e65a4c;
}

body.theme-dark .storage-settings-tabs {
    background: #0b0f17;
    border-color: #253145;
}

body.theme-dark .storage-tabs-head {
    background: #111827;
    border-color: #253145;
}

body.theme-dark .storage-tab-btn {
    color: #9ba8bb;
}

body.theme-dark .storage-tab-btn.active {
    color: #fff;
    background: #505b93;
}

@media (max-width: 640px) {
    .storage-settings-tabs {
        padding: 10px;
    }

    .storage-tabs-head {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .storage-tab-btn {
        padding: 0 8px;
    }
}

/* Sticky footer and interaction polish */
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 180ms ease;
}

body.qf-page-ready {
    opacity: 1;
}

main.wrap {
    flex: 1 0 auto;
    width: 100%;
}

.footer {
    margin-top: auto;
    flex-shrink: 0;
}

.qf-ajax-loading main.wrap {
    opacity: .56;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.qf-loading-indicator {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 1300;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid #dde2ef;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(80, 91, 147, .12);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -10px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.qf-loading-indicator svg {
    width: 24px;
    height: 24px;
}

body.qf-is-loading .qf-loading-indicator {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.theme-dark .qf-loading-indicator {
    background: #0b0f17;
    border-color: #253145;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

body.theme-litenote .qf-loading-indicator {
    background: #fffdf8;
    border-color: #f4d0c9;
    box-shadow: 0 12px 28px rgba(154, 90, 0, .08);
}

.qf-zoomable-image {
    cursor: zoom-in;
}

.content img,
.attachment-img {
    transition: transform 180ms ease, opacity 180ms ease;
}

.content img:hover,
.attachment-img:hover {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    body,
    .qf-ajax-loading main.wrap,
    .content img,
    .attachment-img {
        transition: none;
    }
}

/* Right-side user menu */
.side-user-menu {
    position: fixed;
    top: 50%;
    right: 18px;
    z-index: 890;
    transform: translateY(-50%);
}

.side-user-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #fff;
    background: #505b93;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(80, 91, 147, .22);
    cursor: pointer;
    overflow: hidden;
}

.side-user-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-user-trigger i {
    font-size: 22px;
}

.side-user-panel {
    position: absolute;
    top: 50%;
    right: 58px;
    width: 190px;
    padding: 8px;
    background: #fff;
    border: 1px solid #dde2ef;
    border-radius: 6px;
    box-shadow: 0 16px 38px rgba(80, 91, 147, .14);
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -50%);
    transition: opacity 160ms ease, transform 160ms ease;
}

.side-user-menu.is-open .side-user-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
}

.side-user-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f0edff;
}

.side-user-card img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 999px;
}

.side-user-card strong,
.side-user-card span {
    display: block;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-user-card strong {
    color: #26232f;
    font-size: 14px;
}

.side-user-card span {
    color: #7a8793;
    font-size: 12px;
}

.side-user-panel a {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    color: #5b5568;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
}

.side-user-panel a i {
    width: 18px;
    color: #505b93;
    text-align: center;
}

.side-user-panel a:hover {
    color: #505b93;
    background: #eef1f7;
}

body.theme-litenote .side-user-trigger {
    background: #e65a4c;
    box-shadow: 0 12px 28px rgba(194, 64, 50, .16);
}

body.theme-litenote .side-user-panel {
    background: #fffdf8;
    border-color: #f4d0c9;
    box-shadow: 0 16px 38px rgba(154, 90, 0, .1);
}

body.theme-litenote .side-user-panel a i,
body.theme-litenote .side-user-panel a:hover {
    color: #c24032;
}

body.theme-litenote .side-user-panel a:hover {
    background: #fff4f1;
}

body.theme-dark .side-user-trigger {
    border-color: #0b0f17;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

body.theme-dark .side-user-panel {
    background: #0b0f17;
    border-color: #253145;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .5);
}

body.theme-dark .side-user-card {
    border-bottom-color: #253145;
}

body.theme-dark .side-user-card strong {
    color: #f3f6fb;
}

body.theme-dark .side-user-card span,
body.theme-dark .side-user-panel a {
    color: #9ba8bb;
}

body.theme-dark .side-user-panel a:hover {
    color: #b9c0dd;
    background: #111827;
}

@media (max-width: 980px) {
    .side-user-menu {
        display: none;
    }
}

/* Site width and search modal */
:root {
    --qf-site-width: 1024px;
}

.wrap,
main.wrap,
.footer .wrap {
    width: var(--qf-site-width);
    max-width: calc(100vw - 32px);
    margin-right: auto;
    margin-left: auto;
}

main.wrap {
    flex: 1 0 auto;
}

.site-nav-bar .nav-pill {
    width: var(--qf-site-width);
    max-width: calc(100vw - 32px);
}

.site-nav-bar .nav-row {
    justify-content: space-between;
}

.grid {
    grid-template-columns: minmax(0, 700px) 300px;
}

.latest-list,
.grid > section .card {
    width: 100%;
}

.grid > aside {
    justify-self: stretch;
}

.search-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 31, 45, .38);
    backdrop-filter: blur(8px);
}

.search-modal-overlay.is-open {
    display: flex;
}

.search-modal-box {
    position: relative;
    width: 520px;
    max-width: 94vw;
    padding: 22px;
    background: #fff;
    border: 1px solid #dde2ef;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(51, 57, 97, .2);
}

.search-modal-box h2 {
    margin: 0 42px 16px 0;
    color: #26232f;
}

.search-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    color: #505b93;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
    background: #eef1f7;
    border: 0;
    border-radius: 50%;
}

.search-modal-form label {
    display: block;
    margin-bottom: 8px;
}

.search-modal-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.search-modal-row input {
    width: 100%;
    margin: 0;
}

.search-modal-row .btn {
    width: auto;
    margin: 0;
}

body.theme-dark .search-modal-box {
    color: #d8e2f5;
    background: #080d17;
    border-color: #17243a;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

body.theme-dark .search-modal-box h2 {
    color: #f6f9ff;
}

body.theme-dark .search-modal-close {
    color: #b9c0dd;
    background: #111827;
}

@media (max-width: 640px) {
    .wrap,
    main.wrap,
    .footer .wrap,
    .site-nav-bar .nav-pill {
        max-width: calc(100vw - 20px);
    }

    .search-modal-row {
        grid-template-columns: 1fr;
    }

    .search-modal-row .btn {
        width: 100%;
    }
}

@media (max-width: 860px) {
    .grid {
        display: block;
    }

    .grid > aside {
        margin-top: 18px;
    }
}

/* PHP design system */
:root {
    --php-accent: #505b93;
    --php-nav: #505b93;
    --php-nav-hover: #3f4874;
    --php-nav-active: #333961;
    --php-lavender: #cfd6e8;
    --php-lavender-light: #eaeef6;
    --php-muted-accent: #bcc2dd;
    --php-purple: #793862;
    --php-text: #333333;
    --php-text-strong: #222222;
    --php-muted: #666666;
    --php-border: #E6E6E6;
    --php-border-medium: #CCCCCC;
    --php-surface: #FFFFFF;
    --php-surface-subtle: #F2F2F2;
    --php-surface-muted: #E2E4EF;
    --qf-title-font: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --qf-content-font: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body,
body.theme-php,
body.theme-light,
body.theme-litenote,
body.theme-dark {
    min-height: 100vh;
    color: var(--php-text);
    font-family: var(--qf-content-font);
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: 0;
    background: var(--php-surface-subtle);
}

body.theme-php *,
body.theme-light *,
body.theme-litenote *,
body.theme-dark * {
    letter-spacing: 0;
}

a,
body.theme-php a,
body.theme-light a,
body.theme-litenote a,
body.theme-dark a {
    color: var(--php-accent);
    text-decoration: none;
    text-underline-offset: 2px;
}

a:hover,
body.theme-php a:hover,
body.theme-light a:hover,
body.theme-litenote a:hover,
body.theme-dark a:hover {
    color: #3f4874;
}

a:visited {
    color: #505b93;
}

h1,
h2,
h3,
.brand,
.section-title,
.hero h1,
.page-head h1,
.post-title-card h1,
.signin-modal-box h2,
.signin-rank-mini h3,
.search-modal-box h2 {
    color: var(--php-accent);
    font-family: var(--qf-title-font);
    font-weight: 400;
}

h1,
.hero h1,
.page-head h1,
.post-title-card h1 {
    font-size: 32px;
    line-height: 40px;
}

h2,
.section-title,
.search-modal-box h2 {
    font-size: 24px;
    line-height: 32px;
}

h3,
.signin-rank-mini h3 {
    font-size: 20px;
    line-height: 28px;
}

.muted,
.hero p,
.page-head p,
.meta,
.thread-meta,
.forum-desc,
.side-user-card span {
    color: var(--php-muted);
}

.site-nav-bar {
    background: var(--php-nav);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

.site-nav-bar .nav-pill,
body.theme-dark .site-nav-bar .nav-pill,
.site-nav-bar .nav-more-menu,
body.theme-dark .site-nav-bar .nav-more-menu {
    height: 64px;
    color: var(--php-border-medium);
    background: var(--php-nav);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.site-nav-bar .nav-row {
    min-height: 64px;
}

.site-nav-bar .nav-avatar,
.site-nav-bar .nav-link,
.site-nav-bar .nav-cta,
.site-nav-bar .nav-more-toggle {
    min-height: 64px;
    color: var(--php-border-medium);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.site-nav-bar .nav-link,
.site-nav-bar .nav-cta {
    padding: 8px 16px;
}

.site-nav-bar .nav-link:hover,
.site-nav-bar .nav-cta:hover,
.site-nav-bar .nav-more-toggle:hover,
.site-nav-bar .nav-avatar:hover {
    color: var(--php-lavender-light);
    background: rgba(255, 255, 255, .1);
}

.site-nav-bar .nav-link.active,
.site-nav-bar .nav-cta.active,
.site-nav-bar .nav-avatar.active {
    color: var(--php-lavender-light);
    background: transparent;
}

.brand-mark,
body.theme-dark .brand-mark,
body.theme-litenote .brand-mark,
.site-nav-bar .brand-mark,
.side-user-trigger {
    color: #FFFFFF;
    background: var(--php-accent);
    box-shadow: none;
}

.site-nav-bar .nav-more-menu {
    top: 64px;
    height: auto;
    padding: 8px 0;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.site-nav-bar .nav-more-item {
    color: var(--php-border-medium);
    text-decoration: none;
    border-radius: 0;
}

.site-nav-bar .nav-more-item:hover {
    color: var(--php-lavender-light);
    background: rgba(255, 255, 255, .1);
}

.card,
.site-header,
.footer,
.friend-links,
.signin-modal-box,
.auth-modal-box,
.search-modal-box,
.side-user-panel,
.storage-settings-tabs,
body.theme-dark .card,
body.theme-dark .footer,
body.theme-dark .friend-links,
body.theme-dark .signin-modal-box,
body.theme-dark .auth-modal-box,
body.theme-dark .search-modal-box,
body.theme-dark .side-user-panel {
    color: var(--php-text);
    background: var(--php-surface);
    border: 1px solid var(--php-border);
    border-radius: 0;
    box-shadow: none;
}

.card,
.content-card {
    padding: 24px;
}

.latest-list .card,
.thread-list .card,
.news-card,
.forum-card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.grid > aside .card,
.sidebar,
.side-user-panel {
    font-size: 14px;
    line-height: 21px;
    border-color: var(--php-border-medium);
}

.btn,
button.btn,
input[type="submit"],
.hero .btn,
.page-head .btn,
.auth-submit,
.search-modal-row .btn,
body.theme-dark .btn,
body.theme-litenote .btn {
    min-height: 40px;
    color: #FFFFFF !important;
    font-family: var(--qf-content-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-decoration: none;
    background: var(--php-nav);
    border: 0;
    border-radius: 30px;
    box-shadow: none;
}

.hero .btn,
.page-head .btn {
    min-height: 58px;
    padding: 16px 32px;
    font-size: 20px;
}

.btn:hover,
button.btn:hover,
input[type="submit"]:hover,
.hero .btn:hover,
.page-head .btn:hover,
body.theme-dark .btn:hover,
body.theme-litenote .btn:hover {
    color: #FFFFFF !important;
    background: var(--php-nav-hover);
}

.btn:active,
button.btn:active,
input[type="submit"]:active {
    background: var(--php-nav-active);
}

.btn-light,
.signin-form button,
.signin-done,
.auth-passkey,
.content-page-nav a,
.storage-tab-btn,
body.theme-dark .btn-light,
body.theme-litenote .btn-light {
    min-height: 40px;
    color: var(--php-nav) !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-decoration: none;
    background: var(--php-surface);
    border: 1px solid #8791c4;
    border-radius: 8px;
    box-shadow: none;
}

.btn-light:hover,
.signin-form button:hover,
.auth-passkey:hover,
.content-page-nav a:hover,
.storage-tab-btn:hover {
    color: var(--php-nav) !important;
    background: var(--php-surface-subtle);
}

.content-page-nav a.active,
.storage-tab-btn.active {
    color: #FFFFFF !important;
    background: var(--php-nav);
    border-color: var(--php-nav);
}

input,
select,
textarea,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-litenote input,
body.theme-litenote select,
body.theme-litenote textarea {
    min-height: 40px;
    color: var(--php-text);
    font-family: var(--qf-content-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    background: var(--php-surface);
    border: 1px solid var(--php-border-medium);
    border-radius: 4px;
    box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--php-accent);
    box-shadow: 0 0 0 2px rgba(80, 91, 147, .12);
    outline: 0;
}

input:disabled,
select:disabled,
textarea:disabled {
    color: var(--php-border-medium);
    background: var(--php-surface-subtle);
    border-color: var(--php-border);
}

.search-modal-overlay,
.auth-modal-overlay,
.signin-modal-overlay {
    background: rgba(34, 34, 34, .42);
    backdrop-filter: none;
}

.search-modal-close,
.auth-modal-close {
    color: var(--php-nav);
    background: var(--php-surface-subtle);
    border-radius: 4px;
}

.auth-tabs {
    background: var(--php-surface-muted);
    border-radius: 4px;
}

.auth-tab {
    color: var(--php-nav);
    font-weight: 400;
    border-radius: 4px;
}

.auth-tab.active {
    color: var(--php-text-strong);
    background: #FFFFFF;
    box-shadow: none;
}

.tag,
.badge,
.image-badge,
.nav-badge {
    color: var(--php-text-strong);
    background: var(--php-lavender-light);
    border: 1px solid var(--php-muted-accent);
    border-radius: 4px;
}

.tag.good,
.image-badge {
    color: #FFFFFF;
    background: var(--php-accent);
    border-color: var(--php-accent);
}

.alert {
    color: var(--php-text);
    background: #FFFFFF;
    border: 1px solid var(--php-border-medium);
    border-radius: 0;
}

.alert.success,
.success {
    color: #2D6A4F;
}

.danger,
.alert.danger {
    color: #9F1D35;
}

.side-user-panel a {
    color: var(--php-text);
    text-decoration: none;
    border-radius: 0;
}

.side-user-panel a i,
.side-user-panel a:hover {
    color: var(--php-accent);
}

.side-user-panel a:hover {
    background: var(--php-surface-subtle);
}

table,
.table {
    color: var(--php-text);
    background: var(--php-surface);
    border-color: var(--php-border);
}

th,
td {
    border-color: var(--php-border);
}

code,
pre {
    color: var(--php-text-strong);
    background: var(--php-surface-muted);
    border: 1px solid var(--php-border);
    border-radius: 0;
}

@media (max-width: 640px) {
    body,
    body.theme-php,
    body.theme-light,
    body.theme-litenote,
    body.theme-dark {
        font-size: 16px;
        line-height: 1.5;
    }

    .site-nav-bar .nav-pill,
    .site-nav-bar .nav-row {
        min-height: 58px;
    }

    .site-nav-bar .nav-avatar,
    .site-nav-bar .nav-link,
    .site-nav-bar .nav-cta,
    .site-nav-bar .nav-more-toggle {
        min-height: 58px;
    }

    .card,
    .content-card,
    .search-modal-box,
    .auth-modal-box,
    .signin-modal-box {
        padding: 18px;
    }
}

/* php.net fidelity pass */
:root {
    --phpnet-nav: #505b93;
    --phpnet-nav-dark: #3f4874;
    --phpnet-bg: #272727;
    --phpnet-bg-soft: #333333;
    --phpnet-text-on-dark: #CCCCCC;
    --phpnet-white: #F2F2F2;
    --phpnet-paper: #F7F7F7;
    --phpnet-paper-border: #D8D8D8;
    --phpnet-link: #505b93;
    --phpnet-purple: #793862;
}

body.theme-php {
    color: var(--phpnet-text-on-dark);
    background-color: var(--phpnet-bg);
    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .018) 0, rgba(255, 255, 255, .018) 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(-45deg, rgba(0, 0, 0, .09) 0, rgba(0, 0, 0, .09) 1px, transparent 1px, transparent 5px);
    background-attachment: fixed;
}

body.theme-php .site-nav-bar {
    height: 64px;
    background: var(--phpnet-nav);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

body.theme-php .site-nav-bar .nav-pill {
    width: 1200px;
    max-width: calc(100vw - 70px);
    height: 64px;
    background: transparent;
}

body.theme-php .site-nav-bar .nav-row {
    min-height: 64px;
    gap: 28px;
}

body.theme-php .nav-identity-orb {
    width: auto;
    min-width: 92px;
}

body.theme-php .site-nav-bar .nav-avatar {
    width: auto;
    min-width: 92px;
    padding: 0;
    color: #FFFFFF;
    background: transparent;
}

body.theme-php .php-wordmark {
    display: inline-block;
    width: 86px;
    height: auto;
    transform: none;
}

body.theme-php .site-nav-bar .nav-avatar-home,
body.theme-php .site-nav-bar .brand-mark {
    display: none;
}

    gap: 12px;
}

body.theme-php .site-nav-bar .nav-link,
body.theme-php .site-nav-bar .nav-cta,
body.theme-php .site-nav-bar .nav-more-toggle {
    height: 64px;
    min-height: 64px;
    padding: 0 10px;
    color: #D8D8D8;
    font-size: 17px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}

body.theme-php .site-nav-bar .nav-link:hover,
body.theme-php .site-nav-bar .nav-link.active,
body.theme-php .site-nav-bar .nav-cta:hover,
body.theme-php .site-nav-bar .nav-cta.active,
body.theme-php .site-nav-bar .nav-more-toggle:hover {
    color: #FFFFFF;
    background: rgba(0, 0, 0, .12);
}

body.theme-php .site-nav-bar .nav-link-icon,
body.theme-php .site-nav-bar .nav-activity-bars,
body.theme-php .site-nav-bar .nav-cta-mobile-icon {
    display: none;
}

body.theme-php .site-nav-bar .nav-link[href*="search"] {
    min-width: 298px;
    height: 40px;
    min-height: 40px;
    margin-left: 18px;
    padding: 0 14px;
    justify-content: flex-start;
    color: #C9CDE8;
    background: rgba(0, 0, 0, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 6px;
}

body.theme-php .site-nav-bar .nav-link[href*="search"] .nav-link-icon {
    display: inline-flex;
    margin-right: 10px;
    color: #BFC5EA;
}

body.theme-php .site-nav-bar .nav-link[href*="search"]:hover {
    color: #FFFFFF;
    background: rgba(0, 0, 0, .16);
    border-color: rgba(255, 255, 255, .28);
}

body.theme-php .site-nav-bar .nav-cta {
    color: #FFFFFF;
}

body.theme-php .site-nav-bar .nav-more-menu {
    top: 64px;
    background: var(--phpnet-nav-dark);
    border: 1px solid rgba(0, 0, 0, .22);
}

body.theme-php main.wrap,
body.theme-php .wrap,
body.theme-php .footer .wrap,
body.theme-php .site-nav-bar .nav-pill {
    width: 1200px;
}

body.theme-php main.wrap {
    padding-top: 0;
}

body.theme-php .phpnet-hero {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto 42px;
    padding: 58px 32px 44px;
    color: var(--phpnet-text-on-dark);
    text-align: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.theme-php .phpnet-hero-logo {
    display: block;
    width: 300px;
    max-width: 78vw;
    height: auto;
    margin: 0 auto 18px;
}

body.theme-php .phpnet-hero-lead {
    margin: 0;
    color: #D7D7D7;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.55;
}

body.theme-php .phpnet-hero-copy {
    max-width: 900px;
    margin: 2px auto 28px;
    color: #D0D0D0;
    font-size: 18px;
    line-height: 1.55;
}

body.theme-php .phpnet-hero-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 34px;
}

body.theme-php .phpnet-hero-actions .btn {
    min-width: 190px;
    height: 58px;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 999px;
}

body.theme-php .phpnet-hero-actions .phpnet-primary {
    background: var(--phpnet-nav);
}

body.theme-php .phpnet-hero-actions .phpnet-secondary {
    color: #D7D9F4 !important;
    background: transparent;
    border: 2px solid #8791c4;
}

body.theme-php .phpnet-hero-actions .phpnet-secondary:hover {
    color: #FFFFFF !important;
    background: rgba(80, 91, 147, .35);
}

body.theme-php .phpnet-release-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    color: #989898;
    font-size: 16px;
}

body.theme-php .phpnet-release-strip a {
    color: #E6E6E6;
    text-decoration: none;
}

body.theme-php .phpnet-release-strip a:hover {
    color: #FFFFFF;
    text-decoration: none;
}

body.theme-php .phpnet-layout {
    width: 1200px;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

body.theme-php .latest-title-menu {
    display: none;
}

body.theme-php .phpnet-news-list {
    padding: 0;
    overflow: hidden;
    color: #333333;
    background: var(--phpnet-paper);
    border: 1px solid var(--phpnet-paper-border);
    border-right: 4px solid #C8C8C8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

body.theme-php .phpnet-news-list .list-row {
    display: block;
    min-height: 0;
    padding: 28px 24px 26px;
    border-bottom: 1px dotted #B7B7B7;
}

body.theme-php .phpnet-news-list .list-row:last-child {
    border-bottom: 0;
}

body.theme-php .phpnet-empty-news {
    min-height: 220px;
}

body.theme-php .phpnet-news-list .list-main > a {
    display: block;
    margin: 0 0 18px;
    color: var(--phpnet-link);
    font-size: 25px;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
}

body.theme-php .phpnet-news-list .list-main > a::after {
    content: " »";
}

body.theme-php .phpnet-news-list .list-main > a:hover {
    color: #3f4874;
    text-decoration: none;
}

body.theme-php .phpnet-news-list .list-meta {
    display: block;
    margin: 0;
    color: #555555;
    font-size: 16px;
    line-height: 1.55;
}

body.theme-php .phpnet-news-list .meta-text {
    display: block;
    margin-bottom: 10px;
}

body.theme-php .phpnet-news-list .meta-text::before {
    content: "发布信息：";
    color: var(--phpnet-purple);
}

body.theme-php .phpnet-news-list .meta-metrics,
body.theme-php .phpnet-news-list .list-metrics {
    display: inline-flex;
    gap: 12px;
}

body.theme-php .metric {
    color: #666666;
}

body.theme-php .metric svg {
    stroke: currentColor;
}

body.theme-php .tag,
body.theme-php .category-tag,
body.theme-php .image-badge {
    margin-right: 6px;
    padding: 2px 7px;
    color: #FFFFFF;
    font-size: 13px;
    line-height: 1.4;
    vertical-align: 3px;
    background: var(--phpnet-nav);
    border: 0;
    border-radius: 0;
}

body.theme-php .tag.red {
    background: var(--phpnet-purple);
}

body.theme-php .phpnet-sidebar {
    color: #CCCCCC;
}

body.theme-php .phpnet-sidebar .section-title {
    margin: 25px 0 18px;
    padding-bottom: 8px;
    color: #D8D8D8;
    font-size: 21px;
    line-height: 1.2;
    border-bottom: 1px dotted #555555;
}

body.theme-php .side-forum-card,
body.theme-php .forum-card.card.side-forum-card {
    display: block;
    margin: 0 0 22px;
    padding: 0;
    color: #CCCCCC;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.theme-php .side-forum-card h3 {
    margin: 0 0 8px;
    color: #D8D8D8;
    font-size: 19px;
    font-weight: 400;
}

body.theme-php .side-forum-card p {
    margin: 0 0 8px;
    color: #BBBBBB;
    font-size: 15px;
    line-height: 1.5;
}

body.theme-php .side-forum-card .stats {
    display: flex;
    gap: 8px;
    color: #999999;
    font-size: 14px;
}

body.theme-php .side-forum-card .stats strong {
    color: #FFFFFF;
    font-weight: 400;
}

body.theme-php .footer,
body.theme-php .friend-links {
    color: #BBBBBB;
    background: transparent;
    border-color: rgba(255, 255, 255, .12);
}

body.theme-php .footer a,
body.theme-php .friend-links a {
    color: #D8D8D8;
}

body.theme-php .search-modal-box,
body.theme-php .auth-modal-box,
body.theme-php .signin-modal-box,
body.theme-php .card:not(.phpnet-news-list):not(.side-forum-card) {
    background: var(--phpnet-paper);
    border: 1px solid var(--phpnet-paper-border);
    border-radius: 0;
}

body.theme-php .side-user-trigger {
    background: var(--phpnet-nav);
}

body.theme-php .side-user-panel {
    background: #F7F7F7;
}

@media (max-width: 900px) {
    body.theme-php .site-nav-bar .nav-pill,
    body.theme-php main.wrap,
    body.theme-php .wrap,
    body.theme-php .footer .wrap {
        max-width: calc(100vw - 24px);
    }

        gap: 4px;
    }

    body.theme-php .site-nav-bar .nav-link {
        padding: 0 8px;
        font-size: 15px;
    }

    body.theme-php .site-nav-bar .nav-link[href*="search"] {
        min-width: 0;
        width: auto;
        margin-left: 0;
        padding: 0 8px;
        background: transparent;
        border: 0;
    }

    body.theme-php .site-nav-bar .nav-link[href*="search"] .nav-link-icon {
        display: none;
    }

    body.theme-php .phpnet-hero {
        padding: 40px 12px 32px;
    }

    body.theme-php .phpnet-hero-logo {
        font-size: 88px;
    }

    body.theme-php .phpnet-layout {
        display: block;
    }

    body.theme-php .phpnet-sidebar {
        margin-top: 28px;
    }
}

@media (max-width: 640px) {
    body.theme-php .site-nav-bar {
        height: auto;
    }

    body.theme-php .site-nav-bar .nav-pill,
    body.theme-php .site-nav-bar .nav-row {
        min-height: 58px;
        height: auto;
    }

    body.theme-php .php-wordmark {
        width: 76px;
    }

    body.theme-php .phpnet-hero-logo {
        width: 220px;
    }

    body.theme-php .phpnet-hero-lead,
    body.theme-php .phpnet-hero-copy {
        font-size: 16px;
    }

    body.theme-php .phpnet-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.theme-php .phpnet-news-list .list-row {
        padding: 22px 18px;
    }

    body.theme-php .phpnet-news-list .list-main > a {
        font-size: 22px;
    }
}

/* php.net conflict reset */
body.theme-php {
    padding-top: 0;
    padding-bottom: 0;
}

body.theme-php .site-nav-bar {
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    pointer-events: auto;
}

body.theme-php .site-nav-bar .nav-pill {
    overflow: visible;
    border: 0;
    border-radius: 0;
    pointer-events: auto;
}

body.theme-php .site-nav-bar .nav-row {
    height: 64px;
    min-height: 64px;
    padding: 0;
}

body.theme-php .phpnet-hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    text-decoration: none;
}

body.theme-php .phpnet-hero-actions .phpnet-primary {
    background: var(--phpnet-nav) !important;
}

body.theme-php .phpnet-hero-actions .phpnet-primary:hover {
    background: #3f4874 !important;
}

body.theme-php .phpnet-hero-actions .phpnet-secondary {
    background: transparent !important;
}

body.theme-php .phpnet-hero-actions .phpnet-secondary:hover {
    background: rgba(80, 91, 147, .35) !important;
}

body.theme-php .phpnet-news-list,
body.theme-php .card.phpnet-news-list {
    margin: 0;
    border-radius: 0 !important;
}

body.theme-php .side-user-menu {
    display: none;
}

@media (max-width: 768px) {
    body.theme-php {
        padding-bottom: 0;
    }
}

/* php.do forum index */
body.theme-php {
    --phpdo-accent: #505b93;
    --phpdo-red: #ff674f;
    --phpdo-text: #3f3f3f;
    --phpdo-muted: #969696;
    --phpdo-line: #eceff3;
    --phpdo-soft: #f6f7f9;
    color: var(--phpdo-text);
    background:
        linear-gradient(#f7f7f8, #f7f7f8),
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(150, 150, 150, .16) 31px 32px),
        repeating-linear-gradient(90deg, transparent 0 31px, rgba(150, 150, 150, .16) 31px 32px);
    font-family: var(--qf-content-font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.theme-php main.wrap {
    max-width: none;
    width: 100%;
    padding: 0 0 52px;
}

body.theme-php .site-nav-bar {
    background: #fff;
    border-bottom: 1px solid #e7e8eb;
    box-shadow: 0 1px 6px rgba(20, 20, 20, .04);
}

body.theme-php .site-nav-bar .nav-pill {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 34px;
    background: transparent;
}

body.theme-php .site-nav-bar .nav-row {
    gap: 34px;
}

body.theme-php .site-nav-bar .nav-identity-orb,
body.theme-php .site-nav-bar .nav-avatar {
    width: auto;
    height: 64px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.theme-php .site-nav-bar .nav-avatar {
    height: 46px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

body.theme-php .site-nav-bar .php-wordmark {
    width: 220px;
    max-height: 42px;
    filter: none;
}

body.theme-php .site-nav-bar .nav-avatar-home {
    display: none;
}

    flex: 1;
    justify-content: flex-start;
    gap: 22px;
}

body.theme-php .site-nav-bar .nav-link {
    height: 64px;
    padding: 0 4px;
    color: #3c3c3c;
    font-size: 17px;
    font-weight: 700;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.theme-php .site-nav-bar .nav-link.active,
body.theme-php .site-nav-bar .nav-link:hover {
    color: #111;
}

body.theme-php .site-nav-bar .nav-link-icon {
    display: none;
}

body.theme-php .site-nav-bar .nav-actions {
    gap: 14px;
}

body.theme-php .nav-search-form {
    display: flex;
    align-items: center;
    width: 250px;
    height: 42px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 5px;
}

body.theme-php .nav-search-form input {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 12px;
    color: #333;
    font-size: 15px;
    background: transparent;
    border: 0;
    border-radius: 0 !important;
    outline: 0;
}

body.theme-php .nav-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #555;
    background: #fff !important;
    border: 0;
    border-left: 1px solid #edf0f3;
    border-radius: 0 !important;
    box-shadow: none;
    cursor: pointer;
}

body.theme-php .nav-search-form button:hover {
    color: var(--phpdo-accent);
    background: #f8f9fb !important;
}

body.theme-php .site-nav-bar .nav-cta,
body.theme-php .site-nav-bar .nav-more-toggle {
    height: 46px;
    min-width: 82px;
    padding: 0 18px;
    color: #333;
    font-size: 17px;
    font-weight: 800;
    border: 1px solid #dfe3e8;
    border-radius: 5px;
    background: #fff;
    box-shadow: none;
}

body.theme-php .site-nav-bar .nav-more-toggle {
    background: #fff;
}

body.theme-php .site-nav-bar .nav-cta:hover,
body.theme-php .site-nav-bar .nav-more-toggle:hover,
body.theme-php .site-nav-bar .nav-cta.active,
body.theme-php .site-nav-bar .nav-more-toggle.active {
    color: var(--phpdo-accent);
    border-color: #cfd6e8;
    background: #f7f8fc;
}

body.theme-php .site-nav-bar .nav-activity-bars,
body.theme-php .site-nav-bar .nav-cta-mobile-icon,
body.theme-php .site-nav-bar .nav-more-bars,
body.theme-php .site-nav-bar .nav-more-close {
    display: none;
}

body.theme-php .phpdo-home-shell {
    width: min(1200px, calc(100vw - 48px));
    margin: 0 auto;
}

body.theme-php .phpdo-category-bar {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 70px;
    padding: 0 30px;
    overflow-x: auto;
    color: #333;
    background: #fff;
    border: 1px solid #eceef2;
    border-top: 0;
    border-radius: 0 0 7px 7px;
    box-shadow: 0 1px 0 rgba(20, 20, 20, .03);
    white-space: nowrap;
    scrollbar-width: none;
}

body.theme-php .phpdo-category-bar::-webkit-scrollbar,
body.theme-php .phpdo-feed-tabs::-webkit-scrollbar {
    display: none;
}

body.theme-php .phpdo-category-bar a {
    color: #3c3c3c;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}

body.theme-php .phpdo-category-bar a:hover {
    color: var(--phpdo-accent);
}

body.theme-php .phpdo-inner-category-bar {
    background: #fff;
    border-bottom: 1px solid #eceef2;
    box-shadow: 0 1px 0 rgba(20, 20, 20, .03);
}

body.theme-php .phpdo-inner-category-bar > div {
    display: flex;
    align-items: center;
    gap: 28px;
    width: min(1200px, calc(100vw - 48px));
    min-height: 54px;
    margin: 0 auto;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

body.theme-php .phpdo-inner-category-bar > div::-webkit-scrollbar {
    display: none;
}

body.theme-php .phpdo-inner-category-bar a {
    color: #3c3c3c;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}

body.theme-php .phpdo-inner-category-bar a:hover {
    color: var(--phpdo-accent);
}

body.theme-php .phpdo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0;
    color: #a0a3a8;
    font-size: 14px;
}

body.theme-php .phpdo-breadcrumb a,
body.theme-php .phpdo-breadcrumb strong {
    color: #8f9399;
    text-decoration: none;
}

body.theme-php .phpdo-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
}

body.theme-php .phpdo-feed-card,
body.theme-php .phpdo-side-card {
    background: #fff;
    border: 1px solid #eceef2;
    border-radius: 7px;
    box-shadow: 0 1px 0 rgba(20, 20, 20, .02);
}

body.theme-php .phpdo-feed-card {
    min-width: 0;
    padding: 26px;
}

body.theme-php .phpdo-feed-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    scrollbar-width: none;
}

body.theme-php .phpdo-feed-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    height: 46px;
    padding: 0 20px;
    color: #333;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    background: #f1f1f1;
    border: 0;
    border-radius: 4px;
}

body.theme-php .phpdo-feed-tabs a.active {
    color: #fff;
    background: var(--phpdo-accent);
}

body.theme-php .phpdo-feed-tabs .phpdo-rss {
    min-width: 0;
    margin-left: auto;
    padding: 0;
    gap: 8px;
    color: #8f9399;
    font-size: 15px;
    background: transparent;
}

body.theme-php .phpdo-feed-tabs .phpdo-rss i {
    color: #ff9800;
    font-size: 17px;
}

body.theme-php .phpdo-thread-list {
    display: grid;
}

/* 新话题提示条 */
body.theme-php .phpdo-new-topics {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    margin: 0 auto 16px;
    padding: 9px 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    background: var(--phpdo-accent);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(80, 91, 147, .28);
    cursor: pointer;
    animation: phpdoNewTopics .28s ease;
}
body.theme-php .phpdo-new-topics[hidden] { display: none; }
body.theme-php .phpdo-new-topics b { font-weight: 800; }
body.theme-php .phpdo-new-topics:hover { filter: brightness(1.06); }
body.theme-php .phpdo-new-topics.is-loading { opacity: .7; pointer-events: none; }
@keyframes phpdoNewTopics {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 加载更多 */
body.theme-php .phpdo-feed-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 18px;
}
body.theme-php .phpdo-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 168px;
    height: 44px;
    padding: 0 26px;
    color: var(--phpdo-accent);
    font-size: 15px;
    font-weight: 700;
    background: #f4f5f9;
    border: 1px solid #e3e5ee;
    border-radius: 8px;
    cursor: pointer;
    transition: background .16s, color .16s;
}
body.theme-php .phpdo-more-btn[hidden] { display: none; }
body.theme-php .phpdo-more-btn:hover { color: #fff; background: var(--phpdo-accent); border-color: var(--phpdo-accent); }
body.theme-php .phpdo-more-btn .phpdo-more-spin {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: phpdoSpin .7s linear infinite;
}
body.theme-php .phpdo-more-btn.is-loading .phpdo-more-spin { display: inline-block; }
body.theme-php .phpdo-more-btn.is-loading .phpdo-more-label { opacity: .7; }
@keyframes phpdoSpin { to { transform: rotate(360deg); } }
body.theme-php .phpdo-feed-end {
    padding: 6px 0 2px;
    color: #9aa0a6;
    font-size: 13px;
}
body.theme-php .phpdo-feed-end[hidden] { display: none; }

/* 深色适配 */
body.theme-php-dark .phpdo-more-btn { background: #23262e; border-color: #333844; color: #c8ccff; }
body.theme-php-dark .phpdo-more-btn:hover { background: var(--phpdo-accent); border-color: var(--phpdo-accent); color: #fff; }
body.theme-php-dark .phpdo-feed-end { color: #6b7280; }

body.theme-php .phpdo-thread-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 84px;
    padding: 16px 0;
    border-bottom: 1px solid var(--phpdo-line);
}

body.theme-php .phpdo-thread-row:last-child {
    border-bottom: 0;
}

body.theme-php .phpdo-avatar {
    display: block;
    width: 58px;
    height: 58px;
    overflow: hidden;
    background: #eef0f4;
    border-radius: 0;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 0c9.601 0 12 2.399 12 12 0 9.601-2.399 12-12 12-9.601 0-12-2.399-12-12C0 2.399 2.399 0 12 0z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 0c9.601 0 12 2.399 12 12 0 9.601-2.399 12-12 12-9.601 0-12-2.399-12-12C0 2.399 2.399 0 12 0z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

body.theme-php .phpdo-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.theme-php .phpdo-thread-main {
    min-width: 0;
}

body.theme-php .phpdo-thread-main h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0 0 9px;
    color: #333;
    font-family: var(--qf-content-font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
}

body.theme-php .phpdo-thread-main h2 a {
    min-width: 0;
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-php .phpdo-thread-main h2 a:hover {
    color: var(--phpdo-accent);
}

body.theme-php .phpdo-thread-main p {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    color: #929292;
    font-size: 15px;
    line-height: 1.35;
}

body.theme-php .phpdo-new {
    color: var(--phpdo-red);
    font-size: 17px;
    font-weight: 800;
}

body.theme-php .phpdo-pill,
body.theme-php .phpdo-topic-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 7px;
    color: var(--phpdo-red) !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    background: #fff3ef;
    border-radius: 3px;
}
/* 关键词/分类徽章文字不加粗、字号 -1 */
body.theme-php .phpdo-topic-tag { font-weight: 400; font-size: 13px; }

body.theme-php .phpdo-author-link,
body.theme-php .phpdo-reply-author {
    color: inherit;
    font-weight: 400;
    text-decoration: none;
}

body.theme-php .phpdo-author-link:hover,
body.theme-php .phpdo-reply-author:hover {
    color: var(--phpdo-accent);
}

body.theme-php .phpdo-pill-outline {
    margin-right: 8px;
    color: var(--phpdo-red) !important;
    background: #fff;
    border: 1px solid var(--phpdo-red);
}

body.theme-php .phpdo-good {
    color: #5a6499 !important;
    background: #f0edff;
}

/* 徽章/按钮样式变体：柔和底色系（可用于置顶/精华/分类等各种标签） */
body.theme-php .phpdo-pill-blue    { color: #1d6fb8 !important; background: #e8f2fc; }
body.theme-php .phpdo-pill-green   { color: #2f8f4e !important; background: #e7f6ec; }
body.theme-php .phpdo-pill-amber   { color: #b7791f !important; background: #fdf3e0; }
body.theme-php .phpdo-pill-red     { color: #d1495b !important; background: #fdeaec; }
body.theme-php .phpdo-pill-purple  { color: #6b4bd6 !important; background: #f0ecfd; }
body.theme-php .phpdo-pill-cyan    { color: #1a8a9d !important; background: #e4f6f8; }
body.theme-php .phpdo-pill-slate   { color: #5a6270 !important; background: #eef0f3; }

/* 实心风格 */
body.theme-php .phpdo-pill-solid {
    color: #fff !important;
    background: var(--phpdo-accent);
}
body.theme-php .phpdo-pill-solid-red    { color: #fff !important; background: #e05d44; }
body.theme-php .phpdo-pill-solid-green  { color: #fff !important; background: #35a862; }
body.theme-php .phpdo-pill-solid-amber  { color: #fff !important; background: #f0951f; }

/* 描边风格（任意色，跟随当前文字色描边） */
body.theme-php .phpdo-pill-line {
    background: transparent;
    border: 1px solid currentColor;
}

/* 渐变风格 */
body.theme-php .phpdo-pill-gradient {
    color: #fff !important;
    background: linear-gradient(135deg, #6b7bd6, #9d6bd6);
    border: 0;
}

/* 深色适配：柔和底色改为半透明彩底 */
body.theme-php-dark .phpdo-pill-blue    { color: #7fc0f5 !important; background: rgba(29,111,184,.18); }
body.theme-php-dark .phpdo-pill-green   { color: #7fd6a0 !important; background: rgba(47,143,78,.18); }
body.theme-php-dark .phpdo-pill-amber   { color: #f0c778 !important; background: rgba(183,121,31,.20); }
body.theme-php-dark .phpdo-pill-red     { color: #f39aa6 !important; background: rgba(209,73,91,.18); }
body.theme-php-dark .phpdo-pill-purple  { color: #b7a4f5 !important; background: rgba(107,75,214,.20); }
body.theme-php-dark .phpdo-pill-cyan    { color: #7fd4de !important; background: rgba(26,138,157,.18); }
body.theme-php-dark .phpdo-pill-slate   { color: #b7bdc8 !important; background: rgba(90,98,112,.22); }

body.theme-php .phpdo-image-icon {
    color: #c6c8cc;
    font-size: 18px;
}

body.theme-php .phpdo-thread-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 116px;
    justify-content: flex-end;
    color: #9b9ea3;
    font-size: 16px;
    font-weight: 400;
}

body.theme-php .phpdo-thread-stats span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

body.theme-php .phpdo-thread-stats i {
    color: #aeb1b7;
    font-size: 16px;
}

body.theme-php .phpdo-home-sidebar {
    display: grid;
    gap: 18px;
}

body.theme-php .phpdo-side-card {
    padding: 22px 26px;
}

body.theme-php .phpdo-side-card h2 {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 17px;
    padding-bottom: 18px;
    color: #424242;
    font-size: 21px;
    font-weight: 900;
    border-bottom: 1px solid var(--phpdo-line);
}

body.theme-php .phpdo-side-card h2 span {
    width: 5px;
    height: 23px;
    background: var(--phpdo-accent);
    border-radius: 5px;
}

body.theme-php .phpdo-must-read ul {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.theme-php .phpdo-must-read li {
    position: relative;
    padding-left: 16px;
    color: #444;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.5;
}

body.theme-php .phpdo-must-read li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .72em;
    width: 4px;
    height: 4px;
    background: #c4c7cc;
    border-radius: 50%;
}

body.theme-php .phpdo-post-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 60px;
    color: #fff;
    font-size: 21px;
    font-weight: 900;
    text-decoration: none;
    background: var(--phpdo-accent);
    border-radius: 6px;
}

body.theme-php .phpdo-ad {
    min-height: 118px;
    padding: 18px 22px;
    overflow: hidden;
    color: #fff;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

body.theme-php .phpdo-ad strong,
body.theme-php .phpdo-ad span,
body.theme-php .phpdo-ad em {
    display: block;
}

body.theme-php .phpdo-ad strong {
    font-size: 24px;
    font-weight: 950;
    line-height: 1.15;
}

body.theme-php .phpdo-ad span {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 800;
}

body.theme-php .phpdo-ad em {
    margin-top: 10px;
    font-style: normal;
    font-size: 15px;
    font-weight: 800;
}

body.theme-php .phpdo-ad-warm {
    color: #f06b00;
    background: radial-gradient(circle at 90% 10%, #ffe3c8 0 26%, transparent 27%), linear-gradient(135deg, #fff2df, #ffd8bb);
}

body.theme-php .phpdo-ad-dark {
    background: linear-gradient(135deg, #0d0d0f, #222), repeating-linear-gradient(0deg, transparent 0 8px, rgba(255, 255, 255, .08) 8px 9px);
}

body.theme-php .phpdo-ad-cyan {
    color: #08556c;
    background: linear-gradient(135deg, #cff8ff, #52d7e5 48%, #34c889);
}

body.theme-php .footer {
    margin-top: 26px;
    padding: 0 0 42px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.theme-php .footer .wrap {
    width: min(1200px, calc(100vw - 48px));
    max-width: none;
}

body.theme-php .footer-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.45fr) minmax(210px, .75fr);
    gap: 34px;
    align-items: start;
    padding: 28px 0 0;
    color: #7f8792;
    border-top: 1px solid #e6e9ee;
}

body.theme-php .footer-brand {
    display: grid;
    gap: 12px;
}

body.theme-php .footer-logo {
    display: inline-flex;
    width: 172px;
    text-decoration: none;
}

body.theme-php .footer-logo img {
    display: block;
    width: 100%;
    height: auto;
}

body.theme-php .footer-brand p {
    max-width: 360px;
    margin: 0;
    color: #6f7681;
    font-size: 14px;
    line-height: 1.6;
}

body.theme-php .footer-copyright {
    display: grid;
    gap: 5px;
    color: #9299a4;
    font-size: 13px;
    line-height: 1.45;
}

body.theme-php .footer-link-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

body.theme-php .footer-link-group {
    display: grid;
    align-content: start;
    gap: 8px;
}

body.theme-php .footer-link-group h2 {
    margin: 0 0 4px;
    color: #3f444c;
    font-size: 15px;
    font-weight: 800;
}

body.theme-php .footer-link-group a {
    display: flex;
    align-items: center;
    width: fit-content;
    color: #6d737c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
}

body.theme-php .footer-link-group a:hover {
    color: var(--phpdo-accent);
}

body.theme-php .footer-social {
    display: grid;
    justify-items: end;
    gap: 14px;
}

body.theme-php .footer-social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

body.theme-php .footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 11px;
    color: #60656d;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 5px;
}

body.theme-php .footer-social-links a:hover {
    color: var(--phpdo-accent);
    border-color: #cfd6e8;
    background: #f7f8fc;
}

body.theme-php .footer-qr {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 112px;
    padding: 12px 10px 10px;
    color: #737b86;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: var(--phpdo-card-radius);
}

body.theme-php .footer-qr span {
    display: inline-grid;
    place-items: center;
    width: 74px;
    height: 74px;
    color: #8b92a0;
    font-size: 34px;
    background:
        linear-gradient(90deg, #d9dde5 1px, transparent 1px) 0 0 / 8px 8px,
        linear-gradient(#d9dde5 1px, transparent 1px) 0 0 / 8px 8px,
        #f7f8fa;
    border: 1px solid #dfe3e8;
    border-radius: 3px;
}

body.theme-php .phpdo-right-toolbar {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 80;
    display: grid;
    gap: 10px;
}

body.theme-php .phpdo-right-toolbar a,
body.theme-php .phpdo-right-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    color: #6d737c;
    text-decoration: none;
    background: #fff !important;
    border: 1px solid #e3e6eb;
    border-radius: 6px !important;
    box-shadow: 0 8px 22px rgba(30, 42, 60, .08);
    cursor: pointer;
}

body.theme-php .phpdo-right-toolbar a:hover,
body.theme-php .phpdo-right-toolbar button:hover {
    color: #fff;
    background: var(--phpdo-accent) !important;
    border-color: var(--phpdo-accent);
}

body.theme-php .phpdo-right-toolbar [data-scroll-top] {
    opacity: .58;
}

body.theme-php .phpdo-right-toolbar.is-scrolled [data-scroll-top] {
    opacity: 1;
}

@media (max-width: 1180px) {
    body.theme-php .phpdo-home-shell {
        width: min(1000px, calc(100vw - 32px));
    }

    body.theme-php .footer-panel {
        grid-template-columns: minmax(240px, .9fr) minmax(0, 1.1fr);
    }

    body.theme-php .footer-social {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) auto;
        justify-items: start;
        align-items: center;
    }

    body.theme-php .footer-social-links {
        justify-content: flex-start;
    }

    body.theme-php .phpdo-home-layout {
        grid-template-columns: 1fr;
    }

    body.theme-php .phpdo-home-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.theme-php .phpdo-must-read,
    body.theme-php .phpdo-post-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    body.theme-php .site-nav-bar .nav-pill {
        max-width: 100vw;
        padding: 0 8px;
    }

    body.theme-php .site-nav-bar .nav-row {
        gap: 8px;
    }

    body.theme-php .site-nav-bar .php-wordmark {
        width: 150px;
    }

        display: none;
    }

    body.theme-php .site-nav-bar .nav-actions {
        flex: 1;
        justify-content: flex-end;
        gap: 6px;
    }

    body.theme-php .site-nav-bar .nav-cta,
    body.theme-php .site-nav-bar .nav-more-toggle {
        min-width: 48px;
        height: 40px;
        padding: 0 9px;
        font-size: 14px;
    }

    body.theme-php .nav-search-form {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        background: #f8f9fb;
    }

    body.theme-php .nav-search-form:focus-within {
        position: absolute;
        left: 10px;
        right: 10px;
        z-index: 10;
        width: auto;
    }

    body.theme-php .nav-search-form input {
        flex: 0 1 0;
        padding: 0;
        width: 0;
    }

    body.theme-php .nav-search-form button {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
    }

    body.theme-php .nav-search-form:focus-within input {
        padding: 0 12px;
        width: auto;
    }

    body.theme-php .phpdo-home-shell {
        width: calc(100vw - 20px);
    }

    body.theme-php .footer .wrap {
        width: calc(100vw - 20px);
    }

    body.theme-php .footer-panel {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 22px;
    }

    body.theme-php .footer-logo {
        width: 150px;
    }

    body.theme-php .footer-link-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    body.theme-php .footer-social {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    body.theme-php .phpdo-category-bar {
        gap: 20px;
        min-height: 56px;
        padding: 0 16px;
    }

    body.theme-php .phpdo-category-bar a {
        font-size: 15px;
    }

    body.theme-php .phpdo-inner-category-bar > div {
        gap: 20px;
        width: calc(100vw - 20px);
        min-height: 50px;
    }

    body.theme-php .phpdo-inner-category-bar a {
        font-size: 15px;
    }

    body.theme-php .phpdo-feed-card {
        padding: 16px;
    }

    body.theme-php .phpdo-feed-tabs {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    body.theme-php .phpdo-feed-tabs a {
        min-width: 88px;
        height: 40px;
        padding: 0 12px;
        font-size: 15px;
    }

    body.theme-php .phpdo-thread-row {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 12px;
        min-height: 88px;
    }

    body.theme-php .phpdo-avatar {
        width: 44px;
        height: 44px;
    }

    body.theme-php .phpdo-thread-main h2 {
        font-size: 17px;
    }

    body.theme-php .phpdo-thread-main p {
        gap: 8px;
        flex-wrap: wrap;
        font-size: 13px;
    }

    body.theme-php .phpdo-thread-stats {
        grid-column: 2;
        justify-content: flex-start;
        min-width: 0;
        margin-top: -6px;
        font-size: 13px;
    }

    body.theme-php .phpdo-home-sidebar {
        grid-template-columns: 1fr;
    }

    body.theme-php .footer .wrap {
        width: calc(100vw - 20px);
    }

    body.theme-php .phpdo-right-toolbar {
        right: 10px;
        bottom: 16px;
        gap: 7px;
    }

    body.theme-php .phpdo-right-toolbar a,
    body.theme-php .phpdo-right-toolbar button {
        width: 40px;
        height: 40px;
    }
}

/* php.do inner pages */
body.theme-php.page-forum main.wrap,
body.theme-php.page-thread main.wrap,
body.theme-php.page-search main.wrap,
body.theme-php.page-post main.wrap,
body.theme-php.page-edit-thread main.wrap,
body.theme-php.page-tags main.wrap,
body.theme-php.page-user main.wrap,
body.theme-php.page-profile main.wrap,
body.theme-php.page-page main.wrap,
body.theme-php.page-login main.wrap,
body.theme-php.page-register main.wrap {
    width: min(1200px, calc(100vw - 48px));
    max-width: none;
    padding: 24px 0 56px;
}

body.theme-php .phpdo-page-head,
body.theme-php .phpdo-user-head,
body.theme-php .post-title-card,
body.theme-php .post-content-card,
body.theme-php .replies,
body.theme-php.page-thread main.wrap > .card:not(.post-title-card):not(.post-content-card):not(.replies),
body.theme-php.page-user main.wrap > .card,
body.theme-php.page-tags main.wrap > .card,
body.theme-php.page-profile main.wrap > .card,
body.theme-php.page-page main.wrap > .card,
body.theme-php.page-login main.wrap > .card,
body.theme-php.page-register main.wrap > .card,
body.theme-php .thread-list,
body.theme-php.page-search .thread-list {
    color: var(--phpdo-text);
    background: #fff;
    border: 1px solid #eceef2;
    border-radius: 7px;
    box-shadow: 0 1px 0 rgba(20, 20, 20, .02);
}

body.theme-php .phpdo-page-head,
body.theme-php .page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 16px;
    padding: 24px 26px;
}

body.theme-php .page-head h1,
body.theme-php .post-title-card h1 {
    margin: 0;
    color: #333;
    font-family: var(--qf-content-font), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.25;
}

body.theme-php .page-head p {
    margin: 8px 0 0;
    color: #85898f;
    font-size: 15px;
}

body.theme-php .page-head .back-home {
    margin-left: 10px;
    color: #8f9399;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

body.theme-php .page-head .btn,
body.theme-php.page-thread main.wrap > .card .btn {
    height: 42px;
    padding: 0 18px;
    color: #fff !important;
    font-size: 16px;
    font-weight: 850;
    background: var(--phpdo-accent);
    border: 0;
    border-radius: 5px;
    box-shadow: none;
}

body.theme-php .filter-tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

body.theme-php .filter-tabs::-webkit-scrollbar {
    display: none;
}

body.theme-php .filter-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 38px;
    padding: 0 14px;
    color: #4d5259;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    background: #f1f2f4;
    border: 0;
    border-radius: 4px;
}

body.theme-php .filter-tabs a.active {
    color: #fff;
    background: var(--phpdo-accent);
}

body.theme-php .category-tabs {
    padding-bottom: 6px;
}

body.theme-php .thread-list {
    margin: 0;
    padding: 12px 26px;
}

body.theme-php .thread-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 132px;
    gap: 18px;
    align-items: center;
    min-height: 92px;
    padding: 16px 0;
    border-bottom: 1px solid var(--phpdo-line);
}

body.theme-php .thread-row:last-child {
    border-bottom: 0;
}

body.theme-php .thread-main {
    min-width: 0;
}

body.theme-php .thread-title {
    display: block;
    overflow: hidden;
    color: #333 !important;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

body.theme-php .thread-title:hover {
    color: var(--phpdo-accent) !important;
}

body.theme-php .thread-main p {
    margin: 8px 0 0;
    color: #8f9399;
    font-size: 14px;
    line-height: 1.4;
}

body.theme-php .thread-count {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    color: #9b9ea3;
    font-size: 15px;
    font-weight: 400;
}

body.theme-php .thread-count span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

body.theme-php .thread-count i {
    color: #aeb1b7;
}

body.theme-php .tag,
body.theme-php .category-tag {
    display: inline-flex;
    align-items: center;
    height: 23px;
    margin-right: 7px;
    padding: 0 7px;
    color: var(--phpdo-red) !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    vertical-align: 2px;
    background: #fff3ef !important;
    border: 1px solid rgba(255, 103, 79, .22);
    border-radius: 3px;
    text-decoration: none;
}

body.theme-php .tag.good {
    color: #5a6499 !important;
    background: #f0edff !important;
    border-color: rgba(90, 100, 153, .18);
}

body.theme-php .phpdo-thread-title-card {
    padding: 22px 26px 24px;
}

body.theme-php .phpdo-thread-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: #9aa0a8;
    font-size: 14px;
}

body.theme-php .phpdo-thread-breadcrumb a {
    color: #7d838c;
    font-weight: 750;
    text-decoration: none;
}

body.theme-php .phpdo-thread-title-row {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

body.theme-php .phpdo-author-avatar,
body.theme-php .phpdo-reply-avatar {
    width: 58px;
    height: 58px;
    object-fit: cover;
    background: #eef0f4;
    border-radius: 50%;
}

body.theme-php .post-meta {
    color: #8d929a;
    font-size: 14px;
    line-height: 1.5;
}

body.theme-php .phpdo-thread-votes {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

body.theme-php .phpdo-thread-votes form {
    margin: 0;
}

body.theme-php .phpdo-vote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 78px;
    height: 36px;
    padding: 0 12px;
    color: #666 !important;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    background: #f3f4f6 !important;
    border: 1px solid #e3e6eb;
    border-radius: 5px !important;
    box-shadow: none;
    cursor: pointer;
}

body.theme-php .phpdo-vote-button i {
    color: #a2a7af;
}

body.theme-php .phpdo-vote-button strong {
    color: #333;
    font-weight: 950;
}

body.theme-php .phpdo-vote-button:hover,
body.theme-php .phpdo-vote-button.active {
    color: #fff !important;
    background: var(--phpdo-accent) !important;
    border-color: var(--phpdo-accent);
}

body.theme-php .phpdo-vote-button:hover i,
body.theme-php .phpdo-vote-button:hover strong,
body.theme-php .phpdo-vote-button.active i,
body.theme-php .phpdo-vote-button.active strong {
    color: #fff;
}

body.theme-php .post-content-card {
    margin-top: 14px;
    padding: 26px;
}

body.theme-php .post-content-box,
body.theme-php .reply .content {
    color: #333;
    font-size: 16px;
    line-height: 1.78;
}

body.theme-php .content a {
    color: var(--phpdo-accent);
}

body.theme-php .replies {
    margin-top: 14px;
    padding: 0;
    overflow: hidden;
}

body.theme-php .replies > h2 {
    margin: 0;
    padding: 18px 24px;
    color: #333;
    font-size: 20px;
    font-weight: 900;
    background: #fbfbfc;
    border-bottom: 1px solid var(--phpdo-line);
}

body.theme-php .reply {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 22px;
    margin: 0;
    padding: 34px 30px 28px;
    border-bottom: 1px solid var(--phpdo-line);
}

body.theme-php .reply:last-child {
    border-bottom: 0;
}

body.theme-php .phpdo-reply-body {
    position: relative;
    min-width: 0;
}

body.theme-php .phpdo-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 42px;
    margin: 0 0 18px;
}

body.theme-php .reply .post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    color: #989ca2;
    font-size: 16px;
}

body.theme-php .reply .post-meta strong,
body.theme-php .phpdo-reply-author {
    color: #555;
    font-size: 18px;
    font-weight: 900;
}

body.theme-php .phpdo-level {
    display: inline-flex;
    align-items: center;
    height: 25px;
    padding: 0 7px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    background: var(--phpdo-accent);
    border-radius: 5px;
}

body.theme-php .phpdo-meta-sep {
    width: 1px;
    height: 20px;
    background: #eceef2;
}

body.theme-php .phpdo-only-author {
    color: #8f9399;
    font-weight: 800;
    text-decoration: none;
}

body.theme-php .phpdo-only-author:hover {
    color: var(--phpdo-accent);
}

body.theme-php .phpdo-floor-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 44px;
    padding: 0 10px;
    color: #9a9a9a;
    font-size: 18px;
    font-weight: 900;
    background: #f7f7f7;
    border-radius: 6px;
}

body.theme-php .reply .content {
    min-height: 72px;
    color: #333;
    font-size: 20px;
    line-height: 1.75;
}

body.theme-php .phpdo-signature {
    margin-top: 56px;
    padding-top: 0;
    color: #333;
    border-top: 1px dashed #d9dde3;
}

body.theme-php .phpdo-signature span {
    display: inline-block;
    position: relative;
    top: -11px;
    padding-right: 12px;
    color: var(--phpdo-accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    letter-spacing: 1.5px;
    background: #fff;
}

body.theme-php .phpdo-signature p {
    margin: 8px 0 0;
    color: #444;
    font-size: 16px;
    line-height: 1.6;
}

body.theme-php .phpdo-reply-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    color: #999;
}

body.theme-php .phpdo-reply-actions > div {
    display: flex;
    align-items: center;
    gap: 18px;
}

body.theme-php .phpdo-reply-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: #96999e;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
}

body.theme-php .phpdo-reply-action i {
    color: #b0b3b8;
    font-size: 20px;
}

body.theme-php .phpdo-reply-action:hover,
body.theme-php .phpdo-reply-action:hover i {
    color: var(--phpdo-accent);
}

body.theme-php .phpdo-report {
    cursor: default;
}

body.theme-php .floor-label {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 7px;
    color: #6c7480;
    background: #f1f2f4;
    border-radius: 99px;
}

body.theme-php .floor-replies {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding: 12px;
    background: #f7f8fa;
    border: 1px solid #eceef2;
    border-radius: 6px;
}

body.theme-php .floor-replies:empty {
    display: none;
}

body.theme-php .floor-reply {
    margin: 0;
    padding: 8px 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.55;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 6px;
}

body.theme-php .floor-reply strong {
    color: #333;
}

body.theme-php .floor-reply span {
    margin-left: 8px;
    color: #a0a4aa;
    font-size: 12px;
}

body.theme-php .floor-reply-form {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

body.theme-php .floor-reply-form input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #dfe3e8;
    border-radius: 5px;
}

body.theme-php .floor-reply-toggle,
body.theme-php .floor-reply-submit,
body.theme-php .action-badge {
    border-radius: 5px;
}

body.theme-php.page-thread main.wrap > .card:not(.post-title-card):not(.post-content-card):not(.replies) {
    margin-top: 14px;
    padding: 22px 24px;
}

body.theme-php.page-thread textarea,
body.theme-php.page-post textarea,
body.theme-php.page-edit-thread textarea,
body.theme-php.page-thread input,
body.theme-php.page-post input,
body.theme-php.page-edit-thread input,
body.theme-php.page-thread select,
body.theme-php.page-post select,
body.theme-php.page-edit-thread select {
    border-color: #dfe3e8;
    border-radius: 5px;
}

body.theme-php .phpdo-user-head {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
}

body.theme-php .phpdo-user-head .phpdo-author-avatar {
    width: 72px;
    height: 72px;
}

body.theme-php .phpdo-list-heading {
    margin: 8px 0 10px;
    padding-bottom: 14px;
    color: #333;
    font-size: 20px;
    font-weight: 900;
    border-bottom: 1px solid var(--phpdo-line);
}

body.theme-php .phpdo-empty {
    margin: 18px 0;
    color: #8f9399;
}

body.theme-php .phpdo-user-replies {
    margin-top: 14px;
}

body.theme-php .phpdo-static-page {
    padding: 28px 30px;
}

body.theme-php .phpdo-static-page p {
    margin: 0 0 14px;
    color: #444;
    font-size: 17px;
    line-height: 1.8;
}

body.theme-php .phpdo-static-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--phpdo-line);
}

body.theme-php .phpdo-static-links a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    color: #4d5259;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    background: #f1f2f4;
    border-radius: 4px;
}

body.theme-php .phpdo-static-links a.active {
    color: #fff;
    background: var(--phpdo-accent);
}

body.theme-php .phpdo-auth-page {
    width: min(520px, 100%);
    margin: 32px auto 0;
    padding: 28px 30px;
}

body.theme-php .phpdo-auth-head h1 {
    margin: 0;
    color: #333;
    font-size: 28px;
    font-weight: 950;
}

body.theme-php .phpdo-auth-head p {
    margin: 8px 0 20px;
    color: #85898f;
    font-size: 15px;
    line-height: 1.6;
}

body.theme-php .phpdo-auth-page label {
    display: block;
    margin: 14px 0 7px;
    color: #444;
    font-weight: 850;
}

body.theme-php .phpdo-auth-page input {
    width: 100%;
    height: 42px;
    border-color: #dfe3e8;
    border-radius: 5px !important;
}

body.theme-php .phpdo-auth-page .auth-submit,
body.theme-php .phpdo-auth-page .auth-passkey {
    width: 100%;
    height: 44px;
    margin: 18px 0 0;
    border-radius: 5px !important;
}

body.theme-php .phpdo-auth-page .auth-passkey {
    margin-top: 10px;
}

body.theme-php .phpdo-auth-switch {
    margin: 18px 0 0;
    color: #85898f;
    text-align: center;
}

body.theme-php .phpdo-auth-switch a {
    color: var(--phpdo-accent);
    font-weight: 900;
}

@media (max-width: 900px) {
    body.theme-php.page-forum main.wrap,
    body.theme-php.page-thread main.wrap,
    body.theme-php.page-search main.wrap,
    body.theme-php.page-post main.wrap,
    body.theme-php.page-edit-thread main.wrap,
    body.theme-php.page-tags main.wrap,
    body.theme-php.page-user main.wrap,
    body.theme-php.page-profile main.wrap,
    body.theme-php.page-page main.wrap,
    body.theme-php.page-login main.wrap,
    body.theme-php.page-register main.wrap {
        width: calc(100vw - 20px);
        padding-top: 14px;
    }

    body.theme-php .page-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    body.theme-php .phpdo-user-head {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    body.theme-php .phpdo-user-head .phpdo-author-avatar {
        width: 52px;
        height: 52px;
    }

    body.theme-php .thread-list {
        padding: 6px 16px;
    }

    body.theme-php .thread-row {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 12px;
        min-height: 88px;
    }

    body.theme-php .thread-row .phpdo-avatar {
        width: 44px;
        height: 44px;
    }

    body.theme-php .thread-title {
        font-size: 17px;
    }

    body.theme-php .thread-main p {
        font-size: 13px;
    }

    body.theme-php .thread-count {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: -5px;
        font-size: 13px;
    }

    body.theme-php .phpdo-thread-title-card,
    body.theme-php .post-content-card {
        padding: 18px;
    }

    body.theme-php .phpdo-thread-title-row,
    body.theme-php .reply {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
    }

    body.theme-php .phpdo-author-avatar,
    body.theme-php .phpdo-reply-avatar {
        width: 44px;
        height: 44px;
    }

    body.theme-php .post-title-card h1 {
        font-size: 21px;
    }

    body.theme-php .reply {
        padding: 20px 16px;
    }

    body.theme-php .phpdo-reply-header {
        align-items: flex-start;
        margin-bottom: 12px;
    }

    body.theme-php .reply .post-meta {
        gap: 8px;
        font-size: 13px;
    }

    body.theme-php .reply .post-meta strong {
        font-size: 15px;
    }

    body.theme-php .phpdo-level {
        height: 22px;
        font-size: 12px;
    }

    body.theme-php .phpdo-floor-no {
        min-width: 42px;
        height: 36px;
        font-size: 15px;
    }

    body.theme-php .reply .content {
        min-height: 44px;
        font-size: 16px;
    }

    body.theme-php .phpdo-signature {
        margin-top: 30px;
    }

    body.theme-php .phpdo-reply-actions {
        margin-top: 20px;
    }

    body.theme-php .phpdo-thread-votes {
        flex-wrap: wrap;
    }

    body.theme-php .phpdo-reply-action {
        font-size: 14px;
    }

    body.theme-php .floor-reply-form {
        flex-direction: column;
    }
}

/* php.net component scale pass */
body.theme-php {
    --phpdo-font-sans: "Fira Sans", "Source Sans Pro", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --phpdo-font-mono: "Fira Mono", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --phpdo-card-radius: .25rem;
    --phpdo-control-radius: .5rem;
    --phpdo-space-1: .5rem;
    --phpdo-space-2: .75rem;
    --phpdo-space-3: 1rem;
    --phpdo-space-4: 1.5rem;
    --phpdo-space-5: 2rem;
    --phpdo-shadow-soft: 0 .125rem .5rem rgba(0, 0, 0, .08);
    font-family: var(--phpdo-font-sans);
    font-size: 16px;
    line-height: 1.5;
}

body.theme-php code,
body.theme-php pre,
body.theme-php kbd,
body.theme-php .phpdo-signature span {
    font-family: var(--phpdo-font-mono);
}

body.theme-php .phpdo-home-shell,
body.theme-php.page-forum main.wrap,
body.theme-php.page-thread main.wrap,
body.theme-php.page-search main.wrap,
body.theme-php.page-post main.wrap,
body.theme-php.page-edit-thread main.wrap,
body.theme-php.page-tags main.wrap,
body.theme-php.page-user main.wrap,
body.theme-php.page-profile main.wrap,
body.theme-php.page-page main.wrap,
body.theme-php.page-login main.wrap,
body.theme-php.page-register main.wrap,
body.theme-php .footer .wrap,
body.theme-php .phpdo-inner-category-bar > div {
    width: min(1200px, calc(100vw - 3rem));
}

body.theme-php .phpdo-feed-card,
body.theme-php .phpdo-side-card,
body.theme-php .phpdo-page-head,
body.theme-php .phpdo-user-head,
body.theme-php .post-title-card,
body.theme-php .post-content-card,
body.theme-php .replies,
body.theme-php.page-thread main.wrap > .card:not(.post-title-card):not(.post-content-card):not(.replies),
body.theme-php.page-user main.wrap > .card,
body.theme-php.page-tags main.wrap > .card,
body.theme-php.page-profile main.wrap > .card,
body.theme-php.page-page main.wrap > .card,
body.theme-php.page-login main.wrap > .card,
body.theme-php.page-register main.wrap > .card,
body.theme-php .thread-list,
body.theme-php.page-search .thread-list,
body.theme-php .phpdo-category-bar,
body.theme-php .phpdo-static-page,
body.theme-php .phpdo-auth-page {
    border-radius: var(--phpdo-card-radius) !important;
    box-shadow: var(--phpdo-shadow-soft);
}

body.theme-php .phpdo-feed-card,
body.theme-php .phpdo-side-card,
body.theme-php .phpdo-page-head,
body.theme-php .page-head,
body.theme-php .post-title-card,
body.theme-php .post-content-card,
body.theme-php.page-thread main.wrap > .card:not(.post-title-card):not(.post-content-card):not(.replies),
body.theme-php .phpdo-static-page,
body.theme-php .phpdo-auth-page {
    padding: var(--phpdo-space-4);
}

body.theme-php .site-nav-bar .nav-link,
body.theme-php .site-nav-bar .nav-cta,
body.theme-php .site-nav-bar .nav-more-toggle,
body.theme-php .phpdo-category-bar a,
body.theme-php .phpdo-inner-category-bar a {
    font-size: 1rem;
    font-weight: 500;
}

body.theme-php .nav-search-form,
body.theme-php .site-nav-bar .nav-cta,
body.theme-php .site-nav-bar .nav-more-toggle,
body.theme-php .phpdo-feed-tabs a,
body.theme-php .filter-tabs a,
body.theme-php .page-head .btn,
body.theme-php.page-thread main.wrap > .card .btn,
body.theme-php .phpdo-vote-button,
body.theme-php .phpdo-static-links a,
body.theme-php .footer-page-nav a,
body.theme-php .footer-friend-links a {
    border-radius: var(--phpdo-control-radius) !important;
}

body.theme-php .phpdo-breadcrumb,
body.theme-php .phpdo-feed-tabs,
body.theme-php .filter-tabs {
    margin-bottom: var(--phpdo-space-3);
}

body.theme-php .phpdo-home-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--phpdo-space-3);
}

body.theme-php .phpdo-thread-row,
body.theme-php .thread-row {
    min-height: 5.5rem;
    padding: var(--phpdo-space-3) 0;
}

body.theme-php .phpdo-thread-main h2,
body.theme-php .thread-title {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.35;
}

body.theme-php .phpdo-thread-main p,
body.theme-php .thread-main p,
body.theme-php .post-meta,
body.theme-php .phpdo-thread-stats,
body.theme-php .thread-count,
body.theme-php .phpdo-side-card,
body.theme-php .phpdo-must-read li {
    font-size: .875rem;
}

body.theme-php .page-head h1,
body.theme-php .post-title-card h1,
body.theme-php .phpdo-auth-head h1 {
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.25;
}

body.theme-php .phpdo-side-card h2,
body.theme-php .replies > h2,
body.theme-php .phpdo-list-heading {
    font-size: 1.5rem;
    font-weight: 500;
}

body.theme-php .post-content-box,
body.theme-php .reply .content,
body.theme-php .phpdo-static-page p {
    font-size: 1rem;
    line-height: 1.5;
}

body.theme-php .reply {
    grid-template-columns: 3.75rem minmax(0, 1fr);
    gap: var(--phpdo-space-3);
    padding: var(--phpdo-space-4);
}

body.theme-php .reply .post-meta,
body.theme-php .reply .post-meta strong,
body.theme-php .phpdo-reply-author,
body.theme-php .phpdo-reply-action {
    font-size: .875rem;
}

body.theme-php .phpdo-floor-no,
body.theme-php .phpdo-level {
    border-radius: var(--phpdo-card-radius);
}

body.theme-php .floor-replies,
body.theme-php .floor-reply {
    border-radius: var(--phpdo-card-radius);
}

body.theme-php .phpdo-right-toolbar a,
body.theme-php .phpdo-right-toolbar button {
    border-radius: var(--phpdo-card-radius) !important;
    box-shadow: var(--phpdo-shadow-soft);
}

@media (max-width: 900px) {
    body.theme-php .phpdo-home-shell,
    body.theme-php.page-forum main.wrap,
    body.theme-php.page-thread main.wrap,
    body.theme-php.page-search main.wrap,
    body.theme-php.page-post main.wrap,
    body.theme-php.page-edit-thread main.wrap,
    body.theme-php.page-tags main.wrap,
    body.theme-php.page-user main.wrap,
    body.theme-php.page-profile main.wrap,
    body.theme-php.page-page main.wrap,
    body.theme-php.page-login main.wrap,
    body.theme-php.page-register main.wrap,
    body.theme-php .footer .wrap,
    body.theme-php .phpdo-inner-category-bar > div {
        width: calc(100vw - 1.25rem);
    }

    body.theme-php .phpdo-feed-card,
    body.theme-php .phpdo-side-card,
    body.theme-php .phpdo-page-head,
    body.theme-php .page-head,
    body.theme-php .post-title-card,
    body.theme-php .post-content-card,
    body.theme-php.page-thread main.wrap > .card:not(.post-title-card):not(.post-content-card):not(.replies),
    body.theme-php .phpdo-static-page,
    body.theme-php .phpdo-auth-page {
        padding: var(--phpdo-space-3);
    }

    body.theme-php .page-head h1,
    body.theme-php .post-title-card h1,
    body.theme-php .phpdo-auth-head h1 {
        font-size: 1.5rem;
    }

    body.theme-php .phpdo-thread-main h2,
    body.theme-php .thread-title {
        font-size: 1rem;
    }

    body.theme-php .phpdo-home-layout,
    body.theme-php .phpdo-home-sidebar {
        grid-template-columns: 1fr;
    }

    body.theme-php .phpdo-must-read,
    body.theme-php .phpdo-post-button {
        grid-column: auto;
    }
}

/* PHP official dark variant */
body.theme-php-dark {
    --phpdo-page: #101217;
    --phpdo-surface: #181b22;
    --phpdo-surface-soft: #1f2430;
    --phpdo-surface-raised: #222734;
    --phpdo-border: #303643;
    --phpdo-line: #303643;
    --phpdo-text: #e6e8ee;
    --phpdo-muted: #a6adba;
    --phpdo-faint: #7d8593;
    --phpdo-accent: #8791c4;
    --phpdo-accent-strong: #b9c0dd;
    --phpdo-red: #ff8a78;
    --phpdo-shadow-soft: 0 .125rem .75rem rgba(0, 0, 0, .28);
    color: var(--phpdo-text);
    background: var(--phpdo-page);
}

body.theme-php-dark a {
    color: var(--phpdo-accent-strong);
}

body.theme-php-dark .site-nav-bar {
    background: #151821;
    border-bottom-color: var(--phpdo-border);
    box-shadow: 0 .125rem .75rem rgba(0, 0, 0, .26);
}

body.theme-php-dark .site-nav-bar .nav-avatar {
    padding: 0 .625rem;
    background: #fff;
    border-radius: var(--phpdo-card-radius);
}

body.theme-php-dark .site-nav-bar .nav-link {
    color: #cfd4df;
}

body.theme-php-dark .site-nav-bar .nav-link.active,
body.theme-php-dark .site-nav-bar .nav-link:hover {
    color: #fff;
}

body.theme-php-dark .nav-search-form,
body.theme-php-dark .site-nav-bar .nav-cta,
body.theme-php-dark .site-nav-bar .nav-more-toggle,
body.theme-php-dark .site-nav-bar .nav-more-menu {
    color: var(--phpdo-text);
    background: var(--phpdo-surface) !important;
    border-color: var(--phpdo-border);
}

body.theme-php-dark .nav-search-form input {
    color: var(--phpdo-text);
}

body.theme-php-dark .nav-search-form input::placeholder {
    color: var(--phpdo-faint);
}

body.theme-php-dark .nav-search-form button {
    color: var(--phpdo-muted);
    background: var(--phpdo-surface) !important;
    border-left-color: var(--phpdo-border);
}

body.theme-php-dark .nav-search-form button:hover,
body.theme-php-dark .site-nav-bar .nav-cta:hover,
body.theme-php-dark .site-nav-bar .nav-more-toggle:hover,
body.theme-php-dark .site-nav-bar .nav-cta.active,
body.theme-php-dark .site-nav-bar .nav-more-toggle.active {
    color: #fff;
    background: #252b38 !important;
    border-color: #444d62;
}

body.theme-php-dark .phpdo-category-bar,
body.theme-php-dark .phpdo-inner-category-bar {
    background: var(--phpdo-surface);
    border-color: var(--phpdo-border);
    box-shadow: 0 .0625rem 0 rgba(255, 255, 255, .03);
}

body.theme-php-dark .phpdo-category-bar a,
body.theme-php-dark .phpdo-inner-category-bar a {
    color: #d4d8e1;
}

body.theme-php-dark .phpdo-category-bar a:hover,
body.theme-php-dark .phpdo-inner-category-bar a:hover {
    color: #fff;
}

body.theme-php-dark .phpdo-breadcrumb,
body.theme-php-dark .phpdo-breadcrumb a,
body.theme-php-dark .phpdo-breadcrumb strong,
body.theme-php-dark .post-meta,
body.theme-php-dark .thread-main p,
body.theme-php-dark .phpdo-thread-main p,
body.theme-php-dark .thread-count,
body.theme-php-dark .phpdo-thread-stats,
body.theme-php-dark .page-head p,
body.theme-php-dark .muted {
    color: var(--phpdo-muted);
}

body.theme-php-dark .phpdo-feed-card,
body.theme-php-dark .phpdo-side-card,
body.theme-php-dark .phpdo-page-head,
body.theme-php-dark .phpdo-user-head,
body.theme-php-dark .post-title-card,
body.theme-php-dark .post-content-card,
body.theme-php-dark .replies,
body.theme-php-dark.page-thread main.wrap > .card:not(.post-title-card):not(.post-content-card):not(.replies),
body.theme-php-dark.page-user main.wrap > .card,
body.theme-php-dark.page-tags main.wrap > .card,
body.theme-php-dark.page-profile main.wrap > .card,
body.theme-php-dark.page-page main.wrap > .card,
body.theme-php-dark.page-login main.wrap > .card,
body.theme-php-dark.page-register main.wrap > .card,
body.theme-php-dark .thread-list,
body.theme-php-dark.page-search .thread-list,
body.theme-php-dark .phpdo-category-bar,
body.theme-php-dark .phpdo-static-page,
body.theme-php-dark .phpdo-auth-page,
body.theme-php-dark .card,
body.theme-php-dark .side-user-panel,
body.theme-php-dark .signin-modal-box,
body.theme-php-dark .editor-dialog-box {
    color: var(--phpdo-text);
    background: var(--phpdo-surface);
    border-color: var(--phpdo-border);
    box-shadow: var(--phpdo-shadow-soft);
}

body.theme-php-dark .phpdo-feed-tabs a,
body.theme-php-dark .filter-tabs a,
body.theme-php-dark .phpdo-vote-button,
body.theme-php-dark .floor-label,
body.theme-php-dark .btn-light,
body.theme-php-dark .footer-page-nav a,
body.theme-php-dark .footer-friend-links a,
body.theme-php-dark .side-user-panel a,
body.theme-php-dark .side-user-panel .side-user-card,
body.theme-php-dark .nav-more-item {
    color: #d4d8e1 !important;
    background: var(--phpdo-surface-soft) !important;
    border-color: var(--phpdo-border);
}

body.theme-php-dark .phpdo-feed-tabs a.active,
body.theme-php-dark .filter-tabs a.active,
body.theme-php-dark .phpdo-post-button,
body.theme-php-dark .btn,
body.theme-php-dark .page-head .btn,
body.theme-php-dark.page-thread main.wrap > .card .btn {
    color: #fff !important;
    background: var(--phpdo-accent) !important;
    border-color: var(--phpdo-accent);
}

body.theme-php-dark .phpdo-feed-tabs a:hover,
body.theme-php-dark .filter-tabs a:hover,
body.theme-php-dark .footer-page-nav a:hover,
body.theme-php-dark .footer-friend-links a:hover,
body.theme-php-dark .side-user-panel a:hover,
body.theme-php-dark .nav-more-item:hover {
    color: #fff !important;
    background: var(--phpdo-surface-raised) !important;
    border-color: #444d62;
}

body.theme-php-dark .phpdo-feed-tabs .phpdo-rss {
    color: var(--phpdo-muted) !important;
    background: transparent !important;
}

body.theme-php-dark .phpdo-thread-row,
body.theme-php-dark .thread-row,
body.theme-php-dark .reply,
body.theme-php-dark .replies > h2,
body.theme-php-dark .phpdo-side-card h2 {
    border-color: var(--phpdo-line);
}

body.theme-php-dark .phpdo-thread-main h2,
body.theme-php-dark .phpdo-thread-main h2 a,
body.theme-php-dark .thread-title,
body.theme-php-dark .page-head h1,
body.theme-php-dark .post-title-card h1,
body.theme-php-dark .phpdo-auth-head h1,
body.theme-php-dark .phpdo-side-card h2,
body.theme-php-dark .replies > h2,
body.theme-php-dark .phpdo-list-heading,
body.theme-php-dark .post-content-box,
body.theme-php-dark .reply .content,
body.theme-php-dark .phpdo-static-page p,
body.theme-php-dark .phpdo-reply-author,
body.theme-php-dark .reply .post-meta strong,
body.theme-php-dark .floor-reply strong,
body.theme-php-dark h1,
body.theme-php-dark h2,
body.theme-php-dark h3,
body.theme-php-dark label {
    color: var(--phpdo-text) !important;
}

body.theme-php-dark .phpdo-thread-main h2 a:hover,
body.theme-php-dark .thread-title:hover,
body.theme-php-dark .content a,
body.theme-php-dark .phpdo-author-link:hover,
body.theme-php-dark .phpdo-reply-author:hover,
body.theme-php-dark .phpdo-reply-action:hover,
body.theme-php-dark .phpdo-reply-action:hover i {
    color: var(--phpdo-accent-strong) !important;
}

body.theme-php-dark .phpdo-avatar,
body.theme-php-dark .phpdo-author-avatar,
body.theme-php-dark .phpdo-reply-avatar {
    background: #2a303c;
}

body.theme-php-dark .phpdo-pill,
body.theme-php-dark .phpdo-topic-tag,
body.theme-php-dark .tag,
body.theme-php-dark .category-tag {
    color: #ffae9f !important;
    background: rgba(255, 138, 120, .13) !important;
    border-color: rgba(255, 138, 120, .28);
}

body.theme-php-dark .phpdo-pill-outline {
    background: transparent !important;
    border-color: rgba(255, 138, 120, .58);
}

body.theme-php-dark .phpdo-good,
body.theme-php-dark .tag.good {
    color: #cfd6e8 !important;
    background: rgba(135, 145, 196, .18) !important;
    border-color: rgba(135, 145, 196, .34);
}

body.theme-php-dark .phpdo-image-icon,
body.theme-php-dark .phpdo-thread-stats i,
body.theme-php-dark .thread-count i,
body.theme-php-dark .phpdo-reply-action,
body.theme-php-dark .phpdo-reply-action i,
body.theme-php-dark .phpdo-only-author {
    color: var(--phpdo-faint);
}

body.theme-php-dark .phpdo-must-read li {
    color: #d4d8e1;
}

body.theme-php-dark .phpdo-must-read li::before {
    background: #626b7a;
}

body.theme-php-dark .replies > h2,
body.theme-php-dark .phpdo-floor-no,
body.theme-php-dark .floor-replies {
    background: var(--phpdo-surface-soft);
}

body.theme-php-dark .phpdo-meta-sep {
    background: var(--phpdo-border);
}

body.theme-php-dark .phpdo-floor-no {
    color: var(--phpdo-muted);
}

body.theme-php-dark .phpdo-signature {
    color: var(--phpdo-text);
    border-top-color: #3a4150;
}

body.theme-php-dark .phpdo-signature span {
    color: var(--phpdo-accent-strong);
    background: var(--phpdo-surface);
}

body.theme-php-dark .phpdo-signature p,
body.theme-php-dark .floor-reply {
    color: #d4d8e1;
}

body.theme-php-dark .floor-replies,
body.theme-php-dark .floor-reply {
    border-color: var(--phpdo-border);
}

body.theme-php-dark .floor-reply {
    background: #171a21;
}

body.theme-php-dark input,
body.theme-php-dark select,
body.theme-php-dark textarea,
body.theme-php-dark .floor-reply-form input {
    color: var(--phpdo-text);
    background: #11141a;
    border-color: #3a4150;
}

body.theme-php-dark input::placeholder,
body.theme-php-dark textarea::placeholder {
    color: var(--phpdo-faint);
}

body.theme-php-dark .phpdo-vote-button strong,
body.theme-php-dark .phpdo-vote-button i {
    color: var(--phpdo-muted);
}

body.theme-php-dark .phpdo-vote-button:hover,
body.theme-php-dark .phpdo-vote-button.active {
    color: #fff !important;
    background: var(--phpdo-accent) !important;
    border-color: var(--phpdo-accent);
}

body.theme-php-dark .phpdo-vote-button:hover strong,
body.theme-php-dark .phpdo-vote-button:hover i,
body.theme-php-dark .phpdo-vote-button.active strong,
body.theme-php-dark .phpdo-vote-button.active i {
    color: #fff;
}

body.theme-php-dark .footer {
    background: transparent;
}

body.theme-php-dark .footer-panel {
    color: var(--phpdo-faint);
    border-top-color: var(--phpdo-border);
}

body.theme-php-dark .footer-brand p,
body.theme-php-dark .footer-copyright,
body.theme-php-dark .footer-link-group a {
    color: var(--phpdo-muted);
}

body.theme-php-dark .footer-logo {
    padding: 4px 8px;
    background: #fff;
    border-radius: var(--phpdo-card-radius);
}

body.theme-php-dark .footer-link-group h2 {
    color: var(--phpdo-text);
}

body.theme-php-dark .footer-link-group a:hover {
    color: #fff;
}

body.theme-php-dark .footer-social-links a,
body.theme-php-dark .footer-qr {
    color: #d4d8e1;
    background: var(--phpdo-surface) !important;
    border-color: var(--phpdo-border);
}

body.theme-php-dark .footer-social-links a:hover {
    color: #fff;
    background: var(--phpdo-surface-raised) !important;
    border-color: #444d62;
}

body.theme-php-dark .footer-qr span {
    color: var(--phpdo-muted);
    background:
        linear-gradient(90deg, #343b49 1px, transparent 1px) 0 0 / 8px 8px,
        linear-gradient(#343b49 1px, transparent 1px) 0 0 / 8px 8px,
        #151821;
    border-color: var(--phpdo-border);
}

body.theme-php-dark .phpdo-right-toolbar a,
body.theme-php-dark .phpdo-right-toolbar button {
    color: #d4d8e1;
    background: var(--phpdo-surface) !important;
    border-color: var(--phpdo-border);
    box-shadow: var(--phpdo-shadow-soft);
}

body.theme-php-dark .phpdo-right-toolbar a:hover,
body.theme-php-dark .phpdo-right-toolbar button:hover {
    color: #fff;
    background: var(--phpdo-accent) !important;
    border-color: var(--phpdo-accent);
}

/* ==========================================================================
   分类导航行 · 深色/浅色切换按钮 · 顶部加载指示（新增）
   ========================================================================== */

/* 3) 菜单栏与分类导航之间留出一点空隙 */
.qf-category-nav {
    margin-top: 10px;
}

.qf-category-nav-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 34px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.qf-category-nav-inner::-webkit-scrollbar {
    display: none;
}

.qf-category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: #3c3c3c;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.qf-category-link:hover,
.qf-category-link.active {
    color: var(--phpdo-accent);
}

/* 菜单栏与分类导航内的链接一律不加下划线（盖过全局 a{underline}） */
body.theme-php .site-nav-bar a,
body.theme-php-dark .site-nav-bar a,
body.theme-php .qf-category-nav a,
body.theme-php-dark .qf-category-nav a,
body.theme-php .site-nav-bar a:hover,
body.theme-php-dark .site-nav-bar a:hover,
body.theme-php .qf-category-nav a:hover,
body.theme-php-dark .qf-category-nav a:hover {
    text-decoration: none;
}

.qf-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 16px;
    line-height: 1;
}

.qf-cat-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}

.qf-cat-icon-svg {
    width: 20px;
    height: 20px;
}

.qf-cat-icon-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 分类导航：浅色主题 */
body.theme-php .qf-category-nav {
    background: #fff;
    border-top: 1px solid #eceef2;
    border-bottom: 1px solid #eceef2;
    box-shadow: 0 1px 4px rgba(20, 20, 20, .03);
}

/* 分类导航：深色主题 */
body.theme-php-dark .qf-category-nav {
    background: var(--phpdo-surface);
    border-top: 1px solid var(--phpdo-border);
    border-bottom: 1px solid var(--phpdo-border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03);
}

body.theme-php-dark .qf-category-link {
    color: #d4d8e1;
}

body.theme-php-dark .qf-category-link:hover,
body.theme-php-dark .qf-category-link.active {
    color: #fff;
}

/* 移除主导航后，让搜索/按钮组靠右对齐 */
.site-nav-bar .nav-actions {
    margin-left: auto;
}

/* 1) 顶部菜单栏的深色/浅色切换按钮 */
.nav-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    color: #333;
    font-size: 17px;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 5px;
    cursor: pointer;
    transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.nav-theme-toggle:hover {
    color: var(--phpdo-accent);
    border-color: #cfd6e8;
    background: #f7f8fc;
}

/* 浅色模式显示月亮（点击切换到深色） */
[data-theme-toggle] .nav-theme-sun {
    display: none;
}

[data-theme-toggle] .nav-theme-moon {
    display: inline-block;
}

/* 深色模式下显示太阳（点击切回浅色） */
body.theme-php-dark .nav-theme-toggle {
    color: var(--phpdo-text);
    background: var(--phpdo-surface);
    border-color: var(--phpdo-border);
}

body.theme-php-dark .nav-theme-toggle:hover {
    color: #fff;
    background: #252b38;
    border-color: #444d62;
}

body.theme-php-dark [data-theme-toggle] .nav-theme-sun {
    display: inline-block;
}

body.theme-php-dark [data-theme-toggle] .nav-theme-moon {
    display: none;
}

/* 4) 加载指示移到菜单栏右上角，并在切换时给内容加模糊层 */
.qf-loading-indicator {
    top: 14px;
    left: auto;
    right: 24px;
    transform: translateY(-8px);
}

body.qf-is-loading .qf-loading-indicator {
    transform: translateY(0);
}

body.qf-is-loading main.wrap {
    filter: blur(2px);
    opacity: .7;
    pointer-events: none;
    transition: filter 160ms ease, opacity 160ms ease;
}

@media (prefers-reduced-motion: reduce) {
    body.qf-is-loading main.wrap {
        transition: none;
    }
}

@media (max-width: 640px) {
    .qf-category-nav-inner {
        gap: 16px;
        padding: 6px 16px;
    }

    .qf-category-link {
        font-size: 15px;
    }

    .qf-loading-indicator {
        right: 14px;
    }
}

/* 后台主导航图标编辑区 */
.nav-icon-grid select,
.nav-icon-cell select,
.nav-icon-cell textarea,
.nav-icon-cell input[type="text"] {
    width: 100%;
}

.nav-icon-cell {
    min-width: 220px;
}

.nav-icon-cell > * + * {
    margin-top: 6px;
}

.nav-icon-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 18px;
    color: var(--phpdo-accent);
}

.nav-icon-preview .qf-cat-icon-img,
.nav-icon-preview .qf-cat-icon-svg {
    width: 24px;
    height: 24px;
}

/* 第三方登录（OAuth）按钮 */
.phpdo-oauth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    color: #8a8f99;
    font-size: 13px;
    white-space: nowrap;
}

.phpdo-oauth-divider::before,
.phpdo-oauth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.phpdo-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phpdo-oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    font-weight: 600;
}

.phpdo-oauth-btn i {
    font-size: 17px;
}

.phpdo-oauth-github {
    color: #fff !important;
    background: #24292f !important;
    border-color: #24292f !important;
}

.phpdo-oauth-github:hover {
    background: #32383f !important;
    border-color: #32383f !important;
}

.phpdo-oauth-google {
    color: #3c4043 !important;
    background: #fff !important;
    border: 1px solid #dadce0 !important;
}

.phpdo-oauth-google:hover {
    background: #f7f8f9 !important;
}

.phpdo-oauth-google i {
    color: #4285f4;
}

body.theme-php-dark .phpdo-oauth-divider::before,
body.theme-php-dark .phpdo-oauth-divider::after {
    background: var(--phpdo-border);
}

body.theme-php-dark .phpdo-oauth-google {
    color: #e8eaed !important;
    background: #2a2f3a !important;
    border-color: #3a4150 !important;
}

body.theme-php-dark .phpdo-oauth-google:hover {
    background: #323847 !important;
}

/* ============================================================
   phpBB 式页头（banner + 导航栏 + 面包屑）
   Tailwind preflight 已关闭，这里给页头做作用域内 reset + 组件样式
   ============================================================ */
.qf-topbar { width: 100%; padding-top: 14px; }
.qf-topbar-inner { max-width: 1200px; margin: 0 auto; }
.qf-topbar a { text-decoration: none !important; }
.qf-topbar ul, .qf-topbar li { list-style: none; margin: 0; padding: 0; }

.qf-banner {
    display: flex;
    align-items: center;
    min-height: 200px;
    padding: 0 28px;
    background: linear-gradient(120deg, #5a6aa8 0%, #505b93 58%, #3f4874 100%);
}
.qf-banner-logo img { height: 52px; }
.qf-banner-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px;
    color: #fff; background: rgba(255,255,255,.16); border: 0; cursor: pointer;
    transition: background .15s ease;
}
.qf-banner-btn:hover { background: rgba(255,255,255,.3); }

.qf-navbar { background: #4f5b93; padding: 0 28px; box-shadow: 0 2px 4px rgba(0,0,0,.2); }

/* 头部：banner 图铺满 banner+菜单两段，菜单栏透明叠图 */
.qf-topbar-hasbg { position: relative; }
.qf-topbar-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.qf-topbar-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, .30) 0%,
        rgba(0, 0, 0, .08) 32%,
        rgba(0, 0, 0, .06) 70%,
        rgba(0, 0, 0, .14) 100%);
}
.qf-topbar-hasbg .qf-banner {
    position: relative;
    z-index: 1;
    min-height: 191px;
    background: transparent;
}
.qf-topbar-hasbg .qf-navbar {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: blur(3px) saturate(115%);
    backdrop-filter: blur(3px) saturate(115%);
    border-top: 1px solid rgba(255, 255, 255, .10);
    box-shadow: none;
}
.qf-topbar-hasbg .qf-navbar .qf-menu-link {
    color: rgba(255, 255, 255, .90);
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
    transition: color .12s ease, background .12s ease;
}
.qf-topbar-hasbg .qf-navbar .qf-menu-link:hover { color: #fff; background: rgba(255, 255, 255, .10); }
.qf-topbar-hasbg .qf-navbar .qf-menu-link.active {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    background: rgba(0, 0, 0, .30);
    -webkit-backdrop-filter: blur(12px) saturate(135%);
    backdrop-filter: blur(12px) saturate(135%);
    border-radius: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .65);
}
.qf-menu { display: flex; }
.qf-navbar .qf-menu-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 13px 15px; color: rgba(255,255,255,.82); font-size: 15px; font-weight: 600;
    transition: background .12s ease, color .12s ease;
}
.qf-navbar .qf-menu-link:hover { color: #fff; background: rgba(0,0,0,.06); }
.qf-navbar .qf-menu-link.active { color: #fff; background: rgba(0,0,0,.1); }
.qf-menu-link i, .qf-menu-link .qf-cat-icon { font-size: 14px; }
.qf-menu-link .qf-cat-icon-img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.qf-menu-link .qf-cat-icon-svg svg { fill: currentColor; }

.qf-navbar-right { padding: 6px 4px; }
.qf-search { height: 34px; background: #fff; border-radius: 6px; overflow: hidden; }
.qf-search input { border: 0; outline: 0; height: 34px; padding: 0 10px; width: 140px; max-width: 40vw; background: transparent; font-size: 14px; color: #333; }
.qf-search button { border: 0; background: transparent; padding: 0 10px; color: #666; cursor: pointer; height: 34px; }

.qf-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 6px; font-size: 14px; font-weight: 700; cursor: pointer; }
.qf-btn-ghost { color: #fff; background: rgba(255,255,255,.12); }
.qf-btn-ghost:hover, .qf-btn-ghost.active { background: rgba(255,255,255,.24); }
.qf-btn-solid { color: #3f4874; background: #fff; }
.qf-btn-solid:hover, .qf-btn-solid.active { background: #eef1f7; }

.qf-user-trigger { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 6px; color: #fff; background: rgba(255,255,255,.12); border: 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.qf-user-trigger:hover { background: rgba(255,255,255,.24); }
.qf-user-trigger img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.qf-user-menu { min-width: 194px; padding: 6px; margin-top: 6px; background: #fff; border: 1px solid #e6e8ee; border-radius: 10px; box-shadow: 0 12px 30px rgba(20,20,20,.14); z-index: 60; }
.qf-user-menu a, .qf-user-menu button, .qf-user-static { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border-radius: 7px; color: #333; font-size: 14px; background: transparent; border: 0; cursor: pointer; text-align: left; }
.qf-user-menu a:hover, .qf-user-menu button:hover { background: #f2f4f8; color: #505b93; }
.qf-user-menu form { margin: 0; }
.qf-user-static { color: #8a8f99; }

.qf-breadcrumb { padding: 9px 6px; font-size: 13px; color: #7a7f8a; display: flex; align-items: center; gap: 8px; }
.qf-breadcrumb a { color: #505b93; }
.qf-crumb-sep { color: #b6bcc8; }
.qf-crumb-cur { color: #444; font-weight: 600; }

.qf-burger { color: #fff; background: transparent; border: 0; font-size: 18px; padding: 11px 12px; cursor: pointer; }

@media (max-width: 640px) {
    .qf-menu { flex-direction: column; width: 100%; align-items: stretch; }
    .qf-menu-link { padding: 12px 14px; }
    .qf-navbar-right { width: 100%; padding: 8px 4px; }
    .qf-search input { width: 100%; max-width: none; flex: 1; }
    .qf-search { flex: 1; }
}

/* 深色主题下页头保持石板蓝（banner/navbar 不反色） */
body.theme-php-dark .qf-user-menu { background: #1c2130; border-color: #2b3242; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
body.theme-php-dark .qf-user-menu a, body.theme-php-dark .qf-user-menu button { color: #d4d8e1; }
body.theme-php-dark .qf-user-menu a:hover, body.theme-php-dark .qf-user-menu button:hover { background: #262d3c; color: #fff; }
body.theme-php-dark .qf-breadcrumb { color: #8b93a3; }
body.theme-php-dark .qf-crumb-cur { color: #cfd4df; }

/* ============================================================
   phpBB 风格页面外壳：灰褐底 + 白色圆角立体内容框
   ============================================================ */
body.theme-php {
    background: #b4b4ac !important;
}
body.theme-php-dark {
    background: #0b0d12 !important;
}

.qf-page-frame {
    width: calc(100% - 44px);
    max-width: 1200px;
    margin: 24px auto 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .42),
                0 1px 0 rgba(255, 255, 255, .9) inset,
                0 7px 22px rgba(0, 0, 0, .30);
    overflow: hidden;
}
body.theme-php-dark .qf-page-frame {
    background: #12151c;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .05),
                0 7px 22px rgba(0, 0, 0, .6);
}

/* 页头铺满框宽、banner 顶角交给外框圆角裁切 */
.qf-page-frame .qf-topbar { padding-top: 0; }
.qf-page-frame .qf-topbar-inner { max-width: none; margin: 0; padding: 0; }
.qf-page-frame .qf-banner { border-radius: 0; }

/* 正文区在白框内留出内边距（灰褐底只在框外显示） */
.qf-page-frame main.wrap { padding-bottom: 42px; }
body.theme-php .qf-page-frame main.wrap { background: transparent; }

/* PHP 官网风背景：深底 + 4px 极细斜纹纹理（复刻 php.net bg-texture） */
body.theme-php,
body.theme-php-dark {
    background-color: #262626 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath d='M0 0L4 4M0 4L4 0' stroke='%23000000' stroke-width='.5' stroke-opacity='.28'/%3E%3C/svg%3E") !important;
    background-size: 4px 4px !important;
    background-attachment: fixed !important;
}

/* 侧边栏搜索框 */
.phpdo-side-search {
    display: flex;
    align-items: center;
    height: 42px;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}
.phpdo-side-search input {
    flex: 1; min-width: 0; height: 100%; padding: 0 12px;
    border: 0; outline: 0; background: transparent; font-size: 15px; color: #333;
}
.phpdo-side-search button {
    height: 100%; width: 44px; border: 0; background: transparent;
    color: #666; cursor: pointer; border-left: 1px solid #eef0f3;
}
.phpdo-side-search button:hover { color: #505b93; background: #f7f8fb; }
body.theme-php-dark .phpdo-side-search { background: var(--phpdo-surface); border-color: var(--phpdo-border); }
body.theme-php-dark .phpdo-side-search input { color: var(--phpdo-text); }
body.theme-php-dark .phpdo-side-search button { color: var(--phpdo-muted); border-left-color: var(--phpdo-border); }

/* logo：悬浮轻微放大 + 禁止选中/拖拽（右键已在 HTML 层禁用） */
.qf-banner-logo img {
    transition: transform .18s ease;
    transform-origin: left center;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}
.qf-banner-logo:hover img { transform: scale(1.06); }

/* 顶部菜单合并为一行：超出则横向滚动（隐藏滚动条） */
.qf-menu {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.qf-menu::-webkit-scrollbar { display: none; }
.qf-menu-link { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 640px) {
    .qf-menu { flex: none; overflow-x: visible; }
}

/* 导航栏右侧搜索框：宽度与侧边栏一致（380px），菜单自动收缩横向滚动 */
.qf-navbar-search {
    flex: 0 0 380px;
    max-width: 42vw;
    display: flex;
    align-items: center;
    height: 36px;
    margin: 6px 0 6px 10px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}
.qf-navbar-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: #333;
}
.qf-navbar-search button {
    height: 100%;
    width: 42px;
    border: 0;
    background: transparent;
    color: #666;
    cursor: pointer;
}
.qf-navbar-search button:hover { color: #505b93; }
@media (max-width: 640px) {
    .qf-navbar-search { flex: 1 1 100%; max-width: none; margin: 6px 4px 8px; }
}

/* 入站必看条目：取消加粗，用常规 400 字重 */
body.theme-php .phpdo-must-read li,
body.theme-php-dark .phpdo-must-read li {
    font-weight: 400;
}

/* 白框内正文区左右内边距（提高专属性以盖过基础 main.wrap 规则），并让 home-shell 填满 */
body.theme-php .qf-page-frame main.wrap,
body.theme-php-dark .qf-page-frame main.wrap {
    padding: 0 28px 42px;
}
body.theme-php .qf-page-frame .phpdo-home-shell,
body.theme-php-dark .qf-page-frame .phpdo-home-shell {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* 面包屑行右端搜索框：宽度与侧边栏一致（340px），右对齐 */
.phpdo-crumb-search {
    margin-left: auto;
    flex: 0 0 340px;
    max-width: 46vw;
    display: flex;
    align-items: center;
    height: 38px;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* 点击/聚焦：外框变主题淡紫 + 淡紫光晕 */
.phpdo-crumb-search:focus-within {
    border-color: #505b93;
    box-shadow: 0 0 0 3px rgba(80, 91, 147, .18);
}
.phpdo-crumb-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 4px 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: #333;
}
/* 按钮只保留放大镜图标，无边框/无底色 */
.phpdo-crumb-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 40px;
    border: 0;
    background: transparent;
    color: #8a8f99;
    cursor: pointer;
    transition: color .12s ease;
}
.phpdo-crumb-search button:hover { color: #505b93; }
body.theme-php-dark .phpdo-crumb-search { background: var(--phpdo-surface); border-color: var(--phpdo-border); }
body.theme-php-dark .phpdo-crumb-search:focus-within { border-color: #8791c4; box-shadow: 0 0 0 3px rgba(135, 145, 196, .22); }
body.theme-php-dark .phpdo-crumb-search input { color: var(--phpdo-text); }
body.theme-php-dark .phpdo-crumb-search button { color: var(--phpdo-muted); }
@media (max-width: 640px) {
    .phpdo-crumb-search { flex: 1 1 100%; margin-left: 0; max-width: none; }
}

/* ===== 搜索模态窗（快捷键 ⌘/Ctrl+K 或 / 打开） ===== */
.qf-search-window {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background: rgba(15, 17, 22, .55);
    backdrop-filter: blur(3px);
}
.qf-search-window.is-open { display: flex; }
.qf-search-window-box {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
    overflow: hidden;
}
.qf-search-window form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    height: 60px;
    border-bottom: 1px solid #eef0f3;
}
.qf-search-window form > i { color: #8a8f99; font-size: 18px; }
.qf-search-window input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 17px;
    color: #222;
}
.qf-search-window kbd {
    padding: 3px 7px;
    border: 1px solid #dfe3e8;
    border-radius: 5px;
    background: #f6f7fa;
    color: #888;
    font-size: 12px;
    font-family: inherit;
}
.qf-search-window-hint {
    padding: 11px 18px;
    color: #9aa0ac;
    font-size: 12.5px;
    background: #fafbfc;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
body.theme-php-dark .qf-search-window-box { background: #1a1e28; }
body.theme-php-dark .qf-search-window form { border-bottom-color: #2a3040; }
body.theme-php-dark .qf-search-window input { color: #e6e8ee; }
body.theme-php-dark .qf-search-window kbd { background: #232a38; border-color: #333c4e; color: #aeb4c0; }
body.theme-php-dark .qf-search-window-hint { background: #161a22; color: #8b93a3; }

/* ============================================================
   修复"加载时发暗/像没样式"：内容显示不再依赖 JS(qf-page-ready)
   ============================================================ */
body {
    opacity: 1;
    animation: qfBodyFadeIn 240ms ease-out;
}
@keyframes qfBodyFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 页头关键布局兜底（不依赖 Tailwind，CDN 慢/被墙也不错位） */
.qf-banner { position: relative; width: 100%; }
.qf-banner > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.qf-banner > span { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .25); }
.qf-banner-logo { position: relative; z-index: 2; display: inline-flex; align-items: center; }
.qf-banner > div { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.qf-navbar { display: flex; flex-wrap: wrap; align-items: center; }
.qf-menu { display: flex; align-items: center; }
.hs-dropdown { position: relative; display: inline-flex; }
.qf-user-menu.hidden { display: none; }
.qf-burger { display: none; }
@media (max-width: 640px) {
    .qf-burger { display: inline-flex; align-items: center; }
}

/* 后台设置页 tabs */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e8ee;
}
.settings-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid #e0e3ea;
    border-radius: 8px;
    background: #f6f7fa;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.settings-tabs button:hover { color: #505b93; border-color: #cfd6e8; }
.settings-tabs button.active { color: #fff; background: #505b93; border-color: #505b93; }
.settings-panel h2 { display: flex; align-items: center; gap: 9px; margin-top: 0; }
.settings-panel h2 i { color: #505b93; }
body.theme-php-dark .settings-tabs { border-bottom-color: var(--phpdo-border); }
body.theme-php-dark .settings-tabs button { background: var(--phpdo-surface); border-color: var(--phpdo-border); color: var(--phpdo-muted); }
body.theme-php-dark .settings-tabs button.active { background: #505b93; color: #fff; border-color: #505b93; }
body.theme-php-dark .settings-panel h2 i { color: #8791c4; }

/* ============================================================
   重构页脚（深色纹理底上的浅色页脚）
   ============================================================ */
.site-footer {
    margin-top: 24px;
    padding: 42px 0 34px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}
.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}
.site-footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    justify-content: space-between;
}
.site-footer-brand { flex: 1 1 280px; max-width: 380px; }
.site-footer-logo { display: inline-block; }
.site-footer-logo img { height: 34px; width: auto; user-select: none; -webkit-user-drag: none; }
.site-footer-desc { margin: 16px 0; color: #9298a6; font-size: 14px; line-height: 1.7; }
.site-footer-social { display: flex; gap: 10px; }
.site-footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px;
    color: #c3c8d2; background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: 17px; transition: color .15s, background .15s, border-color .15s;
}
.site-footer-social a:hover { color: #fff; background: #4f5b93; border-color: #4f5b93; }

.site-footer-top { align-items: center; }
.site-footer-brand { max-width: none; }
.site-footer-social { flex: 0 0 auto; }

.site-footer-links {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px;
    margin-top: 26px; padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}
.site-footer-links a { color: #9298a6; font-size: 14px; transition: color .12s ease; }
.site-footer-links a:hover { color: #fff; }
.site-footer-friends { margin-top: 14px; padding-top: 0; border-top: 0; gap: 6px 16px; }
.site-footer-friends-label { color: #6b707b; font-size: 13px; }
.site-footer-friends a { color: #7f8593; font-size: 13px; }

.site-footer-bottom {
    margin-top: 22px; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 12px 20px;
    color: #71767f; font-size: 13px;
}
.site-footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.site-footer-copy { margin-left: auto; color: #8b909d; }
.site-footer-icp a { color: #8b909d; }
.site-footer-icp a:hover { color: #fff; }

/* shields.io 扁平风格徽章：左标签(深灰) + 右数值(彩色) */
.sh-badge {
    display: inline-flex; height: 20px; border-radius: 3px; overflow: hidden;
    font-family: Verdana, "DejaVu Sans", system-ui, sans-serif;
    font-size: 11px; line-height: 20px; white-space: nowrap;
}
.sh-badge-k, .sh-badge-v { padding: 0 7px; color: #fff; }
.sh-badge-k { background: #555; }
.sh-badge-v { background: #4c1; font-variant-numeric: tabular-nums; }
.sh-badge-green { background: #4c1; }
.sh-badge-blue { background: #007ec6; }
.sh-badge-orange { background: #fe7d37; }
.sh-badge-red { background: #e05d44; }

/* ===== 关于 / 社区页 ===== */
body.theme-php .phpdo-about {
    max-width: 960px;
    margin: 0 auto;
    padding: 4px 0 10px;
}
body.theme-php .phpdo-about-hero {
    text-align: center;
    padding: 34px 24px 30px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
}
body.theme-php .phpdo-about-hero h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: var(--phpdo-accent);
    letter-spacing: .5px;
}
body.theme-php .phpdo-about-slogan {
    margin: 8px 0 0;
    color: #8a8f98;
    font-size: 15px;
}
body.theme-php .phpdo-about-topstats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 34px;
    margin-top: 22px;
}
body.theme-php .phpdo-about-topstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
}
body.theme-php .phpdo-about-topstat b { font-size: 22px; font-weight: 800; color: #222; }
body.theme-php .phpdo-about-topstat span { margin-top: 2px; font-size: 13px; color: #8a8f98; }

body.theme-php .phpdo-about-block { margin-top: 30px; }
body.theme-php .phpdo-about-block > h2 {
    margin: 0 0 14px;
    padding-left: 11px;
    font-size: 19px;
    font-weight: 800;
    color: #333;
    border-left: 4px solid var(--phpdo-accent);
    line-height: 1.1;
}
body.theme-php .phpdo-about-text { color: #555; font-size: 15px; line-height: 1.9; }

body.theme-php .phpdo-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
body.theme-php .phpdo-staff-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    text-decoration: none;
    transition: border-color .15s, transform .12s;
}
body.theme-php .phpdo-staff-card:hover { border-color: var(--phpdo-accent); transform: translateY(-1px); }
body.theme-php .phpdo-staff-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    object-fit: cover;
    background: #f1f1f1;
    border-radius: 0;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 0c9.601 0 12 2.399 12 12 0 9.601-2.399 12-12 12-9.601 0-12-2.399-12-12C0 2.399 2.399 0 12 0z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 0c9.601 0 12 2.399 12 12 0 9.601-2.399 12-12 12-9.601 0-12-2.399-12-12C0 2.399 2.399 0 12 0z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
body.theme-php .phpdo-staff-meta { display: flex; flex-direction: column; min-width: 0; }
body.theme-php .phpdo-staff-name {
    font-size: 15px; font-weight: 700; color: #333;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.theme-php .phpdo-staff-title {
    margin-top: 2px; font-size: 12px; color: #9298a6;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

body.theme-php .phpdo-about-contact p { margin: 0 0 8px; color: #555; font-size: 14px; line-height: 1.8; }
body.theme-php .phpdo-about-contact p.muted { color: #9298a6; }
body.theme-php .phpdo-about-contact a { color: var(--phpdo-accent); font-weight: 700; }

body.theme-php .phpdo-about-activity {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
body.theme-php .phpdo-about-metric {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
}
body.theme-php .phpdo-about-metric b { display: block; font-size: 26px; font-weight: 800; color: var(--phpdo-accent); }
body.theme-php .phpdo-about-metric span { display: block; margin-top: 4px; font-size: 14px; color: #333; }
body.theme-php .phpdo-about-metric em { display: block; margin-top: 2px; font-size: 12px; color: #9298a6; font-style: normal; }

@media (max-width: 640px) {
    body.theme-php .phpdo-about-activity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body.theme-php-dark .phpdo-about-hero,
body.theme-php-dark .phpdo-staff-card,
body.theme-php-dark .phpdo-about-metric { background: #2b2b2b; border-color: #3a3a3a; }
body.theme-php-dark .phpdo-about-topstat b,
body.theme-php-dark .phpdo-about-block > h2,
body.theme-php-dark .phpdo-staff-name,
body.theme-php-dark .phpdo-about-metric span { color: #e6e6e6; }
body.theme-php-dark .phpdo-about-text,
body.theme-php-dark .phpdo-about-contact p { color: #c2c2c2; }

/* 首页侧栏「关于社区」卡片 */
body.theme-php .phpdo-community-slogan {
    margin: 0 0 12px;
    color: #8a8f98;
    font-size: 13px;
    line-height: 1.6;
}
body.theme-php .phpdo-community-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
body.theme-php .phpdo-community-stats > div {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 10px 4px;
    background: #f6f7fb;
    border-radius: 8px;
}
body.theme-php .phpdo-community-stats b { display: block; font-size: 18px; font-weight: 800; color: var(--phpdo-accent); }
body.theme-php .phpdo-community-stats span { display: block; margin-top: 2px; font-size: 11px; color: #8a8f98; }
body.theme-php .phpdo-community-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--phpdo-accent);
    text-decoration: none;
    transition: gap .15s ease;
}
body.theme-php .phpdo-community-link:hover { gap: 10px; }
body.theme-php-dark .phpdo-community-stats > div { background: #23262e; }

/* 首页侧栏「用户数目 / 欢迎新用户」卡片 */
body.theme-php .phpdo-newuser-total { margin: 0; color: #6a6f78; font-size: 14px; }
body.theme-php .phpdo-newuser-total b { color: var(--phpdo-accent); font-weight: 800; }
body.theme-php .phpdo-newuser-sub { margin: 16px 0 13px; font-size: 15px; font-weight: 800; color: #333; }
body.theme-php .phpdo-newuser-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 8px;
}
body.theme-php .phpdo-newuser {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    text-decoration: none;
}
body.theme-php .phpdo-newuser img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    background: #f1f1f1;
    border-radius: 0;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 0c9.601 0 12 2.399 12 12 0 9.601-2.399 12-12 12-9.601 0-12-2.399-12-12C0 2.399 2.399 0 12 0z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 0c9.601 0 12 2.399 12 12 0 9.601-2.399 12-12 12-9.601 0-12-2.399-12-12C0 2.399 2.399 0 12 0z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: transform .12s ease;
}
body.theme-php .phpdo-newuser:hover img { transform: translateY(-2px); }
body.theme-php .phpdo-newuser span {
    max-width: 100%;
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.theme-php .phpdo-newuser:hover span { color: var(--phpdo-accent); }
body.theme-php-dark .phpdo-newuser-total { color: #b0b0b0; }
body.theme-php-dark .phpdo-newuser-sub { color: #e6e6e6; }
body.theme-php-dark .phpdo-newuser span { color: #b8b8b8; }

@media (max-width: 640px) {
    .site-footer-top { gap: 24px; }
    .site-footer-inner { padding: 0 18px; }
    .site-footer-copy { margin-left: 0; }
}

/* 帖子卡片两行化：第二行 = 元信息(左) + 统计(右)，头像超级椭圆 */
body.theme-php .phpdo-thread-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}
body.theme-php .phpdo-thread-meta > p {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.theme-php .phpdo-thread-meta > .phpdo-thread-stats {
    flex: 0 0 auto;
    min-width: 0;
    justify-content: flex-end;
    margin: 0;
}

/* ===== 手写工具类（替代已移除的 Tailwind，仅覆盖 header.php 实际用到的类） ===== */
.mx-auto { margin-left: auto; margin-right: auto; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.relative { position: relative; }
.absolute { position: absolute; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-2 { gap: .5rem; }
.z-10 { z-index: 10; }
.right-4 { right: 1rem; }
.top-4 { top: 1rem; }
.rounded-t-xl { border-top-left-radius: .75rem; border-top-right-radius: .75rem; }
.text-xs { font-size: .75rem; }
.hidden { display: none; }
@media (min-width: 640px) {
    .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
    .sm\:inline { display: inline; }
    .sm\:hidden { display: none; }
    .sm\:flex { display: flex; }
}

/* ===== 右侧工具栏最终定位（放最后，覆盖前面泄漏/冲突的规则）===== */
/* 桌面默认：贴视口右侧、约 2/3 高度 */
body.theme-php .phpdo-right-toolbar {
    top: 64%;
    bottom: auto;
    right: 22px;
    left: auto;
    transform: translateY(-50%);
}
/* 宽屏：贴内容框（1200px）右侧 */
@media (min-width: 1320px) {
    body.theme-php .phpdo-right-toolbar {
        right: auto;
        left: calc(50% + 606px);
    }
}
/* 移动端：回到右下角 */
@media (max-width: 760px) {
    body.theme-php .phpdo-right-toolbar {
        top: auto;
        bottom: 16px;
        right: 10px;
        left: auto;
        transform: none;
    }
}

/* 导航栏最右侧 RSS 订阅按钮（图标,点击复制地址） */
.qf-navbar-rss {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .85);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 17px;
    transition: color .12s ease;
}
.qf-navbar-rss:hover { color: #ff9800; }
.qf-topbar-hasbg .qf-navbar-rss { color: rgba(255, 255, 255, .9); text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.qf-topbar-hasbg .qf-navbar-rss:hover { color: #ffb14d; }

/* 顶部加载彩色进度条（页面加载/切换时显示） */
.qf-topload {
    position: fixed;
    top: 5px;
    left: 0;
    right: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
body.qf-is-loading .qf-topload { opacity: 1; }
.qf-topload .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
    pointer-events: none;
}
.qf-topload .progress-container {
    position: relative;
    width: 60%;
    max-width: 500px;
    height: 16px;
    background: radial-gradient(circle, #1b2735, #090a0f);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    border: 1px solid #313131;
}
.qf-topload .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #00f260, #0575e6);
    border-radius: 30px;
    transition: width .25s ease;
    box-shadow: 0 0 15px #00f260, 0 0 30px #0575e6;
}
.qf-topload .progress-bar::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0.5;
    animation: qf-ripple 3s infinite;
}
.qf-topload .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.qf-topload .particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.6;
    animation: qf-float 5s infinite ease-in-out;
}
.qf-topload .particle:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.qf-topload .particle:nth-child(2) { top: 30%; left: 70%; animation-delay: 1s; }
.qf-topload .particle:nth-child(3) { top: 50%; left: 50%; animation-delay: 2s; }
.qf-topload .particle:nth-child(4) { top: 80%; left: 40%; animation-delay: 1.5s; }
.qf-topload .particle:nth-child(5) { top: 90%; left: 60%; animation-delay: 2.5s; }
@keyframes qf-grow { 0% { width: 0; } 100% { width: 40%; } }
@keyframes qf-ripple {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}
@keyframes qf-float {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-20px) translateX(10px); }
    100% { transform: translateY(0) translateX(0); }
}
