/* ---------- 作品集页 ---------- */
.pf-body { background: var(--cream); }
.pf-head { padding: 140px 24px 40px; max-width: 1100px; margin: 0 auto; }
.pf-lead { color: var(--ink-2); max-width: 640px; margin-top: -18px; }

.pf-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.pf-filter button { border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  padding: 8px 20px; border-radius: 999px; cursor: pointer; font-size: 14px; transition: all .2s; }
.pf-filter button:hover { border-color: var(--red); color: var(--red); }
.pf-filter button.is-on { background: var(--red); border-color: var(--red); color: #fff; }

.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-bottom: 90px; }
.pf-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: transform .25s, box-shadow .25s; }
.pf-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(179,23,49,.12); }
.pf-thumb { aspect-ratio: 4 / 3; background: #f1ece4; overflow: hidden; position: relative; }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pf-card:hover .pf-thumb img { transform: scale(1.04); }
.pf-thumb .pf-file-badge { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; color: var(--red); font-size: 13px;
  background: repeating-linear-gradient(135deg, #fdf7f2, #fdf7f2 10px, #f8efe8 10px, #f8efe8 20px); }
.pf-file-badge span:first-child { font-size: 30px; }
.pf-cat { display: inline-block; font-size: 12px; color: var(--red); letter-spacing: 1px; margin-bottom: 6px; }
.pf-card-body { padding: 18px 20px 22px; }
.pf-card-body h3 { font-size: 16px; line-height: 1.5; margin-bottom: 6px; }
.pf-card-body p { font-size: 13px; color: var(--ink-2); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-empty { text-align: center; color: var(--ink-2); padding: 50px 0 90px; }

/* ---------- 大图查看 ---------- */
.pf-viewer { position: fixed; inset: 0; z-index: 200; background: rgba(22,14,10,.92);
  display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.pf-viewer-inner { max-width: 1000px; width: 100%; max-height: 100%; display: flex;
  flex-direction: column; gap: 16px; overflow: auto; }
.pf-viewer-media img, .pf-viewer-media iframe { width: 100%; max-height: 72vh; object-fit: contain;
  border-radius: 12px; background: #fff; display: block; border: none; }
.pf-viewer-info { color: #fff; }
.pf-viewer-info h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 6px; }
.pf-viewer-info p { opacity: .8; font-size: 15px; }
.pf-viewer-close { position: absolute; top: 18px; right: 24px; background: none; border: none;
  color: #fff; font-size: 36px; line-height: 1; cursor: pointer; opacity: .8; }
.pf-viewer-close:hover { opacity: 1; }

/* ---------- 添加作品弹窗 ---------- */
.pf-modal { position: fixed; inset: 0; z-index: 210; background: rgba(22,14,10,.5);
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.pf-modal[hidden] { display: none; }
.pf-viewer[hidden] { display: none; }
.pf-modal-box { background: #fff; border-radius: 18px; padding: 30px; width: 100%;
  max-width: 520px; max-height: 90vh; overflow: auto; }
.pf-modal-box h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 8px; }
.pf-modal-tip { font-size: 13px; color: var(--ink-2); margin-bottom: 20px; line-height: 1.6; }
.pf-modal-box label { display: block; font-size: 14px; color: var(--ink); margin-bottom: 16px; }
.pf-modal-box input[type=text], .pf-modal-box input:not([type]), .pf-modal-box select,
.pf-modal-box textarea { width: 100%; margin-top: 8px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; font-family: var(--sans); background: var(--cream); }
.pf-modal-box textarea { resize: vertical; }
.pf-modal-box input:focus, .pf-modal-box select:focus, .pf-modal-box textarea:focus {
  outline: none; border-color: var(--red); background: #fff; }
.pf-file { padding: 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--cream); }
.pf-file input { margin-top: 8px; }
.pf-modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.pf-btn-cancel { padding: 12px 30px; border-radius: 999px; border: 1px solid #c9beb2;
  background: #fff; color: #6b625a; font-size: 15px; font-family: var(--sans);
  cursor: pointer; transition: all .2s; -webkit-appearance: none; }
.pf-btn-cancel:hover, .pf-btn-cancel:active { border-color: var(--ink-2); color: var(--ink); background: #f7f2ec; }
.pf-modal-msg { font-size: 13px; margin-top: 14px; color: var(--red); }

@media (max-width: 860px) {
  .pf-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .pf-head { padding-top: 110px; }
}
@media (max-width: 560px) {
  .pf-grid { grid-template-columns: 1fr; }
}
