* {
    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: #5d29f0;
}

a:hover {
    color: #4610c8;
}

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

.site-header {
    box-shadow: 0 1px 0 rgba(93, 41, 240, .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: #5d29f0;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #4b16d8;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #f3efff;
    border-color: #ddd2ff;
    color: #5d29f0 !important;
}

.content-page-nav a.active {
    border-color: #5d29f0;
    background: #5d29f0;
}

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

.nav nav a:hover,
.nav nav .nav-register-link {
    color: #5d29f0;
}

.card {
    box-shadow: 0 10px 28px rgba(93, 41, 240, .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: #b6a2ff;
}

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: #5d29f0;
}

.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 #e4dcff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(63, 15, 191, .2);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3efff;
    color: #5d29f0;
    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: #f3efff;
}

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

.auth-tab.active {
    background: #fff;
    color: #5d29f0;
    box-shadow: 0 4px 12px rgba(93, 41, 240, .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: #c8b8ff;
}

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: #5d29f0 !important;
}

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

.btn-light,
.signin-form button,
.signin-done {
    background: #f3efff !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: #5d29f0 !important;
}

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

.btn-light,
.signin-form button,
.signin-done {
    background: #f3efff !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: #5d29f0 !important;
}

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

.btn-light,
.signin-form button,
.signin-done {
    background: #f3efff !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: #5d29f0 !important;
}

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

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

.btn-light,
.signin-form button,
.signin-done {
    background: #f3efff !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: #5d29f0;
    text-decoration: none;
}

a:hover {
    color: #4b16d8;
}

.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: #5d29f0;
    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: #5d29f0;
    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: #5d29f0;
    background: #5d29f0;
}

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

.page-head h1 .back-home:hover {
    color: #4b16d8;
    text-decoration: underline;
}

/* 首页“最新帖子”行内手机端发帖按钮：桌面端隐藏 */
.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: #5d29f0;
    color: #fff !important;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: bold;
}

.btn:hover {
    background: #4b16d8;
}

.btn-light {
    background: #eef5fb;
    color: #5d29f0 !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: #5d29f0;
    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: #5d29f0;
    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: #5d29f0;
    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: #f3efff;
    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: 54px;
}

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

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

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

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

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

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

.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, #5d29f0) !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    background: var(--badge-bg, #f3efff);
    border: 1px solid var(--badge-border, #ddd2ff);
    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, #5d29f0));
    border-color: var(--badge-hover-border, var(--badge-color, #5d29f0));
}

.action-badge-edit {
    --badge-color: #5d29f0;
    --badge-bg: #f3efff;
    --badge-border: #ddd2ff;
}

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

.action-badge-pin {
    --badge-color: #7c3aed;
    --badge-bg: #f3efff;
    --badge-border: #ddd2ff;
}

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

.action-badge-reply {
    --badge-color: #5d29f0;
    --badge-bg: #f3efff;
    --badge-border: #ddd2ff;
}

.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: #5d29f0;
    cursor: pointer;
    font-size: 12px;
}

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

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

.content-link:hover {
    color: #4b16d8;
    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 #ddd2ff;
    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: #5d29f0;
    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: #faf9ff;
}

.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: #5d29f0;
    border-color: #c7b7ff;
    background: #f3efff;
}

.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: #8d6cff;
    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: #5d29f0;
    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 #c7b7ff;
    border-radius: 10px;
    background: #faf9ff;
}

.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 #e4dcff;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(63, 15, 191, .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: #5d29f0;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
    background: #f3efff;
    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 #e4dcff;
    border-radius: 6px;
    box-shadow: 0 18px 44px rgba(63, 15, 191, .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: #f3efff;
    border-radius: 999px;
}

.qf-upload-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: #5d29f0;
    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: #b6a2ff;
    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: #5d29f0;
}

a:hover {
    color: #4610c8;
}

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

.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: #5d29f0;
}

.btn:hover,
.hero .btn:hover,
.page-head .btn:hover {
    background: #4b16d8;
}

.btn-light,
.signin-form button,
.signin-done {
    background: #f3efff;
    border-color: #ddd2ff;
    color: #5d29f0 !important;
}

.content-page-nav a.active {
    border-color: #5d29f0;
    background: #5d29f0;
}

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

.nav nav a:hover,
.nav nav .nav-register-link {
    color: #5d29f0;
}

.card {
    box-shadow: 0 10px 28px rgba(93, 41, 240, .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: #b6a2ff;
}

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: #5d29f0;
}

.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 #e4dcff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(63, 15, 191, .2);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3efff;
    color: #5d29f0;
    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: #f3efff;
}

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

.auth-tab.active {
    background: #fff;
    color: #5d29f0;
    box-shadow: 0 4px 12px rgba(93, 41, 240, .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: #c8b8ff;
}

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: #5d29f0 !important;
}

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

.btn-light,
.signin-form button,
.signin-done {
    background: #f3efff !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: #5d29f0;
}

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: #5d29f0 !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: #b6a2ff;
}

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

