/* Guided editor: scoped to preserve the incumbent shell, tabs and Heritage identity. */
.profile-editor,
.pe-sheet {
  --pe-red: #d42a3a;
  --pe-crimson: #8e1b2b;
  --pe-ink: #1e1e24;
  --pe-muted: #676771;
  --pe-line: #e9e9ec;
  --pe-fill: #f2f2f7;
  --pe-blush: #fff5f5;
  color: var(--pe-ink);
}
.profile-editor {
  padding-bottom: 174px !important;
}
.profile-editor .nav {
  position: relative;
}
.profile-editor button,
.pe-sheet button {
  font: inherit;
  cursor: pointer;
  border: 0;
}
.profile-editor button:disabled,
.pe-sheet button:disabled {
  opacity: 0.5;
  cursor: default;
}
.profile-editor button:focus-visible,
.pe-sheet button:focus-visible,
.profile-editor input:focus-visible,
.profile-editor select:focus-visible,
.profile-editor textarea:focus-visible {
  outline: 2px solid var(--pe-crimson);
  outline-offset: 3px;
}
.pe-page {
  padding: 22px 20px 12px;
}
.pe-page h1 {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 800;
  margin: 0 0 8px;
}
.pe-subtitle {
  font-size: 12px;
  color: var(--pe-muted);
  margin: 0 0 24px;
  line-height: 1.7;
}
.pe-preview-button {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--pe-crimson);
  background: none;
  font-size: 11px !important;
  min-height: 44px;
  max-width: 82px;
  padding: 0 2px;
}
.pe-preview-button iconify-icon {
  font-size: 18px;
  flex: none;
}
.pe-section {
  border: 1px solid var(--pe-line);
  border-radius: 17px;
  padding: 17px;
  margin-bottom: 14px;
  background: #fff;
}
.pe-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.pe-section h2 {
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
}
.pe-section-head > span {
  font-size: 11px;
  color: var(--pe-muted);
  white-space: nowrap;
}
.pe-section-head .pe-private {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--pe-crimson);
}
.pe-instruction {
  margin: -3px 0 12px;
  color: var(--pe-muted);
  font-size: 12px;
  line-height: 1.55;
}
.profile-editor .pe-guide-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  margin-bottom: 14px;
  padding: 8px 11px;
  border: 1px solid var(--pe-line);
  border-radius: 12px;
  background: #fff;
  color: var(--pe-ink);
  text-align: start;
}
.profile-editor .pe-guide-link:hover {
  background: var(--pe-blush);
}
.pe-guide-link strong,
.pe-guide-link small {
  display: block;
}
.pe-guide-link strong {
  font-size: 13px;
}
.pe-guide-link small {
  color: var(--pe-muted);
  font-size: 11px;
}
.pe-guide-symbol {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--pe-blush);
  color: var(--pe-crimson);
  font-size: 17px;
}
.pe-guide-spacer {
  width: 44px;
  flex: none;
}
.profile-editor.pe-guide-open {
  padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)) !important;
}
.pe-account-guide {
  padding-top: 16px;
}
.pe-account-guide .pe-subtitle {
  margin-bottom: 18px;
}
.pe-account-guide .pe-section-head {
  justify-content: flex-start;
  margin-bottom: 0;
}
.pe-account-guide .pe-section-head .pe-guide-symbol {
  color: var(--pe-crimson);
  font-size: 17px;
}
.pe-account-guide .pe-private {
  margin-inline-start: auto;
}
.pe-account-guide dl {
  margin: 0;
}
.pe-account-guide dl > div {
  padding-block: 11px;
}
.pe-account-guide dl > div + div,
.pe-account-guide details {
  border-top: 1px solid var(--pe-line);
}
.pe-account-guide .pe-account-row dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}
.profile-editor .pe-change-action,
.profile-editor .pe-change-link {
  min-height: 44px;
  padding: 7px 10px;
  color: var(--pe-crimson);
  background: var(--pe-blush);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 750;
}
.profile-editor .pe-change-link {
  background: none;
  text-align: start;
}
.pe-change-panel {
  display: grid;
  gap: 10px;
}
.pe-change-form {
  display: grid;
  gap: 11px;
}
.pe-change-form .pe-field { margin: 0; }
.pe-change-form input[name="code"] {
  text-align: center;
  letter-spacing: .3em;
  font-variant-numeric: tabular-nums;
}
.pe-change-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.pe-change-error {
  color: var(--pe-crimson);
  font-size: 12px;
  margin: 0;
}
.pe-change-error:empty { display: none; }
.pe-account-guide dt,
.pe-account-guide dd,
.pe-account-guide details p,
.pe-account-guide ol {
  font-size: 12px;
  line-height: 1.6;
}
.pe-account-guide dd {
  margin: 3px 0 0;
  color: var(--pe-muted);
  overflow-wrap: anywhere;
}
.pe-account-guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 8px;
  scroll-margin-block-end: calc(100px + env(safe-area-inset-bottom, 0px));
  color: var(--pe-crimson);
  font-size: 12px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}
