:root {
  --personal-card: #ffffff;
}

body {
  margin: 0;
  background: var(--pf-bg);
}

/* 좌우 여백은 common.css의 공용 컨테이너 규칙(--pf-gutter)을 그대로 씁니다. */
/* 좌우 여백은 common.css의 --pf-gutter를 따르고, 최대 폭만 좁게 잡습니다. */
.personal-shell {
  max-width: calc(390px + var(--pf-gutter) * 2);
  padding-top: 8px;
  padding-bottom: 96px;
}

.profile-card,
.menu-group {
  background: var(--personal-card);
  border: 1px solid var(--pf-border);
  border-radius: 24px;
  box-shadow: var(--pf-shadow);
}

.profile-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pf-primary), var(--pf-accent));
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.profile-meta {
  min-width: 0;
}

.profile-meta h1 {
  margin: 2px 0 4px;
  font-size: 20px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-email {
  margin: 0;
  font-size: 13px;
  color: var(--pf-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-button {
  border: 1px solid var(--pf-border-strong);
  border-radius: 999px;
  background: var(--pf-primary-soft);
  color: var(--pf-primary-dark);
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.menu-group {
  padding: 12px 8px 6px;
  margin-bottom: 16px;
}

.menu-group h2 {
  margin: 2px 8px 8px;
  font-size: 15px;
  color: var(--pf-muted);
}

/*
 * 그룹 카드가 이미 테두리+그림자로 묶여 있으므로, 안쪽 행은 그림자 없이
 * 얇은 구분선으로만 나눕니다. 카드 안에 카드가 겹쳐 보이지 않게 하기 위함입니다.
 */
.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 10px;
  border: 0;
  border-top: 1px solid var(--pf-border);
  border-radius: 0;
  background: transparent;
  color: var(--pf-text);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

/* 그룹의 첫 행은 제목 바로 아래라 구분선이 필요 없습니다. */
.menu-group h2 + .menu-row {
  border-top: 0;
}

.menu-row:hover {
  background: var(--pf-primary-pale);
}

.menu-arrow {
  color: var(--pf-primary);
  font-size: 18px;
}

.activity-row { display: grid; grid-template-columns: 34px 1fr auto 18px; }
.menu-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: var(--pf-primary-soft); color: var(--pf-primary); font-size: 18px; }
.menu-label { min-width: 0; }
.menu-count { color: var(--pf-muted); font-size: 13px; font-weight: 800; }
.activity-detail { display: grid; gap: 7px; margin: 0 8px 8px 42px; padding: 8px; border-radius: 14px; background: var(--pf-primary-pale); }
.activity-empty { margin: 0; padding: 9px; color: var(--pf-muted); font-size: 13px; line-height: 1.5; }
.scrapped-item { display: grid; gap: 4px; min-height: 52px; padding: 10px; border-radius: 11px; background: #fff; color: var(--pf-text); text-decoration: none; }
.scrapped-item strong { font-size: 13px; }
.scrapped-item span { color: var(--pf-muted); font-size: 11px; }

@media (max-width: 480px) {
  .profile-card {
    grid-template-columns: 48px 1fr;
  }

  .profile-edit-button {
    grid-column: 2 / 3;
    justify-self: start;
    margin-top: 4px;
  }
}
