/* 幻枢工坊 PHANTAFORGE · 设计系统
   基调：纯净深色。平黑底 + 深灰卡片 + 一抹蓝。无光晕、无网格、无霓虹、无紫渐变。
   质感靠：克制的层级差、1px 描边、圆角、留白。 */

:root {
  --bg:        #0b0d11;
  --bg-2:      #0f1218;
  --panel:     #12151c;
  --panel-2:   #171b24;
  --panel-3:   #1d222c;
  --line:      #232833;
  --line-2:    #2e3542;
  --fg:        #e6eaf2;
  --fg-2:      #a6afc0;
  --fg-3:      #6d778a;
  --accent:    #4f8bf7;
  --accent-2:  #3a76e0;
  --accent-soft: rgba(79,139,247,.12);
  --ok:        #34c08b;
  --warn:      #e0a53c;
  --danger:    #e05a5a;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 8px 28px rgba(0,0,0,.45);
  --sh-3: 0 24px 64px rgba(0,0,0,.6);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sidebar: 232px;
  --topbar: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.pf-lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0; }
::selection { background: var(--accent-soft); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #262c38; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333b4a; }

/* ---------------- 顶部进度条 ---------------- */
#pf-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 900; opacity: 0; transition: opacity .15s; pointer-events: none; }
#pf-progress.on { opacity: 1; }
#pf-progress::after { content: ''; display: block; height: 100%; width: 30%; background: var(--accent); animation: pfSlide 1.1s ease-in-out infinite; }
@keyframes pfSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* ---------------- 布局骨架 ---------------- */
.pf-shell { display: flex; min-height: 100vh; }

.pf-side {
  width: var(--sidebar); flex: 0 0 var(--sidebar); background: var(--bg-2);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 60;
}
.pf-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.pf-brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--panel-3);
  border: 1px solid var(--line-2); display: grid; place-items: center; flex: 0 0 32px;
}
.pf-brand-mark svg { width: 18px; height: 18px; }
.pf-brand-text { min-width: 0; }
.pf-brand-name { font-size: 13.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.pf-brand-sub { font-size: 10.5px; color: var(--fg-3); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.pf-ver { font-size: 10px; color: var(--fg-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-left: auto; }

.pf-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.pf-nav-group { margin-bottom: 14px; }
.pf-nav-title { font-size: 10.5px; color: var(--fg-3); letter-spacing: .09em; text-transform: uppercase; padding: 6px 8px; font-weight: 600; }
.pf-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm);
  color: var(--fg-2); font-size: 13.5px; cursor: pointer; transition: background .12s, color .12s; position: relative;
}
.pf-nav-item:hover { background: var(--panel-2); color: var(--fg); }
.pf-nav-item.active { background: var(--panel-3); color: var(--fg); font-weight: 500; }
.pf-nav-item.active::before { content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 2px; height: 16px; background: var(--accent); border-radius: 0 2px 2px 0; }
.pf-nav-item svg { flex: 0 0 18px; opacity: .85; }
.pf-nav-badge { margin-left: auto; font-size: 10.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }

.pf-side-foot { border-top: 1px solid var(--line); padding: 10px; }
.pf-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); cursor: pointer; }
.pf-user:hover { background: var(--panel-2); }
.pf-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--fg-2); flex: 0 0 30px; overflow: hidden; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-user-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-user-credits { font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; }

.pf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-topbar {
  height: var(--topbar); flex: 0 0 var(--topbar); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: rgba(11,13,17,.86); backdrop-filter: saturate(180%) blur(14px);
  position: sticky; top: 0; z-index: 50;
}
.pf-crumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg-3); min-width: 0; }
.pf-crumb b { color: var(--fg); font-weight: 500; }
.pf-topbar-spacer { flex: 1; }
.pf-content { flex: 1; padding: 24px 28px 64px; max-width: 1440px; width: 100%; }
.pf-content.narrow { max-width: 920px; }
.pf-main.is-loading .pf-content { opacity: .55; transition: opacity .12s; }

.pf-menu-btn { display: none; }

/* ---------------- 基础件 ---------------- */
.pf-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pf-card.pad { padding: 20px; }
.pf-card-hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pf-card-hd h3 { flex: 1; min-width: 0; }
.pf-card-bd { padding: 18px; }

