.profile-hero-compact {
  padding: 20px 22px 18px;
}

.profile-hero-compact .hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 370px);
  gap: 18px;
}

.profile-hero-compact .eyebrow {
  min-height: auto;
  padding: 0;
  font-size: 12px;
}

.profile-hero-compact .hero-title {
  margin: 6px 0 6px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.profile-hero-compact .hero-lead {
  margin: 0;
  max-width: none;
  font-size: 14px;
  line-height: 1.5;
}

.profile-hero-side-compact {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.stats-grid-single {
  grid-template-columns: 1fr;
}

.stat-card-compact {
  padding: 14px 18px;
  border-radius: 18px;
  min-height: auto;
}

.stat-card-compact p {
  font-size: 12px;
  line-height: 1.35;
}

.stat-card-compact .stat-value {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.05;
}

.profile-hero-actions {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.profile-hero-actions .btn {
  min-width: 0;
  white-space: nowrap;
  flex: 1 1 0;
  padding-left: 16px;
  padding-right: 16px;
}

.profile-basic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profile-basic-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e9edf5;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

.profile-basic-kpi-ring {
  --pct: 0%;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: conic-gradient(#5b63e6 0 var(--pct), #e5e7eb var(--pct) 100%);
  position: relative;
  flex: 0 0 68px;
}

.profile-basic-kpi-ring-inner {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px #eef2f7;
}

.profile-basic-kpi-ring-inner strong {
  font-size: 14px;
  line-height: 1;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.profile-basic-kpi-ring-inner span {
  margin-top: 4px;
  font-size: 9px;
  color: #64748b;
  font-weight: 700;
}

.profile-basic-kpi-text {
  min-width: 0;
  flex: 1 1 auto;
}

.profile-basic-kpi-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 800;
  line-height: 1.35;
  word-break: keep-all;
}

.profile-basic-kpi-value {
  margin-top: 4px;
  font-size: 15px;
  color: #111827;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.profile-basic-empty {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.profile-card.is-selected {
  border-color: #9d7bff;
  box-shadow: 0 20px 40px rgba(157,123,255,.16);
}

.fm-profiles-page {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.fm-profiles-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.22), transparent 28%),
    radial-gradient(circle at left bottom, rgba(125, 211, 252, 0.18), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #111827 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.fm-profiles-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.fm-profiles-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 22px;
  align-items: stretch;
}

.fm-profiles-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.fm-profiles-title {
  margin: 16px 0 12px;
  font-size: 44px;
  line-height: 1.16;
  letter-spacing: -0.04em;
  color: #fff;
}

.fm-profiles-lead {
  margin: 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.82;
  color: rgba(255, 255, 255, 0.9);
}

.fm-profiles-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.fm-profiles-submeta .badge-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.fm-profiles-hero-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fm-profiles-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.fm-profiles-stat-card,
.fm-profiles-info-card {
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.fm-profiles-stat-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.fm-profiles-stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #111827;
}

.fm-profiles-stat-card span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
}

.fm-profiles-info-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #111827;
}

.fm-profiles-info-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #475569;
}

.fm-profiles-cta-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.fm-profiles-cta-row .btn {
  min-height: 46px;
  border-radius: 16px;
  font-weight: 800;
}

