/* จัดวางหน้า "ตัวฉัน" ใหม่ (23 ต.ค. 2569 · taste-skill) · เจ้าของระบบ: ใช้สีและเนื้อหาเดิม ปรับเฉพาะการจัดวาง
   - ความกว้างเท่าหน้าแรก (1240px)
   - จอกว้าง (≥1000px): คอลัมน์ซ้าย = บัตรโปรไฟล์ + แท็บแนวตั้ง (ติดอยู่กับที่) · คอลัมน์ขวา = เนื้อหาของแท็บ
   - มือถือ: บัตรโปรไฟล์กระชับ รูป ชื่อ และปุ่มแก้ไข/สิทธิ PDPA อยู่แถวเดียว เนื้อหาแท็บขึ้นสูงขึ้น */

.healthy-formal #member { width: min(1240px, 100%) !important; }

/* บัตรโปรไฟล์: รูป + ชื่อ ซ้าย · ปุ่มขวา แถวเดียว */
.healthy-formal #member .member-card { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.healthy-formal #member .member-card > .member-profile-actions { margin: 0 !important; padding-inline-start: 0 !important; }
.healthy-formal #member .member-card > :not(.profile-row):not(.member-profile-actions) { grid-column: 1 / -1; }

@media (max-width: 999px) {
  .healthy-formal #member .member-card { padding: 14px 16px !important; }
  .healthy-formal #member .profile-avatar { width: 56px !important; height: 56px !important; flex-basis: 56px !important; }
  .healthy-formal #member .profile-copy { min-width: 0; }
  .healthy-formal #member .profile-copy :is(strong, p) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .healthy-formal #member .member-profile-actions { display: flex !important; gap: 8px !important; }
  .healthy-formal #member .member-tabs { margin: 0 !important; }
}

@media (min-width: 1000px) {
  .healthy-formal #member { grid-template-columns: 320px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 24px !important; align-items: start; padding-inline: 32px !important; }
  .healthy-formal #member > .member-intro { grid-column: 1 / -1; }
  .healthy-formal #member > .member-card { grid-column: 1; grid-row: 2; grid-template-columns: minmax(0, 1fr); }
  .healthy-formal #member > .member-card .member-profile-actions { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; }
  .healthy-formal #member > .member-card > .member-profile-actions { width: 100% !important; }
  .healthy-formal #member > .member-card > .member-profile-actions > :is(#editProfileBtn, #pdpaRightsBtn) { width: 100% !important; justify-content: center !important; }
  .healthy-formal #member > .member-tabs {
    grid-column: 1; grid-row: 3; align-self: start; position: sticky; top: calc(var(--top-h, 12px) + var(--safe-top, 0px) + 16px);
    display: flex !important; flex-direction: column; gap: 4px; margin: 0 !important;
  }
  .healthy-formal #member > .member-tabs .member-tab { justify-content: flex-start !important; padding: 10px 16px !important; min-height: 52px; }
  .healthy-formal #member > .member-tab-panel { grid-column: 2; grid-row: 2 / -1; min-width: 0; }
  .healthy-formal #member > .member-tab-panel > :first-child,
  .healthy-formal #member > .member-tab-panel > [hidden]:first-child + * { margin-top: 0 !important; }
}