.pf-page-hd { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pf-page-hd .t { flex: 1; min-width: 220px; }
.pf-page-hd h1 { margin-bottom: 5px; }
.pf-page-hd .d { color: var(--fg-3); font-size: 13px; }

.pf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--fg); font-size: 13px; cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s; white-space: nowrap; user-select: none;
}
.pf-btn:hover { background: var(--panel-3); border-color: #39414f; }
.pf-btn:active { transform: translateY(.5px); }
.pf-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.pf-btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.pf-btn.ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.pf-btn.ghost:hover { background: var(--panel-2); color: var(--fg); }
.pf-btn.danger { color: var(--danger); border-color: rgba(224,90,90,.35); background: transparent; }
.pf-btn.danger:hover { background: rgba(224,90,90,.1); }
.pf-btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.pf-btn.lg { height: 40px; padding: 0 20px; font-size: 14px; }
.pf-btn.block { width: 100%; }
.pf-btn[disabled], .pf-btn.disabled { opacity: .45; pointer-events: none; }
.pf-icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; color: var(--fg-3); cursor: pointer; transition: .12s;
}
.pf-icon-btn:hover { background: var(--panel-2); color: var(--fg); border-color: var(--line); }

.pf-input, .pf-textarea, .pf-select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 8px 11px; font-size: 13.5px; outline: none; transition: border-color .12s, background .12s;
}
.pf-input:focus, .pf-textarea:focus, .pf-select:focus { border-color: var(--accent); background: var(--panel); }
.pf-input::placeholder, .pf-textarea::placeholder { color: var(--fg-3); }
.pf-textarea { resize: vertical; min-height: 90px; line-height: 1.7; font-family: inherit; }
.pf-textarea.mono { font-family: var(--mono); font-size: 12.5px; }
.pf-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d778a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; padding-right: 30px; }
.pf-label { display: block; font-size: 12px; color: var(--fg-3); margin-bottom: 6px; font-weight: 500; }
.pf-field { margin-bottom: 16px; }
.pf-hint { font-size: 11.5px; color: var(--fg-3); margin-top: 5px; }
.pf-input-group { display: flex; gap: 8px; }

