/* Модальное окно «Личный профиль» */
#game-viz-profile-modal.nakama-modal {
  align-items: center;
  padding: 16px;
}

body.gv-mobile-ui #game-viz-profile-modal.nakama-modal,
@media (max-width: 480px) {
  #game-viz-profile-modal.nakama-modal {
    align-items: center;
    padding: 12px;
  }
}

#game-viz-profile-modal .profile-modal__panel {
  max-width: min(400px, calc(100vw - 24px));
  width: 100%;
  box-sizing: border-box;
  padding: 20px 18px 22px;
}

.profile-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding-right: 28px;
}

.profile-modal-head > i {
  font-size: 1.35rem;
  color: var(--gv-gold, #d4a84b);
  margin-top: 2px;
}

.profile-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gv-gold, #d4a84b);
  line-height: 1.25;
}

.profile-modal-head p {
  margin: 4px 0 0;
  font-size: 0.7rem;
  color: rgba(244, 228, 193, 0.55);
  font-family: system-ui, sans-serif;
}

.character-class-extra {
  font-family: system-ui, sans-serif;
}

.character-class-extra p {
  margin: 0;
}

#class-detail .profile-hero-card {
  border: none;
  padding: 0;
  background: transparent;
}

#class-detail .profile-stats-grid {
  margin-top: 12px;
  padding-top: 12px;
}

.profile-hero-card {
  border: 1px solid rgba(212, 168, 75, 0.28);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(
    145deg,
    rgba(42, 34, 24, 0.55) 0%,
    rgba(20, 16, 12, 0.85) 100%
  );
}

.profile-card-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  align-items: start;
}

.profile-portrait {
  width: 4.25rem;
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid rgba(212, 168, 75, 0.4);
  background: linear-gradient(
    180deg,
    rgba(42, 34, 24, 0.95) 0%,
    rgba(20, 16, 12, 1) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.45);
}

.profile-portrait i {
  font-size: 2rem;
  color: rgba(212, 168, 75, 0.55);
}

.profile-portrait i.class-icon {
  font-size: 1.75rem;
}

.profile-identity {
  min-width: 0;
  font-family: system-ui, sans-serif;
}

.profile-identity h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gv-ink, #f5e6c8);
  line-height: 1.25;
  word-break: break-word;
}

.profile-identity .profile-role {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--gv-ink-55, rgba(244, 228, 193, 0.65));
  line-height: 1.35;
}

.profile-identity .profile-hint {
  margin: 8px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(251, 191, 36, 0.85);
}

.profile-meta-inline {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--gv-ink-55, rgba(244, 228, 193, 0.65));
  line-height: 1.5;
}

.profile-meta-inline .label {
  color: var(--gv-ink-50, rgba(244, 228, 193, 0.45));
}

.profile-meta-inline .value-gold {
  color: var(--gv-gold, #d4a84b);
  font-weight: 600;
}

.profile-meta-inline .value-stat {
  color: #fcd34d;
  font-weight: 600;
  font-size: 1rem;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 168, 75, 0.15);
  font-family: system-ui, sans-serif;
}

.profile-stat-cell {
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(212, 168, 75, 0.12);
  min-width: 0;
}

.profile-stat-cell span {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gv-ink-50, rgba(244, 228, 193, 0.45));
  margin-bottom: 4px;
}

.profile-stat-cell strong {
  display: block;
  font-size: 0.95rem;
  color: var(--gv-gold, #d4a84b);
  font-weight: 600;
  word-break: break-word;
}

.profile-stat-cell strong.text-coins {
  color: #fcd34d;
}

body.gv-mobile-ui #game-viz-profile-modal .profile-modal__panel,
@media (max-width: 480px) {
  #game-viz-profile-modal .profile-modal__panel {
    max-width: 100%;
    margin: 0 auto;
  }

  .profile-portrait {
    width: 3.75rem;
  }

  .profile-identity h3 {
    font-size: 1.05rem;
  }

  .profile-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
