
.profile-single-column {
  display: grid;
  gap: 1.25rem;
}
.marking-photo-grid a,
.profile-gallery a[data-photo-lightbox] {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: inherit;
  border-radius: inherit;
  cursor: zoom-in;
  text-decoration: none;
}

.marking-photo-grid a::after,
.profile-gallery a[data-photo-lightbox]::after {
  content: "View full size";
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.42rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(26, 24, 21, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.marking-photo-grid a:hover::after,
.marking-photo-grid a:focus-visible::after,
.profile-gallery a[data-photo-lightbox]:hover::after,
.profile-gallery a[data-photo-lightbox]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.marking-photo-grid a:focus-visible,
.profile-gallery a[data-photo-lightbox]:focus-visible {
  outline: 3px solid #b96931;
  outline-offset: 4px;
}

body.profile-media-locked {
  overflow: hidden;
}

.markings-lightbox {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(0.8rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #26221d;
}

.markings-lightbox[open] {
  display: grid;
  place-items: center;
}

.markings-lightbox::backdrop {
  background: rgba(20, 18, 16, 0.82);
  backdrop-filter: blur(7px);
}

.markings-lightbox-frame {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: min(96rem, 100%);
  max-height: 100%;
  padding: clamp(0.75rem, 2vw, 1.35rem);
  border: 1px solid rgba(170, 112, 68, 0.45);
  border-radius: clamp(1rem, 2vw, 1.6rem);
  background: #f7f2e9;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.5);
}

.markings-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: clamp(0.6rem, 1.4vw, 1rem);
  background: #ded5c7;
  box-shadow: 0 0.8rem 2.5rem rgba(38, 34, 29, 0.18);
}

.markings-lightbox-image[hidden],
.markings-lightbox-missing[hidden] {
  display: none;
}

.markings-lightbox-close {
  position: absolute;
  z-index: 2;
  top: clamp(1rem, 2.5vw, 1.7rem);
  right: clamp(1rem, 2.5vw, 1.7rem);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(26, 24, 21, 0.8);
  color: #fff;
  font: 400 1.9rem/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 0.45rem 1.2rem rgba(0, 0, 0, 0.26);
}

.markings-lightbox-close:hover {
  background: #9b4e2c;
}

.markings-lightbox-close:focus-visible {
  outline: 3px solid #f0c28e;
  outline-offset: 3px;
}

.markings-lightbox-caption {
  margin: 0.8rem 3.25rem 0 0;
  justify-self: start;
  color: #62584b;
  font-size: 0.88rem;
  line-height: 1.4;
}

.markings-lightbox-missing {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: min(44rem, 80vw);
  min-height: min(28rem, 58vh);
  margin: 0;
  padding: 2rem;
  border: 2px dashed #ba9e7c;
  border-radius: 1rem;
  background: #eee5d8;
  color: #5c5042;
  text-align: center;
  font-weight: 700;
}

.profile-gallery-scroller {
  position: relative;
  width: 100%;
  isolation: isolate;
}

.profile-gallery-track.subphoto-grid {
  position: relative;
  display: flex;
  width: 100%;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.profile-gallery-track::-webkit-scrollbar {
  display: none;
}

.profile-gallery-track:focus-visible {
  outline: 3px solid #b96931;
  outline-offset: 4px;
}

.profile-gallery-track.subphoto-grid figure {
  flex: 0 0 calc(33.333333% - 0.666667rem);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.profile-gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 1px solid rgba(119, 75, 44, 0.35);
  border-radius: 50%;
  background: rgba(247, 242, 233, 0.94);
  color: #713c24;
  font: 700 1.35rem/1 system-ui, sans-serif;
  transform: translateY(-50%);
  cursor: pointer;
  box-shadow: 0 0.45rem 1.2rem rgba(38, 28, 21, 0.24);
  transition: background 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.profile-gallery-arrow:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.profile-gallery-arrow:focus-visible {
  outline: 3px solid #f0c28e;
  outline-offset: 3px;
}

.profile-gallery-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.profile-gallery-previous {
  left: 0.55rem;
}

.profile-gallery-next {
  right: 0.55rem;
}

.profile-gallery-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .profile-gallery-track.subphoto-grid figure {
    flex-basis: calc(50% - 0.5rem);
  }
}

@media (max-width: 640px) {
  .marking-photo-grid a::after,
  .profile-gallery a[data-photo-lightbox]::after {
    opacity: 1;
    transform: none;
  }

  .markings-lightbox {
    padding: 0.55rem;
  }

  .markings-lightbox-frame {
    padding: 0.55rem;
    border-radius: 1rem;
  }

  .markings-lightbox-image {
    max-height: calc(100vh - 6.8rem);
    border-radius: 0.65rem;
  }

  .markings-lightbox-close {
    top: 0.85rem;
    right: 0.85rem;
  }

  .markings-lightbox-caption {
    margin: 0.65rem 3rem 0 0.2rem;
  }

  .profile-gallery-track.subphoto-grid figure {
    flex-basis: 100%;
  }

  .profile-gallery-arrow {
    width: 2.55rem;
    height: 2.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marking-photo-grid a::after,
  .profile-gallery-arrow {
    transition: none;
  }

  .profile-gallery-track {
    scroll-behavior: auto;
  }
}

.pepper-full {
  background: var(--spice-accent, #b96931) !important;
}

.pepper-partial {
  background: linear-gradient(90deg, var(--spice-accent, #b96931) var(--pepper-fill), rgba(185, 105, 49, 0.18) var(--pepper-fill)) !important;
}

.profile-warm {
  --spice-accent: #d97706;
  --spice-accent-strong: #b45309;
}

.profile-warm .spice-panel {
  border-color: #d97706;
}

.profile-warm .spice-kicker,
.profile-warm .spice-score {
  color: #b45309;
}

.profile-warm .pepper-full {
  background: #d97706 !important;
}

.profile-warm .pepper-partial {
  background: linear-gradient(90deg, #d97706 var(--pepper-fill), rgba(217, 119, 6, 0.18) var(--pepper-fill)) !important;
}