.pf-row { display: flex; align-items: center; gap: 10px; }
.pf-row-end { justify-content: flex-end; }
.pf-row-between { justify-content: space-between; }
.pf-col { display: flex; flex-direction: column; gap: 10px; }
.pf-grid { display: grid; gap: 14px; }
.pf-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-spacer { flex: 1; }
.pf-muted { color: var(--fg-3); }
.pf-dim { color: var(--fg-2); }
.pf-small { font-size: 12px; }
.pf-mono { font-family: var(--mono); font-size: 12px; }
.pf-nowrap { white-space: nowrap; }
.pf-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pf-tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 5px; background: var(--panel-3); border: 1px solid var(--line); font-size: 11.5px; color: var(--fg-2);
}
.pf-tag.blue { background: var(--accent-soft); border-color: rgba(79,139,247,.28); color: #9dc0fb; }
.pf-tag.ok { background: rgba(52,192,139,.12); border-color: rgba(52,192,139,.3); color: #6fd6ad; }
.pf-tag.warn { background: rgba(224,165,60,.12); border-color: rgba(224,165,60,.3); color: #e6bd72; }
.pf-tag.danger { background: rgba(224,90,90,.12); border-color: rgba(224,90,90,.3); color: #ef8f8f; }
.pf-tag.clickable { cursor: pointer; transition: border-color .12s, color .12s; }
.pf-tag.clickable:hover { border-color: var(--accent); color: var(--fg); }
.pf-tag.clickable.on { background: var(--accent-soft); border-color: rgba(79,139,247,.38); color: #9dc0fb; }

.pf-divider { height: 1px; background: var(--line); margin: 18px 0; }
.pf-empty { text-align: center; padding: 56px 20px; color: var(--fg-3); }
.pf-empty .ic { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg-3); }
.pf-empty h3 { color: var(--fg-2); margin-bottom: 6px; }
.pf-empty p { font-size: 13px; }

.pf-loading { display: grid; place-items: center; padding: 60px; color: var(--fg-3); font-size: 13px; }
.pf-spin { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: pfSpin .7s linear infinite; display: inline-block; }
@keyframes pfSpin { to { transform: rotate(360deg); } }
.pf-error { padding: 40px; text-align: center; color: var(--fg-2); }
.pf-error h3 { color: var(--danger); margin-bottom: 8px; }
.pf-error p { color: var(--fg-3); font-size: 13px; margin-bottom: 16px; }

/* ---------------- 表格 ---------------- */
.pf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pf-table th { text-align: left; font-weight: 500; color: var(--fg-3); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.pf-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pf-table tr:last-child td { border-bottom: none; }
.pf-table tbody tr:hover { background: var(--panel-2); }

/* ---------------- Tab ---------------- */
.pf-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab {
  padding: 9px 13px; font-size: 13px; color: var(--fg-3); cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: color .12s; display: flex; align-items: center; gap: 6px;
}
.pf-tab:hover { color: var(--fg-2); }
.pf-tab.active { color: var(--fg); border-bottom-color: var(--accent); font-weight: 500; }
.pf-tab .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.pf-seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.pf-seg button { border: none; background: transparent; padding: 5px 12px; border-radius: 4px; font-size: 12.5px; color: var(--fg-3); cursor: pointer; transition: .12s; }
.pf-seg button:hover { color: var(--fg-2); }
.pf-seg button.active { background: var(--panel-3); color: var(--fg); font-weight: 500; }

/* ---------------- 弹层 ---------------- */
.pf-modal-wrap { position: fixed; inset: 0; background: rgba(5,7,10,.72); backdrop-filter: blur(3px); z-index: 800; display: grid; place-items: center; padding: 24px; animation: pfFade .14s ease; }
@keyframes pfFade { from { opacity: 0; } }
.pf-modal { width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--sh-3); max-height: 88vh; display: flex; flex-direction: column; animation: pfRise .16s cubic-bezier(.2,.8,.3,1); }
@keyframes pfRise { from { transform: translateY(10px) scale(.99); opacity: 0; } }
.pf-modal-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pf-modal-head h3 { flex: 1; }
.pf-modal-body { padding: 18px; overflow-y: auto; }

/* ---------------- Toast ---------------- */
#pf-toast-root { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 950; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.pf-toast {
  background: var(--panel-3); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 16px;
  font-size: 13px; box-shadow: var(--sh-2); display: flex; align-items: center; gap: 9px; animation: pfToastIn .18s cubic-bezier(.2,.8,.3,1);
  max-width: 440px;
}
@keyframes pfToastIn { from { transform: translateY(8px); opacity: 0; } }
.pf-toast.ok { border-color: rgba(52,192,139,.35); }
.pf-toast.err { border-color: rgba(224,90,90,.4); }
.pf-toast .bar { width: 3px; height: 15px; border-radius: 2px; background: var(--fg-3); }
.pf-toast.ok .bar { background: var(--ok); }
.pf-toast.err .bar { background: var(--danger); }

/* ---------------- 图片卡 ---------------- */
.pf-thumb { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; aspect-ratio: 3/4; }
.pf-thumb img, .pf-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-thumb .ov { position: absolute; inset: auto 0 0 0; padding: 20px 10px 9px; background: linear-gradient(to top, rgba(6,8,11,.9), transparent); font-size: 11.5px; }
.pf-thumb .pick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid rgba(255,255,255,.55); background: rgba(10,12,16,.6); display: grid; place-items: center; }
.pf-thumb.sel { border-color: var(--accent); }
.pf-thumb.sel .pick { background: var(--accent); border-color: var(--accent); color: #fff; }
.pf-thumb-click { cursor: pointer; }
.pf-thumb-click:hover { border-color: var(--line-2); }

/* ---------------- 骨架屏 ---------------- */
.pf-skel { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%); background-size: 400% 100%; animation: pfSkel 1.3s ease infinite; border-radius: var(--r); }
@keyframes pfSkel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- 编辑器 ---------------- */
.pf-editor { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.pf-editor-main { min-width: 0; }
.pf-editor-side { position: sticky; top: calc(var(--topbar) + 20px); }
.pf-mode-switch { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; }
.pf-mode-switch button { border: none; background: transparent; padding: 5px 13px; border-radius: 4px; font-size: 12.5px; color: var(--fg-3); cursor: pointer; }
.pf-mode-switch button.active { background: var(--panel-3); color: var(--fg); font-weight: 500; }

.pf-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; transition: .12s; }
.pf-list-item:hover { border-color: var(--line-2); background: var(--panel-2); }
.pf-list-item.active { border-color: rgba(79,139,247,.45); background: var(--accent-soft); }
.pf-list-item .body { flex: 1; min-width: 0; }

.pf-wb-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); margin-bottom: 8px; overflow: hidden; }
.pf-wb-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.pf-wb-head:hover { background: var(--panel-2); }
.pf-wb-body { padding: 12px; border-top: 1px solid var(--line); background: var(--bg-2); }