body.theme-dark .btn-light,
body.theme-dark .signin-form button,
body.theme-dark .signin-done {
    background: #111827 !important;
    border-color: #2a3546;
    color: #b6a2ff !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: #5d29f0;
    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: #5d29f0;
}

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

.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;
}

.qf-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 3000;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    max-width: calc(100vw - 48px);
    min-height: 42px;
    padding: 10px 14px;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    white-space: pre-line;
    pointer-events: none;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.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 span {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

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

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

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

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

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

body.theme-litenote .qf-toast {
    color: #fff;
    background: #0f172a;
    border-color: rgba(15, 23, 42, .1);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}

body.theme-dark .qf-toast {
    color: #fff;
    background: #0f172a;
    border-color: rgba(15, 23, 42, .35);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

body.theme-dark .qf-toast-error {
    color: #fff;
}

body.theme-dark .qf-toast-success {
    color: #fff;
}

@media (max-width: 768px) {
    .qf-toast {
        right: 50%;
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        max-width: min(340px, calc(100vw - 32px));
        transform: translate(50%, 8px);
    }

    .qf-toast.is-visible {
        transform: translate(50%, 0);
    }
}

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

.storage-tabs-head {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #e4dcff;
    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: #5d29f0;
}

.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: #5d29f0;
}

@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 #e4dcff;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(93, 41, 240, .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: #5d29f0;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(93, 41, 240, .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 #e4dcff;
    border-radius: 6px;
    box-shadow: 0 16px 38px rgba(93, 41, 240, .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: #5d29f0;
    text-align: center;
}

.side-user-panel a:hover {
    color: #5d29f0;
    background: #f3efff;
}

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: #b6a2ff;
    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 #e4dcff;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(63, 15, 191, .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: #5d29f0;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
    background: #f3efff;
    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: #b6a2ff;
    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: #5d29f0;
    --php-nav: #5d29f0;
    --php-nav-hover: #4b16d8;
    --php-nav-active: #3f0fbf;
    --php-lavender: #d8ceff;
    --php-lavender-light: #efeaff;
    --php-muted-accent: #b8a8f2;
    --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: underline;
    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: #4b16d8;
}

a:visited {
    color: #663399;
}

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 #8d6cff;
    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(93, 41, 240, .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,
.qf-toast-error {
    color: #9F1D35;
}

.qf-toast,
body.theme-dark .qf-toast,
body.theme-litenote .qf-toast {
    color: #FFFFFF;
    background: var(--php-nav);
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 4px;
}

.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: #5d29f0;
    --phpnet-nav-dark: #4b16d8;
    --phpnet-bg: #272727;
    --phpnet-bg-soft: #333333;
    --phpnet-text-on-dark: #CCCCCC;
    --phpnet-white: #F2F2F2;
    --phpnet-paper: #F7F7F7;
    --phpnet-paper-border: #D8D8D8;
    --phpnet-link: #5d29f0;
    --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: 1170px;
    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: 1170px;
}

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

body.theme-php .phpnet-hero {
    width: 1170px;
    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 #8d6cff;
}

body.theme-php .phpnet-hero-actions .phpnet-secondary:hover {
    color: #FFFFFF !important;
    background: rgba(93, 41, 240, .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: underline;
}

body.theme-php .phpnet-layout {
    width: 1170px;
    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: #4b16d8;
    text-decoration: underline;
}

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: #4b16d8 !important;
}

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

body.theme-php .phpnet-hero-actions .phpnet-secondary:hover {
    background: rgba(93, 41, 240, .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: #5d29f0;
    --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: 1580px;
    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: #d8ceff;
    background: #faf9ff;
}

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(1590px, calc(100vw - 120px));
    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(1180px, calc(100vw - 120px));
    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-thread-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 104px;
    padding: 17px 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: 50%;
}

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;
}

body.theme-php .phpdo-author-link,
body.theme-php .phpdo-reply-author {
    color: inherit;
    font-weight: 900;
    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: #6a58cc !important;
    background: #f0edff;
}

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: 18px;
}

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(1180px, calc(100vw - 120px));
    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: #d8ceff;
    background: #faf9ff;
}

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(1180px, calc(100vw - 120px));
    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: #6a58cc !important;
    background: #f0edff !important;
    border-color: rgba(106, 88, 204, .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: #8d6cff;
    --phpdo-accent-strong: #b6a2ff;
    --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: #d8ceff !important;
    background: rgba(141, 108, 255, .18) !important;
    border-color: rgba(141, 108, 255, .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: 1580px;
    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);
}

.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: #d8ceff;
    background: #faf9ff;
}

/* 浅色模式显示月亮（点击切换到深色） */
.nav-theme-toggle .nav-theme-sun {
    display: none;
}

.nav-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 .nav-theme-toggle .nav-theme-sun {
    display: inline-block;
}

body.theme-php-dark .nav-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;
}
