/* Editable labels can be longer than their defaults; keep controls usable. */
.sapub .sapub-person-nav a{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;height:auto}
.sapub .sapub-back,.sapub .sapub-status,.sapub .sapub-brand-wordmark,.sapub .sapub-brand-name{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.sapub .sapub-brand::before{right:0;max-width:100%}
.sapub .sapub-lightbox-count{max-width:calc(100% - 20px);white-space:normal;overflow-wrap:anywhere;text-align:center}

/* Preserve desktop line breaks; reflow copied prose on narrow screens.
   Blank-line paragraph separators remain outside the inline runs. */
.sapub .sapub-introduction-text{white-space:pre-line;overflow-wrap:anywhere;word-break:normal}
@media(max-width:767px){
 .sapub .sapub-introduction-run{white-space:normal}
}

/* Mobile profile items flow in source order, with no bullet or fixed columns. */
@media(max-width:767px){
 .sapub.sapub-person .sapub-module .sapub-service-list,
 .sapub.sapub-person .sapub-module .sapub-feature-tags{
  display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start;
  gap:12px 10px;list-style:none;margin:0;padding:0 0 6px;
 }
 .sapub.sapub-person .sapub-module .sapub-service-list>li,
 .sapub.sapub-person .sapub-module .sapub-feature-tags>li{
  display:block;flex:0 1 auto;box-sizing:border-box;min-width:0;max-width:100%;
  width:auto;height:auto;margin:0;padding:9px 12px;list-style:none;
  border:1px solid var(--sapub-line);border-radius:11px;background:rgb(255 255 255 / 78%);
  box-shadow:0 3px 0 rgb(78 53 64 / 7%),0 6px 10px rgb(78 53 64 / 6%);
  color:var(--sapub-ink);font-size:15px;font-weight:500;line-height:1.7;
  white-space:normal;word-break:normal;overflow-wrap:anywhere;text-align:left;
 }
 .sapub.sapub-person .sapub-module .sapub-service-list>li::before,
 .sapub.sapub-person .sapub-module .sapub-feature-tags>li::before{
  content:none;display:none;
 }
 .sapub.sapub-person .sapub-module .sapub-service-list>li::marker,
 .sapub.sapub-person .sapub-module .sapub-feature-tags>li::marker{content:""}
}

/* Mobile: two short items per row; longer items span the row. No content is hidden. */
@media(max-width:767px){
 .sapub.sapub-person .sapub-mobile-cards-module{padding:16px 14px;margin-bottom:14px}
 .sapub.sapub-person .sapub-mobile-cards-module>h3{margin-bottom:12px}
 .sapub.sapub-person .sapub-module .sapub-mobile-cards-ready{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:10px;
 }
 .sapub.sapub-person .sapub-module .sapub-mobile-cards-ready>li{
  display:flex;align-items:center;justify-content:center;width:fit-content;max-width:100%;justify-self:center;grid-column:auto;padding:8px 10px;font-size:14px;line-height:1.618;text-align:center;
 }
 .sapub.sapub-person .sapub-module .sapub-mobile-cards-ready>li.sapub-mobile-wide{
  display:block;grid-column:1 / -1;width:fit-content;max-width:calc(100% - 12px);justify-self:center;padding:10px 12px;text-align:left;
 }
 .sapub.sapub-person .sapub-module .sapub-mobile-cards-ready>li.sapub-mobile-single{
  grid-column:1 / -1;width:fit-content;max-width:calc(100% - 12px);justify-self:center;
 }
}

/* Mobile photo viewer: one continuous backdrop, no inset dialog panel. */
@media(max-width:767px){
 .sapub.sapub-person dialog.sapub-lightbox{
  box-sizing:border-box;position:fixed;inset:0;margin:0;padding:0;
  width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;
  border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden;
  touch-action:pan-y pinch-zoom;
 }
 .sapub.sapub-person dialog.sapub-lightbox[open]{display:grid;place-items:center}
 .sapub.sapub-person dialog.sapub-lightbox::backdrop{background:#101010}
 .sapub.sapub-person dialog.sapub-lightbox>img{
  display:block;box-sizing:border-box;width:auto;height:auto;min-width:0;min-height:0;
  max-width:100%;max-height:calc(100vh - 112px);
  max-height:calc(100dvh - 112px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;object-fit:contain;
 }
 .sapub.sapub-person dialog.sapub-lightbox>button{
  display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;
  padding:0;border:0;border-radius:50%;color:#fff;background:rgb(0 0 0 / 42%);box-shadow:none;
 }
 .sapub.sapub-person dialog.sapub-lightbox>button[hidden]{display:none}
 .sapub.sapub-person dialog.sapub-lightbox>.sapub-lightbox-close{
  top:calc(10px + env(safe-area-inset-top,0px));right:calc(10px + env(safe-area-inset-right,0px));
  width:44px;height:44px;transform:none;font-size:30px;line-height:1;
 }
 .sapub.sapub-person dialog.sapub-lightbox>.sapub-lightbox-prev{left:8px;width:44px;height:48px}
 .sapub.sapub-person dialog.sapub-lightbox>.sapub-lightbox-next{right:8px;width:44px;height:48px}
 .sapub.sapub-person dialog.sapub-lightbox>.sapub-lightbox-count{
  bottom:calc(12px + env(safe-area-inset-bottom,0px));margin:0;padding:3px 10px;
  background:transparent;border:0;box-shadow:none;font-size:13px;line-height:1.6;
 }
}

/* Mobile section navigation occupies one swipeable row. */
@media(max-width:767px){
 .sapub.sapub-person .sapub-person-nav{
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;
  gap:6px;box-sizing:border-box;width:100%;max-width:100%;min-width:0;
  margin:0;padding:8px 2px 10px;overflow-x:auto;overflow-y:hidden;
  scrollbar-width:thin;scrollbar-color:#cdb0c0 transparent;scroll-padding-inline:4px;
  -webkit-overflow-scrolling:touch;
 }
 .sapub.sapub-person .sapub-person-nav>a{
  display:inline-flex;flex:0 0 auto;width:auto;max-width:none;min-width:0;
  height:44px;min-height:44px;box-sizing:border-box;padding:8px 12px;
  font-size:14px;font-weight:600;line-height:1.5;border-radius:10px;
  white-space:nowrap;overflow-wrap:normal;word-break:normal;
 }
 .sapub.sapub-person .sapub-person-nav>a:focus-visible{outline-offset:-3px}
}

/* Arrows fade while idle; keyboard focus and the close button stay visible. */
.sapub.sapub-person .sapub-lightbox>button,.sapub.sapub-person .sapub-lightbox-count{z-index:2}
.sapub.sapub-person .sapub-lightbox-prev,.sapub.sapub-person .sapub-lightbox-next{transition:opacity .2s ease}
.sapub.sapub-person .sapub-controls-idle>.sapub-lightbox-prev,
.sapub.sapub-person .sapub-controls-idle>.sapub-lightbox-next{opacity:0;pointer-events:none}
.sapub.sapub-person .sapub-controls-idle>.sapub-lightbox-prev:focus-visible,
.sapub.sapub-person .sapub-controls-idle>.sapub-lightbox-next:focus-visible{opacity:1;pointer-events:auto}
@media(max-width:767px){
 .sapub.sapub-person dialog.sapub-lightbox>.sapub-lightbox-incoming{position:absolute;left:50%;top:50%;pointer-events:none}
}
@media(prefers-reduced-motion:reduce){
 .sapub.sapub-person .sapub-lightbox-prev,.sapub.sapub-person .sapub-lightbox-next{transition:none}
}