.pf-code { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; color: #c8d2e2; }
.pf-kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 13px; }
.pf-kv dt { color: var(--fg-3); }
.pf-kv dd { margin: 0; }

.pf-progress { height: 5px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.pf-progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s ease; }

.pf-drop { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 30px; text-align: center; color: var(--fg-3); cursor: pointer; transition: .15s; font-size: 13px; }
.pf-drop:hover, .pf-drop.over { border-color: var(--accent); color: var(--fg-2); background: var(--accent-soft); }

.pf-radio-card { border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; cursor: pointer; transition: .12s; background: var(--panel); }
.pf-radio-card:hover { border-color: var(--line-2); }
.pf-radio-card.on { border-color: var(--accent); background: var(--accent-soft); }
.pf-radio-card .nm { font-size: 13px; font-weight: 500; }
.pf-radio-card .ds { font-size: 11.5px; color: var(--fg-3); margin-top: 2px; }

.pf-switch { width: 38px; height: 22px; border-radius: 11px; background: var(--panel-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: .15s; flex: 0 0 38px; }
.pf-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--fg-3); transition: .15s; }
.pf-switch.on { background: var(--accent); border-color: var(--accent); }
.pf-switch.on::after { left: 18px; background: #fff; }

/* ---------------- 皮肤预览 ---------------- */
.pf-skin-prev { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-2); aspect-ratio: 4/3; position: relative; }
.pf-skin-prev iframe { width: 100%; height: 100%; border: none; }

/* ---------------- 认证页 ---------------- */
.pf-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.pf-auth-card { width: 100%; max-width: 396px; }
.pf-auth-brand { text-align: center; margin-bottom: 26px; }
.pf-auth-brand .mark { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 13px; background: var(--panel-3); border: 1px solid var(--line-2); display: grid; place-items: center; }
.pf-auth-brand h1 { font-size: 19px; letter-spacing: .01em; }
.pf-auth-brand p { color: var(--fg-3); font-size: 12.5px; margin-top: 5px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------------- 首页 ---------------- */
.pf-hero { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); padding: 30px 32px; margin-bottom: 24px; }
.pf-hero h1 { font-size: 25px; margin-bottom: 8px; }
.pf-hero p { color: var(--fg-3); font-size: 13.5px; max-width: 620px; }
.pf-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.pf-stat > div { background: var(--panel); padding: 16px 18px; }
.pf-stat .k { font-size: 11.5px; color: var(--fg-3); margin-bottom: 5px; }
.pf-stat .v { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pf-stat .u { font-size: 12px; color: var(--fg-3); font-weight: 400; margin-left: 3px; }

.pf-mod { display: block; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); padding: 18px; transition: .15s; cursor: pointer; }
.pf-mod:hover { border-color: var(--line-2); background: var(--panel-2); }
.pf-mod .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--panel-3); border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 13px; color: var(--fg-2); }
.pf-mod .nm { font-size: 14px; font-weight: 500; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.pf-mod .ds { font-size: 12.5px; color: var(--fg-3); line-height: 1.55; }

/* ---------------- 卡片网格 ---------------- */
.pf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.pf-card-tile { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; cursor: pointer; transition: .15s; display: flex; flex-direction: column; }
.pf-card-tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.pf-card-tile .cover { aspect-ratio: 3/4; background: var(--bg-2); position: relative; overflow: hidden; }
.pf-card-tile .cover img { width: 100%; height: 100%; object-fit: cover; }
.pf-card-tile .cover .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--fg-3); font-size: 24px; }
.pf-card-tile .body { padding: 11px 12px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.pf-card-tile .nm { font-size: 13.5px; font-weight: 500; }
.pf-card-tile .meta { font-size: 11.5px; color: var(--fg-3); display: flex; align-items: center; gap: 8px; margin-top: auto; }
.pf-card-tile .pill { position: absolute; top: 8px; left: 8px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .pf-editor { grid-template-columns: 1fr; }
  .pf-editor-side { position: static; }
}
@media (max-width: 860px) {
  .pf-side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--sh-3); }
  .pf-side.open { transform: none; }
  .pf-menu-btn { display: inline-grid; }
  .pf-content { padding: 18px 16px 56px; }
  .pf-topbar { padding: 0 14px; }
  .pf-cards { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
}
.pf-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; display: none; }
.pf-scrim.on { display: block; }

