/*
 * Profile page (/profile). Uses base.css tokens only: no new palette, no new font.
 * Direction: subject = the NFT that stands for you; audience = a wallet holder; one job = pick or remove that picture;
 * mood = plain, exact, calm; signature moment = the chosen NFT sitting in the same round frame every Hartii site draws.
 * Every picture in the grid shares ONE square wrapper (same rendered size, object-fit: cover, fallback inside the wrapper).
 */
.pf [hidden] { display: none !important; } /* .btn and the grid set display, which would otherwise beat the hidden attribute */
.nav-inner { flex-wrap: nowrap; }
.pf-nav-links { align-items: center; flex-wrap: nowrap; }
@media (max-width: 760px) {
  /* wallet.css hides .nav-links on phones; here it holds the wallet chip, so it stays */
  .nav .nav-links.pf-nav-links { display: flex; gap: 4px; }
  .nav .nav-links.pf-nav-links a { padding: 8px; }
}

.pf-head { padding-block: clamp(36px, 6vw, 64px) clamp(16px, 2.4vw, 26px); }
.pf-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.pf-head .lede { max-width: 60ch; }

.pf-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 3vw, 28px); align-items: center;
  padding: clamp(16px, 3vw, 26px); border: 1px solid var(--line-2); border-radius: var(--r);
  background: linear-gradient(160deg, rgba(25, 17, 19, .92), rgba(11, 7, 8, .8));
}
.pf-av { width: 96px; height: 96px; display: grid; place-items: center; }
.pf-name { font: 700 clamp(1.15rem, 2.6vw, 1.5rem)/1.2 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.pf-facts { display: grid; gap: 6px; margin: 12px 0 0; }
.pf-facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; align-items: baseline; }
.pf-facts dt { font-size: 12px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; }
.pf-facts dd { margin: 0; font-size: 14px; color: var(--fg); overflow-wrap: anywhere; }
.pf-facts dd.mono { font-size: 12.5px; color: var(--fg-2); }
.pf-links { margin-top: 12px; font-size: 13px; }
.pf-links a { color: var(--fg-2); }
.pf-links a:hover { color: var(--fg); }

.pf-status {
  margin-top: 18px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03); color: var(--fg-2); font-size: 14px;
}
.pf-status[data-kind="ok"] { border-color: color-mix(in srgb, var(--ok) 55%, transparent); color: var(--fg); }
.pf-status[data-kind="warn"] { border-color: color-mix(in srgb, var(--warn) 60%, transparent); color: var(--fg); }
.pf-status[data-kind="error"] { border-color: color-mix(in srgb, var(--red-hi) 70%, transparent); color: var(--fg); }
.pf-status[data-kind="busy"] { border-color: var(--line-2); color: var(--fg); }
.pf-status .btn { margin-left: 10px; padding: 8px 12px; font-size: 13px; }
.pf-status a { color: var(--fg); }

.pf-connect, .pf-pick { margin-top: clamp(22px, 4vw, 36px); }
.pf-connect h2, .pf-pick h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.pf-connect p { color: var(--fg-2); max-width: 60ch; margin: 10px 0 16px; }
.pf-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-note { color: var(--fg-3); font-size: 13px; line-height: 1.6; max-width: 70ch; margin: 8px 0 18px; }

.pf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.pf-nft { min-width: 0; }
.pf-nft-btn {
  display: block; width: 100%; text-align: left; padding: 8px; cursor: pointer; font: inherit; color: inherit;
  border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .02);
  transition: border-color .18s, background .18s, transform .16s cubic-bezier(.3, 0, .2, 1);
}
.pf-nft-btn:hover:not(:disabled) { border-color: var(--red-hi); background: rgba(255, 255, 255, .045); transform: translateY(-1px); }
.pf-nft-btn:disabled { cursor: wait; opacity: .6; }
.pf-nft[data-current="true"] .pf-nft-btn { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.pf-nft-art {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden;
  background: var(--ink-800);
}
.pf-nft-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-nft-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.1rem/1 var(--mono); color: rgba(255, 255, 255, .88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5); overflow: hidden; padding: 6px;
}
.pf-nft-name { display: block; margin-top: 8px; font-size: 13px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-nft-coll { display: block; margin-top: 2px; font-size: 11.5px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.2em; }
.pf-nft-tag { display: block; margin-top: 6px; font: 500 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--red-hi); min-height: 1em; }
.pf-more { margin-top: 18px; text-align: center; }

@media (max-width: 520px) {
  .pf-card { grid-template-columns: 1fr; justify-items: start; }
  .pf-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
