/**
 * Public profile (profile/user_profile.php) — Abutic Dot shell.
 * Neutral type, frosted card, soft shadows — pairs with abutic-dot-home.css on html.
 * Load AFTER profiles.css.
 */

html.ab-dot-home-html:has(body.ab-dot-public-profile),
body.ab-dot-public-profile {
  overflow-x: clip;
}

/* Preloader + page reveal */
body.ab-dot-public-profile .profile-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.ab-dot-public-profile .profile-preloader.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.ab-dot-public-profile .profile-preloader__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(88vw, 320px);
}

body.ab-dot-public-profile .profile-preloader__glass {
  width: 100%;
  padding: 2.75rem 1.5rem 1.75rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 18px 48px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  text-align: center;
}

body.ab-dot-public-profile.ab-profile-bg-dark .profile-preloader__glass {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

body.ab-dot-public-profile .profile-preloader__photo-wrap {
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

body.ab-dot-public-profile .profile-preloader__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.08);
  filter: blur(14px);
  opacity: 0.92;
  animation: abPreloaderPhotoSharpen 0.9s ease-out forwards;
}

body.ab-dot-public-profile .profile-preloader__initials {
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #3a3f47;
  background: linear-gradient(160deg, #f3f4f6 0%, #e2e4e8 100%);
  border: 3px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-preloader__initials {
  color: #eceef1;
  background: linear-gradient(160deg, #3c4048 0%, #2a2d34 100%);
  border-color: rgba(255, 255, 255, 0.28);
}

body.ab-dot-public-profile .profile-preloader__name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}

body.ab-dot-public-profile.ab-profile-bg-dark .profile-preloader__name {
  color: rgba(255, 255, 255, 0.94);
}

body.ab-dot-public-profile .profile-preloader__shimmer {
  height: 10px;
  width: 42%;
  margin: 0.65rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.45), rgba(148, 163, 184, 0.2));
  background-size: 200% 100%;
  animation: abPreloaderShimmer 1.1s ease-in-out infinite;
}

@keyframes abPreloaderPhotoSharpen {
  to {
    filter: blur(0);
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes abPreloaderShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Legacy skeleton (fallback) */
body.ab-dot-public-profile .profile-preloader__skeleton {
  width: min(80%, 420px);
  display: none;
}

body.ab-dot-public-profile .profile-preloader__block {
  background: #e5e7eb;
  border-radius: 12px;
  margin-bottom: 20px;
}

body.ab-dot-public-profile .profile-page-reveal {
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.ab-dot-public-profile.profile-loaded .profile-page-reveal {
  opacity: 1;
}

/* Repeat visit: skip blur-up card, quick background fade */
html.ab-preloader-fast body.ab-dot-public-profile .profile-preloader {
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

html.ab-preloader-fast body.ab-dot-public-profile .profile-preloader__hero {
  display: none;
}

html.ab-preloader-fast body.ab-dot-public-profile .profile-page-reveal {
  opacity: 1;
  transition: opacity 0.2s ease;
}

html.ab-preloader-fast body.ab-dot-public-profile:not(.profile-loaded) .profile-page-reveal {
  opacity: 0;
}

/* ── Hero entrance (first visit) ── */
html.ab-hero-animate body.ab-dot-public-profile .profile-card.fade-in-section,
html.ab-hero-animate body.ab-dot-public-profile .profile-container.fade-in-section {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Card shell: motion only (no opacity) so name/title/social can stagger independently */
html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-start .ab-hero-shell--card {
  animation: abHeroCardIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--avatar,
html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--name,
html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--subline,
html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--social {
  opacity: 0;
  transform: translateY(10px);
}

html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--avatar {
  transform: translateX(-50%) scale(0.92);
}

html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-start .ab-hero-enter--avatar {
  animation: abHeroAvatarIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-start .profile-avatar-wrap.ab-hero-enter--avatar::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--button-color, #3b82f6) 50%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: abHeroRingPulse 0.85s ease-out 0.38s both;
}

html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-start .ab-hero-enter--name {
  animation: abHeroTextIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-start .ab-hero-enter--subline {
  animation: abHeroTextIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-start .ab-hero-enter--social {
  animation: abHeroTextIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.54s forwards;
}

html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--avatar,
html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--name,
html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--subline,
html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--social {
  opacity: 1;
  transform: none;
}

html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .profile-avatar-wrap.ab-hero-enter--avatar {
  transform: translateX(-50%);
}

@keyframes abHeroCardIn {
  from {
    transform: translateY(18px) scale(0.985);
    filter: blur(8px);
  }
  to {
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes abHeroAvatarIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes abHeroTextIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes abHeroRingPulse {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ab-dot-public-profile .profile-page-reveal {
    opacity: 1;
    transition: none;
  }

  html.ab-preloader-fast body.ab-dot-public-profile .profile-page-reveal {
    opacity: 1;
    transition: none;
  }

  body.ab-dot-public-profile .profile-preloader__photo {
    animation: none;
    filter: none;
    transform: none;
  }

  html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--avatar,
  html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--name,
  html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--subline,
  html.ab-hero-animate body.ab-dot-public-profile.profile-loaded .ab-hero-enter--social,
  html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--avatar,
  html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--name,
  html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--subline,
  html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .ab-hero-enter--social {
    opacity: 1;
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }

  html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-done .profile-avatar-wrap.ab-hero-enter--avatar {
    transform: translateX(-50%) !important;
  }

  html.ab-hero-animate body.ab-dot-public-profile.ab-hero-sequence-start .profile-avatar-wrap.ab-hero-enter--avatar::after {
    display: none;
  }
}

body.ab-dot-public-profile #profile-video-preview {
  cursor: pointer;
  position: relative;
}

body.ab-dot-public-profile #profile-video-preview img {
  width: 100%;
  border-radius: 1rem;
  background: #000;
}

body.ab-dot-public-profile .profile-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

body.ab-dot-public-profile .profile-video-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  background: linear-gradient(145deg, #2c2c2e 0%, #1c1c1e 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 3rem;
}

/* ── Shell: inherit Dot canvas from html.ab-dot-home-html; calm page chrome ── */
body.ab-dot-home.ab-dot-public-profile {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui,
    sans-serif !important;
  -webkit-font-smoothing: antialiased;
  color: #1d1d1f;
  --ab-dot-profile-shadow-lift:
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 12px 28px rgba(15, 23, 42, 0.08),
    0 30px 72px rgba(30, 64, 175, 0.12);
  --ab-dot-profile-shadow-soft:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 8px 18px rgba(15, 23, 42, 0.065),
    0 18px 44px rgba(30, 64, 175, 0.095);
  --ab-dot-profile-shadow-chip:
    0 1px 0 rgba(255, 255, 255, 0.68) inset,
    0 5px 14px rgba(15, 23, 42, 0.08),
    0 12px 28px rgba(30, 64, 175, 0.08);
}

/* Match .profile-container max widths in user_profile.php (middle ground: not 600/720 nor 760/960) */
body.ab-dot-home.ab-dot-public-profile .profile-wrapper.ab-dot-public-profile-main {
  width: 100%;
  max-width: min(100%, 680px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  body.ab-dot-home.ab-dot-public-profile:not(.has-owner-preview) .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 2.25rem;
  }

  body.ab-dot-home.ab-dot-public-profile.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 1.75rem;
  }

  body.ab-dot-home.ab-dot-public-profile .profile-wrapper.ab-dot-public-profile-main {
    max-width: min(91vw, 840px);
  }
}

/* Mobile: extra bottom inset when lead-capture CONNECT bar is active */
@media (max-width: 767px) {
  body.ab-dot-home.ab-dot-public-profile.has-mobile-connect-bar .profile-wrapper.ab-dot-public-profile-main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  body.ab-dot-home.ab-dot-public-profile.has-mobile-connect-bar #shareButtonContainer {
    padding-bottom: 2rem !important;
  }
}

/* Owner preview (Edit / Layout / Design bar): breathing room at page bottom */
body.ab-dot-home.ab-dot-public-profile.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
  padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body.ab-dot-home.ab-dot-public-profile.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
    padding-bottom: 4.5rem;
  }
}

@media (max-width: 767px) {
  body.ab-dot-home.ab-dot-public-profile.has-owner-preview.has-mobile-connect-bar .profile-wrapper.ab-dot-public-profile-main {
    padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
  }

  body.ab-dot-home.ab-dot-public-profile.has-profile-editor.is-profile-edit.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
  }

  body.ab-dot-home.ab-dot-public-profile.has-profile-editor.is-profile-edit.has-owner-preview.has-mobile-connect-bar .profile-wrapper.ab-dot-public-profile-main {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
  }
}

/* In-page footer (replaces fixed-bar “Powered by” when lead capture is off) */
/* In-page "Powered by" strip — hidden everywhere; branding lives in the bottom bar */
body.ab-dot-public-profile .profile-footer-strip {
  display: none !important;
}

/* No banner: add top breathing room above the card so the avatar doesn't crash into the page top */
body.ab-dot-public-profile.no-profile-banner .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 4.5rem !important;
}

/* No banner + owner navbar: extra clearance below the sticky chrome */
body.ab-dot-public-profile.no-profile-banner.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 6.5rem !important;
}

@media (max-width: 767px) {
  body.ab-dot-public-profile.no-profile-banner .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 3.5rem !important;
  }

  body.ab-dot-public-profile.no-profile-banner.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 5rem !important;
  }
}

