/* Shared public page layout (link + in-app preview). */

.pp-public-page,
body.engine-page .ep {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  color: #1a1d1b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pp-gallery { margin: 0 -16px 12px; }
.pp-gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.pp-gallery-track::-webkit-scrollbar { display: none; }
.pp-photo {
  flex: 0 0 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: min(52vw, 280px);
  background: #eef0ee;
  cursor: zoom-in;
  scroll-snap-align: start;
}
.pp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-photo-dots { display: flex; justify-content: center; gap: 5px; padding: 8px 0 0; }
.pp-photo-dots i { width: 6px; height: 6px; border-radius: 999px; background: #c7cdca; }
.pp-photo-dots i.is-on { width: 16px; background: #1a1d1b; }

.pp-namecard {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 4px 2px 10px;
  text-align: left;
}
.pp-avatar {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: #28735a center / cover no-repeat;
  font-size: 17px;
  font-weight: 750;
  flex: none;
}
.pp-namecard strong { display: block; font-size: 16px; }
.pp-handle { margin: 2px 0 0; color: #7a837e; font-size: 13px; }
.pp-namecard small { display: block; color: #6b7570; font-size: 12px; margin-top: 2px; }
.pp-tagline { margin: 4px 0 0; font-size: 13px; color: #2d3530; }

.pp-purpose { margin: 0 0 8px; color: #6b7570; font-size: 13px; line-height: 1.4; }
.pp-title { margin: 12px 0 4px; font-size: 22px; font-weight: 750; letter-spacing: -.2px; }
.pp-about { margin: 0 0 10px; line-height: 1.45; color: #343b37; white-space: pre-wrap; overflow-wrap: anywhere; }

.pp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.pp-tags-plain { margin-top: 4px; }
.pp-tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: #f1f2f1;
  color: #3f4843;
  font-size: 13px;
  font-weight: 650;
}
.pp-tag.plain { background: #f1f2f1; }
.pp-tags-owner-only { opacity: 0.55; }
.pp-tags-owner-note { margin: 4px 0 0; color: #8a938d; font-size: 12px; }

.pp-block { margin: 14px 0; }
.pp-label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #77817b;
}
.pp-block p { margin: 0; font-size: 15px; line-height: 1.5; color: #2d3530; }
.pp-contact-note { color: #68736c; font-size: 13px; }
.pp-contact-owner { display: block; color: #9aa29e; font-size: 12px; font-weight: 500; margin-top: 2px; }

.pp-footer { margin: 22px 0 0; text-align: center; }
.pp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid #d8dcda;
  border-radius: 999px;
  background: #fff;
  color: #1a1d1b;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.pp-button.primary { border-color: #1a1d1b; background: #1a1d1b; color: #fff; }
.pp-button:disabled { opacity: .5; }
.pp-note { margin: 10px 0; color: #6b7570; font-size: 14px; line-height: 1.5; }
.pp-note a { color: #1f7a4d; font-weight: 650; }
.pp-foot { margin: 36px 0 0; text-align: center; color: #9aa29e; font-size: 12px; }

.pp-list-lead { margin: 16px 0 8px; font-size: 15px; color: #6b7570; }
.pp-list-rows { list-style: none; margin: 0; padding: 0; }
.pp-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 8px 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  color: inherit;
  text-decoration: none;
}
.pp-list-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #dce2de center / cover no-repeat;
  flex: none;
}
.pp-list-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #28735a;
}
.pp-list-text strong { display: block; font-size: 15px; }
.pp-list-text small { display: block; margin-top: 2px; color: #768078; font-size: 12px; }

.xc-editor.xc-preview .xc-editor-scroll .pp-public-page {
  padding: 0 0 24px;
  max-width: none;
}

@media (min-width: 621px) {
  .pp-public-page,
  body.engine-page .ep { padding-left: 24px; padding-right: 24px; }
}
