.ph-member-page { min-height: 100vh; background: #f8fafc; color: var(--ph-navy, #0a1c37); }
.ph-member-page[data-page="signin"],
.ph-member-page[data-page="signup"] { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.ph-member-page[data-page="signin"] #header-mount,
.ph-member-page[data-page="signin"] #footer-mount,
.ph-member-page[data-page="signup"] #header-mount,
.ph-member-page[data-page="signup"] #footer-mount { flex: 0 0 auto; }
.ph-member-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 84px; }
.ph-member-heading { margin-bottom: 28px; }
.ph-member-eyebrow { margin-bottom: 7px; color: var(--ph-blue, #168bd2); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ph-member-heading h1 { margin: 0; color: var(--ph-navy, #0a1c37); font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.035em; }
.ph-member-heading p { max-width: 680px; margin: 8px 0 0; color: var(--ph-text-secondary, #68758a); font-size: 15px; line-height: 1.65; }
.ph-member-loading,
.ph-member-empty { padding: 70px 24px; border: 1px solid var(--ph-border, #dce3ea); border-radius: 16px; background: #fff; color: var(--ph-text-secondary, #68758a); text-align: center; }
.ph-member-empty h2 { margin: 0 0 8px; color: var(--ph-navy, #0a1c37); font-size: 22px; font-weight: 600; }
.ph-member-empty p { margin: 0 auto 22px; max-width: 500px; line-height: 1.6; }
.ph-member-primary,
.ph-member-secondary,
.ph-member-danger {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 21px;
  border-radius: 9999px;
  font: 500 14px/1 "Poppins", sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.ph-member-primary { border: 1px solid var(--ph-blue, #168bd2); background: var(--ph-blue, #168bd2); color: #fff; }
.ph-member-secondary { border: 1px solid var(--ph-border, #dce3ea); background: #fff; color: var(--ph-navy, #0a1c37); }
.ph-member-danger { border: 1px solid #fecaca; background: #fff; color: #b91c1c; }
.ph-member-primary:hover,
.ph-member-secondary:hover,
.ph-member-danger:hover { transform: translateY(-1px); text-decoration: none; }
.ph-member-primary:disabled,
.ph-member-secondary:disabled,
.ph-member-danger:disabled { cursor: default; opacity: .55; transform: none; }
.ph-favorites-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ph-favorite-card { position: relative; overflow: hidden; border: 1px solid var(--ph-border, #dce3ea); border-radius: var(--ph-radius-card, 14px); background: #fff; box-shadow: 0 8px 24px rgba(10,28,55,.055); }
.ph-favorite-image { height: 210px; display: grid; place-items: center; padding: 22px; background: var(--ph-surface, #f7f9fb); }
.ph-favorite-image { position: relative; text-decoration: none; }
.ph-favorite-image img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ph-favorite-image .ph-favorite-retailer { position: absolute; right: 14px; bottom: 10px; left: 14px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.ph-favorite-placeholder { color: #a0a9b6; }
.ph-favorite-placeholder svg { width: 26px; height: 26px; }
.ph-favorite-copy { min-height: 210px; display: flex; flex-direction: column; padding: 18px; }
.ph-favorite-retailer { color: var(--ph-text-secondary, #68758a); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ph-favorite-title { display: -webkit-box; margin-top: 8px; overflow: hidden; color: var(--ph-navy, #0a1c37); font-size: 15px; font-weight: 600; line-height: 1.45; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.ph-favorite-price { margin-top: auto; padding-top: 20px; color: var(--ph-navy, #0a1c37); font-size: 21px; font-weight: 700; }
.ph-favorite-price-line { min-height: 31px; display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px; }
.ph-favorite-price-line > span { padding: 5px 9px; border-radius: 999px; background: #e7f8ec; color: #17844c; font-size: 11px; font-weight: 700; }
.ph-favorite-price-line strong { font: 800 20px "Plus Jakarta Sans", sans-serif; }
.ph-favorite-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 13px; }
.ph-favorite-actions { grid-template-columns: 1fr auto auto; }
.ph-favorite-actions .ph-member-primary { min-height: 42px; padding: 0 16px; }
.ph-favorite-remove { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ph-border, #dce3ea); border-radius: 50%; background: #fff; color: #64748b; cursor: pointer; }
.ph-favorite-list { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ph-border, #dce3ea); border-radius: 50%; background: #fff; color: #64748b; cursor: pointer; }
.ph-favorite-list.is-active { border-color: #cfe0ff; background: #eaf2ff; color: var(--ph-signature-blue, #1368ff); }
.ph-favorite-list svg, .ph-favorite-remove svg { width: 17px; height: 17px; }
.ph-favorite-remove:hover { border-color: #fecaca; color: #dc2626; }
.ph-account-profile { display: flex; align-items: center; gap: 20px; padding: 24px; border: 1px solid var(--ph-border, #dce3ea); border-radius: 16px; background: #fff; }
.ph-account-avatar-button { position: relative; width: 82px; height: 82px; flex: 0 0 82px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--ph-border, #dce3ea); border-radius: 50%; background: var(--ph-surface, #f7f9fb); color: var(--ph-navy, #0a1c37); font: 600 24px "Poppins", sans-serif; cursor: pointer; }
.ph-account-avatar-button img { width: 100%; height: 100%; object-fit: cover; }
.ph-account-avatar-button::after { content: "Edit"; position: absolute; inset: auto 0 0; padding: 4px; background: rgba(10,28,55,.72); color: #fff; font-size: 9px; font-weight: 500; }
.ph-account-profile-copy { min-width: 0; flex: 1; }
.ph-account-profile-copy h2 { margin: 0; overflow: hidden; color: var(--ph-navy, #0a1c37); font-size: 21px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ph-account-profile-copy p { margin: 4px 0 0; overflow: hidden; color: var(--ph-text-secondary, #68758a); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ph-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.ph-account-card { padding: 25px; border: 1px solid var(--ph-border, #dce3ea); border-radius: 16px; background: #fff; }
.ph-account-card.is-wide { grid-column: 1 / -1; }
.ph-account-card h2 { margin: 0 0 5px; color: var(--ph-navy, #0a1c37); font-size: 19px; font-weight: 600; }
.ph-account-card > p { margin: 0 0 21px; color: var(--ph-text-secondary, #68758a); font-size: 13px; line-height: 1.55; }
.ph-account-fields { display: grid; gap: 14px; }
.ph-account-field { display: grid; gap: 6px; }
.ph-account-field label { color: #516074; font-size: 12px; font-weight: 500; }
.ph-account-input,
.ph-account-select { width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid var(--ph-border, #dce3ea); border-radius: 9999px; background: var(--ph-surface, #f7f9fb); color: var(--ph-navy, #0a1c37); font: 400 14px "Poppins", sans-serif; outline: none; }
.ph-account-input:focus,
.ph-account-select:focus { border-color: var(--ph-blue, #168bd2); background: #fff; box-shadow: 0 0 0 3px rgba(22,139,210,.13); }
.ph-account-input[readonly] { color: var(--ph-text-secondary, #68758a); cursor: default; }
.ph-account-toggle { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 4px; color: var(--ph-navy, #0a1c37); font-size: 13px; }
.ph-account-toggle input { width: 20px; height: 20px; accent-color: var(--ph-blue, #168bd2); }
.ph-account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ph-account-message { min-height: 18px; margin-top: 12px; color: var(--ph-text-secondary, #68758a); font-size: 12px; }
.ph-account-preference-group { margin-top: 20px; }
.ph-account-preference-group > strong { display: block; margin-bottom: 9px; color: #526176; font-size: 12px; }
.ph-account-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-account-choice { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid var(--ph-border, #dce3ea); border-radius: 999px; background: #fff; color: #5a687c; font: 600 12px "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.ph-account-choice svg { width: 15px; height: 15px; }
.ph-account-choice[aria-pressed="true"] { border-color: var(--ph-signature-blue, #1368ff); background: var(--ph-signature-blue, #1368ff); color: #fff; }
.ph-account-danger { border-color: #fecaca; background: #fffafa; }
.ph-auth-shell { width: min(440px, calc(100% - 32px)); min-height: 560px; flex: 1 0 auto; display: grid; place-items: center; margin: 0 auto; padding: 64px 0; }
.ph-auth-shell .ph-auth-card-public { width: 100%; }
.ph-auth-card-public { padding: 34px; border: 1px solid var(--ph-border, #dce3ea); border-radius: 16px; background: #fff; box-shadow: 0 16px 46px rgba(10,28,55,.09); }
.ph-auth-card-public h1 { margin: 0; color: var(--ph-navy, #0a1c37); font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.ph-auth-card-public > p { margin: 7px 0 24px; color: var(--ph-text-secondary, #68758a); font-size: 13px; line-height: 1.6; }
.ph-auth-form-public { display: grid; gap: 12px; }
.ph-auth-form-public .ph-member-primary { width: 100%; margin-top: 4px; }
.ph-auth-switch { margin: 19px 0 0; color: var(--ph-text-secondary, #68758a); font-size: 13px; text-align: center; }
.ph-auth-switch a { color: var(--ph-blue, #168bd2); font-weight: 400; text-decoration: none; }
.ph-auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .ph-favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ph-member-shell { width: min(100% - 28px, 1120px); padding-top: 34px; }
  .ph-account-grid { grid-template-columns: 1fr; }
  .ph-account-card.is-wide { grid-column: auto; }
  .ph-account-profile { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .ph-favorites-grid { grid-template-columns: 1fr; }
  .ph-auth-shell { padding-top: 38px; }
  .ph-auth-card-public { padding: 27px 22px; }
}
