/* 参考页结构：我的图标入口 → 档案列表 → 独立编辑页。 */
#page-profile { background: #f2effc; }
.profile-overview { padding: 36px 26px 50px; background: linear-gradient(180deg,#eae1fa 0,#f2effc 370px); }
.profile-user-header { display: flex; align-items: center; gap: 18px; min-height: 112px; }
.profile-user-avatar { flex: 0 0 74px; display: grid; place-items: center; height: 74px; border: 4px solid #ffffffb3; border-radius: 50%; background: linear-gradient(135deg,#6551ce,#899ee8); color: #fff; font-size: 30px; box-shadow: 0 8px 24px #7454b522; }
.profile-user-avatar.female { background: linear-gradient(135deg,#df7eac,#f5a9b8); }
.profile-user-copy { flex: 1; min-width: 0; }
.profile-overview .profile-user-copy h2 { margin: 0 0 8px; color: #30283c; font-size: 24px; overflow-wrap: anywhere; }
.profile-user-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; background: #e2d5f5; color: #8a65b2; font-size: 11px; }
.profile-user-copy p { margin-top: 9px; color: #9786aa; font-size: 12px; line-height: 1.6; }
.profile-user-summary { position: relative; margin-top: 24px; padding: 24px; min-height: 158px; border: 1px solid #ffffffb8; border-radius: 24px; background: linear-gradient(115deg,#fff,#fbf8ff); box-shadow: 0 10px 28px #7c5aa311; }
.profile-summary-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; color: #96849f; font-size: 13px; }
.profile-summary-heading span:last-child { color: #8150b7; }
.profile-user-summary strong { color: #433252; font-size: 19px; font-weight: 600; }
.profile-user-summary p { margin-top: 8px; color: #a08eaa; font-size: 13px; line-height: 1.7; }
.profile-local-note { display: block; margin-top: 18px; color: #b6a9be; font-size: 11px; }
.profile-menu-section { margin-top: 48px; }
.profile-overview h2 { margin: 0 0 22px; font-size: 20px; color: #292335; }
.profile-entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.profile-entry { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 12px; min-height: 130px; border: 0; border-radius: 22px; background: #fff; color: #292335; font-size: 17px; box-shadow: 0 6px 16px #51377609; }
.profile-entry-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: #e6f1fd; color: #2f689a; }
.profile-entry svg,.profile-card-actions svg,.profile-add-floating svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.phone.profile-subpage .appbar,.phone.profile-subpage .main-nav { display: none; }
.phone.profile-subpage { padding-bottom: 0; }
.profile-manager { min-height: 100svh; padding-bottom: 110px; }
.profile-subnav { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 56px minmax(0,1fr) 56px; align-items: center; min-height: 56px; padding: 0 10px; background: #6528d5; color: #fff; }
.profile-subnav h3 { margin: 0; text-align: center; color: #fff; font-size: 18px; }
.profile-subnav button { min-height: 44px; padding: 0; border: 0; background: transparent; color: #fff; font-size: 13px; }
.profile-subnav button:first-child { font-size: 34px; text-align: left; padding-left: 5px; }
.profile-storage-note,.profile-manager>.profile-help { margin: 12px 24px 0; color: #8a8099; font-size: 12px; line-height: 1.7; }
#profile-list { display: grid; gap: 14px; margin: 20px; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: 22px; background: #fff; }
.profile-avatar { flex: 0 0 50px; display: grid; place-items: center; height: 50px; border-radius: 14px; background: linear-gradient(135deg,#4864df,#5b90e6); color: #fff; font-size: 25px; }
.profile-avatar.female { background: linear-gradient(135deg,#f471a4,#ffa1a4); }
.profile-card-copy { flex: 1; min-width: 0; }
.profile-card-heading { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.profile-card-heading h4 { margin: 0; font-size: 19px; color: #292335; overflow-wrap: anywhere; }
.profile-default { padding: 2px 7px; border-radius: 8px; color: #b78b20; background: #fff8e6; font-size: 11px; }
.profile-card-copy p { margin-top: 6px; color: #746b82; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.profile-card-copy .profile-phone-summary { font-size: 11px; color: #9b91a6; }
.profile-card-actions { display: flex; flex-shrink: 0; gap: 8px; }
.profile-card-actions button { display: grid; place-items: center; width: 35px; height: 35px; padding: 7px; border: 1px solid #ded5f1; border-radius: 10px; background: #f0eafa; color: #7546bd; }
.profile-card-actions svg { width: 19px; height: 19px; }
.profile-card-actions .profile-delete { border-color: #f0d4d5; background: #fff0ef; color: #d77780; }
.profile-add-floating { position: fixed; right: max(24px,calc((100vw - 750px)/2 + 24px)); bottom: calc(30px + env(safe-area-inset-bottom)); z-index: 8; display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; background: #6731d1; color: #fff; box-shadow: 0 7px 20px #6133b52b; }
.profile-empty { padding: 70px 24px; text-align: center; color: #8a8099; }
.profile-empty h4 { margin: 0 0 12px; font-size: 17px; font-weight: 500; }
.profile-empty p { color: #9b91a6; font-size: 13px; }
.profile-editor { position: fixed; inset: 0; width: min(100%,750px); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: #f2effc; color: #30293b; overflow-y: auto; }
.profile-editor::backdrop { background: #eeedf1; }
.profile-form-body { padding: 4px 22px 26px; border-radius: 0 0 12px 12px; background: #fff; }
.profile-form-row { display: flex; align-items: center; min-height: 70px; gap: 14px; }
.profile-form-row>label,.profile-field-label { flex: 0 0 88px; color: #30293b; font-size: 15px; }
.profile-required { color: #8f62d1; margin-right: 3px; }
.profile-editor input[type="text"],.profile-editor input[type="number"] { flex: 1; min-width: 0; width: 100%; margin: 0; padding: 10px 0; border: 0; border-radius: 0; background: #fff; color: #30293b; font-size: 16px; }
.profile-editor input::placeholder { color: #a29ba9; }
.profile-sex { display: flex; gap: 16px; }
.profile-sex label { position: relative; cursor: pointer; }
.profile-sex input { position: absolute; opacity: 0; }
.profile-sex span { display: block; min-width: 72px; padding: 7px 16px; border-radius: 13px; text-align: center; background: #f4f0fa; font-size: 16px; }
.profile-sex input:checked+.male { background: linear-gradient(100deg,#6375de,#6999e8); color: #fff; }
.profile-sex input:checked+.female { background: linear-gradient(100deg,#f277aa,#ff9c9f); color: #fff; }
.profile-sex input:focus-visible+span { outline: 2px solid #673acb; outline-offset: 3px; }
.profile-birthday { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 12px; min-width: 0; flex: 1; }
.profile-editor .profile-birthday input { border-bottom: 1px solid #eee9f4; text-align: center; }
.profile-check { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; font-size: 14px; }
.profile-check input { appearance: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 20px; background: #ded8e7; cursor: pointer; }
.profile-check input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.profile-check input:checked { background: #7139ca; }
.profile-check input:checked::after { left: 21px; }
.profile-form-body .profile-help { margin: 4px 0 12px; font-size: 11px; line-height: 1.8; color: #a198ac; }
.profile-optional { margin: 14px 0; border-top: 1px solid #f0edf5; border-bottom: 1px solid #f0edf5; }
.profile-optional summary { padding: 18px 0; color: #81708e; font-size: 14px; cursor: pointer; }
.profile-editor-actions { display: flex; gap: 12px; margin-top: 14px; }
.profile-editor-actions button { flex: 1; min-height: 48px; border: 0; border-radius: 26px; background: #f3eff8; color: #8b7a9a; font-size: 15px; }
.profile-editor-actions .profile-primary { flex: 3; background: linear-gradient(100deg,#6330ce,#9464d1); color: #fff; font-weight: 600; }
.profile-error { margin: 14px 20px; padding: 10px 12px; border-radius: 8px; background: #fff1f0; color: #ac5652; font-size: 13px; line-height: 1.7; }
.profile-form-body .profile-error { margin-left: 0; margin-right: 0; }
.module-profile-box { margin: 20px 0; padding: 16px; border: 1px solid #e7dff3; border-radius: 14px; background: #faf7ff; }
.module-profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.module-profile-heading strong { font-size: 14px; color: #5e4381; }
.module-profile-heading button { border: 0; padding: 7px 0; background: transparent; color: #855ab4; font-size: 12px; }
.module-profile-label { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: #8a799b; }
.module-profile-label select { flex: 1; min-width: 0; max-width: 100%; padding: 11px 8px; border: 1px solid #e2d8ee; border-radius: 9px; background: #fff; color: #4e3e60; font-size: 13px; }
.module-profile-hint { margin-top: 12px; color: #998ba7; font-size: 11px; line-height: 1.8; }
#page-profile button:focus-visible,.profile-editor input:focus-visible,.module-profile-box select:focus-visible { outline: 2px solid #673acb; outline-offset: 3px; }
@media (max-width:480px) {
  .profile-overview { padding: 28px 16px 40px; }
  .profile-user-header { min-height: 108px; gap: 14px; }
  .profile-user-avatar { flex-basis: 66px; height: 66px; font-size: 27px; }
  .profile-overview .profile-user-copy h2 { font-size: 21px; }
  .profile-user-summary { margin-top: 20px; padding: 22px 20px; min-height: 160px; }
  .profile-menu-section { margin-top: 40px; }
  .profile-entry-grid { gap: 12px; }
  .profile-entry { min-height: 110px; border-radius: 18px; font-size: 15px; padding: 16px 8px; gap: 10px; }
  .profile-entry-icon { width: 44px; height: 44px; border-radius: 13px; }
  #profile-list { margin: 16px 12px; gap: 12px; }
  .profile-card { padding: 16px 12px; gap: 10px; border-radius: 18px; flex-wrap: wrap; }
  .profile-avatar { flex-basis: 42px; height: 46px; font-size: 22px; border-radius: 12px; }
  .profile-card-heading h4 { font-size: 17px; }
  .profile-card-copy p { font-size: 12px; }
  .profile-card-actions { margin-left: auto; gap: 6px; }
  .profile-card-actions button { width: 31px; height: 33px; padding: 6px; }
  .profile-form-body { padding-left: 16px; padding-right: 16px; }
  .profile-form-row>label,.profile-field-label { flex-basis: 76px; font-size: 14px; }
  .profile-sex { gap: 10px; }
  .profile-sex span { min-width: 64px; padding: 7px 12px; }
}