/* ================= 游玩工坊 ================= */
.pf-play { display: grid; grid-template-columns: 258px 1fr; gap: 18px; height: calc(100vh - 150px); min-height: 520px; }
.pf-play-side { border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow: auto; background: var(--panel); }
.pf-play-list { display: flex; flex-direction: column; gap: 4px; }
.pf-play-item { position: relative; padding: 9px 26px 9px 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.pf-play-item:hover { background: var(--panel-3); }
.pf-play-item.active { background: var(--panel-3); border-color: var(--line-2); }
.pf-play-item-t { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-play-item-s { font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.pf-play-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--fg-3); cursor: pointer; font-size: 15px; line-height: 1; opacity: 0; }
.pf-play-item:hover .pf-play-del { opacity: 1; }
.pf-play-main { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); min-height: 0; }
.pf-play-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.pf-play-search { height: 30px; font-size: 12px; }
.pf-msgs-box { flex: 1; overflow: auto; min-height: 0; }
.pf-msgs { padding: 16px 16px 4px; display: flex; flex-direction: column; gap: 14px; }
.pf-bubble { display: flex; gap: 9px; max-width: 78%; }
.pf-bubble.me { align-self: flex-end; flex-direction: row-reverse; }
.pf-bubble-av { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; flex: 0 0 auto; }
.pf-bubble-body { position: relative; }
.pf-bubble-text { padding: 10px 12px; border-radius: 11px; background: var(--panel-2); font-size: 13.5px; line-height: 1.72; white-space: pre-wrap; word-break: break-word; }
.pf-bubble.me .pf-bubble-text { background: var(--accent); color: #fff; }
.pf-bubble.opening .pf-bubble-text { border-left: 2px solid var(--accent); }
.pf-bubble.typing .pf-bubble-text { opacity: .82; }
.pf-bubble-tools { display: flex; gap: 3px; margin-top: 4px; opacity: 0; transition: opacity .12s; }
.pf-bubble:hover .pf-bubble-tools { opacity: 1; }
.pf-bubble-tools button { background: none; border: 0; color: var(--fg-3); font-size: 11px; cursor: pointer; padding: 1px 5px; border-radius: 5px; }
.pf-bubble-tools button:hover { background: var(--panel-3); color: var(--fg); }
.pf-bubble.me .pf-bubble-tools { justify-content: flex-end; }
.pf-play-foot { padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.pf-fold { display: inline-flex; align-items: center; gap: 6px; align-self: center; font-size: 11.5px; color: var(--fg-3); border: 1px dashed var(--line-2); border-radius: 20px; padding: 4px 12px; cursor: pointer; }
.pf-fold:hover { color: var(--fg); }
.pf-play-pick { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.pf-play-pick-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.pf-play-pick-item:hover { border-color: var(--accent); background: var(--panel-3); }
.pf-play-pick-n { font-size: 13px; font-weight: 600; }
.pf-chip { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: var(--panel-2); color: var(--fg-3); }

/* ---- 回访：继续上次对话 / 站内提醒（无光效，靠层级差与描边） ---- */
.pf-resume { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); cursor: pointer; }
.pf-resume:hover { border-color: var(--line-2); background: var(--panel-2); }
.pf-resume.primary { border-color: var(--line-2); background: var(--panel-2); }
.pf-resume-cv { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 11px; overflow: hidden; background: var(--panel-3); border: 1px solid var(--line); }
.pf-resume-cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-resume-cv .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--fg-3); }
.pf-resume-bd { min-width: 0; flex: 1; }
.pf-resume-k { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--fg-3); letter-spacing: .02em; }
.pf-resume-n { font-size: 14.5px; font-weight: 600; margin-top: 3px; }
.pf-resume-s { font-size: 12px; color: var(--fg-3); margin-top: 2px; }

