/* /profile/:username (views/pages/profile/index.njk). Own prefix .pf-; part of the CSS bundle. */
.pf { --pf-card: #fff; --pf-line: #e1eaf7; --pf-ink: #14233a; --pf-text: #3a4a63; --pf-muted: #5f6f89; --pf-soft: #eef4fc; --pf-cell: #e8eff9; --pf-accent: #1d68c4; --pf-gold: #e0a100;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; width: 100%; color: var(--pf-text); }
html[data-theme="dark"] .pf { --pf-card: #161b22; --pf-line: #2a313c; --pf-ink: #eef1f5; --pf-text: #c3ccd9; --pf-muted: #8d99ab; --pf-soft: #1f2630; --pf-cell: #202731; --pf-accent: #6ab8ff; --pf-gold: #f5b400; }
.pf [hidden] { display: none !important; }
.pf-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pf h1, .pf h2, .pf p, .pf dl, .pf dd { margin: 0; }
.pf-card { background: var(--pf-card); border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--pf-line); }
.pf-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 16px; border-bottom: 1px solid var(--pf-line); }
.pf .pf-top h2 { font-size: 15px; font-weight: 700; color: var(--pf-ink); }
.pf-top h2 small { margin-left: 4px; font-size: 13px; font-weight: 400; color: var(--pf-muted); }
.pf-empty { padding: 18px 16px; font-size: 14px; color: var(--pf-muted); }

.pf-pager { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pf-muted); }
.pf-pager button { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--pf-line); border-radius: 6px; background: var(--pf-soft); color: var(--pf-ink); font-size: 10px; cursor: pointer; }
.pf-pager button:disabled { opacity: .35; cursor: default; }

/* hero */
.pf-hero { position: relative; }
.pf-cover { position: relative; height: 150px; background: linear-gradient(120deg, #ff7aa0 0%, #ffd86b 100%); }
.pf-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-status { position: absolute; top: 10px; right: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.pf-status.is-on { background: #1fa34a; }
.pf-ava { position: absolute; left: 20px; top: 102px; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--pf-cell); box-shadow: 0 0 0 4px var(--pf-card); }
.pf-ava img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 12%; }
.pf-id { min-height: 78px; padding: 14px 16px 18px 132px; }
.pf .pf-name { font-size: 22px; font-weight: 700; color: var(--pf-gold); line-height: 1.2; }
.pf-motto { margin-top: 5px; font-size: 14px; color: var(--pf-ink); }
.pf-resp { margin-top: 4px; font-size: 13px; color: var(--pf-muted); }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--pf-line); }
.pf-stats > div { padding: 12px 16px; border-left: 1px solid var(--pf-line); min-width: 0; }
.pf-stats > div:first-child { border-left: 0; }
.pf-stats dt { font-size: 12px; color: var(--pf-muted); }
.pf-stats dd { margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--pf-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* friends */
.pf-friends { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
.pf-friend { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--pf-cell); box-shadow: inset 0 0 0 1px transparent; }
.pf-friend:hover { box-shadow: inset 0 0 0 2px var(--pf-accent); }
.pf-friend.is-on { box-shadow: inset 0 0 0 2px #1fa34a; }
.pf-friend img { max-width: none; image-rendering: pixelated; opacity: .9; }
.pf-friend.is-on img { opacity: 1; }

/* groups */
.pf-groups { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
.pf-group { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 10px; background: var(--pf-cell); font-size: 13.5px; color: var(--pf-ink); }
.pf-group img { width: 30px; height: 30px; object-fit: contain; }
.pf-group:not(:has(img)) { padding-left: 12px; }

/* badges */
.pf-badges { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
.pf-badge { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; background: var(--pf-cell); }
.pf-badge.is-worn { box-shadow: inset 0 0 0 2px var(--pf-gold); }
.pf-badge img { max-width: 80%; max-height: 80%; image-rendering: pixelated; }

/* rooms */
.pf-room { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.pf-room + .pf-room { border-top: 1px solid var(--pf-line); }
.pf-room-pic { flex: none; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; background: var(--pf-cell); }
.pf-room-pic img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.pf-room-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pf-room-txt b { font-size: 15px; font-weight: 600; color: var(--pf-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-room-txt small { font-size: 13px; color: var(--pf-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-room-users { flex: none; min-width: 34px; padding: 2px 8px; border-radius: 6px; background: var(--pf-cell); box-shadow: inset 0 0 0 1px var(--pf-line); font-size: 12px; font-weight: 700; color: var(--pf-ink); text-align: center; }

@media (max-width: 1000px) { .pf { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-stats > div:nth-child(3) { border-left: 0; }
  .pf-stats > div:nth-child(n+3) { border-top: 1px solid var(--pf-line); }
  .pf-friends { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pf-badges { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
