/* Public member profile (/profile?u=<public_id>).
   Sign-in gated, noindex. Lightweight identity card + segmented tabs
   (Saved | Trophies | Friends) + locked panels + read-only trophy tiles.
   Theme tokens mirror the other public pages (support/account). */
:root { --navy: #101530; --cream: #FAFAF8; --border: #E8E8E4; --ink: #1A1A1A; --ink-faint: #999; }
* { box-sizing: border-box; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--cream); color: var(--ink); margin: 0; }

.pf.content { max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; }
.pf h1 { font-family: 'DM Sans', sans-serif; font-size: 26px; font-weight: 800; color: var(--navy); margin: 0 0 8px; }

.pf-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; margin: 0 0 16px; }

/* Signed-out prompt + not-found */
.pf-signin, .pf-notfound { text-align: center; }
.pf-signin p, .pf-notfound p { font-size: 15px; color: #444; line-height: 1.6; margin: 0 0 16px; }

.pf-loading { text-align: center; color: var(--ink-faint); font-size: 15px; padding: 48px 0; }

/* Buttons */
.pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border: 1px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.pf-btn-primary { background: #101530; border-color: #101530; color: #fff; }
.pf-btn-primary:hover { background: #03306f; }
.pf-btn:disabled { opacity: .55; cursor: default; }
.pf-add.is-friend { background: #fff; color: var(--navy); border-color: var(--border); opacity: 1; }

/* Identity card */
.pf-id-top { display: flex; align-items: flex-start; gap: 18px; }
.pf-avatar { position: relative; width: 76px; height: 76px; flex: 0 0 auto; border-radius: 18px; background: #101530; overflow: hidden; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-avatar-initial { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #fff; font-family: 'DM Sans', sans-serif; font-size: 30px; font-weight: 800; }
.pf-id-text { min-width: 0; flex: 1 1 auto; }
.pf-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pf-name { font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.pf-persona { font-size: 12px; font-weight: 600; color: #6b7280; background: #f1f2f4; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pf-headline { font-size: 15px; color: #444; margin-top: 4px; overflow-wrap: anywhere; }
.pf-meta { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }
.pf-about { font-size: 15px; color: #444; line-height: 1.6; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); overflow-wrap: anywhere; white-space: pre-wrap; }
.pf-add { flex: 0 0 auto; align-self: flex-start; }

/* Tabs */
.pf-tabs-card { padding: 8px 12px 20px; }
.pf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 -12px 18px; padding: 0 12px; }
.pf-tab { position: relative; background: none; border: 0; padding: 12px 10px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--ink-faint); cursor: pointer; }
.pf-tab.is-active { color: var(--navy); }
.pf-tab.is-active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: #ecaf18; border-radius: 2px; }
.pf-tab-n { font-size: 12px; font-weight: 600; color: var(--ink-faint); margin-left: 3px; }

.pf-panel { min-height: 60px; }
.pf-empty { color: var(--ink-faint); font-size: 14px; padding: 22px 4px; text-align: center; }

/* Locked panels */
.pf-locked { text-align: center; padding: 30px 16px; }
.pf-locked-title { font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; color: var(--navy); }
.pf-locked-body { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }

/* Saved — restaurant / market cards like the site list */
.pf-saved-group { margin-bottom: 20px; }
.pf-saved-head { font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #7b8590; margin-bottom: 10px; }
.pf-rlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pf-rc { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-decoration: none; color: inherit; transition: border-color .12s, box-shadow .12s, transform .12s; }
a.pf-rc:hover { border-color: #d9d2c2; box-shadow: 0 4px 14px rgba(1,31,73,.07); transform: translateY(-1px); }
.pf-rc-photo { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 10px; background: #eceae4 center/cover no-repeat; }
.pf-rc-photo-none { background: linear-gradient(135deg, #eef1f5, #dfe4ea); }
.pf-rc-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-rc-name { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-rc-meta { font-size: 12px; color: #7b8590; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Trophies (read-only tiles with a glyph badge) */
.pf-trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.pf-trophy { display: flex; flex-direction: column; align-items: center; text-align: center; border: 1px solid var(--border); border-radius: 14px; padding: 16px 12px; background: #fff; }
.pf-trophy-badge { width: 52px; height: 52px; margin-bottom: 8px; }
.pf-trophy-badge .oe-tbadge { width: 100%; height: 100%; display: block; }
.pf-trophy-name { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 800; color: var(--navy); }
.pf-trophy-blurb { font-size: 11.5px; color: #667; line-height: 1.45; margin-top: 4px; }
.pf-trophy-earned { font-size: 11px; color: var(--ink-faint); margin-top: 8px; }

/* Friends (self-only) — liquid avatar grid */
.pf-friends { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
.pf-friend { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px 6px; border-radius: 12px; text-decoration: none; color: inherit; }
.pf-friend:hover { background: #f6f6f4; }
.pf-friend-av { position: relative; width: 60px; height: 60px; border-radius: 16px; flex: 0 0 auto; background: #101530; overflow: hidden; }
.pf-friend-av-ini { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: 22px; }
.pf-friend-av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-friend-text { min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 1px; }
.pf-friend-name { font-size: 13px; font-weight: 600; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-friend-persona { font-size: 11px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Footer actions */
.pf-foot { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 8px; }
.pf-linkbtn { background: none; border: 0; padding: 6px 4px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.pf-report { color: #c0392b; }
.pf-unfriend { color: #7b8590; }

@media (max-width: 560px) {
  .pf.content { padding: 28px 16px 60px; }
  .pf-card { padding: 18px 16px; }
  .pf-id-top { gap: 14px; flex-wrap: wrap; }
  .pf-add { width: 100%; margin-top: 4px; }
}

/* ═══ Account-style treatment (navy profile header) ═══════════════════════════
   Match /account: cream ground, a navy gradient identity banner (white name,
   translucent persona chip, gold Add-Friend, ringed avatar), warm card lines,
   squared brand buttons, Playfair headings. */
body { background: #f7f2e9; }
.pf h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.pf-card { border-color: #e4ddcf; box-shadow: 0 4px 14px rgba(15,44,64,.06); }
/* Squared brand buttons (were fully-round pills). */
.pf-btn { border-radius: 8px; }
/* .pf-btn sets display:inline-flex, which overrides the UA [hidden] rule — so a
   button JS hides (e.g. Add-Friend on your OWN profile) would still render as an
   empty pill. Restore hiding. */
.pf-btn[hidden] { display: none !important; }
.pf-btn-primary { text-transform: uppercase; letter-spacing: .04em; }

/* Identity card → navy profile banner (the account hero treatment). */
.pf-id {
  background: linear-gradient(135deg, #101530 0%, #223059 100%);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(15,44,64,.20);
}
.pf-id .pf-avatar {
  background: #26345c;
  box-shadow: 0 0 0 3px rgba(255,255,255,.22), 0 8px 20px rgba(0,0,0,.40);
}
.pf-id .pf-name { color: #fff; }
.pf-id .pf-persona { background: rgba(255,255,255,.15); color: #fff; }
.pf-id .pf-headline { color: rgba(255,255,255,.82); }
.pf-id .pf-meta { color: rgba(255,255,255,.60); }
.pf-id .pf-about { color: rgba(255,255,255,.82); border-top-color: rgba(255,255,255,.16); }
/* Add-friend goes gold on the banner so it stands out; the "Friends"/requested
   state is a quiet translucent-white outline. */
.pf-id .pf-btn-primary { background: #ecaf18; border-color: #ecaf18; color: #101530; }
.pf-id .pf-btn-primary:hover { background: #f4c542; border-color: #f4c542; }
.pf-id .pf-add.is-friend { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.40); color: #fff; }