/* ── No-banner top breathing room ── */
/* When no banner image: add a top gap so the avatar doesn't start at the very
   top of the viewport. Card margin is reduced by the same amount so the avatar
   lift math stays consistent. */
body.ab-dot-public-profile.no-profile-banner:not(.has-owner-preview)
  .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 4rem;
}

body.ab-dot-public-profile.no-profile-banner.has-owner-preview
  .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 3rem;
}

@media (max-width: 767px) {
  body.ab-dot-public-profile.no-profile-banner:not(.has-owner-preview)
    .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 3rem;
  }

  body.ab-dot-public-profile.no-profile-banner.has-owner-preview
    .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 2.25rem;
  }
}

/* ── Kill legacy animated gradient card + heavy chrome ── */
body.ab-dot-public-profile .profile-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  max-width: 100% !important;
  width: 100%;
  margin-top: 0 !important;
  padding: 0 !important;
}

body.ab-dot-public-profile .profile-container.fade-in-section {
  max-width: min(100%, 680px);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  body.ab-dot-public-profile .profile-container.fade-in-section {
    max-width: min(91vw, 840px);
  }
}

/* ── Profile header: guest vs owner preview (separate top spacing) ── */

/* Shared: floating avatar on card */
body.ab-dot-public-profile .profile-card.fade-in-section {
  position: relative;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

body.ab-dot-public-profile .profile-avatar-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Keep the avatar at its original (large) size from profiles.css — 300×300 desktop,
   200×200 mobile. We fix the overlap by lifting it further above the card and
   pushing the name/title/org rows farther down so they clear the avatar bottom. */
body.ab-dot-public-profile .profile-avatar-wrap .profile-img {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 0;
}

body.ab-dot-public-profile .profile-header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Banner — Linktree-style full-bleed hero that soft-fades into the page bg */
body.ab-dot-public-profile:not(.no-profile-banner) .profile-banner-container {
  position: relative;
  z-index: 0;
  width: 100vw !important;
  max-width: 100vw !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  margin: 0 0 -2.75rem !important;
  padding: 0 !important;
  box-sizing: border-box;
  height: clamp(12.5rem, 38vw, 20rem);
  overflow: hidden;
  pointer-events: none;
}

body.ab-dot-public-profile:not(.no-profile-banner) .profile-banner-image {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-color: transparent;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  /* Stronger bottom dissolve — image mostly gone before the avatar */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.78) 48%,
    rgba(0, 0, 0, 0.38) 68%,
    rgba(0, 0, 0, 0.12) 84%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.78) 48%,
    rgba(0, 0, 0, 0.38) 68%,
    rgba(0, 0, 0, 0.12) 84%,
    transparent 100%
  );
}