.pe-account-guide summary::-webkit-details-marker {
  display: none;
}
.pe-account-guide summary:focus-visible {
  outline: 2px solid var(--pe-crimson);
  outline-offset: 3px;
}
.pe-account-guide details[open] summary iconify-icon {
  rotate: 180deg;
}
.pe-account-guide details p,
.pe-account-guide ol {
  margin: 0 0 3px;
  color: var(--pe-muted);
  overflow-wrap: anywhere;
}
.pe-account-guide ol {
  padding-inline-start: 18px;
}
.pe-account-guide li + li {
  margin-top: 4px;
}
.pe-steps {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
}
.pe-steps button {
  flex: 1;
  background: none;
  text-align: left;
  min-height: 44px;
  color: var(--pe-muted);
  font-size: 11px;
  line-height: 1.5;
  padding: 0 0 4px;
}
.pe-steps button:before {
  content: "";
  display: block;
  height: 3px;
  background: var(--pe-line);
  border-radius: 3px;
  margin-bottom: 8px;
}
.pe-steps button[aria-current] {
  color: var(--pe-crimson);
  font-weight: 700;
}
.pe-steps button[aria-current]:before {
  background: var(--pe-crimson);
}
.pe-error-summary {
  background: var(--pe-blush);
  color: #a00f1c;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 10px;
  padding: 12px;
}
.pe-error-summary:empty {
  display: none;
}
.pe-form-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.pe-field {
  display: block;
  min-width: 0;
  margin: 13px 0 0;
}
.pe-field > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.pe-field b {
  color: var(--pe-red);
}
.pe-field input,
.pe-field select,
.pe-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #dddde5;
  background: #fafafc;
  border-radius: 11px;
  padding: 11px 12px;
  min-height: 46px;
  font: inherit;
  font-size: 16px;
  color: var(--pe-ink);
  line-height: 1.5;
}
.pe-field textarea {
  min-height: 112px;
  resize: vertical;
}
.pe-field input:focus,
.pe-field textarea:focus,
.pe-field select:focus {
  border-color: var(--pe-crimson);
}
.pe-field [aria-invalid="true"] {
  border-color: #a00f1c;
  background: #fff8f8;
}
.pe-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pe-help,
.pe-legacy {
  font-size: 11px;
  color: var(--pe-muted);
  line-height: 1.7;
  margin: 9px 0 0;
  overflow-wrap: anywhere;
}
.pe-legacy {
  background: var(--pe-fill);
  border-radius: 10px;
  padding: 12px;
}
.pe-help strong,
.pe-legacy strong {
  color: var(--pe-ink);
  font-weight: 700;
}
.pe-error {
  display: block;
  font-size: 12px;
  color: #a00f1c;
  line-height: 1.5;
  margin: 5px 0 0;
}
.pe-error:empty {
  display: none;
}
.pe-single {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-height: 44px;
  margin: 5px 0;
}
.pe-single input {
  width: 18px;
  height: 18px;
  accent-color: var(--pe-crimson);
}
.pe-gender {
  border: 0;
  padding: 0;
  margin: 18px 0;
  min-width: 0;
}
.pe-gender legend {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  float: none;
  width: auto;
}
.pe-gender > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.pe-gender label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  min-height: 76px;
  border: 1px solid var(--pe-line);
  border-radius: 12px;
  background: #fafafc;
  font-size: 11px;
  color: var(--pe-muted);
  cursor: pointer;
}
.pe-gender label:has(:checked) {
  background: var(--pe-blush);
  border-color: var(--pe-crimson);
  color: var(--pe-crimson);
  font-weight: 700;
}
.pe-gender input {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  accent-color: var(--pe-crimson);
}
.pe-gender iconify-icon {
  font-size: 24px;
}
.pe-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 32px;
}
.pe-tags > span {
  display: flex;
  align-items: center;
  background: var(--pe-blush);
  border: 1px solid #f1d6dd;
  color: var(--pe-crimson);
  border-radius: 9px;
  padding-left: 10px;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.pe-tags button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  color: inherit;
  border-radius: 8px;
}
.pe-language-search {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid #dddde5;
  background: #fafafc;
  border-radius: 11px;
  padding-left: 10px;
}
.pe-language-search > iconify-icon {
  color: var(--pe-muted);
  font-size: 18px;
}
.pe-language-search input {
  border: 0;
  background: none;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  font-size: 16px;
  padding: 6px 0;
  color: var(--pe-ink);
}
.pe-language-search button {
  min-width: 44px;
  min-height: 44px;
  color: var(--pe-crimson);
  background: none;
}
.pe-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pe-suggestions button {
  background: var(--pe-fill);
  color: #555561;
  border-radius: 9px;
  padding: 9px 11px;
  min-height: 44px;
  font-size: 11px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.pe-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pe-photo {
  padding: 0;
  aspect-ratio: 3/4;
  border-radius: 13px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 80px;
  background: var(--pe-fill);
}
.pe-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pe-photo.is-cover {
  grid-row: span 2;
  grid-column: span 2;
}
.pe-photo > span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: #fff;
  background: #1e1e2488;
  padding: 4px 7px;
  font-size: 10px;
  border-radius: 7px;
}
.pe-photo.pe-add {
  border: 1px dashed #d6a8b3;
  background: var(--pe-blush);
  color: var(--pe-crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}
.pe-add > span {
  position: static;
  color: inherit;
  background: none;
  padding: 0;
}
.pe-add > iconify-icon {
  font-size: 25px;
}
.pe-photo-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--pe-muted);
  font-size: 10px;
}
.pe-photo-help small {
  font-size: 10px;
}
.pe-photo-help button {
  min-height: 44px;
  background: none;
  color: var(--pe-crimson);
  font-size: 11px;
}
.pe-notice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.7;
  font-size: 11px;
  color: var(--pe-muted);
  margin: 0 0 12px;
  background: var(--pe-blush);
  border-radius: 10px;
  padding: 11px;
}
.pe-notice iconify-icon {
  font-size: 17px;
  flex: none;
  margin-top: 2px;
  color: var(--pe-crimson);
}
.pe-actions {
  position: fixed;
  z-index: 12;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: max(88px, calc(76px + env(safe-area-inset-bottom, 0px)));
  width: min(100%, 430px);
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid var(--pe-line);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 66px;
}
.pe-actions > small {
  flex: 1;
  min-width: 0;
  color: var(--pe-muted);
  font-size: 10px;
  line-height: 1.5;
}
.pe-primary,
.pe-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4;
}
.pe-primary {
  background: linear-gradient(135deg, #e84054, #d42a3a 55%, #a00f1c);
  color: #fff;
  box-shadow: 0 4px 12px #d42a3a1b;
}
.pe-secondary {
  background: var(--pe-fill);
  color: var(--pe-ink);
}
.pe-primary:active,
.pe-secondary:active {
  filter: brightness(0.96);
}
.pe-full {
  width: 100%;
}
.pe-sheet {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  border: 0;
  border-radius: 25px 25px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  max-width: 430px;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -15px 45px #17101f1a;
  font:
    14px/1.55 Manrope,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}
.pe-sheet::backdrop {
  background: #17101f66;
  backdrop-filter: blur(3px);
}
.pe-sheet[open] {
  animation: pe-sheet-up 0.25s cubic-bezier(0.22, 0.8, 0.25, 1);
}
.pe-sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.pe-sheet-head h2 {
  font-size: 17px;
  font-weight: 800;
  flex: 1;
  margin: 0;
}
.pe-sheet-head button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--pe-fill);
  display: grid;
  place-items: center;
  color: var(--pe-ink);
}
.pe-sheet > p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--pe-muted);
}
.pe-option {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: left;
  width: 100%;
  min-height: 58px;
  padding: 11px 0;
  background: #fff;
  border-bottom: 1px solid var(--pe-line) !important;
  color: var(--pe-ink);
  font-size: 13px !important;
}
.pe-option iconify-icon {
  font-size: 22px;
  color: var(--pe-crimson);
  width: 30px;
  flex: none;
}
.pe-option small {
  width: 100%;
  font-size: 10px;
  color: var(--pe-muted);
  padding-left: 40px;
}
.pe-sheet-photo {
  aspect-ratio: 3/4;
  width: min(100%, 220px);
  margin: 0 auto 14px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--pe-fill);
}
.pe-sheet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pe-canvas {
  width: 100%;
  max-height: 42dvh;
  aspect-ratio: 3/4;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--pe-fill);
}
.pe-range {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 4px 0;
  font-size: 12px;
}
.pe-range span {
  min-width: 72px;
}
.pe-range input {
  flex: 1;
  min-width: 0;
  accent-color: var(--pe-crimson);
}
.pe-sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.pe-sheet-actions > * {
  flex: 1;
}
.pe-order {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafafc;
  border: 1px solid var(--pe-line);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 8px;
}
.pe-order img {
  width: 42px;
  height: 56px;
  object-fit: cover;
  border-radius: 7px;
}
.pe-order > span {
  flex: 1;
  font-size: 12px;
}
.pe-order button {
  min-width: 44px;
  min-height: 44px;
  background: var(--pe-fill);
  border-radius: 9px;
  color: var(--pe-ink);
}
.pe-original {
  width: 100%;
  max-height: 70dvh;
  object-fit: contain;
}
.pe-public h1 {
  overflow-wrap: anywhere;
}
.pe-public p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.pe-public .pe-photos img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 12px;
}
.pe-public .pe-tags > span {
  padding: 8px 11px;
}
@keyframes pe-sheet-up {
  from {
    opacity: 0.5;
    translate: 0 25%;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (max-width: 350px) {
  .pe-page {
    padding: 18px 14px;
  }
  .pe-section {
    padding: 13px;
  }
  .pe-two {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .pe-actions {
    padding: 10px 12px;
    gap: 6px;
  }
  .pe-actions .pe-primary,
  .pe-actions .pe-secondary {
    padding: 10px 12px;
    font-size: 12px !important;
  }
  .pe-section-head > span {
    font-size: 10px;
  }
  .pe-steps button {
    font-size: 10px;
  }
  .pe-page h1 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .profile-editor *,
  .pe-sheet,
  .pe-sheet * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
    transform: none !important;
  }
}