.pf-nudge { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 18px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--r); background: var(--panel); cursor: pointer; }
.pf-nudge:hover { background: var(--panel-2); }
.pf-nudge-cv { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: var(--panel-3); border: 1px solid var(--line); }
.pf-nudge-cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-nudge-cv .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--fg-3); }
.pf-nudge-bd { min-width: 0; flex: 1; font-size: 13px; }

/* 游玩记录分组 */
.pf-play-group { font-size: 11px; color: var(--fg-3); padding: 8px 8px 4px; letter-spacing: .04em; }
.pf-play-item .pf-play-badge { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); font-size: 10px; padding: 1px 6px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }

/* ================= 账号设置 ================= */
.pf-tabs2 { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.pf-tab2 { background: none; border: 0; padding: 9px 14px; color: var(--fg-3); font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pf-tab2:hover { color: var(--fg); }
.pf-tab2.active { color: var(--fg); border-bottom-color: var(--accent); }
.pf-avatar-xl { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--panel-2); display: grid; place-items: center; }
.pf-avatar-xl img { width: 100%; height: 100%; object-fit: cover; }
.pf-avatar-ph { font-size: 28px; color: var(--fg-3); }
.pf-preset { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 15px; }
.pf-preset:hover { border-color: var(--accent); background: var(--panel-2); }
.pf-kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pf-kv:last-child { border-bottom: 0; }
.pf-code { display: block; padding: 7px 10px; background: var(--panel-2); border-radius: 7px; font-size: 12px; font-family: ui-monospace, monospace; }
.pf-chip2 { background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--fg-2); cursor: pointer; }
.pf-chip2:hover { border-color: var(--accent); color: var(--fg); }
.pf-bar { height: 6px; border-radius: 4px; background: var(--panel-3); overflow: hidden; margin-top: 10px; }
.pf-bar-in { height: 100%; background: var(--accent); }
.pf-page-hd h1 { font-size: 21px; }

/* ================= 站群：漫画 / 论坛 / 短剧 / 对决 / 市场 ================= */
.pf-page-hd { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.pf-page-hd .t h1 { font-size: 24px; font-weight: 600; }
.pf-page-hd .d { font-size: 13px; color: var(--fg-3); margin-top: 4px; }
.pf-small { font-size: 12.5px; }
.pf-muted { color: var(--fg-3); }
.pf-chip2 { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px;
  background: var(--panel-2); color: var(--fg-2); border: 1px solid var(--line); }
.pf-badge2 { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: rgba(88,140,255,.14); color: var(--accent); margin-top: 4px; }
.pf-price { color: var(--accent); font-weight: 600; font-size: 13px; }
.pf-rank { display: inline-block; min-width: 18px; }
.pf-rank.top { color: var(--accent); }

.pf-comic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }
.pf-comic { cursor: pointer; }
.pf-comic-cover { aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--panel-2);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--fg-3); margin-bottom: 8px; transition: border-color .15s; }
.pf-comic:hover .pf-comic-cover { border-color: var(--accent); }
.pf-comic-cover img { width: 100%; height: 100%; object-fit: cover; }
.pf-comic-cover.lg { width: 148px; height: 197px; margin: 0; flex: 0 0 auto; }
.pf-comic-t { font-size: 13.5px; font-weight: 500; }
.pf-comic-t + .pf-small { margin-top: 3px; }