/* Extra soft wash so the handoff into light/dark page bg feels intentional */
body.ab-dot-public-profile:not(.no-profile-banner) .profile-banner-fade {
  position: absolute;
  inset: auto 0 0;
  height: 68%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(248, 250, 252, 0) 0%,
    rgba(248, 250, 252, 0.08) 40%,
    rgba(248, 250, 252, 0.28) 72%,
    rgba(248, 250, 252, 0.48) 100%
  );
}

body.ab-dot-public-profile:not(.no-profile-banner).ab-profile-bg-dark .profile-banner-fade,
body.ab-dot-public-profile:not(.no-profile-banner):not(.ab-profile-bg-light) .profile-banner-fade {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(8, 8, 12, 0.28) 32%,
    rgba(8, 8, 12, 0.72) 64%,
    rgba(8, 8, 12, 0.96) 100%
  );
}

/* Animated backgrounds: rely mostly on the mask, keep wash very light */
body.ab-dot-public-profile:not(.no-profile-banner).has-animated-bg .profile-banner-fade {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
}

body.ab-dot-public-profile:not(.no-profile-banner).has-animated-bg:not(.ab-profile-bg-light) .profile-banner-fade {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.14) 45%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

/* Keep content above the banner layer; pull the card into the fade */
body.ab-dot-public-profile:not(.no-profile-banner) .profile-content-container {
  position: relative;
  z-index: 1;
}

body.ab-dot-public-profile:not(.no-profile-banner):not(.has-owner-preview) .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 0 !important;
}

body.ab-dot-public-profile:not(.no-profile-banner).has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 0.35rem !important;
}

/* Extra room between banner fade and avatar */
body.ab-dot-public-profile:not(.no-profile-banner):not(.has-owner-preview) .profile-card.fade-in-section {
  margin-top: 7.25rem !important;
}

body.ab-dot-public-profile:not(.no-profile-banner).has-owner-preview .profile-card.fade-in-section {
  margin-top: 6.5rem !important;
}

@media (max-width: 768px) {
  body.ab-dot-public-profile:not(.no-profile-banner) .profile-banner-container {
    height: clamp(11rem, 48vw, 16.5rem);
    margin-bottom: -1.75rem !important;
  }

  body.ab-dot-public-profile:not(.no-profile-banner):not(.has-owner-preview) .profile-card.fade-in-section {
    margin-top: 5rem !important;
  }

  body.ab-dot-public-profile:not(.no-profile-banner).has-owner-preview .profile-card.fade-in-section {
    margin-top: 4.5rem !important;
  }
}

/* Desktop: a bit taller than mobile, centered crop (not top-locked). */
@media (min-width: 900px) {
  body.ab-dot-public-profile:not(.no-profile-banner) .profile-banner-container {
    height: clamp(16rem, 26vw, 24rem);
    margin-bottom: -2.75rem !important;
  }

  body.ab-dot-public-profile:not(.no-profile-banner) .profile-banner-image {
    background-position: center center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ab-dot-public-profile:not(.no-profile-banner) .profile-banner-image {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 100%);
  }
}

/* Legacy inset banner styles — superseded by fade hero above */
body.ab-dot-public-profile.no-profile-banner .profile-banner-container {
  display: none;
}

/* Guest / public visitor — no owner navbar
   Avatar 300px @ top -150 → 150px above, 150px sits over the card.
   Card padding-top 1rem (16px) + header margin 9rem (144px) = name at 160px.
   →  ~10px breathing room between the avatar bottom and the name.
   Total empty space at top of card: 160px (vs. previous 224px). */
body.ab-dot-public-profile:not(.has-owner-preview) .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 1.75rem;
}

body.ab-dot-public-profile:not(.has-owner-preview) .profile-card.fade-in-section {
  margin-top: 7.5rem !important;
  padding: 1rem 1.5rem 1.5rem;
}

body.ab-dot-public-profile:not(.has-owner-preview) .profile-avatar-wrap {
  top: -150px;
}

body.ab-dot-public-profile:not(.has-owner-preview) .profile-header-text {
  margin-top: 9rem;
}

/* Owner preview — same avatar treatment, slightly tighter top chrome */
body.ab-dot-public-profile.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 1.375rem;
}

body.ab-dot-public-profile.has-owner-preview .profile-card.fade-in-section {
  margin-top: 6.5rem !important;
  padding: 1rem 1.5rem 1.5rem;
}

body.ab-dot-public-profile.has-owner-preview .profile-avatar-wrap {
  top: -150px;
}

body.ab-dot-public-profile.has-owner-preview .profile-header-text {
  margin-top: 9rem;
}