.fm-profiles-section-card {
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e8eef7;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.fm-profiles-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.fm-profiles-card-head .card-sub {
  margin: 0;
}

.fm-profiles-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fm-profiles-profile-card {
  border-radius: 26px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fm-profiles-profile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.fm-profiles-profile-card.is-selected {
  border-color: #c7d2fe;
  box-shadow: 0 18px 42px rgba(79, 70, 229, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.fm-profiles-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fm-profiles-profile-title {
  margin: 14px 0 10px;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #111827;
}

.fm-profiles-meta-tight {
  margin-top: 8px;
}

.fm-profiles-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.fm-profile-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.fm-profile-kpi-ring {
  --size: 78px;
  --thickness: 8px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(#5b63e6 var(--pct), #e5e7eb 0);
  display: grid;
  place-items: center;
  flex: 0 0 var(--size);
}

.fm-profile-kpi-ring-inner {
  width: calc(var(--size) - (var(--thickness) * 2));
  height: calc(var(--size) - (var(--thickness) * 2));
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  text-align: center;
}

.fm-profile-kpi-ring-inner strong {
  font-size: 15px;
  color: #111827;
  letter-spacing: -0.03em;
}

.fm-profile-kpi-ring-inner span {
  margin-top: 4px;
  font-size: 9px;
  color: #64748b;
  font-weight: 700;
}

.fm-profile-kpi-text {
  min-width: 0;
}

.fm-profile-kpi-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.fm-profile-kpi-value {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
  color: #111827;
  font-weight: 700;
  word-break: keep-all;
}

.fm-profiles-empty-inline {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  border: 1px dashed #dbe4ef;
}

.fm-profiles-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.fm-profiles-actions .btn,
.fm-profiles-cta-row .btn,
.fm-profiles-empty-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fm-profiles-actions .btn {
  min-height: 40px;
  border-radius: 14px;
  font-weight: 800;
}

.fm-profiles-actions .btn.is-disabled,
.fm-profiles-actions .btn:disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.fm-profiles-empty-card {
  border-radius: 26px;
  padding: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px dashed #dbe4ef;
  text-align: center;
}

.fm-profiles-empty-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: #111827;
}

.fm-profiles-empty-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: #475569;
}

.fm-profiles-empty-card .card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.fm-btn-emoji,
.fm-chip-emoji,
.fm-inline-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
}

.fm-btn-emoji {
  width: 24px;
  height: 24px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 14px rgba(15,23,42,.08);
}

.fm-chip-emoji {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 10px rgba(15,23,42,.08);
}

.fm-inline-emoji {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 5px 12px rgba(15,23,42,.08);
}

.fm-btn-emoji.is-pink,
.fm-chip-emoji.is-pink,
.fm-inline-emoji.is-pink {
  background: linear-gradient(135deg, #fda4af 0%, #fb7185 100%);
}

.fm-btn-emoji.is-sky,
.fm-chip-emoji.is-sky,
.fm-inline-emoji.is-sky {
  background: linear-gradient(135deg, #7dd3fc 0%, #60a5fa 100%);
}

.fm-btn-emoji.is-violet,
.fm-chip-emoji.is-violet,
.fm-inline-emoji.is-violet {
  background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
}

.fm-btn-emoji.is-amber,
.fm-chip-emoji.is-amber,
.fm-inline-emoji.is-amber {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
}

.fm-btn-emoji.is-emerald,
.fm-chip-emoji.is-emerald,
.fm-inline-emoji.is-emerald {
  background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
}

.fm-btn-emoji.is-rose,
.fm-chip-emoji.is-rose,
.fm-inline-emoji.is-rose {
  background: linear-gradient(135deg, #fda4af 0%, #f43f5e 100%);
}

.fm-btn-emoji.is-slate,
.fm-chip-emoji.is-slate,
.fm-inline-emoji.is-slate {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
}

@media (max-width: 980px) {
  .profile-hero-compact .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .profile-hero-side-compact {
    max-width: 420px;
    margin-left: auto;
    width: 100%;
  }

  .profile-hero-actions {
    justify-content: flex-start;
  }

  .fm-profiles-hero-grid,
  .fm-profiles-profile-grid,
  .fm-profiles-kpi-grid {
    grid-template-columns: 1fr;
  }

  .fm-profiles-title {
    font-size: 36px;
  }
}

@media (max-width: 640px) {
  .profile-hero-compact {
    padding: 18px 18px 16px;
  }

  .profile-hero-compact .hero-title {
    margin: 6px 0 6px;
    font-size: 28px;
    line-height: 1.14;
  }

  .profile-hero-compact .hero-lead {
    font-size: 13px;
    line-height: 1.5;
  }

  .profile-hero-side-compact {
    max-width: none;
    margin-left: 0;
  }

  .profile-hero-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .profile-hero-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 14px;
  }

  .profile-basic-grid {
    grid-template-columns: 1fr;
  }

  .fm-profiles-hero,
  .fm-profiles-section-card,
  .fm-profiles-empty-card {
    padding: 22px;
    border-radius: 24px;
  }

  .fm-profiles-title {
    font-size: 30px;
    line-height: 1.18;
  }

  .fm-profiles-card-head,
  .fm-profiles-empty-card .card-actions,
  .fm-profiles-cta-row,
  .fm-profiles-actions {
    flex-direction: column;
  }

  .fm-profiles-card-head .card-actions,
  .fm-profiles-empty-card .btn,
  .fm-profiles-cta-row .btn,
  .fm-profiles-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
/* 공개 프로필 공유 버튼 */
.fm-profiles-actions form[action="/profile/share"] .btn {
  border-color: rgba(167, 139, 250, .38);
  background: linear-gradient(135deg, #fff, #f8f7ff);
}

.fm-profiles-actions form[action="/profile/share"] .btn:hover,
.fm-profiles-actions a[href^="/p/"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(124, 58, 237, .12);
}