.pf-post { padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--panel); transition: border-color .15s; }
.pf-post:hover { border-color: var(--accent); }
.pf-post-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.pf-post-ft { display: flex; gap: 14px; margin-top: 8px; }
.pf-cmt { padding: 11px 0; border-bottom: 1px solid var(--line); }

.pf-reader { max-width: 720px; margin: 0 auto; }
.pf-reader-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; position: sticky; top: 0; background: var(--bg); padding: 10px 0; z-index: 5; }
.pf-reader-body { display: flex; flex-direction: column; gap: 10px; }
.pf-page { aspect-ratio: 3/4; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: var(--fg-3); font-size: 13px; }
.pf-reader-ft { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

.pf-fighter { display: flex; flex-direction: column; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; background: var(--panel); transition: border-color .15s; }
.pf-fighter.on { border-color: var(--accent); background: var(--panel-2); }
.pf-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center;
  padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.pf-vs > div:last-child { text-align: right; }
.pf-player { aspect-ratio: 9/16; max-height: 420px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.pf-player-in { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--fg-2); }
.pf-ch { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
  background: var(--panel); display: flex; flex-direction: column; gap: 3px; transition: border-color .15s; }
.pf-ch:hover { border-color: var(--accent); }
.pf-field { margin-bottom: 13px; }
.pf-label { display: block; font-size: 12.5px; color: var(--fg-3); margin-bottom: 6px; }

/* ---------- 第三方登录 ---------- */
.pf-social-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--fg-3); font-size: 12px; }
.pf-social-sep::before, .pf-social-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pf-social-row { display: flex; gap: 8px; }
.pf-social-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; padding: 9px 6px; }
.pf-social-btn .mk { width: 17px; height: 17px; border-radius: 50%; background: var(--panel-2);
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--fg-2); }
.pf-social-btn:hover .mk { border-color: var(--accent); color: var(--fg); }

/* ---------------- 全站页脚 ---------------- */
.pf-foot { padding: 26px 30px 20px; border-top: 1px solid var(--line); margin-top: 30px; }
.pf-foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; max-width: 820px; }
.pf-foot-col h4 { font-size: 12px; color: var(--fg-3); margin: 0 0 8px; font-weight: 600; letter-spacing: .02em; }
.pf-foot-link { display: block; font-size: 12.5px; color: var(--fg-2); padding: 3px 0; transition: color .12s; }
.pf-foot-link:hover { color: var(--accent); }
.pf-foot-bar { display: flex; justify-content: space-between; gap: 14px; margin-top: 20px; }

/* ---------- 版本历史 · 改动高亮（diff） ---------- */
.pf-diff-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.pf-diff-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); margin-bottom: 8px; overflow: hidden; }
.pf-diff-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.pf-diff-row .body { flex: 1; min-width: 0; cursor: pointer; }
.pf-diff-row:hover { background: var(--panel-2); }
.pf-diff-row.open { background: var(--panel-2); border-bottom: 1px solid var(--line); }
.pf-diff-panel { padding: 12px; background: var(--bg-2); }
.pf-diff-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--fg-2); margin-bottom: 10px; }
.pf-diff-change { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); margin-bottom: 8px; overflow: hidden; }
.pf-diff-hd { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.pf-diff-body { padding: 9px 10px; font-size: 13px; line-height: 1.75; color: var(--fg-2); white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.pf-diff-body.mono { font-family: var(--mono); font-size: 12px; }
.pf-diff-same { color: var(--fg-3); }
.pf-diff-fold { color: var(--accent); cursor: pointer; }
ins.pf-diff-add { color: #6fd6ad; background: rgba(52,192,139,.12); border-radius: 3px; padding: 0 1px; text-decoration: none; }
del.pf-diff-del { color: #ef8f8f; background: rgba(224,90,90,.12); border-radius: 3px; padding: 0 1px; text-decoration: none; }
.pf-diff-line { padding: 1px 0; }
.pf-diff-line.add { color: #6fd6ad; }
.pf-diff-line.del { color: #ef8f8f; }
.pf-diff-plain { margin: 0; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--fg-2); max-height: 340px; overflow: auto;
  white-space: pre-wrap; word-break: break-word; }