@media (max-width: 768px) {
  /* Avatar 200px @ top -100 → 100px above, 100px sits over the card.
     Card padding-top 0.75rem (12px) + header margin 6rem (96px) = name at 108px.
     →  ~8px breathing room between avatar bottom and the name. */
  body.ab-dot-public-profile:not(.has-owner-preview) .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 1.5rem;
  }

  body.ab-dot-public-profile:not(.has-owner-preview) .profile-card.fade-in-section {
    margin-top: 4.5rem !important;
    padding: 0.75rem 1.25rem 1.25rem;
  }

  body.ab-dot-public-profile:not(.has-owner-preview) .profile-avatar-wrap {
    top: -100px;
  }

  body.ab-dot-public-profile:not(.has-owner-preview) .profile-header-text {
    margin-top: 6rem;
  }

  body.ab-dot-public-profile.has-owner-preview .profile-wrapper.ab-dot-public-profile-main {
    padding-top: 1.125rem;
  }

  body.ab-dot-public-profile.has-owner-preview .profile-card.fade-in-section {
    margin-top: 4rem !important;
    padding: 0.75rem 1.25rem 1.25rem;
  }

  body.ab-dot-public-profile.has-owner-preview .profile-avatar-wrap {
    top: -100px;
  }

  body.ab-dot-public-profile.has-owner-preview .profile-header-text {
    margin-top: 6rem;
  }
}

body.ab-dot-public-profile .profile-header-subline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: #1d1d1f;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-header-subline {
  color: rgba(255, 255, 255, 0.9);
}

body.ab-dot-public-profile .profile-header-subline .profile-org {
  font-weight: 600;
  color: #424245;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-header-subline .profile-org {
  color: rgba(255, 255, 255, 0.92);
}

body.ab-dot-public-profile .profile-business-logo {
  display: block;
  margin: 1rem auto 0;
  max-width: 55px;
  height: auto;
  opacity: 0.9;
}

body.ab-dot-public-profile .profile-header-spacer {
  height: 24px;
}

body.ab-dot-public-profile .portfolio-section__title {
  display: none;
}

