/* Cozy Tree: the profile card (item 9, CONTRACT.md b): a nickname in the serif face, one line below, no box.
   Two places, both only on someone else's tree (js/ui/profile.js):
   - #profile-card: small on the tree view, under the icon row, while the letter sheet is folded away
   - .pf-in-sheet: one small line inside the story sheet, between the story and its buttons */

/* the account sheet: the two fields */
.dt-ui .pf-form{display:flex;flex-direction:column;gap:6px;margin:10px 0 0}
.dt-ui .pf-form .pf-nick{font-family:var(--dt-serif);font-size:19px}

/* the words of the card, in both places */
.pf-card p{margin:0}
.pf-nick-text{font-family:"Instrument Serif",Georgia,serif;font-size:19px;line-height:1.2;letter-spacing:.005em;overflow-wrap:anywhere}
.pf-intro-text{margin-top:2px;font-size:13.5px;line-height:1.45;overflow-wrap:anywhere;word-break:keep-all}
.pf-card .pf-report{font-size:12px;min-height:36px;opacity:.7}
.pf-card .pf-report:hover{opacity:1}

/* the tree view: where the sheet would unfold, small, with the page's halo for any background */
#profile-card.pf-card{
  position:absolute;z-index:2;pointer-events:auto;box-sizing:border-box;
  left:max(22px,env(safe-area-inset-left));top:var(--left-top);
  max-width:260px;color:var(--ink);text-shadow:var(--halo);
  animation:pf-in .5s cubic-bezier(.2,.8,.2,1) both;
}
#profile-card[hidden]{display:none}
#profile-card .pf-intro-text{opacity:.86}
/* the sheet is open (story, letter or writing): the card on the tree view steps back */
:root:has(#overlay .sheet:not([hidden])) #profile-card{display:none}
/* the own tree never shows it */
:root[data-view="mine"] #profile-card{display:none}

/* inside the story sheet: paper ink, a thin line above, only for the story */
.pf-in-sheet{margin:10px 0 0;padding-top:8px;color:var(--paper-ink);
  background:linear-gradient(var(--paper-soft),var(--paper-soft)) 0 0 / 22px 1px no-repeat}
.pf-in-sheet[hidden],.sheet:not([data-kind="story"]) .pf-in-sheet{display:none}
.pf-in-sheet .pf-nick-text{font-size:17px}
.pf-in-sheet .pf-intro-text{color:var(--paper-soft);font-size:13px}
.sheet .pf-in-sheet .pf-report{color:var(--paper-ink);text-shadow:none}

@media (max-width:899px){
  #profile-card.pf-card{left:max(16px,env(safe-area-inset-left));right:calc(max(16px,env(safe-area-inset-right)) + 56px);max-width:calc(50% - 30px)}
  .pf-nick-text{font-size:17px}
}
@keyframes pf-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#profile-card.pf-card{animation:none}}
