/* The character's full profile (views/character-profile.js): portrait, a few
   facts, the description, and the pictures made of them. */

.profile-dialog { width: min(640px, 94vw); }

.cp-top { display: flex; gap: 20px; align-items: flex-start; }
.cp-portrait {
  position: relative; flex: 0 0 150px; width: 150px; aspect-ratio: 1 / 1; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--panel2); border: 1px solid var(--border);
}
.cp-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-portrait .initial {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-size: 56px; color: var(--faint); user-select: none;
}
.cp-facts { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-content: start; font-size: 15px; padding-top: 4px; }
.cp-facts dt { color: var(--muted); font-size: 14px; }
.cp-facts dd { overflow-wrap: anywhere; text-transform: capitalize; }

.desc-modal-body { max-height: 40vh; overflow-y: auto; font-size: 15px; line-height: 1.65; color: var(--text); }
.desc-modal-body > :first-child { margin-top: 0; }
.desc-modal-body > :last-child { margin-bottom: 0; }
.desc-modal-body p { margin: 0 0 12px; }
.desc-modal-body a { color: var(--accent-text); }

.cp-gallery-head { border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.cp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--sp-2); max-height: 260px; overflow-y: auto; }
.cp-gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--border); }
.cp-gallery .hint { grid-column: 1 / -1; }

@media (max-width: 520px) { .cp-top { flex-direction: column; } }