body.ab-dot-public-profile .profile-card {
  /* Static profiles: frosted glass (not opaque white) so page gradient shows through */
  background: rgba(255, 255, 255, 0.62) !important;
  background-image: none !important;
  animation: none !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 1.5rem !important;
  box-shadow: var(--ab-dot-profile-shadow-lift) !important;
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body.ab-dot-public-profile .profile-card:hover {
  transform: none !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 14px 34px rgba(15, 23, 42, 0.09),
    0 36px 84px rgba(30, 64, 175, 0.14) !important;
}

/* Animated page bg: readable glass card (override profiles.css dark glass) */
body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-card {
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-card h1,
body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-header-text,
body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-header-text span {
  color: rgba(255, 255, 255, 0.96) !important;
}

/* Avatar */
body.ab-dot-public-profile .profile-img {
  border: 4px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 22px rgba(15, 23, 42, 0.16),
    0 18px 46px rgba(30, 64, 175, 0.13) !important;
}

body.ab-dot-public-profile .profile-avatar-wrap .profile-img.profile-img--initials {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  background: linear-gradient(160deg, #f3f4f6 0%, #e2e4e8 100%) !important;
  color: #3a3f47 !important;
  font-size: clamp(2.75rem, 12vw, 4.5rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
  line-height: 1 !important;
  text-align: center !important;
  user-select: none;
  object-fit: unset !important;
  overflow: hidden;
  box-sizing: border-box;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-avatar-wrap .profile-img.profile-img--initials {
  background: linear-gradient(160deg, #3c4048 0%, #2a2d34 100%) !important;
  color: #eceef1 !important;
}

body.ab-dot-public-profile .profile-img--initials.qc-avatar-initials {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(160deg, #f3f4f6 0%, #e2e4e8 100%) !important;
  color: #3a3f47 !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-img--initials.qc-avatar-initials {
  background: linear-gradient(160deg, #3c4048 0%, #2a2d34 100%) !important;
  color: #eceef1 !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-img {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35) !important;
}

/* Typography */
body.ab-dot-public-profile .profile-card h1,
body.ab-dot-public-profile .profile-card h1.text-2xl {
  font-size: 1.625rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
  color: #1d1d1f !important;
  line-height: 1.2 !important;
}

/* Do not override .profile-header-text margin — Tailwind mt-20 reserves space below the
   absolutely positioned avatar; shrinking it caused the name block to sit under the photo. */

body.ab-dot-public-profile .profile-header-text .profile-title-line,
body.ab-dot-public-profile .profile-header-text .italic,
body.ab-dot-public-profile .profile-header-text span:not([style*="font-weight"]) {
  color: #6e6e73 !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-size: 0.9375rem !important;
}

body.ab-dot-public-profile .profile-header-text span[style*="font-weight"] {
  color: #424245 !important;
  font-weight: 600 !important;
}

/* Dark page backgrounds: frosted cards read as mid-gray — use light muted text */
body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-header-text .profile-title-line,
body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-header-subline .profile-org {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* About / sections */
body.ab-dot-public-profile .about-section {
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 1.25rem !important;
  box-shadow: var(--ab-dot-profile-shadow-soft) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .about-section {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .about-section .about-content,
body.ab-dot-public-profile:not(.ab-profile-bg-light) .about-header {
  color: rgba(255, 255, 255, 0.9) !important;
}

body.ab-dot-public-profile .profile-section[data-section="bio"] .bg-white\/30 {
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.025);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-section[data-section="bio"] .bg-white\/30 {
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(255, 255, 255, 0.11);
}

@media (max-width: 767px) {
  body.ab-dot-public-profile .about-section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  body.ab-dot-public-profile .profile-section[data-section="bio"] > .w-full {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Social row — neutral “chips” instead of rainbow circles */
body.ab-dot-public-profile .social-buttons {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  align-items: center;
}

body.ab-dot-public-profile .social-buttons a {
  position: relative;
  isolation: isolate;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 3rem !important;
  height: 3rem !important;
  padding: 0 !important;
  line-height: 1 !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: var(--ab-dot-profile-shadow-chip) !important;
  animation: none !important;
  color: #1d1d1f !important;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  text-decoration: none !important;
  flex-shrink: 0;
}

body.ab-dot-public-profile .social-buttons a::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--brand-start, #dbeafe), var(--brand-end, #c7d2fe));
  opacity: 0.18;
  filter: blur(8px);
  transition: opacity 0.18s ease, filter 0.18s ease;
}

body.ab-dot-public-profile .social-buttons a:hover {
  transform: translateY(-1px) scale(1.03) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 8px 18px rgba(15, 23, 42, 0.1),
    0 18px 38px rgba(30, 64, 175, 0.11) !important;
}

body.ab-dot-public-profile .social-buttons a:hover::after {
  opacity: 0.32;
  filter: blur(10px);
}

body.ab-dot-public-profile .social-buttons a i {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: #1d1d1f !important;
  -webkit-text-fill-color: currentColor !important;
  pointer-events: none;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .social-buttons a {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: rgba(255, 255, 255, 0.94) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 8px 20px rgba(0, 0, 0, 0.18) !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .social-buttons a::after {
  opacity: 0.24;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .social-buttons a i {
  color: rgba(255, 255, 255, 0.94) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Primary CTAs — square tiles with minimal corner radius */
body.ab-dot-public-profile .profile-button.custom-button {
  border-radius: 6px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  padding: 0.75rem 1.5rem !important;
  min-height: 2.75rem;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.18) !important;
}

body.ab-dot-public-profile .btn-solid.custom-button {
  border: none !important;
}

/* Save Contact — first-class connect tile */
body.ab-dot-public-profile .ab-cta-save-contact {
  grid-column: 1 / -1;
  width: 100%;
  justify-content: center;
  font-weight: 700 !important;
}

/* Contact CTAs — glass mode always uses black text (Connect bar, FAB, Save Contact) */
body.ab-dot-public-profile .mobile-connect-btn.profile-button.btn-transparent,
body.ab-dot-public-profile .mobile-connect-btn.profile-button.btn-transparent i,
body.ab-dot-public-profile .desktop-vcard-fab--transparent,
body.ab-dot-public-profile .desktop-vcard-fab--transparent i,
body.ab-dot-public-profile .profile-button.btn-transparent.ab-cta-save-contact,
body.ab-dot-public-profile .profile-button.btn-transparent.ab-cta-save-contact i,
body.ab-dot-public-profile .save-contact-cta.btn-transparent,
body.ab-dot-public-profile .save-contact-cta.btn-transparent i {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

@media (min-width: 601px) {
  body.ab-dot-public-profile .about-cta-grid:has(.ab-cta-save-contact) {
    grid-template-columns: 1fr 1fr;
  }
  body.ab-dot-public-profile .ab-cta-save-contact {
    grid-column: 1 / -1;
  }
}

body.ab-dot-public-profile #shareButtonContainer,
body.ab-dot-public-profile .bottom-button-container {
  margin-top: 0.5rem !important;
}

/* Section spacing — label belongs to the content below it */
body.ab-dot-public-profile .profile-section {
  padding-top: 1.35rem !important;
  padding-bottom: 0.25rem !important;
}

body.ab-dot-public-profile .about-section > .profile-section:first-child {
  padding-top: 0.5rem !important;
}

body.ab-dot-public-profile .profile-section-label {
  display: block;
  margin: 0 0 0.75rem !important;
  padding: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  color: #86868b !important;
}

body.ab-dot-public-profile .about-section > .profile-section-label,
body.ab-dot-public-profile .profile-container > .profile-section-label {
  margin-top: 1.35rem !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-section-label {
  color: rgba(255, 255, 255, 0.82) !important;
}

body.ab-dot-public-profile .profile-section + .profile-section {
  margin-top: 0 !important;
}

body.ab-dot-public-profile .cta-grid,
body.ab-dot-public-profile .about-cta-grid {
  margin: 0 auto !important;
  max-width: 100%;
  padding: 0 !important;
}

/* Bio block — frosted inset card */
body.ab-dot-public-profile .profile-bio-card {
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 1rem !important;
  box-shadow: var(--ab-dot-profile-shadow-soft) !important;
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-bio-card {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.ab-dot-public-profile .profile-bio-card__title {
  font-size: 1.0625rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: #1d1d1f !important;
  margin: 0 0 0.75rem !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-bio-card__title {
  color: rgba(255, 255, 255, 0.96) !important;
}

body.ab-dot-public-profile .profile-bio-card__text {
  color: #424245 !important;
  font-size: 0.9375rem !important;
  line-height: 1.7 !important;
  margin: 0 !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-bio-card__text {
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Custom link rows — frosted horizontal tiles */
body.ab-dot-public-profile .links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-width: 100%;
}

body.ab-dot-public-profile .profile-link-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.52) !important;
  border: 1px solid rgba(255, 255, 255, 0.48) !important;
  border-radius: 0.75rem !important;
  box-shadow: var(--ab-dot-profile-shadow-soft) !important;
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.ab-dot-public-profile .profile-link-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 102, 204, 0.18) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 10px 22px rgba(15, 23, 42, 0.09),
    0 20px 44px rgba(30, 64, 175, 0.1) !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

body.ab-dot-public-profile .profile-link-row__thumb {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  align-self: center;
  display: block;
}

body.ab-dot-public-profile .profile-link-row__thumb--pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  font-size: 1.35rem;
}

body.ab-dot-public-profile .profile-link-row__thumb--promo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 102, 204, 0.08);
  color: #0066cc;
  font-size: 1.15rem;
}

body.ab-dot-public-profile .profile-link-row__thumb--link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 1.05rem;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row__thumb--pdf {
  background: rgba(255, 255, 255, 0.12);
  color: #fecaca;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row__thumb--promo {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row__thumb--link {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

body.ab-dot-public-profile .profile-link-row--static {
  cursor: default;
}

body.ab-dot-public-profile .profile-link-row--static:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.48) !important;
  box-shadow: var(--ab-dot-profile-shadow-soft) !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row--static:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
}

@media (min-width: 768px) {
  body.ab-dot-public-profile .profile-link-row__thumb {
    width: 4.5rem;
    height: 4.5rem;
  }
}

body.ab-dot-public-profile .profile-link-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

body.ab-dot-public-profile .profile-link-row__label {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1d1d1f !important;
  line-height: 1.3;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row__label {
  color: rgba(255, 255, 255, 0.96) !important;
}

body.ab-dot-public-profile .profile-link-row__host {
  font-size: 0.8125rem;
  color: #6e6e73 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row__host {
  color: rgba(255, 255, 255, 0.65) !important;
}

body.ab-dot-public-profile .profile-link-row__chevron {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #86868b !important;
  opacity: 0.85;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .profile-link-row__chevron {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Video block */
body.ab-dot-public-profile .profile-video-block {
  margin: 1.5rem 0;
  padding: 0 0.5rem;
}

body.ab-dot-public-profile .profile-video-block .video-wrapper {
  border-radius: 1rem !important;
  overflow: hidden;
  box-shadow: var(--ab-dot-profile-shadow-soft) !important;
  border: 1px solid rgba(255, 255, 255, 0.48);
}

body.ab-dot-public-profile .profile-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

body.ab-dot-public-profile .profile-video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
  border-radius: 1rem !important;
}

body.ab-dot-public-profile .profile-video-block video,
body.ab-dot-public-profile .profile-video-block iframe,
body.ab-dot-public-profile .profile-video-block img {
  border-radius: 1rem !important;
  max-width: 100%;
}

@media (min-width: 768px) {
  body.ab-dot-public-profile .profile-video-block {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Custom link cards (legacy image tiles) */
body.ab-dot-public-profile .custom-link-card {
  background: rgba(255, 255, 255, 0.52) !important;
  border: 1px solid rgba(255, 255, 255, 0.48) !important;
  border-radius: 1rem !important;
  box-shadow: var(--ab-dot-profile-shadow-soft) !important;
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .custom-link-card {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

body.ab-dot-public-profile .custom-link-card .link-label {
  color: #1d1d1f !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .custom-link-card .link-label {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Portfolio block */
body.ab-dot-public-profile .portfolio-section {
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 1.25rem !important;
  box-shadow: var(--ab-dot-profile-shadow-soft) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  margin: 2rem 0;
  padding: 1.75rem 1.25rem;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .portfolio-section {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.ab-dot-public-profile .portfolio-section__title {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: #1d1d1f !important;
  text-align: center;
  margin: 0 0 1.25rem !important;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .portfolio-section__title {
  color: rgba(255, 255, 255, 0.96) !important;
}

body.ab-dot-public-profile .portfolio-section__title i {
  color: #0066cc;
  margin-right: 0.35rem;
}

body.ab-dot-public-profile .portfolio-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

body.ab-dot-public-profile .portfolio-item {
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 0.75rem !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.ab-dot-public-profile .portfolio-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .portfolio-item {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

body.ab-dot-public-profile .portfolio-item__media,
body.ab-dot-public-profile .portfolio-item__media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

body.ab-dot-public-profile .portfolio-item__placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.85), rgba(199, 210, 254, 0.75));
  color: #0066cc;
  font-size: 2.5rem;
}

body.ab-dot-public-profile .portfolio-item__body {
  padding: 1.125rem;
}

body.ab-dot-public-profile .portfolio-item__category {
  display: inline-block;
  background: rgba(219, 234, 254, 0.65);
  color: #1e40af;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

body.ab-dot-public-profile .portfolio-item__heading {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1d1d1f !important;
  margin: 0 0 0.35rem;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .portfolio-item__heading {
  color: rgba(255, 255, 255, 0.95) !important;
}

body.ab-dot-public-profile .portfolio-item__desc {
  color: #6e6e73 !important;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .portfolio-item__desc {
  color: rgba(255, 255, 255, 0.72) !important;
}

body.ab-dot-public-profile .portfolio-item__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #0066cc !important;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none !important;
}

body.ab-dot-public-profile .portfolio-item__link:hover {
  text-decoration: underline !important;
}

/* ── Gallery grid ── */
body.ab-dot-public-profile .profile-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 520px) {
  body.ab-dot-public-profile .profile-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body.ab-dot-public-profile .profile-gallery-item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.ab-dot-public-profile .profile-gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

body.ab-dot-public-profile .profile-gallery-item:focus-visible {
  outline: 2px solid rgba(10, 102, 204, 0.65);
  outline-offset: 2px;
}

body.ab-dot-public-profile .profile-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.ab-dot-public-profile .profile-gallery-item__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

/* ── Gallery lightbox ── */
body.ab-dot-public-profile.gallery-lightbox-open {
  overflow: hidden;
}

body.ab-dot-public-profile .profile-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

body.ab-dot-public-profile .profile-gallery-lightbox[hidden] {
  display: none !important;
}

body.ab-dot-public-profile .profile-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.ab-dot-public-profile .profile-gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.ab-dot-public-profile .profile-gallery-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1 1 auto;
}

body.ab-dot-public-profile .profile-gallery-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 720px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  transition: opacity 0.15s ease;
}

body.ab-dot-public-profile .profile-gallery-lightbox__img.is-loading {
  opacity: 0.92;
}

body.ab-dot-public-profile .profile-gallery-lightbox__close,
body.ab-dot-public-profile .profile-gallery-lightbox__nav {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

body.ab-dot-public-profile .profile-gallery-lightbox__close {
  top: 0.35rem;
  right: 0.35rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
}

body.ab-dot-public-profile .profile-gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  font-size: 1rem;
}

body.ab-dot-public-profile .profile-gallery-lightbox__nav--prev {
  left: 0.35rem;
}

body.ab-dot-public-profile .profile-gallery-lightbox__nav--next {
  right: 0.35rem;
}

body.ab-dot-public-profile .profile-gallery-lightbox__close:hover,
body.ab-dot-public-profile .profile-gallery-lightbox__nav:hover {
  background: rgba(15, 23, 42, 0.72);
}

body.ab-dot-public-profile .profile-gallery-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

body.ab-dot-public-profile .profile-gallery-lightbox__meta {
  padding: 0 0.25rem;
  color: rgba(255, 255, 255, 0.92);
}

body.ab-dot-public-profile .profile-gallery-lightbox__caption {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

body.ab-dot-public-profile .profile-gallery-lightbox__caption:empty {
  display: none;
}

body.ab-dot-public-profile .profile-gallery-lightbox__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.ab-dot-public-profile .profile-gallery-lightbox__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

body.ab-dot-public-profile .profile-gallery-lightbox__link:hover {
  background: rgba(255, 255, 255, 0.22);
}

body.ab-dot-public-profile .profile-gallery-lightbox__count {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 640px) {
  body.ab-dot-public-profile .profile-gallery-lightbox__nav {
    width: 2.35rem;
    height: 2.35rem;
  }

  body.ab-dot-public-profile .profile-gallery-lightbox__img {
    max-height: min(64vh, 560px);
    border-radius: 10px;
  }
}

/* ── Visit card ── */
body.ab-dot-public-profile .profile-visit-card {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

body.ab-dot-public-profile .profile-visit-card__name {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

body.ab-dot-public-profile .profile-visit-card__address,
body.ab-dot-public-profile .profile-visit-card__hours p,
body.ab-dot-public-profile .profile-visit-card__notes {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
}

body.ab-dot-public-profile .profile-visit-card__hours-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

body.ab-dot-public-profile .profile-visit-card__map {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0066ff;
  text-decoration: none;
}

body.ab-dot-public-profile .profile-visit-card__map:hover {
  text-decoration: underline;
}

/* ── FAQ accordion ── */
body.ab-dot-public-profile .profile-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

body.ab-dot-public-profile .profile-faq-item {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

body.ab-dot-public-profile .profile-faq-item__q {
  padding: 0.75rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
}

body.ab-dot-public-profile .profile-faq-item__q::-webkit-details-marker {
  display: none;
}

body.ab-dot-public-profile .profile-faq-item__a {
  padding: 0 0.9rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #475569;
}

body.ab-dot-public-profile .ab-qc-faq-item__fields textarea {
  min-height: 4.5rem;
  resize: vertical;
}

@media (prefers-reduced-motion: reduce) {
  body.ab-dot-public-profile .profile-link-row:hover,
  body.ab-dot-public-profile .portfolio-item:hover {
    transform: none;
  }
}

/* Portfolio block (inline styles in PHP) — legacy selector kept for specificity */
body.ab-dot-public-profile .portfolio-section h3 {
  color: #1d1d1f !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}

/* ── Owner preview chrome (sticky stack: toolbar + completion banner) ── */
body.ab-dot-public-profile:has(.ab-owner-chrome) {
  display: block !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
}

body.ab-dot-public-profile .ab-owner-chrome {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  flex-shrink: 0;
}

body.ab-dot-public-profile .ab-owner-chrome .ab-owner-polish.is-collapsed,
body.ab-dot-public-profile.owner-polish-dismissed .ab-owner-polish {
  display: none !important;
}

/* ── Owner preview bar ── */
body.ab-dot-public-profile .ab-owner-polish {
  width: 100%;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

body.ab-dot-public-profile .ab-owner-polish__inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 10px 1rem 12px;
}

body.ab-dot-public-profile .ab-owner-polish__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

body.ab-dot-public-profile .ab-owner-polish__pct {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #475569;
}

body.ab-dot-public-profile .ab-owner-polish__dismiss {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
}

body.ab-dot-public-profile .ab-owner-polish__dismiss:hover {
  color: #64748b;
}

body.ab-dot-public-profile .ab-owner-polish__bar {
  height: 4px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-bottom: 0.625rem;
}

body.ab-dot-public-profile .ab-owner-polish__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0066cc, #6366f1);
  transition: width 0.25s ease;
}

body.ab-dot-public-profile .ab-owner-polish__tips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

body.ab-dot-public-profile .ab-owner-polish__tips a {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0066cc !important;
  text-decoration: none !important;
}

body.ab-dot-public-profile .ab-owner-polish__tips a:hover {
  text-decoration: underline !important;
}

body.ab-dot-public-profile #topEditBar.top-edit-bar {
  position: relative;
  top: 0;
  z-index: 1;
  width: 100%;
  margin: 0;
  background: rgba(255, 255, 255, 0.72) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 4px 20px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
}

body.ab-dot-public-profile .ab-owner-chrome .ab-owner-polish {
  border-top: none;
}

body.ab-dot-public-profile .ab-owner-chrome #topEditBar.top-edit-bar {
  border-bottom: none !important;
  box-shadow: none;
}

body.ab-dot-public-profile.owner-polish-dismissed .ab-owner-chrome #topEditBar.top-edit-bar,
body.ab-dot-public-profile .ab-owner-chrome #topEditBar.top-edit-bar:only-child {
  border-bottom: 1px solid rgba(15, 23, 42, 0.07) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 4px 20px rgba(15, 23, 42, 0.05);
}

body.ab-dot-public-profile .ab-owner-chrome ~ .profile-wrapper {
  scroll-margin-top: 5rem;
}

body.ab-dot-public-profile #topEditBar.top-edit-bar ~ * {
  scroll-margin-top: 80px;
}

body.ab-dot-public-profile .top-edit-bar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

body.ab-dot-public-profile .top-edit-bar-message {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 7px 14px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.55), rgba(255, 255, 255, 0.9));
  border-radius: 9999px;
  border: 1px solid rgba(0, 102, 204, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

body.ab-dot-public-profile .top-edit-bar-message i {
  color: #0066cc;
  font-size: 13px;
}

body.ab-dot-public-profile .top-edit-bar-views {
  margin-left: 0.35rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(15, 23, 42, 0.12);
  color: #0066cc;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

body.ab-dot-public-profile .top-edit-bar-views:hover {
  text-decoration: underline;
}

body.ab-dot-public-profile .top-edit-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.ab-dot-public-profile .top-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  letter-spacing: -0.01em;
  font-family: inherit;
}

body.ab-dot-public-profile .top-edit-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 102, 204, 0.22);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.1);
}

body.ab-dot-public-profile .top-edit-btn i {
  font-size: 13px;
  opacity: 0.85;
  color: #0066cc;
}

body.ab-dot-public-profile .top-edit-btn--editor {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.2);
}

body.ab-dot-public-profile .top-edit-btn--editor i {
  color: #93c5fd;
}

body.ab-dot-public-profile .top-edit-btn--editor:hover {
  border-color: rgba(15, 23, 42, 0.35);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

@media (max-width: 768px) {
  body.ab-dot-public-profile .top-edit-bar-content {
    flex-direction: column;
    padding: 12px 14px;
    gap: 12px;
  }

  body.ab-dot-public-profile .top-edit-bar-message {
    width: 100%;
    justify-content: center;
    font-size: 12px;
  }

  body.ab-dot-public-profile .top-edit-bar-views {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    width: 100%;
    text-align: center;
  }

  body.ab-dot-public-profile .top-edit-bar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  body.ab-dot-public-profile .top-edit-btn {
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    font-size: 11px;
    padding: 10px 6px;
  }

  body.ab-dot-public-profile .top-edit-btn span {
    display: block;
    font-size: 10px;
    line-height: 1.2;
  }

  body.ab-dot-public-profile .top-edit-btn i {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ab-dot-public-profile .top-edit-btn:hover {
    transform: none;
  }
}

/* Footer strip if present */
body.ab-dot-public-profile .profile-footer,
body.ab-dot-public-profile footer {
  color: #6e6e73 !important;
  font-size: 0.8125rem !important;
}

/* ── Linktree-style Abutic brand chip (top left) ── */
body.ab-dot-public-profile .ab-profile-brand-chip {
  position: fixed;
  z-index: 900;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 22px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.ab-dot-public-profile .ab-profile-brand-chip:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 26px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}

body.ab-dot-public-profile .ab-profile-brand-chip:active {
  transform: scale(0.96);
}

body.ab-dot-public-profile .ab-profile-brand-chip img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  display: block;
  border-radius: 0.35rem;
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .ab-profile-brand-chip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(24, 24, 27, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 8px 22px rgba(0, 0, 0, 0.28);
}

body.ab-dot-public-profile:not(.ab-profile-bg-light) .ab-profile-brand-chip:hover {
  background: rgba(24, 24, 27, 0.72);
}

body.ab-dot-public-profile.has-owner-preview .ab-profile-brand-chip {
  top: max(4.25rem, calc(env(safe-area-inset-top, 0px) + 3.5rem));
}

/* Hide promo chrome while the owner is in the full profile editor */
body.ab-dot-public-profile.has-profile-editor .ab-profile-brand-chip,
body.ab-dot-public-profile.has-profile-editor .ab-profile-brand-sheet {
  display: none !important;
}

body.ab-dot-public-profile.ab-brand-sheet-open {
  overflow: hidden;
}

body.ab-dot-public-profile.ab-brand-sheet-open .ios-bottom-bar,
body.ab-dot-public-profile.ab-brand-sheet-open .chrome-backdrop {
  display: none !important;
}

/* Promo sheet — above ios-bottom-bar (9999) / chrome-backdrop (9998) */
body.ab-dot-public-profile .ab-profile-brand-sheet {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

body.ab-dot-public-profile .ab-profile-brand-sheet[hidden] {
  display: none !important;
}

body.ab-dot-public-profile .ab-profile-brand-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
}

body.ab-dot-public-profile .ab-profile-brand-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  margin: 0;
  padding: 1.35rem 1.25rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
  border-radius: 1.35rem 1.35rem 0 0;
  background: #f4f6f8;
  box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.18);
  animation: ab-profile-brand-sheet-in 0.28s ease;
}

@media (min-width: 640px) {
  body.ab-dot-public-profile .ab-profile-brand-sheet {
    align-items: center;
    padding: 1rem;
  }

  body.ab-dot-public-profile .ab-profile-brand-sheet__panel {
    border-radius: 1.25rem;
    padding: 1.5rem 1.4rem 1.4rem;
  }
}

@keyframes ab-profile-brand-sheet-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.ab-dot-public-profile .ab-profile-brand-sheet__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 9999px;
  background: #fff;
  color: #52525b;
  cursor: pointer;
}

body.ab-dot-public-profile .ab-profile-brand-sheet__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.85rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

body.ab-dot-public-profile .ab-profile-brand-sheet__mark img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

body.ab-dot-public-profile .ab-profile-brand-sheet__title {
  margin: 0;
  max-width: 16rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #111827;
}

body.ab-dot-public-profile .ab-profile-brand-sheet__lede {
  margin: 0.55rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #6b7280;
}

body.ab-dot-public-profile .ab-profile-brand-sheet__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.15rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

body.ab-dot-public-profile .ab-profile-brand-sheet__link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4b5563 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.ab-dot-public-profile .ab-profile-brand-chip,
  body.ab-dot-public-profile .ab-profile-brand-sheet__panel {
    transition: none;
    animation: none;
  }
}
