/* 黑豹 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-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(--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(--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 { 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-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-feedtabs { display: flex; gap: 4px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.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: nowrap; }
.pt-board-num { font-family: var(--mono); font-size: 13px; color: var(--soft); }

.pt-boardhead { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pt-boardhead-body { flex: 1; 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; }
.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; }

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

.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; }
.pt-thread-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.pt-thread-title a:visited { color: var(--soft); }
.pt-thread.is-top .pt-thread-title a { color: var(--red); }
.pt-thread-meta { margin-top: 3px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.pt-thread-meta .pt-author { color: var(--soft); }
.pt-thread-meta .pt-author:hover { color: var(--red); }
.pt-thread-meta .pt-badges { margin-left: 4px; }
.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-cover { height: 96px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 14px), linear-gradient(120deg, #1f1d1a 0%, #3a3128 60%, #b8432f 140%); }
.pt-profile-top { display: flex; align-items: flex-end; gap: 16px; padding: 0 22px 10px; }
.pt-profile-top > .pt-avatar { margin-top: -38px; border: 4px solid var(--card); background-color: var(--card); }
.pt-profile-id { flex: 1; min-width: 0; padding-bottom: 2px; }
.pt-profile-id h1 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.3; color: var(--ink); margin-bottom: 2px; }
.pt-profile-act { padding-bottom: 4px; }
.pt-profile-more { padding: 0 22px 16px; }
.pt-profile-bio { font-size: 14px; color: var(--text); }
.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: 8px; 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); }
.pt-profile-stats > * { display: flex; flex-direction: column; align-items: center; padding: 14px 0; }
.pt-profile-stats > * + * { border-left: 1px solid var(--line); }
.pt-profile-stats b { font-family: var(--mono); font-size: 19px; line-height: 1.3; 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: 0 22px 18px; margin: 0; }

.pt-exp { margin: 4px 0 14px; font-size: 12px; color: var(--faint); }
.pt-exp-bar { height: 5px; background: var(--fill); overflow: hidden; margin-bottom: 5px; border-radius: 3px; }
.pt-exp-bar span { display: block; height: 100%; background: linear-gradient(90deg, #d0644e, var(--red)); border-radius: 3px; }
.pt-exp-text { display: flex; justify-content: space-between; }

.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); }
.pt-post-title .pt-flag { vertical-align: 6px; }
.pt-post-author { display: flex; align-items: center; gap: 12px; margin: 16px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pt-post-author-info { flex: 1; min-width: 0; }
.pt-post-author-info .pt-author { font-weight: 600; }
.pt-post-meta { font-size: 12.5px; color: var(--faint); }
.pt-post-meta a { color: var(--soft); }

.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; 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; }
.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; }
.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 { display: flex; flex-direction: column; line-height: 1.35; }
.pt-me-stats a + a { border-left: 1px solid var(--line); }
.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-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: hidden; 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 8px; background: var(--fill); border-bottom: 1px solid var(--line); }
.pt-md-tabs, .pt-md-tools { display: flex; flex-wrap: wrap; gap: 2px; }
.pt-md-bar button { min-width: 32px; height: 30px; padding: 0 9px; font-size: 13px; color: var(--soft); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.pt-md-bar button:hover { color: var(--ink); background: var(--card); }
.pt-md-tools button[data-md="hide"] { color: var(--red); }
.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 textarea { display: block; width: 100%; min-height: 360px; 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: 360px; padding: 14px 16px; }

.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-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; gap: 12px; }
.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); gap: 6px; }
    .pt-quick a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; 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-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); }
    .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; }

    .pt-thread { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
    .pt-thread .pt-avatar { width: 34px; height: 34px; }
    .pt-lastreply { display: none; }

    .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-cover { height: 76px; }
    .pt-profile-top { padding: 0 16px 8px; gap: 12px; }
    .pt-profile-top > .pt-avatar { margin-top: -30px; width: 64px; height: 64px; }
    .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-act .pt-btn:not(.pt-follow) { background: rgba(255, 255, 255, .92); color: #1f1d1a; border-color: transparent; }
    .pt-profile-more { padding: 0 16px 14px; }
    .pt-profile > .pt-exp { padding: 0 16px 16px; }
    .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: wrap; margin: 12px 0 16px; padding-bottom: 14px; }
    .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-editor { padding: 16px 14px; }
    .pt-editor-row { flex-direction: column; }
    .pt-editor select, .pt-editor-row input { flex: none; }
    .pt-md textarea, .pt-md-preview { min-height: 260px; }
    .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; } }
