/* 黑豹 Panther —— 纸面风格论坛 */

:root {
    --paper: #f4f0e7;
    --card: #fffdf9;
    --fill: #f6f2ea;
    --hover: #f1ece2;
    --ink: #1f1d1a;
    --text: #34312c;
    --soft: #6b655b;
    --faint: #9a9385;
    --rule: #ddd6c7;
    --line: #ece6da;
    --red: #b8432f;
    --red-bg: rgba(184, 67, 47, .08);
    --blue: #2f6fb8;
    --green: #3d7a4a;
    --radius: 8px;
    --serif: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --mono: "SF Mono", Menlo, Consolas, "Courier New", monospace;
    --wrap: 1320px;
    --left: 212px;
    --side: 288px;
    --top: 60px;
    --tabbar: 58px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --paper: #181715;
    --card: #211f1c;
    --fill: #2a2824;
    --hover: #2e2b27;
    --ink: #ece7dc;
    --text: #d6d0c4;
    --soft: #a39c8e;
    --faint: #7a7368;
    --rule: #3a362f;
    --line: #2f2c27;
    --red: #dc765f;
    --red-bg: rgba(220, 118, 95, .13);
    --blue: #6fa0dc;
    --green: #6fae7c;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #181715;
        --card: #211f1c;
        --fill: #2a2824;
        --hover: #2e2b27;
        --ink: #ece7dc;
        --text: #d6d0c4;
        --soft: #a39c8e;
        --faint: #7a7368;
        --rule: #3a362f;
        --line: #2f2c27;
        --red: #dc765f;
        --red-bg: rgba(220, 118, 95, .13);
        --blue: #6fa0dc;
        --green: #6fae7c;
        color-scheme: dark;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--text); font: 15px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: .9em; }
.sans { font-family: var(--sans); }
.pt-only-m { display: none !important; }
.pt-ico { display: inline-block; flex-shrink: 0; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ================= 顶栏 ================= */

.pt-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
    .pt-topbar { background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
}
.pt-topbar-in { display: flex; align-items: center; gap: 16px; max-width: var(--wrap); height: var(--top); margin: 0 auto; padding: 0 24px; }
.pt-menu-btn { display: none !important; }
.pt-brand { display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; width: var(--left); min-width: 0; }
.pt-brand:hover { color: var(--ink); }
.pt-brand-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-brand small { font-size: 12px; color: var(--red); white-space: nowrap; }
.pt-brand img { max-height: 34px; display: block; }

.pt-search { position: relative; flex: 1; max-width: 460px; }
.pt-search .pt-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.pt-search input { width: 100%; height: 38px; padding: 0 14px 0 38px; font-size: 14px; background: var(--fill); border: 1px solid transparent; border-radius: 19px; transition: border-color .15s, background .15s; }
.pt-search input:focus { outline: none; background: var(--card); border-color: var(--ink); }
/* 搜索页自带的搜索框：桌面用顶栏那个，手机上才显示这个 */
.pt-search-page { display: none; }

.pt-topbar-act { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pt-user-entry { display: flex; align-items: center; gap: 8px; margin-left: 4px; }

.pt-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--soft); }
.pt-icon-btn:hover { color: var(--ink); background: var(--hover); }
.pt-bell-num, .pt-dot-num { min-width: 16px; height: 16px; padding: 0 4px; font-family: var(--mono); font-size: 10px; font-weight: 700; line-height: 16px; color: #fff; text-align: center; background: var(--red); border-radius: 8px; }
.pt-bell-num { position: absolute; top: 2px; right: 0; }
.pt-dot-num { display: inline-block; margin-left: 4px; vertical-align: 1px; }

.pt-usermenu { position: relative; }
.pt-usermenu-btn { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; background: none; border: 0; border-radius: 20px; cursor: pointer; font-size: 14px; color: var(--ink); }
.pt-usermenu-btn:hover { background: var(--hover); }
.pt-usermenu-name { max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-usermenu-list { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 160px; list-style: none; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }
.pt-usermenu.is-open .pt-usermenu-list { display: block; }
.pt-usermenu-list a { display: block; padding: 7px 12px; font-size: 14px; border-radius: 6px; }
.pt-usermenu-list a:hover { background: var(--fill); color: var(--ink); }

/* ================= 骨架 ================= */

.pt-wrap { max-width: var(--wrap); margin: 0 auto; padding: 20px 24px 28px; }
.pt-shell { display: grid; grid-template-columns: var(--left) minmax(0, 1fr); gap: 24px; align-items: start; }
.pt-shell-main { min-width: 0; }
.pt-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 20px; align-items: start; }
.pt-layout.is-single { grid-template-columns: minmax(0, 1fr); }
.pt-layout.is-single > .pt-side { display: none; }
.pt-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* ================= 左侧栏（宽屏）/ 抽屉（窄屏） ================= */

.pt-leftnav { position: sticky; top: calc(var(--top) + 20px); max-height: calc(100vh - var(--top) - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 12px; }
.pt-drawer-head, .pt-drawer-me { display: none; }

.pt-navmain { display: flex; flex-direction: column; gap: 2px; }
.pt-navmain a, .pt-navboard-row > a, .pt-navboard-kids a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14.5px; color: var(--text); border-radius: var(--radius); transition: background .15s, color .15s; }
.pt-navmain a .pt-ico { color: var(--pt-ico, var(--soft)); }
.pt-navmain a:hover, .pt-navboard-row > a:hover, .pt-navboard-kids a:hover { background: var(--hover); color: var(--ink); }
.pt-navmain a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), inset 0 0 0 1px var(--line); }
.pt-navmain a[aria-current="page"] .pt-ico { color: var(--pt-ico, var(--red)); }

.pt-navsec { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 6px; padding: 0 12px; font-size: 12px; color: var(--faint); letter-spacing: 1px; }
.pt-navsec a { color: var(--faint); letter-spacing: 0; }
.pt-navsec a:hover { color: var(--red); }

/* 左栏版块图标按序轮转配色：否则灰底灰字和版块首字同色，看着像「站 站务公告」多打了一个字 */
.pt-navboards li:nth-child(6n+1) .pt-board-icon { --bc: var(--red); }
.pt-navboards li:nth-child(6n+2) .pt-board-icon { --bc: var(--blue); }
.pt-navboards li:nth-child(6n+3) .pt-board-icon { --bc: var(--green); }
.pt-navboards li:nth-child(6n+4) .pt-board-icon { --bc: #a9782f; }
.pt-navboards li:nth-child(6n+5) .pt-board-icon { --bc: #7a5a8f; }
.pt-navboards li:nth-child(6n) .pt-board-icon { --bc: #4a6f8f; }
.pt-navboards { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.pt-navboard-row { position: relative; display: flex; align-items: center; }
.pt-navboard-row > a { flex: 1; min-width: 0; padding: 6px 10px; }
.pt-navboard-row > a .pt-ico { flex: none; color: var(--soft); }
.pt-navboard-row.is-link > a .pt-ico { color: var(--faint); }
.pt-navboards li.has-kids > .pt-navboard-row > a { padding-right: 34px; }
.pt-navboard-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-navboard-num { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.pt-navboard-row > a[aria-current="page"], .pt-navboard-kids a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.pt-navboard-row > a[aria-current="page"] .pt-navboard-num, .pt-navboard-kids a[aria-current="page"] .pt-navboard-num { color: var(--red); }
.pt-navboard-toggle { position: absolute; right: 4px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--faint); background: none; border: 0; border-radius: 6px; cursor: pointer; transition: transform .2s, background .15s; }
.pt-navboard-toggle:hover { background: var(--fill); color: var(--ink); }
.pt-navboards li.is-open > .pt-navboard-row .pt-navboard-toggle { transform: rotate(90deg); }
.pt-navboard-kids { list-style: none; display: none; margin: 2px 0 4px 22px; padding-left: 12px; border-left: 1px solid var(--rule); }
.pt-navboards li.is-open > .pt-navboard-kids { display: block; }
.pt-navboard-kids a { padding: 5px 10px; font-size: 13.5px; color: var(--soft); }

/* 左侧栏：后台自定义导航（主导航下方） */
.pt-navlinks { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; }
.pt-navlink-row { position: relative; display: flex; align-items: center; }
.pt-navlinks .pt-navlink-row > a, .pt-navlink-kids a { display: flex; align-items: center; gap: 10px; color: var(--text); border-radius: var(--radius); transition: background .15s, color .15s; }
.pt-navlinks .pt-navlink-row > a { flex: 1; min-width: 0; padding: 8px 12px; font-size: 14.5px; }
.pt-navlinks .pt-navlink-row > a .pt-ico { flex: none; color: var(--pt-ico, var(--faint)); }
.pt-navlinks .pt-navlink-row > a:hover, .pt-navlink-kids a:hover { background: var(--hover); color: var(--ink); }
.pt-navlinks .pt-navlink-row > a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), inset 0 0 0 1px var(--line); }
.pt-navlinks .pt-navlink-row > a[aria-current="page"] .pt-ico { color: var(--pt-ico, var(--red)); }
.pt-navlink.has-kids > .pt-navlink-row > a { padding-right: 34px; }
.pt-navitem { list-style: none; }
.pt-navlink-kids { list-style: none; display: none; margin: 2px 0 4px 22px; padding-left: 12px; border-left: 1px solid var(--rule); }
.pt-navlink.is-open > .pt-navlink-kids { display: block; }
.pt-navlink.is-open > .pt-navlink-row .pt-navboard-toggle { transform: rotate(90deg); }
.pt-navlink-kids a { padding: 5px 10px; font-size: 13.5px; color: var(--soft); }

/* 自定义过颜色的导航图标：暗色模式优先用 --pt-ico-d，没配就沿用亮色设置 */
:root[data-theme="dark"] .pt-navmain a.has-navico .pt-ico,
:root[data-theme="dark"] .pt-navlinks a.has-navico .pt-ico { color: var(--pt-ico-d, var(--pt-ico, var(--soft))); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pt-navmain a.has-navico .pt-ico,
    :root:not([data-theme="light"]) .pt-navlinks a.has-navico .pt-ico { color: var(--pt-ico-d, var(--pt-ico, var(--soft))); }
}

/* ================= 首页分栏 ================= */

.pt-feedtabs { display: flex; gap: 4px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
/* tab 条与列表卡仍是两张独立卡，只是间距从 14px 收到 10px（.pt-main 的 gap 是 14，负 4px 抵掉） */
.pt-main > .pt-feedtabs { margin-bottom: -4px; }
.pt-feedtabs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 14px; color: var(--soft); border-radius: 6px; white-space: nowrap; transition: background .15s, color .15s; }
.pt-feedtabs a:hover { color: var(--ink); background: var(--fill); }
.pt-feedtabs a[aria-current="page"] { color: var(--red); background: var(--red-bg); font-weight: 600; }

/* ================= 卡片 / 面板 ================= */

.pt-card, .pt-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-card { padding: 20px 22px; }
.pt-panel { overflow: hidden; }
.pt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.pt-panel-head h2 { font-size: 15px; font-weight: 600; color: var(--ink); }
.pt-panel-head h2 small { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--faint); }
.pt-panel-extra { font-size: 13px; }
.pt-panel-extra a { color: var(--soft); }
.pt-panel-note { font-size: 12px; color: var(--faint); }
.pt-panel-pad { padding: 16px 18px; }

.pt-headcard { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-headcard-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; color: var(--red); background: var(--red-bg); border-radius: 12px; }
.pt-headcard-text { flex: 1; min-width: 0; }
.pt-headcard-text h1 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; color: var(--ink); }
.pt-headcard-text p { margin-top: 2px; font-size: 13px; color: var(--faint); }
.pt-headcard-act { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pt-headcard-note { font-size: 13px; color: var(--soft); }
.pt-headcard-note b { font-family: var(--mono); color: var(--red); }

.pt-empty-state { display: flex; flex-direction: column; align-items: center; padding: 44px 20px 40px; text-align: center; }
.pt-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 14px; color: var(--faint); background: var(--fill); border-radius: 50%; box-shadow: 0 0 0 8px var(--hover); }
.pt-empty-state b { font-size: 15px; font-weight: 600; color: var(--ink); }
.pt-empty-state p { max-width: 320px; margin-top: 4px; font-size: 13px; color: var(--faint); }
.pt-empty-act { display: flex; gap: 8px; margin-top: 16px; }
.pt-empty { padding: 36px 18px; color: var(--faint); font-size: 14px; text-align: center; }

/* ================= 通用部件 ================= */

.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 16px; font-size: 14px; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 17px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.pt-btn:hover { color: var(--ink); border-color: var(--ink); }
.pt-btn.is-solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pt-btn.is-solid:hover { background: var(--red); border-color: var(--red); color: #fff; }
.pt-btn.is-ghost { background: transparent; border-color: transparent; color: var(--soft); }
.pt-btn.is-ghost:hover { color: var(--ink); background: var(--fill); }
.pt-btn.is-block { display: flex; width: 100%; height: 40px; border-radius: 20px; }
.pt-btn.is-sm { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 14px; }
.pt-btn.is-danger { color: var(--red); }
.pt-btn.is-danger:hover { color: #fff; background: var(--red); border-color: var(--red); }
.pt-btn.is-on { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.pt-btn:disabled { opacity: .5; cursor: default; }
.pt-follow { color: #fff; background: var(--red); border-color: var(--red); }
.pt-follow:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.pt-follow.is-on { color: var(--soft); background: var(--fill); border-color: var(--line); }
.pt-follow.is-on:hover { color: var(--red); background: var(--card); border-color: var(--red); }
.pt-link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; color: var(--soft); }
.pt-link-btn:hover { color: var(--red); }

.pt-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--fill); display: block; flex-shrink: 0; }
.pt-avatar.is-xs { width: 20px; height: 20px; }
.pt-avatar.is-sm { width: 26px; height: 26px; }
.pt-avatar.is-lg { width: 48px; height: 48px; }
.pt-avatar.is-xl { width: 76px; height: 76px; }

.pt-flag { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; margin-right: 4px; font-size: 11px; font-weight: 400; line-height: 18px; color: var(--red); background: var(--red-bg); border-radius: 4px; vertical-align: 2px; white-space: nowrap; }
.pt-flag .pt-ico { vertical-align: 0; }
.pt-flag.is-soft { color: var(--soft); background: var(--fill); }
.pt-flag.is-op { color: var(--paper); background: var(--ink); }

.pt-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: 1px; }
.pt-badge { --badge: var(--soft); display: inline-block; padding: 0 6px; font-size: 11px; line-height: 18px; color: var(--badge); border: 1px solid currentColor; border-radius: 4px; white-space: nowrap; }
.pt-badge b { font-weight: 700; font-size: inherit; }
.pt-badge.is-role { --badge: var(--red); }
.pt-badge.is-mod { --badge: var(--blue); }
.pt-badge.is-title { color: #fff; background: var(--badge); border-color: var(--badge); }
.pt-badge.is-guest { --badge: var(--faint); border-style: dashed; }

.pt-dot::before { content: "·"; margin: 0 6px; color: var(--faint); }
.pt-crumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--faint); }
.pt-crumb a { color: var(--soft); }
.pt-crumb a:hover { color: var(--red); }

.pt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.pt-tag { padding: 1px 10px; font-size: 13px; color: var(--soft); background: var(--fill); border-radius: 12px; }
.pt-tag:hover { color: var(--red); }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; font-size: 13px; color: var(--text); background: var(--fill); border-radius: 14px; }
.pt-chip small { font-size: 11px; color: var(--faint); }
.pt-chip:hover { color: var(--red); }
.pt-board-chip { display: inline-block; padding: 0 7px; margin-right: 8px; font-size: 12px; line-height: 19px; color: var(--soft); background: var(--fill); border-radius: 4px; }
.pt-board-chip:hover { color: var(--red); }

/* ================= 版块 ================= */

.pt-board-icon { --bc: #6b655b; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; overflow: hidden; font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1; color: var(--bc); background: var(--fill); border-radius: 10px; }
@supports (background: color-mix(in srgb, red 10%, white)) {
    .pt-board-icon { background: color-mix(in srgb, var(--bc) 14%, var(--card)); }
}
.pt-board-icon.has-img { background: var(--fill); }
.pt-board-icon img { width: 100%; height: 100%; object-fit: cover; }
.pt-board-icon.is-xs { width: 18px; height: 18px; font-size: 10px; border-radius: 5px; }
.pt-board-icon.is-sm { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
.pt-board-icon.is-md { width: 46px; height: 46px; font-size: 20px; border-radius: 12px; }
.pt-board-icon.is-lg { width: 60px; height: 60px; font-size: 26px; border-radius: 14px; }
.pt-board-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-board-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.pt-board-desc { font-size: 13px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pt-board-num { font-family: var(--mono); font-size: 13px; color: var(--soft); }

/* 版块总览页 ?boards.htm */
.pt-crumb-cur { color: var(--text); }
.pt-boards-page { display: flex; flex-direction: column; gap: 14px; }
.pt-boards-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 2px 2px 0; }
.pt-boards-head h1 { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.pt-boards-head > span { font-size: 13px; color: var(--faint); }

.pt-bcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pt-bcard { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pt-bcard:hover { border-color: var(--rule); box-shadow: 0 8px 22px rgba(31, 29, 26, .06); transform: translateY(-1px); }
.pt-bcard-main { display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px 14px; color: inherit; }
.pt-bcard-main:hover { color: inherit; }
.pt-bcard-icon { width: 42px; height: 42px; margin-top: 1px; font-size: 18px; border-radius: 11px; }
.pt-bcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pt-bcard-name { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; line-height: 1.35; color: var(--ink); transition: color .15s; }
.pt-bcard-main:hover .pt-bcard-name { color: var(--red); }
.pt-bcard-desc { font-size: 13px; line-height: 1.55; color: var(--faint); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pt-bcard-count { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; padding-left: 4px; line-height: 1.2; }
.pt-bcard-count b { font-family: var(--mono); font-size: 17px; font-weight: 400; color: var(--ink); }
.pt-bcard-count small { font-size: 11px; color: var(--faint); }
.pt-bcard-foot { display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: auto; padding: 9px 18px 11px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
.pt-bcard-today { flex-shrink: 0; padding: 0 7px; font-size: 11.5px; line-height: 19px; color: var(--red); background: var(--red-bg); border-radius: 4px; }
.pt-bcard-last { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--soft); }
.pt-bcard-last:hover { color: var(--red); }
.pt-bcard-last-label { flex-shrink: 0; font-size: 11.5px; color: var(--faint); }
.pt-bcard-last-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-bcard-last.is-empty { font-size: 12px; color: var(--faint); }
/* 图标底色轮换，让目录有节奏但不抢纸面主色 */
.pt-bcards > li:nth-child(6n+1) .pt-board-icon { --bc: var(--red); }
.pt-bcards > li:nth-child(6n+2) .pt-board-icon { --bc: var(--blue); }
.pt-bcards > li:nth-child(6n+3) .pt-board-icon { --bc: var(--green); }
.pt-bcards > li:nth-child(6n+4) .pt-board-icon { --bc: #a9782f; }
.pt-bcards > li:nth-child(6n+5) .pt-board-icon { --bc: #7a5a8f; }
.pt-bcards > li:nth-child(6n+6) .pt-board-icon { --bc: #407c7a; }

@media (max-width: 760px) {
    .pt-boards-page { gap: 10px; }
    .pt-boards-head { padding: 0 2px; }
    .pt-boards-head h1 { font-size: 1.25rem; }
    .pt-bcards { grid-template-columns: 1fr; gap: 10px; }
    .pt-bcard:hover { transform: none; box-shadow: none; }
    .pt-bcard-main { gap: 11px; padding: 13px 14px 11px; }
    .pt-bcard-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
    .pt-bcard-name { font-size: 1rem; }
    .pt-bcard-desc { -webkit-line-clamp: 1; font-size: 12.5px; }
    .pt-bcard-count b { font-size: 15px; }
    .pt-bcard-foot { gap: 8px; padding: 8px 14px 9px; }
}

.pt-boardhead { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pt-boardhead-body { flex: 1 1 240px; min-width: 0; }
.pt-boardhead-parent { font-size: 12.5px; color: var(--faint); }
.pt-boardhead h1 { font-family: var(--serif); font-size: 1.45rem; line-height: 1.3; color: var(--ink); }
.pt-boardhead p { color: var(--soft); font-size: 14px; margin-top: 2px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.pt-boardhead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 6px; font-size: 13px; color: var(--faint); }
.pt-boardhead-meta b { font-family: var(--mono); color: var(--ink); }
.pt-boardhead-mods { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-boardhead-mods a { display: inline-flex; align-items: center; gap: 4px; color: var(--soft); }
.pt-boardhead-kids { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.pt-subboard-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; font-size: 13px; color: var(--text); background: var(--fill); border-radius: 16px; }
.pt-subboard-chip small { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.pt-subboard-chip:hover { color: var(--red); }

.pt-boardgroup-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.pt-boardgroup-head:hover { background: var(--fill); color: inherit; }
.pt-boardgroup-head .pt-board-name { font-size: 16px; }
.pt-boardgroup-head .pt-board-desc { white-space: normal; }
.pt-boardgroup-num { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--faint); line-height: 1.3; }
.pt-boardgroup-num b { font-family: var(--mono); font-size: 17px; color: var(--ink); }
.pt-subboards { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--fill); }
.pt-subboard { display: flex; align-items: center; gap: 10px; padding: 11px 18px; }
.pt-subboard b { font-size: 14px; font-weight: 600; color: var(--ink); }
.pt-subboard:hover { background: var(--hover); color: inherit; }
.pt-subboards li:nth-child(odd) { border-right: 1px solid var(--line); }
.pt-subboards li:nth-child(n+3) { border-top: 1px solid var(--line); }
.pt-boardgroup-latest { display: flex; gap: 10px; padding: 10px 18px; font-size: 13px; color: var(--soft); border-top: 1px solid var(--line); background: var(--fill); }
.pt-boardgroup-latest span { margin-left: auto; color: var(--faint); white-space: nowrap; }

/* ================= 帖子列表 ================= */

@media (min-width: 761px) {
    .is-mobile-only, .is-mobile-avatar { display: none !important; }
    .is-desktop-avatar, .is-desktop-only { display: inline-flex; }
}
.pt-threads { list-style: none; }
.pt-thread { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .15s; }
.pt-thread:last-child { border-bottom: 0; }
.pt-thread:hover { background: var(--fill); }
.pt-thread .pt-avatar { width: 40px; height: 40px; }
/* 超长无空格串（长英文、URL）不能撑破卡片，桌面端也要断 */
.pt-thread-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; word-break: break-word; }
.pt-thread-title a { overflow-wrap: anywhere; word-break: break-word; }
.pt-thread-title a:visited { color: var(--soft); }
.pt-thread.is-top .pt-thread-title a { color: var(--red); }
.pt-thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.pt-thread-author-wrap, .pt-thread-info-wrap { display: inline-flex; align-items: center; gap: 6px; }
.pt-thread-author-name .pt-author { color: var(--soft); font-weight: 500; }
.pt-thread-author-name .pt-author:hover { color: var(--red); }
.pt-thread-meta .pt-badges { margin-left: 2px; }
.pt-thread-count { min-width: 32px; padding: 0 9px; text-align: center; font-family: var(--mono); font-size: 12px; font-weight: 600; line-height: 22px; color: var(--soft); background: var(--fill); border-radius: 11px; }
.pt-thread-count:hover { color: #fff; background: var(--red); }

.pt-mini-list { list-style: none; }
.pt-mini-list li { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.pt-mini-list li:last-child { border-bottom: 0; }
.pt-mini-text { display: block; color: var(--text); line-height: 1.6; }
.pt-mini-text.is-title { font-weight: 600; color: var(--ink); }
.pt-mini-meta { margin-top: 3px; font-size: 12.5px; color: var(--faint); }
.pt-mini-meta a { color: var(--soft); }

.pt-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tabs button, .pt-tabs a { position: relative; padding: 13px 10px; font-size: 14px; color: var(--soft); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.pt-tabs button small, .pt-tabs a small { margin-left: 2px; font-size: 12px; color: var(--faint); }
.pt-tabs [aria-selected="true"] { color: var(--ink); font-weight: 600; }
.pt-tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--red); border-radius: 1px; }

.pt-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.pt-pagination a, .pt-pagination span, .pt-pagination em { display: inline-block; min-width: 32px; padding: 3px 8px; text-align: center; font-style: normal; border-radius: 16px; background: var(--fill); }
.pt-pagination a:hover { color: #fff; background: var(--ink); }
.pt-pagination span { background: var(--ink); color: var(--paper); }
.pt-pagination em { background: none; color: var(--faint); }

/* ================= 会员主页 ================= */

.pt-profile { position: relative; padding: 0; overflow: hidden; }
.pt-profile-top { display: flex; align-items: center; gap: 18px; padding: 24px 22px 20px; }
.pt-profile-top > .pt-avatar { flex: none; width: 76px; height: 76px; border: 1px solid var(--line); background-color: var(--fill); }
.pt-profile-id { flex: 1; min-width: 0; }
.pt-profile-id h1 { font-family: var(--serif); font-size: 1.55rem; line-height: 1.3; color: var(--ink); margin-bottom: 4px; }
.pt-profile-act { align-self: flex-start; padding-top: 2px; }
.pt-profile-more { padding: 0 22px 16px; }
.pt-profile-bio { font-size: 14px; color: var(--text); }
.pt-profile-bio:empty { display: none; }
.pt-profile-sites { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pt-profile-sites a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 12px 3px 9px; font-size: 13px; color: var(--text); background: var(--fill); border-radius: 14px; }
.pt-profile-sites a .pt-ico { color: var(--soft); }
.pt-profile-sites a:hover { color: var(--red); }
.pt-profile-sites a.is-add { color: var(--faint); background: none; border: 1px dashed var(--rule); }
.pt-profile-since { margin-top: 5px; font-size: 12.5px; color: var(--faint); }
.pt-profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--card); }
.pt-profile-stats > * { display: flex; flex-direction: column; align-items: center; padding: 12px 0 11px; }
.pt-profile-stats > * + * { border-left: 1px solid var(--line); }
.pt-profile-stats b { font-family: var(--mono); font-size: 18px; line-height: 1.35; color: var(--ink); }
.pt-profile-stats span { font-size: 12px; color: var(--faint); }
.pt-profile-stats a:hover b { color: var(--red); }
.pt-profile > .pt-exp { padding: 12px 22px 14px; margin: 0; border-top: 1px solid var(--line); }

.pt-exp { margin: 4px 0 14px; font-size: 12px; color: var(--faint); }
.pt-exp-bar { height: 7px; background: var(--fill); overflow: hidden; margin-bottom: 6px; border-radius: 4px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.06); }
.pt-exp-bar span { display: block; height: 100%; background: linear-gradient(90deg, #d0644e, var(--red)); border-radius: 4px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.pt-exp-text { display: flex; justify-content: space-between; align-items: center; }
.pt-exp-lv { font-weight: 700; margin-right: 3px; }
.pt-exp-tag { display: inline-block; font-size: 11px; padding: 1px 6px; background: var(--fill); border: 1px solid var(--line); border-radius: 10px; margin-left: 6px; color: var(--soft); font-weight: normal; vertical-align: middle; }
.pt-exp-need { font-size: 11.5px; opacity: .85; margin-left: 4px; }
.pt-me .pt-exp-need { display: none; }

.pt-user-list { list-style: none; }
.pt-user-list li { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.pt-user-list li:last-child { border-bottom: 0; }
.pt-user-list-body { flex: 1; min-width: 0; }
.pt-user-list-body .pt-author { font-weight: 600; }
.pt-user-list-body p { font-size: 13px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= 帖子详情 ================= */

.pt-post { padding: 24px 26px; }
.pt-post-title { font-family: var(--serif); font-size: 1.6rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; word-break: break-word; }
.pt-post-title .pt-flag { vertical-align: 6px; }
.pt-post-author { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pt-post-author-main { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.pt-post-author-info { flex: 1; min-width: 0; }
.pt-post-author-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt-post-author-info .pt-author { font-weight: 600; }
.pt-post-meta { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.pt-post-meta a { color: var(--soft); }
.pt-post-author-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pt-post-manage-dropdown { position: relative; display: inline-block; }
.pt-post-more-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--soft); border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: all .15s ease; }
.pt-post-more-btn:hover, .pt-post-manage-dropdown.is-open .pt-post-more-btn { color: var(--ink); background: var(--fill); border-color: var(--rule); }
.pt-post-manage-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 120; min-width: 150px; padding: 6px 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); display: none; }
.pt-post-manage-dropdown.is-open .pt-post-manage-menu { display: block; animation: ptDropdownFade .15s ease; }
.pt-post-manage-menu .pt-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; font-size: 13px; color: var(--text); background: none; border: 0; text-align: left; text-decoration: none; cursor: pointer; transition: background .12s, color .12s; white-space: nowrap; }
.pt-post-manage-menu .pt-menu-item:hover, .pt-post-manage-menu .pt-menu-item:active { background: var(--fill); color: var(--ink); }
.pt-post-manage-menu .pt-menu-item.is-danger { color: var(--red); }
.pt-post-manage-menu .pt-menu-item.is-danger:hover, .pt-post-manage-menu .pt-menu-item.is-danger:active { background: var(--red-bg); }

.pt-post-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.pt-pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 20px; font-size: 14px; white-space: nowrap; color: var(--soft); background: var(--fill); border: 1px solid transparent; border-radius: 19px; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.pt-pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pt-pill:hover { color: var(--ink); border-color: var(--rule); }
.pt-pill.is-on { color: var(--red); background: var(--red-bg); }
.pt-pill.is-on svg { fill: currentColor; }

.pt-modbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 12px; background: var(--fill); border: 1px dashed var(--blue); border-radius: var(--radius); }
.pt-modbar-label { display: inline-flex; align-items: center; gap: 5px; margin-right: auto; font-size: 13px; font-weight: 600; color: var(--blue); }

.pt-content { overflow-wrap: anywhere; line-height: 1.85; color: var(--text); }
.pt-content > * + * { margin-top: .85em; }
.pt-content a { color: var(--red); }
.pt-content a:hover { text-decoration: underline; }
.pt-content h1, .pt-content h2, .pt-content h3, .pt-content h4 { font-family: var(--serif); line-height: 1.4; margin-top: 1.4em; color: var(--ink); }
.pt-content h2 { font-size: 1.3rem; }
.pt-content h3 { font-size: 1.12rem; }
.pt-content ul, .pt-content ol { padding-left: 1.5em; }
.pt-content img { max-width: 100%; height: auto; border-radius: 6px; cursor: zoom-in; }
.pt-content blockquote { padding: 8px 14px; background: var(--fill); border-left: 3px solid var(--rule); color: var(--soft); border-radius: 0 6px 6px 0; }
.pt-content code { font-family: var(--mono); font-size: .88em; padding: 1px 5px; background: var(--fill); border-radius: 4px; }
.pt-content pre { max-width: 100%; padding: 14px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; background: var(--fill); border-radius: var(--radius); font-size: 13.5px; line-height: 1.6; }
.pt-content pre::-webkit-scrollbar { height: 8px; }
.pt-content pre::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.pt-content pre::-webkit-scrollbar-thumb:hover { background: var(--faint); }
.pt-content pre::-webkit-scrollbar-track { background: transparent; }
.pt-content pre code { display: block; min-width: max-content; padding: 0; background: none; }
.pt-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pt-content th, .pt-content td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.pt-content hr { border: 0; border-top: 1px solid var(--line); }
.pt-article { font-size: 16px; }

/* 隐藏内容 */
.pt-hide { margin: 1em 0; padding: 14px 16px; border-radius: var(--radius); }
.pt-hide-tip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.pt-hide-tip b { color: var(--red); font-weight: 600; }
.pt-hide-tip b::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; background: currentColor; -webkit-mask: var(--pt-lock) center / contain no-repeat; mask: var(--pt-lock) center / contain no-repeat; }
.pt-hide { --pt-lock: url("data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Crect x="5" y="11" width="14" height="9" rx="2"/%3E%3Cpath d="M8 11V8a4 4 0 0 1 8 0v3"/%3E%3C/svg%3E"); }
.pt-hide.is-locked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; background: repeating-linear-gradient(135deg, var(--fill) 0 8px, var(--card) 8px 16px); border: 1px dashed var(--rule); }
.pt-hide.is-locked .pt-hide-tip { flex-direction: column; align-items: flex-start; gap: 2px; }
.pt-hide-act { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; font-size: 13px; color: #fff !important; background: var(--red); border-radius: 16px; cursor: pointer; text-decoration: none !important; }
.pt-hide-act:hover { background: var(--ink); }
.pt-hide-note { font-size: 13px; color: var(--faint); }
.pt-hide.is-open, .pt-hide.is-preview { background: var(--fill); border: 1px solid var(--green); }
.pt-hide.is-open .pt-hide-tip, .pt-hide.is-preview .pt-hide-tip { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--rule); }
.pt-hide.is-open .pt-hide-tip b, .pt-hide.is-preview .pt-hide-tip b { color: var(--green); }
.pt-hide.is-open, .pt-hide.is-preview { --pt-lock: url("data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Crect x="5" y="11" width="14" height="9" rx="2"/%3E%3Cpath d="M8 11V8a4 4 0 0 1 7.6-1.7"/%3E%3C/svg%3E"); }

/* ================= 回复 ================= */

.pt-replies { display: flex; flex-direction: column; }
.pt-reply { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.pt-reply:target, .pt-subreply:target { background: var(--red-bg); }
.pt-reply-head { display: flex; align-items: center; gap: 10px; }
.pt-reply-who { flex: 1; min-width: 0; }
.pt-reply-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; line-height: 1.4; }
.pt-reply-name .pt-author { font-weight: 600; color: var(--ink); }
.pt-reply-name .pt-flag { margin: 0; vertical-align: 0; }
.pt-reply-meta { font-size: 12px; color: var(--faint); }
.pt-reply-no { align-self: flex-start; font-family: var(--mono); font-size: 12px; color: var(--faint); padding: 1px 6px; border-radius: 4px; background: var(--fill); }
.pt-reply-no:hover { color: var(--red); }
.pt-reply-main { padding-left: 48px; margin-top: 8px; }
.pt-reply-main > .pt-content { font-size: 15px; }
.pt-mention { display: inline-block; margin-right: 6px; padding: 0 6px; font-size: 12.5px; color: var(--soft); background: var(--fill); border-radius: 4px; }
.pt-mention b { font-weight: 600; color: var(--blue); }
.pt-reply-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 8px; }
.pt-act { display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; font-size: 12.5px; color: var(--faint); background: none; border: 0; cursor: pointer; }
.pt-act svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pt-act:hover, .pt-act.is-on { color: var(--red); }
.pt-act.is-on svg { fill: currentColor; }

.pt-subreplies { margin-top: 12px; padding: 4px 14px 6px; background: var(--fill); border-radius: var(--radius); }
.pt-subreplies-title { padding: 8px 0 4px; font-size: 12px; color: var(--faint); }
.pt-subreply { display: flex; gap: 10px; padding: 10px 0; }
.pt-subreply + .pt-subreply { border-top: 1px solid var(--line); }
.pt-subreply.is-folded { display: none; }
.pt-subreply-body { flex: 1; min-width: 0; }
.pt-subreply .pt-reply-name { font-size: 13px; }
.pt-subreply .pt-content { margin-top: 2px; font-size: 14px; line-height: 1.75; }
.pt-subreply .pt-reply-actions { margin-top: 4px; gap: 4px 14px; }
.pt-unfold { display: block; width: 100%; padding: 8px 0 4px; font-size: 13px; color: var(--blue); background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; text-align: left; }

.pt-reply-box { padding: 16px 20px; background: var(--card); }
.pt-reply-box .pt-empty-state { padding: 24px 0; }
.pt-reply-form { display: flex; gap: 12px; }
.pt-reply-form-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pt-reply-main .pt-reply-form { margin-top: 12px; }
.pt-reply-main .pt-reply-form > .pt-avatar { display: none; }
.pt-reply-form textarea, .pt-reply-form input[type="text"], .pt-reply-form input[type="email"], .pt-reply-form input[type="url"],
.pt-modal input[type="text"], .pt-modal input[type="email"], .pt-modal input[type="password"], .pt-pw-form input { width: 100%; height: 38px; padding: 0 12px; font-size: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.pt-reply-form textarea { height: auto; min-height: 84px; padding: 9px 12px; resize: vertical; line-height: 1.7; background: var(--fill); border-color: transparent; }
.pt-reply-form textarea:focus { background: var(--card); }
.pt-reply-form textarea:focus, .pt-reply-form input:focus, .pt-modal input:focus, .pt-pw-form input:focus { outline: none; border-color: var(--ink); }
.pt-reply-guest { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: center; }
.pt-captcha { display: flex; align-items: center; gap: 8px; }
.pt-captcha img { height: 38px; cursor: pointer; border-radius: 4px; }
.pt-captcha input { width: 100px !important; }
.pt-reply-bar { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.pt-reply-msg { margin-right: auto; font-size: 12.5px; color: var(--faint); }
.pt-reply-msg a { color: var(--red); }
.pt-reply-msg.is-error { color: var(--red); }
.pt-reply-msg.is-ok { color: var(--green); font-size: 13px; font-weight: 600; }
/* 表情选择器：全局悬浮面板，避免被回复框 overflow 裁剪 */
.pt-emoji-panel { position: fixed; z-index: 130; width: 292px; max-height: 216px; overflow-y: auto; overscroll-behavior: contain; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); }
.pt-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.pt-emoji-item { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: 19px; line-height: 1; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.pt-emoji-item:hover { background: var(--hover); }
.pt-emoji-item:active { transform: scale(.9); }
.pt-reply-to { font-size: 13px; color: var(--soft); }
.pt-reply-to button { margin-left: 8px; }

.pt-neighbor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 14px; }
.pt-neighbor a { padding: 12px 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-neighbor a small { display: block; color: var(--faint); font-size: 12px; }
.pt-neighbor .is-next { text-align: right; }

/* ================= 搜索 ================= */

.pt-bigsearch { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; }
.pt-bigsearch:focus-within { border-color: var(--ink); }
.pt-bigsearch > .pt-ico { color: var(--faint); }
.pt-bigsearch input { flex: 1; min-width: 0; height: 40px; padding: 0 4px; font-size: 15px; background: none; border: 0; }
.pt-bigsearch input:focus { outline: none; }
.pt-bigsearch select { max-width: 130px; height: 40px; padding: 0 10px; font-size: 13px; color: var(--soft); background: var(--fill); border: 0; border-radius: 20px; }
.pt-bigsearch .pt-btn { height: 40px; border-radius: 20px; padding: 0 22px; }
.pt-search-meta { margin-top: -4px; padding: 0 6px; font-size: 13px; color: var(--faint); }
.pt-search-meta b { color: var(--ink); }

.pt-hotlist { list-style: none; }
.pt-hotlist li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pt-hotlist li:last-child { border-bottom: 0; }
.pt-hot-rank { width: 22px; flex-shrink: 0; padding-top: 1px; font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--faint); text-align: center; }
.pt-hot-rank.is-top { color: var(--red); }
.pt-hot-body { flex: 1; min-width: 0; }
.pt-hot-title { display: block; font-weight: 600; color: var(--ink); line-height: 1.5; }
.pt-hot-meta { margin-top: 2px; font-size: 12.5px; color: var(--faint); }

/* ================= 会员排行 ================= */

.pt-rank { list-style: none; }
.pt-rank li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pt-rank li:last-child { border-bottom: 0; }
.pt-rank li.is-me { background: var(--red-bg); }
.pt-rank-no { width: 28px; flex-shrink: 0; text-align: center; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--faint); }
.pt-rank li.is-top .pt-rank-no { display: inline-flex; align-items: center; justify-content: center; height: 28px; color: #fff; border-radius: 50%; }
.pt-rank li.is-top1 .pt-rank-no { background: #c99a2e; }
.pt-rank li.is-top2 .pt-rank-no { background: #9aa3ad; }
.pt-rank li.is-top3 .pt-rank-no { background: #b07a4f; }
.pt-rank li.is-top .pt-avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--line); }
.pt-rank-body { flex: 1; min-width: 0; }
.pt-rank-body .pt-author { font-weight: 600; }
.pt-rank-body p { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-rank-exp { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.pt-rank-exp b { font-family: var(--mono); font-size: 16px; color: var(--ink); }
.pt-rank-exp span { font-size: 11px; color: var(--faint); }

/* ================= 右侧栏 ================= */

.pt-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* 右栏不做 sticky、不设内高：跟随整页滚动，避免出现一条独立的侧栏滚动条 */
.pt-side > * { flex-shrink: 0; }
.pt-side-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pt-side-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.pt-side-head h4 { font-size: 14px; font-weight: 600; color: var(--ink); }
.pt-side-head a { font-size: 12.5px; color: var(--soft); }
.pt-side-body { padding: 12px 16px; }
.pt-me { padding: 18px 16px; }
.pt-side-user { display: flex; gap: 12px; align-items: center; }
.pt-side-user > div > b { display: block; font-size: 15px; line-height: 1.4; color: var(--ink); }
.pt-side-user p { font-size: 13px; color: var(--soft); line-height: 1.6; }
.pt-me-guest b { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.pt-me-guest p { margin: 4px 0 14px; font-size: 13px; color: var(--soft); }
.pt-me-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0; padding: 10px 0; background: var(--fill); border-radius: var(--radius); text-align: center; }
.pt-me-stats a, .pt-me-stats > div { display: flex; flex-direction: column; line-height: 1.35; }
.pt-me-stats a + a, .pt-me-stats > div + div { border-left: 1px solid var(--line); }
.pt-me-stats.is-4 { grid-template-columns: repeat(4, 1fr); }
.pt-me-stats.is-4 b { font-size: 15px; }
.pt-me-stats.is-4 span { font-size: 11.5px; }
.pt-me-stats b { font-family: var(--mono); font-size: 16px; color: var(--ink); }
.pt-me-stats span { font-size: 12px; color: var(--faint); }
.pt-me-stats a:hover b { color: var(--red); }
.pt-me .pt-exp { margin: -4px 0 14px; }
.pt-me-stats:last-child { margin-bottom: 0; }
.pt-me-actions { display: flex; gap: 8px; }
.pt-me-actions .pt-btn { flex: 1; }

.pt-checkin { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 38px; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--red); background: var(--red-bg); border: 1px dashed var(--red); border-radius: 19px; cursor: pointer; }
.pt-checkin small { font-weight: 400; font-size: 12px; opacity: .85; }
.pt-checkin:hover { color: #fff; background: var(--red); border-style: solid; }
.pt-checkin.is-done { color: var(--faint); background: var(--fill); border: 1px solid var(--line); font-weight: 400; cursor: default; }

.pt-side-list { list-style: none; font-size: 14px; padding-top: 6px; padding-bottom: 6px; }
.pt-side-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.pt-side-list li.is-sub a { padding-left: 4px; color: var(--soft); }
.pt-side-list span { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.pt-side-posts { list-style: none; padding-top: 4px; padding-bottom: 4px; }
.pt-side-posts li { padding: 8px 0; }
.pt-side-posts li + li { border-top: 1px solid var(--line); }
.pt-side-posts a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.55; color: var(--ink); }
.pt-side-posts a:hover { color: var(--red); }
.pt-side-posts span { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.pt-side-feed { list-style: none; padding-top: 4px; padding-bottom: 4px; }
.pt-side-feed li { display: flex; gap: 10px; padding: 8px 0; }
.pt-side-feed li + li { border-top: 1px solid var(--line); }
.pt-side-feed li > div { flex: 1; min-width: 0; }
.pt-side-feed-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.pt-side-feed-meta { margin-top: 2px; font-size: 12px; color: var(--faint); }
.pt-side-custom { font-size: 14px; }
.pt-side-feed.is-text li { flex-direction: column; gap: 0; }
.pt-side-feed-text p { margin: 0; }
.pt-side-search { display: flex; gap: 8px; }
.pt-side-search input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-side-search .pt-btn { height: 34px; }
.pt-side-empty { font-size: 13px; color: var(--faint); }

/* 日历：emlog 返回的 table.calendartop + table.calendar */
#calendar table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
#calendar .calendartop { margin-bottom: 6px; }
#calendar .calendartop td { padding: 2px 0; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); }
#calendar .calendartop a { display: inline-block; padding: 0 6px; color: var(--faint); }
#calendar .calendartop a:hover { color: var(--red); }
#calendar .calendar td { height: 30px; padding: 0; font-family: var(--mono); font-size: 12.5px; color: var(--soft); }
#calendar .calendar .week, #calendar .calendar .sun { height: 26px; font-family: inherit; font-size: 12px; color: var(--faint); }
#calendar .calendar .sun { color: var(--red); }
#calendar .calendar a { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 600; color: var(--red); background: var(--red-bg); }
#calendar .calendar a:hover { color: var(--paper); background: var(--red); }
#calendar .calendar .day { font-weight: 700; color: var(--ink); }
#calendar .calendar .day:not(:has(a)) { text-decoration: underline; text-underline-offset: 4px; }
#calendar .calendar .day a { color: var(--paper); background: var(--ink); }

/* ================= 消息 ================= */

.pt-notices { list-style: none; }
.pt-notice-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pt-notice-item:last-child { border-bottom: 0; }
.pt-notice-item.is-unread { background: linear-gradient(90deg, var(--red-bg), transparent 60%); }
.pt-notice-item.is-unread .pt-notice-line::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--red); border-radius: 50%; vertical-align: 2px; }
.pt-notice-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; font-weight: 700; color: var(--soft); background: var(--fill); border-radius: 50%; }
.pt-notice-icon.is-approved, .pt-notice-icon.is-mod { color: var(--green); }
.pt-notice-icon.is-rejected, .pt-notice-icon.is-removed { color: var(--red); }
.pt-notice-body { flex: 1; min-width: 0; }
.pt-notice-line { font-size: 14px; line-height: 1.6; }
.pt-notice-line .pt-author { font-weight: 600; }
.pt-notice-line a:not(.pt-author) { color: var(--red); }
.pt-notice-quote { margin-top: 6px; padding: 6px 10px; font-size: 13.5px; color: var(--text); background: var(--fill); border-radius: 6px; overflow-wrap: anywhere; }
.pt-notice-meta { margin-top: 4px; font-size: 12px; color: var(--faint); }

/* ================= 发帖 / 我的帖子 ================= */

.pt-notice-card { text-align: center; padding: 48px 24px; }
.pt-notice-card h1 { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.pt-notice-card p { margin: 8px 0 20px; color: var(--soft); }
.pt-notice { padding: 10px 14px; font-size: 13.5px; background: var(--red-bg); border-radius: var(--radius); color: var(--red); }

.pt-editor { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; }
.pt-editor-head { display: flex; align-items: center; gap: 10px; }
.pt-editor-head h1 { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); }
.pt-editor-row { display: flex; gap: 10px; }
.pt-editor select, .pt-editor input[type="text"], .pt-editor input[type="number"] { height: 42px; padding: 0 12px; font-size: 15px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.pt-editor select { flex: 0 0 180px; color: var(--text); }
.pt-editor-row input { flex: 1; min-width: 0; font-weight: 600; }
.pt-editor input:focus, .pt-editor select:focus { outline: none; border-color: var(--ink); }
.pt-md { border: 1px solid var(--rule); border-radius: var(--radius); overflow: visible; background: var(--card); }
.pt-md:focus-within { border-color: var(--ink); }
.pt-md-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px; background: var(--fill); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.pt-md-tabs { display: flex; gap: 3px; }
.pt-md-bar-main { display: flex; align-items: center; gap: 6px; width: 100%; }
.pt-md-tabs { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.pt-md-tools-scroll { display: inline-flex; align-items: center; gap: 2px; }
.pt-md-primary-tools { display: inline-flex; align-items: center; gap: 2px; }
.pt-md-bar-actions { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.pt-md-extra-tools { display: flex; align-items: center; gap: 4px; }
.pt-md-section { display: inline-flex; align-items: center; }
.pt-md-zen-wrap { display: inline-flex; align-items: center; }
.pt-md-group { display: inline-flex; align-items: center; gap: 2px; }
.pt-md-sep { display: inline-block; width: 1px; height: 16px; background: var(--line); margin: 0 4px; }
.pt-md-bar button { min-width: 30px; height: 30px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; color: var(--soft); background: none; border: 0; border-radius: 6px; cursor: pointer; transition: all .15s ease; }
.pt-md-bar button:hover { color: var(--ink); background: var(--card); }
.pt-md-bar button svg { flex-shrink: 0; }
.pt-md-btn-text { font-size: 12px; font-weight: 500; }
.pt-md-tabs button[aria-selected="true"] { color: var(--ink); background: var(--card); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.pt-editor.is-preview .pt-md-tools { visibility: hidden; }

/* 下拉菜单 */
.pt-md-dropdown { position: relative; display: inline-block; }
.pt-md-dropdown-btn { display: inline-flex; align-items: center; gap: 4px; }
.pt-caret { transition: transform .15s; }
.pt-md-dropdown.is-open .pt-caret { transform: rotate(180deg); }
.pt-md-dropdown-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 120; min-width: 160px; padding: 6px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12); display: none; }
.pt-md-dropdown-menu.is-right { left: auto; right: 0; }
.pt-md-dropdown.is-open .pt-md-dropdown-menu { display: block; animation: ptDropdownFade .15s ease; }
@keyframes ptDropdownFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.pt-md-dropdown-menu a { display: block; padding: 7px 14px; font-size: 13px; color: var(--text); text-decoration: none; transition: background .12s; white-space: nowrap; }
.pt-md-dropdown-menu a:hover { background: var(--fill); color: var(--red); }

/* 编辑框与底栏 */
.pt-md textarea { display: block; width: 100%; min-height: 380px; padding: 14px 16px; font-size: 15px; line-height: 1.8; background: none; border: 0; resize: vertical; }
.pt-md textarea:focus { outline: none; }
.pt-md-preview { min-height: 380px; padding: 16px 20px; }
.pt-md-bar-bottom { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px; font-size: 12px; color: var(--faint); background: var(--fill); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.pt-md-stat { font-family: var(--mono); }
.pt-md-stat-hint { opacity: .8; }

/* 全屏沉浸模式 (Zen) */
body.has-zen { overflow: hidden; }
.pt-editor.is-fullscreen { position: fixed !important; inset: 0 !important; z-index: 99999 !important; background: var(--card) !important; margin: 0 !important; padding: 20px 32px !important; border-radius: 0 !important; overflow-y: auto !important; box-shadow: none !important; }
.pt-editor.is-fullscreen .pt-md textarea, .pt-editor.is-fullscreen .pt-md-preview { min-height: calc(100vh - 350px) !important; }
.pt-md-exit-zen { display: none; }
.pt-editor.is-fullscreen .pt-md-exit-zen { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; font-size: 12.5px; font-weight: 600; color: var(--red); background: var(--red-bg); border: 1px solid var(--red-rule); border-radius: 6px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.pt-editor.is-fullscreen .pt-md-exit-zen:hover { background: var(--red); color: #fff; }
.pt-editor.is-fullscreen .pt-md-zen-wrap button { color: var(--red); background: var(--red-bg); border-color: var(--red-rule); }

/* 折叠面板 Fold */
.pt-fold { margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--fill); overflow: hidden; }
.pt-fold > summary { padding: 10px 14px; font-weight: 600; color: var(--ink); cursor: pointer; background: var(--fill); user-select: none; outline: none; display: flex; align-items: center; gap: 8px; list-style: none; }
.pt-fold > summary::-webkit-details-marker { display: none; }
.pt-fold > summary:hover { color: var(--red); }
.pt-fold > summary svg { color: var(--soft); transition: transform .2s; }
.pt-fold[open] > summary svg { transform: rotate(90deg); color: var(--red); }
.pt-fold-body { padding: 12px 16px; background: var(--card); border-top: 1px solid var(--line); line-height: 1.75; }

/* ================= 高亮信息卡片 (Callout) ================= */
.pt-callout {
    position: relative;
    margin: 18px 0;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--fill);
    box-sizing: border-box;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.pt-callout-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.pt-callout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    flex-shrink: 0;
}
.pt-callout-icon svg {
    display: block;
}

.pt-callout-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.pt-callout-body {
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--text);
    padding-left: 2px;
}
.pt-callout-body > :first-child { margin-top: 0; }
.pt-callout-body > :last-child { margin-bottom: 0; }
.pt-callout-body p { margin: 6px 0; }
.pt-callout-body code { background: rgba(0, 0, 0, 0.05); }

/* 1. Tip 提示说明 (明晰清雅的科技蓝) */
.pt-callout.is-tip {
    border-color: rgba(59, 130, 246, 0.24);
    background: #f0f7ff;
}
.pt-callout.is-tip .pt-callout-head {
    color: #1e40af;
}
.pt-callout.is-tip .pt-callout-icon {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.15);
}

/* 2. Warn 注意事项 (温和醒目的暖琥珀橙) */
.pt-callout.is-warn {
    border-color: rgba(245, 158, 11, 0.28);
    background: #fdfaf2;
}
.pt-callout.is-warn .pt-callout-head {
    color: #92400e;
}
.pt-callout.is-warn .pt-callout-icon {
    color: #d97706;
    background: rgba(245, 158, 11, 0.16);
}

/* 3. Danger 危险警告 (警醒的珊瑚红) */
.pt-callout.is-danger {
    border-color: rgba(239, 68, 68, 0.26);
    background: #fef2f2;
}
.pt-callout.is-danger .pt-callout-head {
    color: #991b1b;
}
.pt-callout.is-danger .pt-callout-icon {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.14);
}

/* 4. Success-Summary 经验总结 (稳重典雅的翡翠绿) */
.pt-callout.is-success.is-summary {
    border-color: rgba(16, 185, 129, 0.28);
    background: #f0fdf4;
}
.pt-callout.is-success.is-summary .pt-callout-head {
    color: #065f46;
}
.pt-callout.is-success.is-summary .pt-callout-icon {
    color: #059669;
    background: rgba(16, 185, 129, 0.15);
}

/* 5. Success-Recommend 推荐建议 (明丽清新的薄荷绿/极光青) */
.pt-callout.is-success.is-recommend,
.pt-callout.is-success:not(.is-summary) {
    border-color: rgba(20, 184, 166, 0.28);
    background: #f0fdfa;
}
.pt-callout.is-success.is-recommend .pt-callout-head,
.pt-callout.is-success:not(.is-summary) .pt-callout-head {
    color: #115e59;
}
.pt-callout.is-success.is-recommend .pt-callout-icon,
.pt-callout.is-success:not(.is-summary) .pt-callout-icon {
    color: #0d9488;
    background: rgba(20, 184, 166, 0.15);
}

/* 暗色模式适配 (Dark Mode) */
[data-theme="dark"] .pt-callout.is-tip {
    border-color: rgba(96, 165, 250, 0.25);
    background: rgba(30, 58, 138, 0.18);
}
[data-theme="dark"] .pt-callout.is-tip .pt-callout-head { color: #93c5fd; }
[data-theme="dark"] .pt-callout.is-tip .pt-callout-icon { color: #60a5fa; background: rgba(96, 165, 250, 0.2); }

[data-theme="dark"] .pt-callout.is-warn {
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(120, 53, 15, 0.18);
}
[data-theme="dark"] .pt-callout.is-warn .pt-callout-head { color: #fde68a; }
[data-theme="dark"] .pt-callout.is-warn .pt-callout-icon { color: #fbbf24; background: rgba(251, 191, 36, 0.2); }

[data-theme="dark"] .pt-callout.is-danger {
    border-color: rgba(248, 113, 113, 0.25);
    background: rgba(127, 29, 29, 0.18);
}
[data-theme="dark"] .pt-callout.is-danger .pt-callout-head { color: #fca5a5; }
[data-theme="dark"] .pt-callout.is-danger .pt-callout-icon { color: #f87171; background: rgba(248, 113, 113, 0.2); }

[data-theme="dark"] .pt-callout.is-success.is-summary {
    border-color: rgba(52, 211, 153, 0.25);
    background: rgba(6, 78, 59, 0.18);
}
[data-theme="dark"] .pt-callout.is-success.is-summary .pt-callout-head { color: #a7f3d0; }
[data-theme="dark"] .pt-callout.is-success.is-summary .pt-callout-icon { color: #34d399; background: rgba(52, 211, 153, 0.2); }

[data-theme="dark"] .pt-callout.is-success.is-recommend,
[data-theme="dark"] .pt-callout.is-success:not(.is-summary) {
    border-color: rgba(45, 212, 191, 0.25);
    background: rgba(19, 78, 74, 0.18);
}
[data-theme="dark"] .pt-callout.is-success.is-recommend .pt-callout-head,
[data-theme="dark"] .pt-callout.is-success:not(.is-summary) .pt-callout-head { color: #99f6e4; }
[data-theme="dark"] .pt-callout.is-success.is-recommend .pt-callout-icon,
[data-theme="dark"] .pt-callout.is-success:not(.is-summary) .pt-callout-icon { color: #2dd4bf; background: rgba(45, 212, 191, 0.2); }

.pt-perm { display: grid; grid-template-columns: auto minmax(0, 1fr) 120px; align-items: center; gap: 8px 10px; padding: 12px 14px; background: var(--fill); border-radius: var(--radius); }
.pt-perm-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.pt-perm-label .pt-ico { color: var(--red); }
.pt-perm select, .pt-perm input { height: 36px !important; font-size: 14px !important; }
.pt-perm select { flex: none; }
.pt-perm-tip { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); }
.pt-perm-tip code { font-family: var(--mono); font-size: 12px; padding: 0 4px; background: var(--card); border-radius: 3px; }

.pt-editor-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pt-editor-msg { margin-right: auto; font-size: 13px; color: var(--faint); }
.pt-editor-msg.is-error { color: var(--red); }
.pt-draft-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; font-size: 13.5px; background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-draft-banner[hidden] { display: none; }
.pt-draft-banner .pt-draft-text { color: var(--soft); }
.pt-draft-banner .pt-draft-act { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.pt-draft-status { font-size: 12.5px; color: var(--faint); }
.pt-draft-status:not(:empty) { margin-right: 12px; }

.pt-manage { list-style: none; }
.pt-manage li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pt-manage li:last-child { border-bottom: 0; }
.pt-manage-body { flex: 1; min-width: 0; }
.pt-manage-title { display: block; font-weight: 600; color: var(--ink); line-height: 1.5; }
.pt-manage-meta { margin-top: 3px; font-size: 12.5px; color: var(--faint); }
.pt-manage-feedback { margin-top: 6px; padding: 6px 10px; font-size: 13px; color: var(--red); background: var(--red-bg); border-radius: 6px; }
.pt-manage-act { display: flex; gap: 6px; flex-shrink: 0; }

/* ================= 账号设置 ================= */

.pt-avatar-edit { display: flex; align-items: center; gap: 18px; }
.pt-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.pt-form label { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 12px; }
.pt-form label.is-top { align-items: start; }
.pt-form label.is-top span { padding-top: 8px; }
.pt-form label span { font-size: 14px; color: var(--soft); }
.pt-form input, .pt-form textarea { width: 100%; height: 38px; padding: 0 12px; font-size: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.pt-form textarea { height: auto; padding: 8px 12px; line-height: 1.7; resize: vertical; }
.pt-form input:focus, .pt-form textarea:focus { outline: none; border-color: var(--ink); }
.pt-form input[readonly] { color: var(--faint); background: var(--fill); }
.pt-form-tip { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.pt-form-indent { margin: -6px 0 0 92px; }
.pt-form-foot { padding-left: 92px; }
.pt-form-foot-split { display: flex; justify-content: space-between; padding-left: 0; }
.pt-sites { display: flex; flex-direction: column; gap: 8px; }
.pt-site-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }

/* 胶囊开关 */
.pt-switch { position: relative; display: inline-flex; flex: none; width: 42px; height: 24px; cursor: pointer; }
.pt-switch input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pt-switch span { position: relative; display: block; width: 42px; height: 24px; background: var(--rule); border-radius: 999px; transition: background .18s ease; }
.pt-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--card); border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); transition: transform .18s ease; }
.pt-switch input:checked + span { background: var(--ink); }
.pt-switch input:checked + span::after { transform: translateX(18px); }
.pt-switch input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.pt-switch input:disabled { cursor: default; }
.pt-switch input:disabled + span { opacity: .45; }

/* 通知提醒设置 */
.pt-notify-master { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pt-notify-master > div { flex: 1; min-width: 0; }
.pt-notify-master b { font-size: 14px; font-weight: 600; color: var(--ink); }
.pt-notify-master .pt-form-tip { margin: 2px 0 0; }
.pt-notify-head, .pt-notify-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px 56px; gap: 8px; align-items: center; padding: 11px 18px; }
.pt-notify-head { font-size: 12px; color: var(--faint); border-bottom: 1px solid var(--line); }
.pt-notify-head span:not(:first-child), .pt-notify-row > .pt-switch { justify-self: center; }
.pt-notify-row + .pt-notify-row { border-top: 1px solid var(--line); }
.pt-notify-label { min-width: 0; }
.pt-notify-label b { font-size: 14px; font-weight: 600; color: var(--ink); }
.pt-notify-label .pt-form-tip { margin: 2px 0 0; }
.pt-notify-form .pt-form-foot { padding: 14px 18px; border-top: 1px solid var(--line); }
.pt-tw-list-profile .pt-tw-card:last-child { border-bottom: 0; }
.pt-tw-more { border-top: 1px solid var(--line); }
@media (max-width: 560px) {
    .pt-notify-master, .pt-notify-head, .pt-notify-row { padding-left: 14px; padding-right: 14px; }
    .pt-notify-head, .pt-notify-row { grid-template-columns: minmax(0, 1fr) 46px 46px; }
    .pt-notify-label .pt-form-tip { font-size: 11.5px; }
}

/* ================= 页脚 / 浮动 ================= */

.pt-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding: 16px 2px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.pt-footer a { color: var(--soft); }
.pt-footer-info { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.pt-footer-stat { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.pt-footer-stat b { font-weight: 400; color: var(--soft); }
.pt-totop { position: fixed; right: 20px; bottom: 24px; width: 38px; height: 38px; font-size: 15px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); cursor: pointer; z-index: 40; }
.pt-tabbar, .pt-drawer-mask { display: none; }

/* ================= 弹窗 / 提示 ================= */

.pt-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pt-modal-mask { position: absolute; inset: 0; background: rgba(20, 18, 15, .45); }
.pt-modal-card { position: relative; width: 100%; max-width: 360px; padding: 26px 24px 20px; background: var(--card); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.pt-modal-card h3 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 18px; color: var(--ink); }
.pt-modal-card form { display: flex; flex-direction: column; gap: 10px; }
.pt-modal-card form > div { display: flex; flex-direction: column; gap: 10px; }
.pt-modal-close { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; font-size: 20px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--faint); border-radius: 50%; }
.pt-modal-close:hover { color: var(--ink); background: var(--fill); }
.pt-modal-alert { display: none; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; color: var(--red); background: var(--red-bg); border-radius: 6px; }
.pt-modal-alert.is-show { display: block; }
.pt-modal-alert.is-ok { color: var(--green); background: rgba(61, 122, 74, .1); }
.pt-modal-switch { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.pt-modal-switch a { color: var(--soft); }
.pt-modal-ext:empty { display: none; }
.pt-modal-ext { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pt-row { display: flex !important; flex-direction: row !important; gap: 8px; align-items: center; }
.pt-row[hidden] { display: none !important; }
.pt-row input { flex: 1; }
.pt-row img { height: 38px; cursor: pointer; border-radius: 4px; }
.pt-row .pt-btn { height: 38px; border-radius: var(--radius); }
.pt-modal-hint { margin: -2px 0 0; font-size: 12px; color: var(--faint); }
.pt-modal-note { margin: 0 0 4px; padding: 8px 12px; font-size: 13px; color: var(--soft); background: var(--red-bg); border-radius: 6px; }
.pt-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); }
.pt-toast { position: fixed; left: 50%; bottom: 32px; z-index: 120; transform: translate(-50%, 20px); padding: 8px 18px; font-size: 14px; color: var(--paper); background: var(--ink); border-radius: 20px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.pt-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.pt-standalone { max-width: 520px; padding-top: 18vh; }
.pt-standalone-title { font-family: var(--serif); font-size: 2rem; line-height: 1.3; margin: 6px 0 8px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); color: var(--ink); }
.pt-standalone p { margin-top: 14px; }
.pt-standalone a { color: var(--red); }
.pt-kicker { font-size: 12px; color: var(--faint); letter-spacing: 1px; }
.pt-sub { color: var(--soft); font-size: 14px; }
.pt-pw-form { display: flex; gap: 10px; margin-top: 22px; }

/* ================= 中等宽度：左栏变抽屉 ================= */

@media (max-width: 1180px) {
    .pt-menu-btn { display: inline-flex !important; }
    .pt-brand { width: auto; }
    .pt-shell { display: block; }
    body.is-drawer { overflow: hidden; }
    .pt-leftnav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 95; width: min(84vw, 300px); max-height: none; padding: 0 12px calc(24px + env(safe-area-inset-bottom)); background: var(--paper); box-shadow: 4px 0 30px rgba(0, 0, 0, .15); transform: translateX(-105%); transition: transform .25s ease; visibility: hidden; }
    body.is-drawer .pt-leftnav { transform: none; visibility: visible; }
    .pt-drawer-mask { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(20, 18, 15, .4); }
    .pt-drawer-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; height: 56px; margin: 0 -12px 10px; padding: 0 6px 0 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
    .pt-drawer-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
    .pt-drawer-me { display: block; margin-bottom: 14px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
    .pt-drawer-user { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: inherit; }
    .pt-drawer-user > span > b { display: block; font-size: 16px; color: var(--ink); }
    .pt-drawer-tip { margin-bottom: 12px; font-size: 13px; color: var(--soft); }
    .pt-drawer-auth { display: flex; gap: 8px; }
    .pt-drawer-auth .pt-btn { flex: 1; }
    .pt-quick { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 6px; }
    .pt-quick a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 62px; padding: 10px 4px 8px; font-size: 12px; color: var(--text); background: var(--fill); border-radius: var(--radius); }
    .pt-quick a .pt-ico { color: var(--soft); }
    .pt-quick a:hover { color: var(--red); }
    .pt-quick-num { position: absolute; top: 5px; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; color: #fff; text-align: center; background: var(--red); border-radius: 8px; }
}

@media (max-width: 900px) {
    .pt-layout { grid-template-columns: minmax(0, 1fr); }
    .pt-side { display: none; }
    .pt-subboards { grid-template-columns: minmax(0, 1fr); }
    .pt-subboards li:nth-child(odd) { border-right: 0; }
    .pt-subboards li:nth-child(n+2) { border-top: 1px solid var(--line); }
}

/* ================= 手机 ================= */

@media (max-width: 760px) {
    :root { --top: 52px; }
    body { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
    .pt-topbar-in { gap: 4px; padding: 0 6px; }
    .pt-brand-name { font-size: 1.2rem; }
    .pt-search, .pt-user-entry { display: none; }
    .pt-search-page { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 23px; }
    .pt-search-page .pt-ico { flex: none; color: var(--faint); }
    .pt-search-page input { flex: 1; min-width: 0; height: 44px; font-size: 14px; color: var(--ink); background: none; border: 0; outline: none; }
    .pt-search-page .pt-btn { flex: none; height: 34px; padding: 0 14px; font-size: 13px; }
    .pt-wrap { padding: 12px 12px 16px; }
    .pt-main { gap: 12px; }

    .pt-feedtabs { position: sticky; top: calc(var(--top) + 6px); z-index: 30; box-shadow: 0 4px 14px rgba(0, 0, 0, .05); }
    /* 手机上 tab 是吸顶的，与下方卡片保持分离，间距同样收到 10px（此处 gap 是 12） */
    .pt-main > .pt-feedtabs { margin-bottom: -2px; }
    .pt-feedtabs a { flex: 1; justify-content: center; padding: 6px 4px; }

    .pt-card { padding: 16px; }
    .pt-headcard { padding: 14px 16px; gap: 12px; }
    .pt-headcard-icon { width: 38px; height: 38px; border-radius: 10px; }
    .pt-headcard-text h1 { font-size: 1.2rem; }
    .pt-headcard-act .pt-btn { height: 30px; padding: 0 12px; font-size: 13px; }
    .pt-panel-head { padding: 12px 14px; }

    .is-desktop-only, .is-desktop-avatar { display: none !important; }
    .is-mobile-only, .is-mobile-avatar { display: inline-flex; }

    .pt-thread { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 14px 12px; }
    .pt-thread .is-desktop-avatar { display: none !important; }
    .pt-thread .pt-thread-count.is-desktop-only { display: none !important; }
    .pt-thread-body { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
    .pt-thread-title { font-size: 15.5px; font-weight: 600; line-height: 1.45; color: var(--ink); margin: 0; }
    .pt-thread-title a { color: var(--ink); word-break: break-word; }
    .pt-thread-excerpt { font-size: 13px; line-height: 1.5; color: var(--soft); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .pt-thread-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; width: 100%; }
    .pt-thread-author-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; width: 100%; }
    .pt-thread-avatar.is-mobile-avatar { display: inline-flex; flex-shrink: 0; }
    .pt-thread-avatar.is-mobile-avatar .pt-avatar { width: 22px; height: 22px; border-radius: 50%; }
    .pt-thread-author-name { font-size: 13px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; flex-shrink: 0; }
    .pt-thread-badges { display: inline-flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
    .pt-thread-badges .pt-badge { flex-shrink: 0; white-space: nowrap; height: 18px; line-height: 18px; padding: 0 5px; font-size: 11px; border-radius: 3px; }
    .pt-thread-info-wrap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); min-width: 0; width: 100%; }
    .pt-thread-time { white-space: nowrap; color: var(--faint); flex-shrink: 0; }
    .pt-board-chip { height: 20px; line-height: 20px; padding: 0 6px; font-size: 11px; border-radius: 4px; background: var(--fill); color: var(--soft); white-space: nowrap; flex-shrink: 0; }
    .pt-lastreply { display: none; }
    .pt-thread-stats.is-mobile-only { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; color: var(--soft); font-size: 11.5px; flex-shrink: 0; }
    .pt-stat-item { display: inline-flex; align-items: center; gap: 3px; }
    .pt-stat-item svg { width: 13px; height: 13px; opacity: 0.75; }

    .pt-boardhead { gap: 12px; }
    .pt-boardhead .pt-board-icon.is-lg { width: 48px; height: 48px; font-size: 21px; border-radius: 12px; }
    .pt-boardhead h1 { font-size: 1.25rem; }
    .pt-boardhead > .pt-btn { width: 100%; }
    .pt-boardgroup-head, .pt-subboard { padding-left: 14px; padding-right: 14px; }

    .pt-card.pt-profile { padding: 0; }
    .pt-profile-top { padding: 18px 16px 14px; gap: 12px; }
    .pt-profile-top > .pt-avatar { width: 60px; height: 60px; }
    .pt-profile-id h1 { font-size: 1.25rem; }
    .pt-profile-act { position: absolute; right: 12px; top: 12px; padding: 0; }
    .pt-profile-act .pt-btn { height: 30px; padding: 0 12px; font-size: 13px; }
    .pt-profile-more { padding: 0 16px 14px; }
    .pt-profile > .pt-exp { padding: 10px 16px 14px; }
    .pt-profile-stats b { font-size: 16px; }
    .pt-mini-list li, .pt-user-list li, .pt-notice-item, .pt-rank li { padding: 12px 14px; }

    .pt-post { padding: 18px 16px; }
    .pt-post-title { font-size: 1.3rem; }
    .pt-post-author { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 16px; padding-bottom: 14px; }
    .pt-post-author-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
    .pt-post-author-info { min-width: 0; flex: 1; }
    .pt-post-author-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; font-size: 14px; }
    .pt-post-meta { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
    .pt-post-author-acts { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
    .pt-post-author-acts .pt-follow { height: 32px; padding: 0 12px; font-size: 12.5px; }
    .pt-post-more-btn { width: 34px; height: 34px; border-radius: 8px; }
    .pt-post-actions { justify-content: space-between; gap: 8px; }
    .pt-pill { flex: 1; justify-content: center; padding: 0 10px; }
    .pt-modbar-label { width: 100%; }

    .pt-reply { padding: 14px 14px 12px; }
    .pt-reply-head .pt-avatar { width: 34px; height: 34px; }
    .pt-reply-main { padding-left: 0; }
    .pt-subreplies { padding: 2px 10px 4px; }
    .pt-reply-box { padding: 14px; }
    .pt-reply-form > .pt-avatar { display: none; }

    .pt-bigsearch select { display: none; }
    .pt-bigsearch .pt-btn { padding: 0 16px; }
    .pt-hotlist li { padding: 12px 14px; }

    .pt-neighbor { grid-template-columns: 1fr; gap: 8px; }
    .pt-neighbor .is-next { text-align: left; }

    /* 草稿恢复提示框移动端适配 */
    .pt-draft-banner { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
    .pt-draft-banner .pt-draft-text { font-size: 13px; line-height: 1.5; color: var(--soft); word-break: break-word; }
    .pt-draft-banner .pt-draft-act { margin-left: 0; display: flex; justify-content: flex-end; gap: 8px; }
    .pt-draft-banner .pt-draft-act .pt-btn { height: 30px; padding: 0 12px; font-size: 12.5px; white-space: nowrap; flex-shrink: 0; }

    /* 编辑发帖移动端容器及防溢出 */
    body.has-editor .pt-tabbar, body:has(.pt-editor) .pt-tabbar { display: none !important; }
    body.has-editor, body:has(.pt-editor) { padding-bottom: 20px !important; }
    .pt-editor { padding: 16px 14px; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    .pt-editor-row { flex-direction: column; width: 100%; min-width: 0; gap: 10px; }
    .pt-editor select, .pt-editor-row input { flex: none; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    .pt-md { width: 100%; max-width: 100%; min-width: 0; border-radius: 10px; overflow: hidden; box-sizing: border-box; }
    .pt-md-bar { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: var(--fill); border-radius: 9px 9px 0 0; }
    .pt-md-bar-main { display: flex; align-items: center; justify-content: flex-start; gap: 4px; padding: 6px 8px; width: 100%; min-width: 0; box-sizing: border-box; border-bottom: 1px solid var(--line); overflow: hidden; }
    .pt-md-tabs { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; white-space: nowrap; }
    .pt-md-tabs button { height: 32px; padding: 0 8px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
    .pt-md-tools-scroll { flex: 1; min-width: 0; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 2px; }
    .pt-md-tools-scroll::-webkit-scrollbar { display: none; }
    .pt-md-primary-tools { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
    .pt-md-primary-tools button { width: 32px; height: 32px; min-width: 32px; padding: 0; border-radius: 6px; flex-shrink: 0; }
    .pt-md-bar-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; white-space: nowrap; }
    .pt-md-more-toggle { height: 32px; padding: 0 8px; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--soft); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all .15s ease; }
    .pt-md-more-toggle.is-active { color: var(--red); background: var(--red-bg); border-color: var(--red-rule); }
    .pt-md-zen-wrap { display: inline-flex; align-items: center; flex-shrink: 0; }
    .pt-md-zen-wrap button { width: 32px; height: 32px; min-width: 32px; padding: 0; flex-shrink: 0; }
    .pt-md-extra-tools { display: none; flex-direction: column; gap: 10px; padding: 12px 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
    .pt-md-extra-tools.is-open { display: flex; animation: ptDropdownFade .18s ease; }
    .pt-md-section { display: flex; flex-direction: column; gap: 6px; }
    .pt-md-section-label { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.5px; }
    .pt-md-section .pt-md-group { display: flex; flex-wrap: wrap; gap: 6px; }
    .pt-md-chip { height: 32px; padding: 0 10px; font-size: 12px; color: var(--text); background: var(--fill); border: 1px solid var(--line); border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
    .pt-md-chip:active { background: var(--hover); }
    .pt-md-chip.is-hide-btn { color: var(--red) !important; background: var(--red-bg); border-color: var(--red-rule); }
    .pt-md textarea { min-height: 300px; padding: 12px 14px; font-size: 16px !important; line-height: 1.7; width: 100%; box-sizing: border-box; }
    .pt-md-preview { min-height: 300px; padding: 14px 16px; overflow-wrap: anywhere; word-break: break-word; width: 100%; box-sizing: border-box; }

    /* 移动端全屏模式 (Zen) 独立全屏编辑视图 */
    body.has-zen { overflow: hidden !important; touch-action: none; }
    .pt-editor.is-fullscreen {
        position: fixed !important;
        inset: 0 !important;
        z-index: 99999 !important;
        background: var(--card) !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100vw !important;
        height: 100dvh !important;
        height: 100vh !important;
        max-height: 100% !important;
        overflow: hidden !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }
    .pt-editor.is-fullscreen > :not(#pt-md) {
        display: none !important;
    }
    .pt-editor.is-fullscreen #pt-md {
        flex: 1 1 100% !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        border: 0 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: var(--card) !important;
        overflow: hidden !important;
    }
    .pt-editor.is-fullscreen .pt-md-bar {
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 10 !important;
        border-radius: 0 !important;
        border-bottom: 1px solid var(--line) !important;
        background: var(--fill) !important;
        padding-top: env(safe-area-inset-top) !important;
    }
    .pt-editor.is-fullscreen .pt-md-bar-main {
        border-bottom: 1px solid var(--line) !important;
    }
    .pt-editor.is-fullscreen .pt-md textarea {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        resize: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 14px 16px !important;
        font-size: 16px !important;
        line-height: 1.7 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
        background: var(--card) !important;
    }
    .pt-editor.is-fullscreen .pt-md-preview {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 16px !important;
        box-sizing: border-box !important;
    }
    .pt-editor.is-fullscreen .pt-md-bar-bottom {
        flex-shrink: 0 !important;
        border-top: 1px solid var(--line) !important;
        border-radius: 0 !important;
        background: var(--fill) !important;
        padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
    }
    .pt-editor-foot { flex-wrap: wrap; justify-content: flex-end; gap: 8px; width: 100%; box-sizing: border-box; }
    .pt-editor-foot .pt-editor-msg { width: 100%; text-align: right; order: -1; }
    .pt-perm { grid-template-columns: minmax(0, 1fr) 100px; }
    .pt-perm-label { grid-column: 1 / -1; }
    .pt-manage li { flex-wrap: wrap; padding: 12px 14px; }
    .pt-manage-act { width: 100%; justify-content: flex-end; }

    .pt-form { padding: 14px; }
    .pt-form label { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .pt-form label.is-top span { padding-top: 0; }
    .pt-form-indent { margin-left: 0; }
    .pt-form-foot { padding-left: 0; }
    .pt-form-foot:not(.pt-form-foot-split) .pt-btn { width: 100%; }
    .pt-site-row { grid-template-columns: minmax(0, 1fr) 36px; }
    .pt-site-row input[type="url"] { grid-column: 1; grid-row: 2; }
    .pt-site-row .pt-icon-btn { grid-row: 1 / span 2; grid-column: 2; }

    .pt-footer { margin-top: 24px; justify-content: center; text-align: center; }

    .pt-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); }
    .pt-tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--faint); -webkit-tap-highlight-color: transparent; }
    .pt-tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .pt-tabbar a[aria-current="page"] { color: var(--ink); }
    .pt-tabbar a[aria-current="page"] span { font-weight: 600; }
    .pt-tabbar a.is-post svg { width: 44px; height: 34px; padding: 7px 12px; color: var(--paper); background: var(--ink); border-radius: 17px; stroke-width: 2.2; }
    .pt-tab-dot { position: absolute; top: 7px; left: calc(50% + 8px); width: 8px; height: 8px; background: var(--red); border-radius: 50%; border: 2px solid var(--card); box-sizing: content-box; }
    .pt-totop { bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom)); right: 14px; }
    .pt-toast { bottom: calc(var(--tabbar) + 20px + env(safe-area-inset-bottom)); }
    .pt-standalone { padding-top: 12vh; }
}

/* ================= 图片灯箱 ================= */

.pt-lightbox { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; background: rgba(12, 11, 10, .9); touch-action: none; }
.pt-lightbox[hidden] { display: none; }
.pt-lightbox-fig { display: flex; margin: 0; max-width: 94vw; max-height: 90vh; }
.pt-lightbox-fig img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 6px; cursor: default; }
.pt-lightbox-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: #fff; background: rgba(255, 255, 255, .14); border: 0; border-radius: 50%; cursor: pointer; }
.pt-lightbox-close:hover { background: rgba(255, 255, 255, .28); }
.pt-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 66px; font-size: 30px; line-height: 1; color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 8px; cursor: pointer; }
.pt-lightbox-nav:hover { background: rgba(255, 255, 255, .26); }
.pt-lightbox-nav.is-prev { left: 10px; }
.pt-lightbox-nav.is-next { right: 10px; }
.pt-lightbox-nav[hidden] { display: none; }
.pt-lightbox-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); padding: 3px 12px; font-size: 13px; color: #fff; background: rgba(0, 0, 0, .45); border-radius: 12px; }
.pt-lightbox-count[hidden] { display: none; }
body.pt-noscroll { overflow: hidden; }
@media (max-width: 642px) {
    .pt-lightbox-nav { width: 38px; height: 56px; font-size: 26px; }
    .pt-lightbox-close { top: 10px; right: 12px; }
}

/* ================= 交互：触摸反馈 / 动效 ================= */

/* 去掉移动端浏览器默认的蓝灰色点击高亮，换成下面的按压反馈 */
html { -webkit-tap-highlight-color: transparent; }
a, button, [role="tab"], label, summary, select { touch-action: manipulation; }
.pt-tabbar, .pt-btn, .pt-pill, .pt-act, .pt-icon-btn, .pt-feedtabs, .pt-tabs, .pt-quick, .pt-checkin { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 按钮类：轻微缩放 */
.pt-btn, .pt-pill, .pt-icon-btn, .pt-checkin, .pt-thread-count, .pt-totop, .pt-modal-close, .pt-hide-act, .pt-usermenu-btn, .pt-navboard-toggle, .pt-md-bar button, .pt-lightbox-close, .pt-lightbox-nav {
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, opacity .2s, transform .12s cubic-bezier(.3, .7, .4, 1);
}
.pt-btn:active:not(:disabled), .pt-pill:active, .pt-checkin:not(.is-done):active, .pt-hide-act:active, .pt-usermenu-btn:active { transform: scale(.96); }
.pt-icon-btn:active, .pt-modal-close:active, .pt-navboard-toggle:active, .pt-totop:active, .pt-thread-count:active, .pt-md-bar button:active { transform: scale(.88); }
.pt-icon-btn:active, .pt-modal-close:active { background: var(--hover); }
.pt-act { transition: color .15s, transform .12s; }
.pt-act:active { transform: scale(.92); }

/* 列表行、导航项：按下时铺一层底色 */
.pt-thread, .pt-mini-list li, .pt-user-list li, .pt-notice-item, .pt-rank li, .pt-hotlist li, .pt-manage li, .pt-subboard, .pt-boardgroup-head, .pt-side-posts li, .pt-side-feed li, .pt-neighbor a { transition: background .15s; }
.pt-navmain a:active, .pt-navboard-row > a:active, .pt-navboard-kids a:active, .pt-usermenu-list a:active, .pt-quick a:active, .pt-feedtabs a:active, .pt-chip:active, .pt-tag:active, .pt-subboard-chip:active, .pt-board-chip:active, .pt-pagination a:active { background: var(--hover); transform: scale(.97); }
.pt-quick a, .pt-feedtabs a, .pt-chip, .pt-tag, .pt-subboard-chip, .pt-board-chip, .pt-pagination a { transition: background .15s, color .15s, transform .12s; }
.pt-thread.is-press, .pt-mini-list li.is-press, .pt-user-list li.is-press, .pt-notice-item.is-press, .pt-rank li.is-press, .pt-hotlist li.is-press, .pt-manage li.is-press { background: var(--hover); }
.pt-subboard:active, .pt-boardgroup-head:active, .pt-neighbor a:active { background: var(--hover); }
.pt-tabs button, .pt-tabs a { transition: color .15s; }
.pt-tabs button:active, .pt-tabs a:active { color: var(--ink); }
.pt-tabs [aria-selected="true"]::after { animation: pt-grow .22s ease-out; }

/* 整行可点的帖子 */
.pt-thread[data-href] { cursor: pointer; }

/* 底部导航：按下缩放 + 选中时图标轻弹 */
.pt-tabbar a { transition: color .15s; }
.pt-tabbar a svg { transition: transform .15s cubic-bezier(.3, .7, .4, 1); }
.pt-tabbar a:active svg { transform: scale(.84); }
.pt-tabbar a[aria-current="page"] svg { animation: pt-pop .32s ease-out; }
.pt-tabbar a.is-post:active svg { transform: scale(.9); }

/* 触屏设备不保留 hover 残影（点完回到列表时那一行还亮着） */
@media (hover: none) {
    .pt-thread:hover, .pt-boardgroup-head:hover, .pt-subboard:hover { background: none; }
    .pt-subboards .pt-subboard:hover { background: none; }
    .pt-btn:hover { border-color: var(--rule); }
    .pt-btn.is-solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
    .pt-pill:hover { color: var(--soft); border-color: transparent; }
    .pt-pill.is-on:hover { color: var(--red); }
    .pt-thread-count:hover { color: var(--soft); background: var(--fill); }
    .pt-icon-btn:hover { background: none; color: var(--soft); }
    .pt-pagination a:hover { color: var(--ink); background: var(--fill); }
}

/* 赞 / 收藏：点亮时弹一下 */
.pt-pill.is-pop svg, .pt-act.is-pop svg { animation: pt-heart .45s cubic-bezier(.2, .9, .3, 1.4); }
.pt-count-bump { display: inline-block; animation: pt-bump .3s ease-out; }

/* 顶栏滚动后加一道阴影 */
.pt-topbar { transition: box-shadow .2s; }
.pt-topbar.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(0, 0, 0, .05); }

/* 楼层定位：避开吸顶栏，命中后闪一下再淡出 */
.pt-reply, .pt-subreply, [id^="comment-"] { scroll-margin-top: calc(var(--top) + 16px); }
.pt-reply:target, .pt-subreply:target { animation: pt-flash 2.4s ease-out; background: none; }

/* 弹层出现动画 */
.pt-modal:not([hidden]) .pt-modal-mask { animation: pt-fade .2s ease-out; }
.pt-modal:not([hidden]) .pt-modal-card { animation: pt-rise .26s cubic-bezier(.2, .8, .3, 1); }
.pt-usermenu.is-open .pt-usermenu-list { animation: pt-drop .16s ease-out; transform-origin: top right; }
.pt-drawer-mask:not([hidden]) { animation: pt-fade .25s ease-out; }
.pt-lightbox:not([hidden]) { animation: pt-fade .2s ease-out; }
.pt-lightbox:not([hidden]) .pt-lightbox-fig img { animation: pt-zoom .25s cubic-bezier(.2, .8, .3, 1); }
.pt-totop:not([hidden]) { animation: pt-rise .25s ease-out; }
[data-pane]:not([hidden]) { animation: pt-fade .2s ease-out; }
.pt-navboards li.is-open > .pt-navboard-kids { animation: pt-drop .18s ease-out; transform-origin: top left; }
.pt-toast { transform: translate(-50%, 16px) scale(.96); transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .3, 1.2); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.pt-toast.is-show { transform: translate(-50%, 0) scale(1); }

/* 页面跳转进度条 */
.pt-progress { position: fixed; top: 0; left: 0; z-index: 200; width: 100%; height: 2px; pointer-events: none; transform-origin: left; transform: scaleX(0); background: var(--red); opacity: 0; }
.pt-progress.is-run { opacity: 1; animation: pt-load 8s cubic-bezier(.1, .7, .2, 1) forwards; }

/* 请求中的按钮 */
.pt-btn:disabled, .pt-pill:disabled, .pt-act:disabled { cursor: progress; }

@keyframes pt-fade { from { opacity: 0; } }
@keyframes pt-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes pt-drop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes pt-zoom { from { opacity: 0; transform: scale(.92); } }
@keyframes pt-grow { from { transform: scaleX(.3); opacity: 0; } }
@keyframes pt-pop { 40% { transform: scale(1.18); } }
@keyframes pt-heart { 0% { transform: scale(1); } 30% { transform: scale(.7); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes pt-bump { 0% { transform: translateY(0); } 40% { transform: translateY(-4px); opacity: .6; } 100% { transform: translateY(0); } }
@keyframes pt-flash { 0%, 30% { background: var(--red-bg); } 100% { background: transparent; } }
@keyframes pt-load { 0% { transform: scaleX(0); } 20% { transform: scaleX(.45); } 100% { transform: scaleX(.92); } }

@media (max-width: 760px) {
    /* iOS 输入框字号小于 16px 时聚焦会自动放大页面 */
    input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], textarea, select { font-size: 16px !important; }

    /* 手机上登录弹窗改为底部抽屉 */
    .pt-modal { align-items: flex-end; padding: 0; }
    .pt-modal-card { max-width: none; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; }
    .pt-modal-card::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; background: var(--rule); border-radius: 2px; }
    .pt-modal:not([hidden]) .pt-modal-card { animation: pt-sheet .3s cubic-bezier(.2, .8, .3, 1); }

    .pt-tabbar { box-shadow: 0 -4px 16px rgba(0, 0, 0, .04); }
    @supports (backdrop-filter: blur(1px)) {
        .pt-tabbar { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
    }
}
@keyframes pt-sheet { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .pt-progress { display: none; }
}

/* 验证码延后加载：图片还没请求时留出位置，提示点一下 */
img[data-captcha]:not([src]), #captcha:not([src]) { display: inline-block; width: 90px; height: 38px; vertical-align: middle; background: var(--fill); border-radius: 4px; }

/* ================= 帖子列表：摘要 ================= */

.pt-thread-excerpt { margin-top: 2px; font-size: 13.5px; line-height: 1.6; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@media (max-width: 760px) { .pt-thread-excerpt { font-size: 13px; } }


/* 搜索高亮 */
.pt-threads mark { padding: 0 1px; color: var(--red); background: var(--red-bg); border-radius: 2px; }

/* 未读角标数字变多时弹一下 */
.pt-bell-num.is-pop, .pt-quick-num.is-pop, .pt-dot-num.is-pop, .pt-tab-dot.is-pop { animation: pt-pop .4s ease-out; }

/* 新回复插入后闪一下 */
.pt-reply.is-flash, .pt-subreply.is-flash { animation: pt-flash 2.4s ease-out; }

/* ================= 手机端读帖操作栏 ================= */

.pt-postbar { display: none; }
@media (max-width: 760px) {
    body.has-postbar .pt-tabbar { display: none; }
    .pt-postbar { display: flex; align-items: center; gap: 4px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom) 12px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .04); transition: transform .25s cubic-bezier(.2, .8, .3, 1); }
    @supports (backdrop-filter: blur(1px)) {
        .pt-postbar { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
    }
    .pt-postbar.is-away { transform: translateY(110%); }
    .pt-postbar-input { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; font-size: 14px; color: var(--faint); text-align: left; background: var(--fill); border: 0; border-radius: 19px; cursor: text; transition: background .15s, transform .12s; }
    .pt-postbar-input span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pt-postbar-input:active { background: var(--hover); transform: scale(.98); }
    .pt-postbar-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 48px; height: 46px; padding: 0 4px; font-size: 11px; line-height: 1.2; color: var(--soft); background: none; border: 0; border-radius: 10px; cursor: pointer; transition: color .15s, transform .12s; }
    .pt-postbar-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .pt-postbar-btn .pt-ico { vertical-align: 0; }
    .pt-postbar-btn span:empty { display: none; }
    .pt-postbar-btn:active { transform: scale(.88); }
    .pt-postbar-btn.is-on { color: var(--red); }
    .pt-postbar-btn.is-on svg { fill: currentColor; }
    .pt-postbar-btn.is-pop svg { animation: pt-heart .45s cubic-bezier(.2, .9, .3, 1.4); }
}

/* 日历异步加载：先占好位置，避免侧栏跳动 */
#calendar:empty { min-height: 232px; border-radius: 6px; background: linear-gradient(90deg, var(--fill) 25%, var(--hover) 50%, var(--fill) 75%) 0 0 / 200% 100%; animation: pt-shimmer 1.4s linear infinite; }
@keyframes pt-shimmer { to { background-position: -200% 0; } }

/* ================= 加密帖密码页 ================= */

.pt-lockpage { min-height: 100vh; min-height: 100dvh; display: flex; background: radial-gradient(120% 80% at 50% 0%, var(--card) 0%, var(--paper) 60%); }
.pt-lock { width: 100%; max-width: 420px; margin: auto; padding: 32px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pt-lock-brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.pt-lock-brand:hover { color: var(--red); }
.pt-lock-card { width: 100%; padding: 30px 26px 22px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .07); animation: pt-rise .35s cubic-bezier(.2, .8, .3, 1); }
.pt-lock-icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 12px; color: var(--red); background: var(--red-bg); border-radius: 50%; box-shadow: 0 0 0 8px color-mix(in srgb, var(--red-bg) 50%, transparent); }
.pt-lock-kicker { font-size: 12.5px; color: var(--faint); letter-spacing: .5px; }
.pt-lock-title { margin-top: 4px; font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; text-wrap: balance; }
.pt-lock-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 0; margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.pt-lock-meta .pt-avatar { margin-right: 6px; }
.pt-lock-meta > span:first-of-type { color: var(--soft); }
.pt-lock-form { margin-top: 22px; text-align: left; }
.pt-lock-field { position: relative; }
.pt-lock-field input { width: 100%; height: 46px; padding: 0 46px 0 16px; font-size: 16px; letter-spacing: .5px; color: var(--ink); background: var(--fill); border: 1px solid transparent; border-radius: 12px; transition: border-color .15s, background .15s, box-shadow .15s; }
.pt-lock-field input:focus { outline: none; background: var(--card); border-color: var(--ink); box-shadow: 0 0 0 4px var(--hover); }
.pt-lock-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--faint); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.pt-lock-eye:hover, .pt-lock-eye[aria-pressed="true"] { color: var(--ink); background: var(--hover); }
.pt-lock-msg { min-height: 20px; margin: 8px 2px 14px; font-size: 12.5px; color: var(--faint); }
.pt-lock-card.is-wrong .pt-lock-msg { color: var(--red); }
.pt-lock-card.is-wrong .pt-lock-field input { border-color: var(--red); background: var(--card); }
.pt-lock-card.is-wrong .pt-lock-field { animation: pt-shake .4s; }
.pt-lock-form .pt-btn.is-block { height: 44px; border-radius: 22px; font-size: 15px; }
.pt-lock-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.pt-lock-foot a { color: var(--soft); }
.pt-lock-foot a:hover { color: var(--red); }
.pt-lock-foot > a:only-child { margin: 0 auto; }
@keyframes pt-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 760px) { .pt-lockpage { padding-bottom: 0; } .pt-lock-card { padding: 26px 18px 18px; } }

/* ---------- 网盘下载块 ---------- */
.pt-pan { margin: 18px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pt-pan-main { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.pt-pan-ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; color: var(--red); background: var(--red-bg); border-radius: 9px; }
.pt-pan-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-pan-text b { font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; }
.pt-pan-text span { font-size: 12px; color: var(--faint); }
.pt-pan-code { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--rule); background: var(--fill); font-size: 13px; color: var(--soft); }
.pt-pan-code code { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; color: var(--ink); }
.pt-pan-copy { margin-left: auto; padding: 3px 10px; font-size: 12px; color: var(--red); background: var(--card); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.pt-pan-copy:hover { border-color: var(--red); }
.pt-pan-note { padding: 0 16px 14px; font-size: 12.5px; color: var(--soft); overflow-wrap: anywhere; }
@media (max-width: 560px) {
    .pt-pan-main { flex-wrap: wrap; }
    .pt-pan-main .pt-btn { width: 100%; }
}

/* ---------- 微语 / 朋友圈 ---------- */
.pt-tw-login { padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--soft); }
.pt-tw-login p { margin: 0; }

/* ---------- 微语发布器（单卡片：头像 + 正文 + 工具条） ---------- */
.pt-tw-compose {
    --tw-min: 104px;
    --tw-focus: 180px;
    --tw-max: 320px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.pt-tw-compose:focus-within,
.pt-tw-compose.is-expanded { border-color: var(--rule); }
.pt-tw-compose.is-expanded { box-shadow: 0 10px 26px -22px rgba(31, 29, 26, .55); }
.pt-tw-compose form { min-width: 0; }

/* 头部：头像 + 昵称 + 编辑/预览 */
.pt-tw-chead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pt-tw-cava-link { flex: none; display: block; }
.pt-tw-cava { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pt-tw-cinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.pt-tw-cname { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-tw-chint { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-tw-cmodes { flex: none; display: inline-flex; gap: 2px; padding: 2px; background: var(--fill); border-radius: 999px; }
.pt-tw-cmodes button { height: 26px; padding: 0 12px; font-size: 12px; color: var(--soft); background: none; border: 0; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.pt-tw-cmodes button:hover { color: var(--ink); }
.pt-tw-cmodes button.is-on { color: var(--ink); background: var(--card); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }

/* 正文：无边框，聚焦后平滑展开 */
.pt-tw-cedit { margin-top: 10px; min-width: 0; }
.pt-tw-compose textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: var(--tw-min);
    max-height: var(--tw-max);
    padding: 0;
    font: inherit;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text);
    background: none;
    border: 0;
    border-radius: 0;
    resize: none;
    overflow-y: auto;
    transition: min-height .2s ease, height .2s ease;
}
.pt-tw-compose.is-expanded textarea { min-height: var(--tw-focus); }
.pt-tw-compose.is-fitting textarea { transition: none; }
.pt-tw-compose textarea:focus { outline: none; }
.pt-tw-compose textarea::placeholder { color: var(--faint); }

/* Markdown 预览：和发布后的正文同一套排版 */
.pt-tw-mdview { min-height: var(--tw-focus); max-height: 400px; margin-top: 0; overflow-y: auto; overscroll-behavior: contain; }
.pt-tw-mdview.is-loading { opacity: .6; }
.pt-tw-mdview > :first-child { margin-top: 0; }
.pt-tw-mdempty { margin: 0; font-size: 13.5px; color: var(--faint); }

/* 已选图片：固定三列（和发布后的九宫格一致），最多 9 张正好 3×3 */
.pt-tw-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; max-width: 392px; }
.pt-tw-prev { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--fill); }
.pt-tw-prev img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pt-tw-prev.is-uploading img { opacity: .55; }
.pt-tw-prev.is-uploading::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .18); }
.pt-tw-prev.is-uploading::before { content: ''; position: absolute; z-index: 2; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(255, 255, 255, .9); border-top-color: transparent; border-radius: 50%; animation: pt-spin .7s linear infinite; }
.pt-tw-prev.is-error { box-shadow: inset 0 0 0 1px var(--red); }
.pt-tw-prev.is-error::after { content: ''; position: absolute; inset: 0; background: rgba(184, 67, 47, .22); }
.pt-tw-prev-rm { position: absolute; top: 4px; right: 4px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; font-size: 15px; line-height: 1; color: #fff; background: rgba(0, 0, 0, .55); border: 0; border-radius: 50%; cursor: pointer; }
.pt-tw-prev-rm:hover { background: rgba(0, 0, 0, .78); }
.pt-tw-prev-retry { position: absolute; left: 6px; right: 6px; bottom: 6px; z-index: 3; height: 24px; font-size: 11.5px; color: #fff; background: rgba(0, 0, 0, .62); border: 0; border-radius: 6px; cursor: pointer; }
.pt-tw-prev-retry:hover { background: rgba(0, 0, 0, .8); }
@keyframes pt-spin { to { transform: rotate(360deg); } }

/* 工具条 */
.pt-tw-cfoot { display: flex; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pt-tw-tools { display: flex; align-items: center; gap: 2px; min-width: 0; flex-wrap: wrap; }
.pt-tw-tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; font-size: 13px; color: var(--soft); background: none; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.pt-tw-tool:hover { color: var(--ink); background: var(--fill); }
.pt-tw-tool:disabled { opacity: .5; cursor: default; }
.pt-tw-tool.is-on { color: var(--red); background: var(--red-bg); }
.pt-tw-vis { position: relative; }
.pt-tw-vis-ico { display: inline-flex; }
.pt-tw-vismenu { display: none; position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 40; width: 208px; max-width: calc(100vw - 32px); padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, .14); }
.pt-tw-vis.is-open .pt-tw-vismenu { display: block; animation: pt-drop .16s ease-out; }
.pt-tw-vismenu button { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 8px 10px; text-align: left; color: var(--soft); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.pt-tw-vismenu button:hover { background: var(--fill); color: var(--ink); }
.pt-tw-vismenu button[aria-checked="true"] { color: var(--ink); }
.pt-tw-vismenu .pt-ico { margin-top: 2px; flex: none; }
.pt-tw-vismenu b { display: block; font-size: 13px; font-weight: 600; }
.pt-tw-vismenu small { display: block; font-size: 11.5px; font-weight: 400; color: var(--faint); }
.pt-tw-send { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pt-tw-count { font-family: var(--mono); font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-tw-count.is-warn { color: var(--red); }
.pt-tw-post { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 18px; font-size: 14px; font-weight: 600; color: var(--card); background: var(--ink); border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.pt-tw-post:hover:not(:disabled) { color: #fff; background: var(--red); border-color: var(--red); }
.pt-tw-post:disabled { color: var(--faint); background: var(--fill); border-color: var(--line); cursor: default; }
.pt-tw-post.is-busy { cursor: progress; }
.pt-tw-post.is-busy .pt-ico { display: none; }
.pt-tw-post.is-busy::before { content: ''; width: 13px; height: 13px; border: 1.6px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: pt-spin .7s linear infinite; }
.pt-tw-card.is-new { animation: pt-tw-new .32s ease-out; }
@keyframes pt-tw-new { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 顶栏：视图 + 排序 */
.pt-tw-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.pt-tw-tabs, .pt-tw-sorts { display: flex; gap: 4px; }
.pt-tw-tabs a, .pt-tw-sorts a { padding: 5px 12px; font-size: 13.5px; color: var(--soft); border-radius: 999px; }
.pt-tw-tabs a:hover, .pt-tw-sorts a:hover { background: var(--hover); color: var(--ink); }
.pt-tw-tabs a[aria-selected="true"] { background: var(--ink); color: var(--card); font-weight: 600; }
.pt-tw-sorts a { font-size: 12.5px; }
.pt-tw-sorts a[aria-selected="true"] { color: var(--red); background: var(--red-bg); }

/* 卡片 */
.pt-tw-list { display: flex; flex-direction: column; }
.pt-tw-card { padding: 18px 16px; border-bottom: 1px solid var(--rule); transition: opacity .18s, transform .18s; }
.pt-tw-card:last-child { border-bottom: 0; }
.pt-tw-card.is-gone { opacity: 0; transform: translateY(-6px); }
.pt-tw-hd { display: flex; gap: 10px; align-items: flex-start; }
.pt-tw-ava img { width: 42px; height: 42px; border-radius: 50%; display: block; object-fit: cover; }
.pt-tw-who { flex: 1; min-width: 0; }
.pt-tw-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt-tw-nick { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pt-tw-when { margin-top: 3px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.pt-tw-tag { padding: 1px 6px; font-size: 11px; color: var(--soft); background: var(--fill); border-radius: 4px; }
.pt-tw-tag.is-private { color: var(--red); background: var(--red-bg); }
.pt-tw-del { padding: 0; font-size: 12px; color: var(--faint); background: none; border: 0; cursor: pointer; }
.pt-tw-del:hover { color: var(--red); }

/* 正文 + 九宫格 */
.pt-tw-text { margin-top: 9px; font-size: 14.5px; line-height: 1.78; }
.pt-tw-text p { margin: 0 0 8px; }
.pt-tw-text p:last-child { margin-bottom: 0; }
.pt-tw-imgs { margin-top: 10px; display: grid; gap: 4px; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 410px; }
.pt-tw-imgs.is-n1 { grid-template-columns: minmax(0, 1fr); }
.pt-tw-imgs.is-n2, .pt-tw-imgs.is-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-tw-img { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--fill); }
.pt-tw-img img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.pt-tw-imgs.is-n1 .pt-tw-img, .pt-tw-imgs.is-n2 .pt-tw-img { aspect-ratio: 4 / 3; }
.pt-tw-imgs.is-n1 { max-width: 320px; }

/* 操作条 */
.pt-tw-acts { display: flex; gap: 6px; margin-top: 8px; }
.pt-tw-act { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 13px; color: var(--soft); background: none; border: 0; border-radius: 999px; cursor: pointer; line-height: 1.4; }
.pt-tw-act:hover { background: var(--hover); color: var(--ink); }
.pt-tw-act.is-on { color: var(--red); }
.pt-tw-act.is-on .pt-ico { fill: currentColor; }
.pt-tw-act .pt-ico { pointer-events: none; }
.pt-tw-act.is-pop .pt-ico { animation: pt-tw-pop .32s ease-out; }
.pt-tw-act.is-share { text-decoration: none; }
@keyframes pt-tw-pop { 0% { transform: scale(.72); } 55% { transform: scale(1.24); } 100% { transform: scale(1); } }

/* 评论区 */
.pt-tw-cmts { display: none; margin-top: 8px; }
.pt-tw-cmts.is-open { display: block; animation: pt-drop .18s ease-out; }
.pt-tw-cmt-list { background: var(--fill); border-radius: 8px; padding: 7px 11px; }
.pt-tw-cmt-list:empty { display: none; }
.pt-tw-cmt { display: flex; gap: 8px; padding: 5px 0; }
.pt-tw-cmt + .pt-tw-cmt { border-top: 1px solid var(--line); }
.pt-tw-cmt-ava img { width: 24px; height: 24px; border-radius: 50%; display: block; object-fit: cover; }
.pt-tw-cmt-body { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.7; }
.pt-tw-cmt-nick { margin-right: 6px; font-weight: 600; color: var(--ink); }
.pt-tw-cmt-text { color: var(--text); overflow-wrap: anywhere; }
.pt-tw-cmt-text a { color: var(--blue); }
.pt-tw-cmt-meta { display: block; margin-top: 2px; font-size: 11.5px; color: var(--faint); }
.pt-tw-cmt-del { padding: 0; font-size: 11.5px; color: var(--faint); background: none; border: 0; cursor: pointer; }
.pt-tw-cmt-del:hover { color: var(--red); }
.pt-tw-cmt-more { margin-top: 7px; padding: 0; font-size: 12.5px; color: var(--blue); background: none; border: 0; cursor: pointer; }
.pt-tw-cmt-more:hover { text-decoration: underline; }
.pt-tw-cform { display: flex; gap: 8px; margin-top: 9px; }
.pt-tw-cform input { flex: 1; min-width: 0; padding: 7px 12px; font: inherit; font-size: 13.5px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.pt-tw-cform input:focus { outline: none; border-color: var(--red); }
.pt-tw-cneed { margin-top: 9px; font-size: 12.5px; color: var(--faint); }
.pt-tw-cneed a { color: var(--red); }

@media (max-width: 760px) {
    .pt-tw-compose { --tw-min: 96px; --tw-focus: 150px; --tw-max: 260px; padding: 16px; border-radius: 12px; }
    .pt-tw-cava { width: 36px; height: 36px; }
    .pt-tw-chint { display: none; }
    .pt-tw-cmodes button { padding: 0 10px; }
    .pt-tw-previews { max-width: none; }
    .pt-tw-cfoot { gap: 8px; }
    .pt-tw-tools { gap: 0; }
    .pt-tw-tool { padding: 0 8px; }
    .pt-tw-bar { padding: 8px 12px; }
    .pt-tw-card { padding: 15px 12px; }
    .pt-tw-imgs { max-width: none; }
    .pt-tw-imgs.is-n1 { max-width: 260px; }
}

@media (max-width: 420px) {
    .pt-tw-compose { padding: 14px; }
    .pt-tw-md .pt-tw-tlabel { display: none; }
    .pt-tw-tool { gap: 4px; }
    .pt-tw-send { width: 100%; justify-content: flex-end; }
    .pt-tw-count { font-size: 11.5px; }
    .pt-tw-post { padding: 0 16px; }
}

/* ---------- 图集 / 视频正文 ---------- */
.pt-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 2px 0 14px; }
.pt-gallery.is-1 { grid-template-columns: minmax(0, 1fr); }
.pt-gallery.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-gallery-item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--fill); }
.pt-gallery.is-1 .pt-gallery-item { aspect-ratio: auto; max-height: 620px; }
.pt-gallery.is-1 .pt-gallery-item img { height: auto; max-height: 620px; object-fit: contain; background: var(--fill); }
.pt-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.pt-gallery-item:hover img { transform: scale(1.03); }
.pt-gallery-text { margin-top: 4px; }
.pt-gallery-text:empty { display: none; }
.pt-video { margin: 2px 0 16px; border-radius: var(--radius); overflow: hidden; background: #000; }
.pt-video video, .pt-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
@media (max-width: 640px) {
    .pt-gallery:not(.is-1) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-gallery.is-1 .pt-gallery-item, .pt-gallery.is-1 .pt-gallery-item img { max-height: 460px; }
}

/* ---------- 分享海报 ---------- */
.pt-poster-card { max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.pt-poster-preview { margin: 12px 0; min-height: 100px; text-align: center; }
.pt-poster-preview img { max-width: 100%; max-height: 52vh; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .16); }
.pt-poster-act { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pt-poster-act .pt-btn { width: 100%; min-width: 0; justify-content: center; }

.pt-poster-act .pt-btn[data-poster-share] { color: var(--ink); font-weight: 500; }
.pt-poster-act [data-poster-share="wechat"] { background: rgba(61, 122, 74, .16); border-color: rgba(61, 122, 74, .24); }
.pt-poster-act [data-poster-share="wechat"]:hover { background: rgba(61, 122, 74, .25); }
.pt-poster-act [data-poster-share="qq"] { background: rgba(47, 111, 184, .14); border-color: rgba(47, 111, 184, .23); }
.pt-poster-act [data-poster-share="qq"]:hover { background: rgba(47, 111, 184, .23); }
.pt-poster-act [data-poster-share="copy"] { background: var(--fill); border-color: var(--rule); }
.pt-poster-act [data-poster-share="copy"]:hover { background: var(--hover); }
.pt-poster-act [data-poster-share]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.pt-poster-act [disabled], .pt-poster-act [aria-disabled="true"] { opacity: .5; cursor: wait; }
.pt-poster-preview[aria-busy="true"] { display: grid; place-items: center; color: var(--faint); }
.pt-poster-tip { margin-top: 10px; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------- 广告位 ---------- */
.pt-ad { position: relative; margin: 14px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pt-ad-label { position: absolute; top: 6px; right: 8px; z-index: 1; padding: 0 6px; font-size: 10px; line-height: 16px; color: var(--faint); background: rgba(255, 255, 255, .82); border-radius: 4px; }
.pt-ad-body { display: block; }
.pt-ad-body img { display: block; width: 100%; height: auto; }
.pt-ad-body iframe { display: block; width: 100%; border: 0; }
.pt-thread-ad { list-style: none; margin: 10px 0; }
.pt-thread-ad .pt-ad { margin: 0; }
.pt-side .pt-ad { margin: 10px 0; }
:root[data-theme="dark"] .pt-ad-label { background: rgba(0, 0, 0, .55); }

/* ================= 插入网盘下载卡片弹窗规范 (Pan Modal) ================= */
.pt-pan-modal-card {
    width: 100%;
    max-width: 520px;
    padding: 24px 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
    animation: ptPanModalIn .2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ptPanModalIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 弹窗头部 */
.pt-pan-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.pt-pan-header-text {
    flex: 1;
    min-width: 0;
}
.pt-pan-title {
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    margin: 0 0 6px 0;
}
.pt-pan-subtitle {
    font-size: 13px;
    line-height: 1.5;
    color: var(--faint);
    margin: 0;
}
.pt-pan-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--soft);
    background: var(--fill);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s ease;
    flex-shrink: 0;
}
.pt-pan-close-btn:hover {
    color: var(--ink);
    background: var(--line);
}

/* 表单结构与字段 */
.pt-pan-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}
.pt-pan-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.pt-pan-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.pt-pan-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    user-select: none;
}
.pt-pan-required {
    color: var(--red);
    font-weight: 700;
}

/* 统一输入框视觉规范：高度 44px、圆角 10px */
.pt-pan-input,
.pt-pan-textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: var(--text) !important;
    background: var(--fill) !important;
    border: 1px solid var(--rule) !important;
    border-radius: 10px !important;
    padding: 0 14px !important;
    transition: border-color .15s, box-shadow .15s, background-color .15s !important;
}
.pt-pan-input {
    height: 44px !important;
    line-height: 42px !important;
}
.pt-pan-textarea {
    padding: 10px 14px !important;
    min-height: 64px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
}
.pt-pan-input::placeholder,
.pt-pan-textarea::placeholder {
    color: var(--faint) !important;
    opacity: 0.85 !important;
}
.pt-pan-input:focus,
.pt-pan-textarea:focus {
    outline: none !important;
    border-color: var(--ink) !important;
    background: var(--card) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05) !important;
}

/* 提取码 + 文件大小 50% 并排，间距 12px */
.pt-pan-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
}

/* 自动识别徽章与反馈 */
.pt-pan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 6px;
    line-height: 1.4;
    animation: ptPanBadgeIn .2s ease;
}
@keyframes ptPanBadgeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.pt-pan-feedback {
    font-size: 12px;
    line-height: 1.4;
    color: var(--red);
    margin-top: 2px;
}

/* 底部操作按钮：同一行，右对齐，高度 42-44px，间距 12px */
.pt-pan-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 6px !important;
    padding-top: 4px !important;
}
.pt-pan-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 42px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
    user-select: none !important;
    box-sizing: border-box !important;
}
.pt-pan-btn-cancel {
    background: var(--fill) !important;
    color: var(--soft) !important;
    border: 1px solid var(--line) !important;
}
.pt-pan-btn-cancel:hover {
    background: var(--line) !important;
    color: var(--ink) !important;
}
.pt-pan-btn-submit {
    background: var(--red) !important;
    color: #fff !important;
    border: 1px solid var(--red) !important;
}
.pt-pan-btn-submit:hover:not(:disabled) {
    background: #9f3624 !important;
    border-color: #9f3624 !important;
}
.pt-pan-btn-submit:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    background: var(--soft) !important;
    border-color: var(--soft) !important;
}

/* 响应式适配：移动端 */
@media (max-width: 540px) {
    .pt-pan-modal-card {
        padding: 20px 18px !important;
        margin: 16px !important;
        max-width: calc(100vw - 32px) !important;
    }
    .pt-pan-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .pt-pan-actions {
        margin-top: 4px !important;
    }
}


/* ---------- 我的积分 ---------- */
.pt-pay-balance { display: flex; align-items: baseline; gap: 10px; padding: 18px 20px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-pay-balance span { font-size: 14px; color: var(--soft); }
.pt-pay-balance b { font-family: var(--mono); font-size: 32px; line-height: 1; color: var(--red); }
.pt-credit-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pt-credit-rule { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--fill); border-radius: var(--radius); }
.pt-credit-rule b { font-size: 14px; color: var(--ink); }
.pt-credit-rule span { font-size: 13px; color: var(--red); }
.pt-credit-rule small { font-size: 12px; color: var(--faint); line-height: 1.6; }
.pt-credit-list { list-style: none; margin: 0; padding: 0; }
.pt-credit-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--rule); }
.pt-credit-list li:first-child { border-top: 0; }
.pt-credit-main { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.pt-credit-main b { font-family: var(--mono); font-size: 16px; min-width: 56px; }
.pt-credit-main b.is-plus { color: var(--green); }
.pt-credit-main b.is-minus { color: var(--red); }
.pt-credit-main span { color: var(--text); }
.pt-credit-meta { display: flex; align-items: baseline; gap: 12px; font-size: 12px; color: var(--faint); }

/* ---------------------------------------------------------------------------
 * 商城（内嵌彩虹）：列表 / 详情 / 订单
 * ------------------------------------------------------------------------- */
.pt-shop-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
.pt-shop-search { display: flex; gap: 8px; flex: 1 1 240px; }
.pt-shop-search input { flex: 1 1 auto; min-width: 0; padding: 6px 10px; font: inherit; color: var(--text); background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-shop-cats .pt-board-chip { margin-right: 0; padding: 2px 10px; font-size: 13px; line-height: 22px; }
.pt-shop-cats .pt-board-chip.is-on { color: #fff; background: var(--ink); }
.pt-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pt-shop-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-card:hover { border-color: var(--rule); background: var(--fill); }
.pt-shop-card.is-soldout { opacity: .6; }
.pt-shop-kind { align-self: flex-start; padding: 0 7px; font-size: 11px; line-height: 18px; color: var(--soft); background: var(--fill); border-radius: 4px; }
.pt-shop-name { font-size: 15px; line-height: 1.4; color: var(--ink); }
.pt-shop-prices { display: flex; align-items: baseline; gap: 10px; }
.pt-shop-money { font-family: var(--serif); font-size: 17px; color: var(--red); }
.pt-shop-point { font-size: 13px; color: var(--blue); }
.pt-shop-meta { font-size: 12px; color: var(--faint); }
.pt-shop-badge { position: absolute; top: 10px; right: 10px; padding: 0 6px; font-size: 11px; line-height: 18px; color: var(--red); background: var(--red-bg); border-radius: 4px; }
.pt-shop-detail { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.pt-shop-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pt-shop-detail-price { display: flex; align-items: baseline; gap: 12px; }
.pt-shop-note { font-size: 13px; color: var(--soft); }
.pt-shop-alert { padding: 8px 12px; font-size: 13px; color: var(--soft); background: var(--fill); border-radius: var(--radius); }
.pt-shop-alert.is-error { color: var(--red); background: var(--red-bg); }
.pt-shop-alert a { color: var(--red); }
.pt-shop-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.pt-field { display: flex; flex-direction: column; gap: 5px; }
.pt-field > span { font-size: 13px; color: var(--soft); }
.pt-field input { padding: 8px 10px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-field input:focus { border-color: var(--rule); outline: none; background: var(--fill); }
.pt-field-num input { max-width: 120px; }
.pt-shop-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pt-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.pt-shop-paytype { padding: 5px 8px; font: inherit; font-size: 13px; color: var(--text); background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-submit { align-self: flex-start; }
.pt-shop-result { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-result pre { margin: 0; padding: 10px 12px; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; word-break: break-all; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-result-act { display: flex; gap: 8px; }
.pt-shop-desc { font-size: 14px; line-height: 1.85; color: var(--text); }
.pt-shop-orders { padding: 6px 0; }
.pt-order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pt-order-row:last-child { border-bottom: 0; }
.pt-order-row:hover { background: var(--fill); }
.pt-order-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pt-order-main b { font-size: 14px; color: var(--ink); }
.pt-order-main small { font-size: 12px; color: var(--faint); }
.pt-order-side { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.pt-order-state { padding: 0 7px; font-size: 12px; font-style: normal; line-height: 20px; color: var(--soft); background: var(--fill); border-radius: 4px; }
.pt-order-state.is-done { color: var(--green); background: rgba(61, 122, 74, .1); }
.pt-order-state.is-pending { color: var(--soft); }
.pt-order-state.is-fail { color: var(--red); background: var(--red-bg); }
.pt-shop-order { padding: 18px 20px; }
.pt-order-fields { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; margin: 0 0 16px; font-size: 13px; }
.pt-order-fields dt { color: var(--faint); }
.pt-order-fields dd { margin: 0; color: var(--text); word-break: break-all; }
.pt-shop-toast { position: fixed; left: 50%; bottom: 44px; z-index: 9999; padding: 8px 16px; font-size: 13px; color: var(--paper); background: rgba(31, 29, 26, .92); border-radius: 20px; opacity: 0; transform: translate(-50%, 8px); transition: opacity .18s, transform .18s; pointer-events: none; }
.pt-shop-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------------------
 * 商城（内嵌彩虹）：列表 / 详情 / 订单
 * ------------------------------------------------------------------------- */
.pt-shop-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
.pt-shop-search { display: flex; gap: 8px; flex: 1 1 240px; }
.pt-shop-search input { flex: 1 1 auto; min-width: 0; padding: 6px 10px; font: inherit; color: var(--text); background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-shop-cats .pt-board-chip { margin-right: 0; padding: 2px 10px; font-size: 13px; line-height: 22px; }
.pt-shop-cats .pt-board-chip.is-on { color: #fff; background: var(--ink); }
.pt-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pt-shop-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-card:hover { border-color: var(--rule); background: var(--fill); }
.pt-shop-card.is-soldout { opacity: .6; }
.pt-shop-kind { align-self: flex-start; padding: 0 7px; font-size: 11px; line-height: 18px; color: var(--soft); background: var(--fill); border-radius: 4px; }
.pt-shop-name { font-size: 15px; line-height: 1.4; color: var(--ink); }
.pt-shop-prices { display: flex; align-items: baseline; gap: 10px; }
.pt-shop-money { font-family: var(--serif); font-size: 17px; color: var(--red); }
.pt-shop-point { font-size: 13px; color: var(--blue); }
.pt-shop-meta { font-size: 12px; color: var(--faint); }
.pt-shop-badge { position: absolute; top: 10px; right: 10px; padding: 0 6px; font-size: 11px; line-height: 18px; color: var(--red); background: var(--red-bg); border-radius: 4px; }
.pt-shop-detail { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.pt-shop-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pt-shop-detail-price { display: flex; align-items: baseline; gap: 12px; }
.pt-shop-note { font-size: 13px; color: var(--soft); }
.pt-shop-alert { padding: 8px 12px; font-size: 13px; color: var(--soft); background: var(--fill); border-radius: var(--radius); }
.pt-shop-alert.is-error { color: var(--red); background: var(--red-bg); }
.pt-shop-alert a { color: var(--red); }
.pt-shop-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.pt-field { display: flex; flex-direction: column; gap: 5px; }
.pt-field > span { font-size: 13px; color: var(--soft); }
.pt-field input { padding: 8px 10px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-field input:focus { border-color: var(--rule); outline: none; background: var(--fill); }
.pt-field-num input { max-width: 120px; }
.pt-shop-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pt-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.pt-shop-paytype { padding: 5px 8px; font: inherit; font-size: 13px; color: var(--text); background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-submit { align-self: flex-start; }
.pt-shop-result { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-result pre { margin: 0; padding: 10px 12px; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; word-break: break-all; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-result-act { display: flex; gap: 8px; }
.pt-shop-desc { font-size: 14px; line-height: 1.85; color: var(--text); }
.pt-shop-orders { padding: 6px 0; }
.pt-order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pt-order-row:last-child { border-bottom: 0; }
.pt-order-row:hover { background: var(--fill); }
.pt-order-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pt-order-main b { font-size: 14px; color: var(--ink); }
.pt-order-main small { font-size: 12px; color: var(--faint); }
.pt-order-side { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.pt-order-state { padding: 0 7px; font-size: 12px; font-style: normal; line-height: 20px; color: var(--soft); background: var(--fill); border-radius: 4px; }
.pt-order-state.is-done { color: var(--green); background: rgba(61, 122, 74, .1); }
.pt-order-state.is-pending { color: var(--soft); }
.pt-order-state.is-fail { color: var(--red); background: var(--red-bg); }
.pt-shop-order { padding: 18px 20px; }
.pt-order-fields { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; margin: 0 0 16px; font-size: 13px; }
.pt-order-fields dt { color: var(--faint); }
.pt-order-fields dd { margin: 0; color: var(--text); word-break: break-all; }
.pt-shop-toast { position: fixed; left: 50%; bottom: 44px; z-index: 9999; padding: 8px 16px; font-size: 13px; color: var(--paper); background: rgba(31, 29, 26, .92); border-radius: 20px; opacity: 0; transform: translate(-50%, 8px); transition: opacity .18s, transform .18s; pointer-events: none; }
.pt-shop-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.pt-shop-wallet { padding: 14px 18px; }
.pt-shop-exchange { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin-top: 10px; }
.pt-shop-exchange input { padding: 8px 10px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-shop-preview { margin-left: 8px; font-size: 13px; color: var(--blue); }

/* ================= 黑豹商城：彩虹经典自助下单样式 (方案 A) ================= */
.pt-shop-box {
    margin-bottom: 20px;
    padding: 24px 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.pt-shop-order-form {
    display: flex;
    flex-direction: column;
}
.pt-shop-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}
.pt-shop-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}
.pt-shop-select,
.pt-shop-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 14.5px;
    color: var(--ink);
    background: var(--fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s ease, background .15s ease;
}
.pt-shop-select:focus,
.pt-shop-input:focus {
    border-color: var(--red);
    background: var(--card);
}
.pt-shop-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    margin-bottom: 16px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.pt-shop-meta-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--soft);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pt-shop-price-val {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.pt-shop-money {
    font-size: 20px;
    font-weight: 700;
    color: var(--red);
}
.pt-shop-point {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold, #d97706);
}
.pt-shop-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}
.pt-shop-badge.is-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
.pt-shop-badge.is-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
.pt-shop-badge.is-normal {
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--soft);
}
.pt-shop-stepper {
    display: inline-flex;
    align-items: center;
    width: 140px;
    height: 38px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
}
.pt-step-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: var(--fill);
    color: var(--ink);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    user-select: none;
}
.pt-step-btn:active {
    background: var(--hover);
}
.pt-step-input {
    flex: 1;
    min-width: 0;
    height: 38px;
    border: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: transparent;
    outline: none;
    -moz-appearance: textfield;
}
.pt-step-input::-webkit-outer-spin-button,
.pt-step-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pt-shop-hint {
    font-size: 12px;
    color: var(--soft);
}
.pt-shop-pay-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    width: 100%;
}
.pt-radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--fill);
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}
.pt-radio-card:hover {
    border-color: var(--line);
}
.pt-radio-card input[type="radio"] {
    accent-color: var(--red);
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}
.pt-radio-card:has(input[type="radio"]:checked) {
    border-color: var(--red);
    background: var(--card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.pt-radio-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pt-radio-info b {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    color: var(--ink);
}
.pt-radio-info span {
    font-size: 12px;
    color: var(--soft);
}
.pt-shop-paytype-select {
    margin-left: auto;
    height: 32px;
    padding: 0 8px;
    font-size: 12.5px;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 6px;
    outline: none;
}
.pt-shop-desc-card {
    margin: 16px 0;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.pt-shop-desc-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: var(--card);
    border-bottom: 1px solid var(--line);
}
.pt-shop-desc-head svg {
    color: var(--red);
}
.pt-shop-desc-body {
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text);
    word-break: break-word;
}
.pt-shop-submit-wrap {
    margin-top: 14px;
}
.pt-shop-submit-btn {
    width: 100%;
    height: 46px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
}
.pt-shop-placeholder {
    padding: 36px 16px;
    text-align: center;
    color: var(--soft);
    font-size: 14px;
    background: var(--fill);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    margin-top: 6px;
}
.pt-shop-result {
    padding: 28px 20px;
    text-align: center;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.pt-shop-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.pt-shop-result-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 6px;
}
.pt-shop-result-desc {
    font-size: 13.5px;
    color: var(--soft);
    margin: 0 0 14px;
}
.pt-shop-result-content {
    text-align: left;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 14px 16px;
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink);
    max-height: 240px;
    overflow-y: auto;
    margin: 0 0 16px;
    word-break: break-all;
    white-space: pre-wrap;
}
.pt-shop-result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .pt-shop-box {
        padding: 16px 14px;
    }
    .pt-shop-status-bar {
        padding: 10px 14px;
    }
    .pt-shop-money {
        font-size: 18px;
    }
    .pt-shop-pay-options {
        grid-template-columns: 1fr;
    }
    .pt-shop-submit-btn {
        height: 44px;
        font-size: 15px;
    }
}

/* =========================================================
   登录 / 注册 / 找回密码
   核心模板是 bootstrap 的 .card + .form-control，和纸面风格不搭，
   这里用 .pt-auth 作用域整体重做（不改核心 class，避免影响别的页面）
   ========================================================= */

.pt-auth {
    /* .pt-main 是 flex 列，auto margin 会取消 stretch，必须显式给宽度 */
    width: 100%;
    max-width: 430px;
    margin: 34px auto 52px;
}

.pt-auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px 26px 20px;
    box-shadow: 0 1px 2px rgba(31, 29, 26, .04), 0 16px 40px -24px rgba(31, 29, 26, .35);
}

.pt-auth-head { margin-bottom: 20px; }

.pt-auth-head h1 {
    margin: 0 0 7px;
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -.3px;
    line-height: 1.3;
    color: var(--ink);
}

.pt-auth-head p {
    margin: 0;
    font-size: 13px;
    color: var(--soft);
    line-height: 1.65;
}

.pt-auth .form-group.pt-field {
    margin: 0 0 15px;
    display: block;
}

.pt-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    color: var(--soft);
    font-weight: 500;
}

.pt-auth .form-control {
    height: 44px;
    padding: 0 13px;
    font-size: 14px;
    color: var(--ink);
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

.pt-auth .form-control::placeholder { color: #a8a29a; }

.pt-auth .form-control:focus {
    background: var(--card);
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(31, 29, 26, .07);
}

.pt-auth .pt-field.is-error .form-control {
    border-color: var(--red);
    background: var(--red-bg);
}

.pt-field-msg {
    display: none;
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--red);
    line-height: 1.5;
}

/* 独立页和弹窗共用：字段出错时显示红字 */
.pt-field.is-error .pt-field-msg { display: block; }

/* 验证码：输入框 + 发送按钮并排 */
.pt-field-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pt-field-inline .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.pt-field-inline .pt-btn {
    flex: 0 0 auto;
    height: 44px;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 13.5px;
}

/* 提交按钮 */
.pt-auth .pt-btn.is-block {
    height: 46px;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

.pt-auth-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.pt-auth-foot a { color: var(--soft); }
.pt-auth-foot a:hover { color: var(--red); }

/* 找回密码完成页：只读邮箱 */
.pt-auth .form-control:disabled {
    background: var(--fill);
    color: var(--soft);
    opacity: 1;
}

@media (max-width: 760px) {
    .pt-auth {
        max-width: none;
        margin: 12px 0 24px;
    }
    .pt-auth-card {
        padding: 22px 18px 16px;
        border-radius: 12px;
    }
    .pt-auth-head h1 { font-size: 22px; }
}

/* ---------- 登录 / 注册弹窗（PC 端；移动端不渲染入口拦截） ---------- */

.pt-authmodal-card {
    max-width: 400px;
    padding: 0;
    overflow: hidden;
}

.pt-authmodal-tabs {
    display: flex;
    padding-right: 42px;	/* 给右上角关闭按钮留位 */
    border-bottom: 1px solid var(--line);
}

.pt-authmodal-tabs button {
    position: relative;
    flex: 1 1 0;
    height: 52px;
    padding: 0;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--soft);
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .15s, background .15s;
}

/* hover 底色只给未选中项，否则会盖住选中态的红色下划线 */
.pt-authmodal-tabs button:not([aria-selected="true"]):hover { background: var(--fill); }

/* 点完不要留 Chrome 默认的黑框，键盘 Tab 过来才给红框 */
.pt-authmodal-tabs button:focus { outline: none; }
.pt-authmodal-tabs button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: -4px;
    border-radius: 6px;
}

.pt-authmodal-tabs button[aria-selected="true"] {
    color: var(--ink);
    font-weight: 600;
}

.pt-authmodal-tabs button[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 34px;
    height: 2px;
    margin-left: -17px;
    background: var(--red);
    border-radius: 2px;
}

.pt-authmodal-panel { display: none; padding: 20px 24px 18px; }
.pt-authmodal-panel.is-on { display: block; }

.pt-authmodal-title {
    margin: 0 0 16px !important;
    font-family: var(--serif);
    font-size: 20px !important;
    font-weight: 600;
    color: var(--ink);
}

/* 字段间距交给 .pt-field，抵掉 .pt-modal-card 里通用 form 的 gap */
.pt-authmodal-card form { gap: 0; }

.pt-authmodal-card .pt-field {
    display: block;
    margin: 0 0 13px;
}

.pt-authmodal-card .pt-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--soft);
}

.pt-authmodal input[type="text"],
.pt-authmodal input[type="email"],
.pt-authmodal input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    font-size: 14px;
    color: var(--ink);
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: none;
}

.pt-authmodal input[type="text"]:focus,
.pt-authmodal input[type="email"]:focus,
.pt-authmodal input[type="password"]:focus {
    background: var(--card);
    border-color: var(--ink);
    outline: 0;
}

.pt-authmodal .pt-field.is-error input {
    border-color: var(--red);
    background: var(--red-bg);
}

.pt-authmodal .pt-field-msg { margin-top: 5px; }

.pt-authmodal .pt-btn.is-block {
    height: 44px;
    margin-top: 3px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
}

.pt-authmodal-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
}

.pt-authmodal-foot a { color: var(--soft); }
.pt-authmodal-foot a:hover { color: var(--red); }

.pt-authmodal-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--soft);
    background: var(--red-bg);
    border-radius: 8px;
}

/* 表情面板跟着主题配色走（第三方 qqFace 适配保留） */
#facebox.qqFace {
    background: var(--card);
    border-color: var(--line);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(31, 29, 26, .16);
}

#facebox.qqFace table td { padding: 4px; }
#facebox.qqFace table td img { border-color: transparent; border-radius: 4px; }
#facebox.qqFace table td img:hover { border-color: var(--red); }

/* 正文里的表情图 */
.pt-content .pt-em,
.pt-thread-excerpt .pt-em {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin: 0 1px;
    vertical-align: -6px;
}

/* =========================================================
   发新帖 / 编辑帖子 / 高级回复
   核心模板是 bootstrap 的 .card + .form-control，这里整体重做
   ========================================================= */

.pt-editor-page {
    /* .pt-main 是 flex 列，交叉轴 auto margin 会取消 stretch 并按内容收缩，
       必须显式给宽度，否则发帖卡片会塌成 textarea 的默认宽度 */
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
}

.pt-editor-card { padding: 22px 24px 16px; }

.pt-editor-head {
    /* 老样式（第 702 行）把它设成了 flex row，这里要显式改回块级 */
    display: block;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.pt-editor-head h1 {
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.2px;
    color: var(--ink);
}

.pt-editor-head p {
    margin: 0;
    font-size: 13px;
    color: var(--soft);
    line-height: 1.6;
}

.pt-editor-card .form-group.pt-field {
    display: block;
    margin: 0 0 16px;
}

.pt-editor-card .pt-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--soft);
}

.pt-editor-card .form-control,
.pt-editor-card .custom-select {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    font-size: 14px;
    color: var(--ink);
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

.pt-editor-card .custom-select {
    /* 板块只有几个字，横跨整行会很空 */
    width: 240px;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%);
    background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.pt-editor-card .form-control:focus,
.pt-editor-card .custom-select:focus {
    background: var(--card);
    border-color: var(--ink);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(31, 29, 26, .07);
}

.pt-editor-card .form-control::placeholder { color: #a8a29a; }

.pt-editor-card .pt-field.is-message .form-control {
    height: auto;
    min-height: 280px;
    padding: 13px 15px;
    font-size: 14.5px;
    line-height: 1.85;
    resize: vertical;
}

.pt-editor-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.pt-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    color: var(--soft);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 17px;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}

.pt-attach-btn:hover {
    color: var(--ink);
    border-color: var(--ink);
    background: var(--fill);
}

.pt-attach-btn input[type="file"] { display: none; }

.pt-editor-submit { display: flex; align-items: center; gap: 10px; }
.pt-editor-submit .pt-btn { height: 38px; border-radius: 19px; padding: 0 22px; font-weight: 600; }

/* 附件列表（核心 post_file_list_html 输出的结构） */
.pt-editor-foot .attachlist {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.pt-editor-foot .attachlist li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--soft);
}

.pt-editor-foot .attachlist li a { color: var(--soft); }
.pt-editor-foot .attachlist li a:hover { color: var(--red); }
.pt-editor-foot .attachlist li a.delete { color: var(--faint); }

.pt-editor-foot .fieldset {
    margin: 10px 0 0;
    padding: 0;
    border: 0;
}

.pt-editor-foot .fieldset legend {
    font-size: 12px;
    color: var(--faint);
    margin-bottom: 2px;
}

.pt-editor-foot .progress {
    width: 100%;
    max-width: 320px;
    height: 6px;
    margin-top: 10px;
    background: var(--fill);
    border-radius: 3px;
    overflow: hidden;
}

.pt-editor-foot .progress-bar {
    height: 100%;
    font-size: 0;
    background: var(--red);
    transition: width .2s;
}

@media (max-width: 760px) {
    .pt-editor-card { padding: 18px 16px 14px; }
    .pt-editor-head h1 { font-size: 20px; }
    .pt-editor-card .pt-field.is-message .form-control { min-height: 220px; }
    .pt-editor-foot { flex-direction: column; }
    .pt-editor-submit { width: 100%; }
    .pt-editor-submit .pt-btn { flex: 1; }
    /* 手机发帖时右栏会整块堆到表单下面，纯干扰 */
    .pt-layout:has(.pt-editor-page) > .pt-side { display: none; }
}


/* =========================================================
   左栏"发新帖"主按钮：从导航列表里提出来，和页面入口区分
   ========================================================= */

.pt-nav-post {
	margin: 2px 0 12px;
	font-weight: 600;
	letter-spacing: .2px;
}

.pt-nav-post .pt-ico { flex: none; }

@media (max-width: 760px) {
	/* 手机抽屉顶部已有独立的发帖按钮，这里不再重复
	   （选择器要压过 .pt-btn.is-block 的 display:flex） */
	.pt-navmain .pt-nav-post { display: none; }
}

/* 移动端列表排版（对齐黑豹论坛）：作者行独占一行，版块/时间/计数另起一行 */
@media (max-width: 760px) {
	.pt-thread-meta {
		flex-wrap: wrap;
		row-gap: 5px;
	}

	.pt-thread-author-wrap,
	.pt-thread-info-wrap {
		width: 100%;
	}

	/* 参考站手机上摘要是两行，一行信息量太少 */
	.pt-thread-excerpt {
		-webkit-line-clamp: 2;
	}
}
