:root {
  --brown-950: #1e1209;
  --brown-900: #2a190d;
  --brown-800: #3b2415;
  --brown-700: #4e301c;
  --brown-600: #6b4226;
  --tan-400: #b58a5c;
  --tan-300: #cba579;
  --beige-200: #ede1cc;
  --beige-100: #f5ecdb;
  --beige-050: #faf5ea;
  --gold: #cfa15f;

  --font-display: "Playfair Display", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Nunito Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--brown-900);
  color: var(--beige-100);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(207, 161, 95, 0.14), transparent 60%),
    linear-gradient(180deg, var(--brown-950) 0%, var(--brown-900) 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(237, 225, 204, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--tan-300);
  margin: 0 0 1.25rem;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  margin: 0;
  color: var(--beige-050);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-dates {
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--tan-300);
  margin: 1rem 0 0;
}

.hero-dates .dash { color: var(--tan-400); margin: 0 0.35em; }

.hero-tagline {
  font-style: italic;
  font-size: 1.4rem;
  color: var(--beige-200);
  margin: 1.75rem 0 0;
}

.hero-paw {
  margin-top: 2.5rem;
  font-size: 1.6rem;
  opacity: 0.6;
  filter: grayscale(0.2) sepia(0.3);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--tan-400);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  opacity: 0.7;
  text-decoration: none;
}

.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--tan-300);
  animation: scrollcue 1.8s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

@media (max-width: 720px) {
  /* A mouse-wheel cue doesn't mean anything on a touchscreen — swap it for
     a fingertip sliding down a swipe track. */
  .scroll-cue {
    width: 2px;
    height: 34px;
    border: none;
    border-radius: 1px;
    background: rgba(203, 165, 121, 0.3);
    padding-top: 0;
    display: block;
  }

  .scroll-cue span {
    position: absolute;
    top: 0;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tan-300);
    animation: scrollcue-finger 1.8s ease-in-out infinite;
  }

  @keyframes scrollcue-finger {
    0% { opacity: 0; transform: translate(-50%, 27px); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -3px); }
  }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--beige-050);
  text-align: center;
  margin: 0 0 0.5rem;
}

.section-subtitle {
  text-align: center;
  font-style: italic;
  color: var(--tan-300);
  font-size: 1.1rem;
  margin: 0 0 2.75rem;
}

.story-section .section-title,
.tribute-section .section-title {
  margin-bottom: 2.25rem;
}

.story-content,
.tribute-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.placeholder-copy {
  color: var(--beige-200);
  font-size: 1.25rem;
  line-height: 1.75;
  opacity: 0.85;
}

.paw-divider {
  margin-top: 2.5rem;
  letter-spacing: 0.6em;
  opacity: 0.5;
  font-size: 1.1rem;
}

.tribute-section {
  text-align: center;
}

.final-banner {
  margin: 0;
}

.final-banner-photo {
  display: block;
  width: 100%;
  max-width: 840px;
  margin: 2.5rem auto 0;
  border-radius: 12px;
  border: 1px solid rgba(207, 161, 95, 0.25);
}

.final-banner-caption {
  margin: 0.6rem auto 0;
  max-width: 840px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--beige-200);
  text-align: center;
}

.closing-line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--beige-050);
  margin: 0;
}

.closing-subline {
  font-style: italic;
  font-size: 1.3rem;
  color: var(--beige-200);
  margin: 1rem 0 0;
}

/* ---------- Narrative sections ---------- */

.narrative-section .section-title {
  margin-bottom: 0.4rem;
}

.narrative-section .section-subtitle {
  margin-bottom: 2.5rem;
}

.narrative-section:not(:has(.section-subtitle)) .section-title {
  margin-bottom: 2.5rem;
}

.narrative-section {
  max-width: 1160px;
}

.section-prose {
  max-width: 1056px;
  margin: 0 auto;
  text-align: left;
}

.section-prose::after {
  content: "";
  display: table;
  clear: both;
}

.section-prose p {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--beige-100);
}

.subsection-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--beige-050);
  margin: 2.5rem 0 1.25rem;
  clear: both;
}

.quirk-list {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
  color: var(--beige-100);
  font-size: 1.25rem;
  line-height: 1.75;
}

.quirk-list li { margin-bottom: 0.4rem; }

.thank-you-item {
  padding-left: 1rem;
  border-left: 2px solid rgba(207, 161, 95, 0.35);
}

/* Floated inline photos */

.float-photo {
  width: clamp(200px, 32vw, 300px);
  margin: 0.25rem 0 1.5rem;
}

.float-photo.chewing-phase img.media-tile {
  aspect-ratio: 3 / 5;
  object-fit: cover;
}

@media (max-width: 720px) {
  .float-photo.chewing-phase img.media-tile {
    aspect-ratio: 4 / 3;
  }
}

.float-photo.harness-video {
  width: clamp(150px, 24vw, 225px);
}

.float-photo.float-left {
  float: left;
  margin-right: 1.75rem;
}

.float-photo.float-right {
  float: right;
  margin-left: 1.75rem;
}

.float-photo .media-tile {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.float-photo img.media-tile {
  cursor: pointer;
  object-fit: cover;
  border: 1px solid rgba(207, 161, 95, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.float-photo img.media-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.float-video {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(207, 161, 95, 0.25);
  background: var(--brown-800);
}

.float-photo figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--beige-200);
  text-align: center;
}

/* Multi-photo mosaic (one large photo, two smaller below) */

.float-photo.photo-group {
  width: clamp(240px, 36vw, 360px);
}

.float-photo.photo-group.early-signs-mosaic {
  width: clamp(168px, 28.6vw, 286px);
}

.trails-video {
  width: fit-content;
  max-width: 100%;
}

.trails-video .float-video {
  width: auto;
  height: 399px;
  max-width: 100%;
}

@media (max-width: 720px) {
  .trails-video .float-video {
    width: 100%;
    height: auto;
  }
}

.beach-trip-video {
  clear: right;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 11.5px;
}

.beach-trip-video .float-video {
  width: auto;
  height: 302px;
  max-width: 100%;
}

@media (max-width: 720px) {
  .beach-trip-video .float-video {
    width: 100%;
    height: auto;
  }
}

.photo-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.photo-group-grid img:first-child,
.photo-group-grid .video-thumb:first-child {
  grid-column: 1 / 3;
  aspect-ratio: 16 / 10;
}

.photo-group-grid img:not(:first-child),
.photo-group-grid .video-thumb:not(:first-child) {
  aspect-ratio: 1 / 1;
}

.float-photo.photo-group.lung-comparison {
  width: clamp(260px, 38vw, 380px);
  clear: right;
  margin-top: 0;
  margin-bottom: 61px;
}

.float-photo.photo-group.eye-worst {
  width: clamp(240px, 36vw, 360px);
  clear: right;
}

.eye-worst-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.float-photo.photo-group.final-moments {
  width: clamp(160px, 22vw, 221px);
  clear: right;
}

.lung-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Two-item stacked layout (e.g. one photo above one video) */

.float-photo.photo-pair {
  width: clamp(120px, 18vw, 180px);
}

.photo-pair-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.photo-pair-grid > img.media-tile,
.photo-pair-grid > .video-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-pair-grid > video.float-video {
  width: 100%;
  height: auto;
}

/* Standalone row of media (e.g. several videos + one photo), centered
   at the end of a section rather than floated beside a paragraph. Each
   item keeps its own natural aspect ratio at a shared height, with its
   own italic caption underneath. */

.quad-grid {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 1.25rem;
  clear: both;
  width: max-content;
  max-width: none;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  margin-left: 50%;
  transform: translateX(-50%);
}

.quad-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.quad-grid-item img.media-tile {
  width: auto;
  height: 500px;
  max-width: 100%;
  aspect-ratio: auto;
  cursor: pointer;
  border: 1px solid rgba(207, 161, 95, 0.25);
  border-radius: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.quad-grid-item img.media-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.quad-grid-item video.float-video {
  width: auto;
  height: 500px;
  max-width: 100%;
}

.quad-grid-item figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--beige-200);
  text-align: center;
}

@media (max-width: 720px) {
  .quad-grid {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }

  .quad-grid-item {
    width: 100%;
    max-width: 320px;
  }

  .quad-grid-item img.media-tile,
  .quad-grid-item video.float-video {
    width: 100%;
    height: auto;
  }
}

/* Bark Social footer: two videos side by side, with a photo gallery grid
   to their right — sits centered at the end of the section. */

.bark-social-footer {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 1.75rem;
  clear: both;
  width: max-content;
  max-width: none;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  margin-left: 50%;
  transform: translateX(-50%);
}

.video-pair {
  display: flex;
  gap: 0.75rem;
}

.video-pair-item {
  margin: 0;
}

.video-pair-item video.float-video {
  width: auto;
  height: 500px;
  max-width: 100%;
}

.video-pair-item figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--beige-200);
  text-align: center;
}

.inline-photo-gallery {
  margin: 0;
  width: 500px;
  max-width: 100%;
}

.at-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.4rem;
  height: 500px;
}

.at-home-grid img.media-tile {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid rgba(207, 161, 95, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.at-home-grid img.media-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.inline-photo-gallery figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--beige-200);
  text-align: center;
}

@media (max-width: 720px) {
  .bark-social-footer {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }

  .video-pair {
    flex-direction: column;
    align-items: center;
  }

  .video-pair-item video.float-video {
    width: 100%;
    height: auto;
  }

  .at-home-grid {
    height: auto;
  }

  .at-home-grid img.media-tile {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* Inline video thumbnail (muted preview frame + play badge) used alongside
   photos in a figure — photos and videos still open in separate lightbox
   sets, they just sit next to each other visually. */

.video-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(207, 161, 95, 0.25);
  background: var(--brown-800);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.video-thumb .play-badge {
  opacity: 1;
  font-size: 1.6rem;
  background: rgba(30, 18, 9, 0.3);
}

/* Centered, equal-height media pair (mosaic + video side by side) */

.media-duo {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 1.75rem;
  clear: both;
  width: max-content;
  max-width: none;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  margin-left: 50%;
  transform: translateX(-50%);
}

.float-photo.media-duo-item {
  float: none;
  width: auto;
  margin: 0;
}

.media-duo-mosaic {
  display: flex;
  flex-direction: column;
  width: 320px;
  height: 500px;
  gap: 0.5rem;
}

.media-duo-mosaic > img.media-tile {
  height: 62%;
  width: 100%;
  object-fit: cover;
}

.media-duo-mosaic-bottom {
  display: flex;
  height: 38%;
  gap: 0.5rem;
}

.media-duo-mosaic-bottom img.media-tile {
  height: 100%;
  flex: 1 1 0;
  min-width: 0;
  object-fit: cover;
}

.float-video.media-duo-video {
  height: 500px;
  width: auto;
}

@media (max-width: 720px) {
  .media-duo {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }

  .float-photo.media-duo-item {
    width: 100%;
    max-width: 320px;
  }

  .media-duo-mosaic {
    width: 100%;
    height: auto;
  }

  .media-duo-mosaic > img.media-tile {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .media-duo-mosaic-bottom {
    height: auto;
  }

  .media-duo-mosaic-bottom img.media-tile {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .float-video.media-duo-video {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 720px) {
  .float-photo.float-left,
  .float-photo.float-right {
    float: none;
    width: 100%;
    margin: 0 0 1.75rem;
  }

  .float-photo.photo-group.early-signs-mosaic,
  .float-photo.photo-group.lung-comparison,
  .float-photo.photo-group.eye-worst,
  .float-photo.photo-group.final-moments {
    width: 100%;
  }

  .float-photo.photo-group.lung-comparison {
    margin-bottom: 1.5rem;
  }

  /* On mobile, media stacks in normal document order rather than floating
     beside text, so a few pieces need to visually move relative to the
     paragraph they illustrate. `order` re-sequences them without touching
     the desktop DOM position floats depend on. */
  #before-apollo .section-prose,
  #early-days .section-prose,
  #bark-social .section-prose,
  #final-years .section-prose {
    display: flex;
    flex-direction: column;
  }

  #before-apollo .section-prose::after,
  #early-days .section-prose::after,
  #bark-social .section-prose::after,
  #final-years .section-prose::after {
    display: none;
  }
}

/* ---------- Media grids ---------- */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

#photos.section {
  max-width: 1300px;
}

#photo-grid {
  grid-template-columns: repeat(5, 1fr);
}

#photo-grid .media-tile {
  aspect-ratio: 1 / 1;
}

#video-grid .media-tile {
  aspect-ratio: auto;
  height: 416px;
}

#video-grid .media-tile video {
  height: 100%;
  object-fit: cover;
}

/* The grid crops each video to fill its tile, but that same crop shouldn't
   carry into fullscreen — show the whole frame there instead, letterboxed
   as needed rather than zoomed to fill a wider screen. */
#video-grid .media-tile video:fullscreen {
  object-fit: contain;
}

#video-grid .media-tile video:-webkit-full-screen {
  object-fit: contain;
}

#video-grid .media-tile video:-moz-full-screen {
  object-fit: contain;
}

.video-open-lightbox {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 62px;
  cursor: pointer;
  z-index: 2;
}

@media (max-width: 900px) {
  #photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

#videos.section {
  max-width: 1300px;
}

#video-grid {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 900px) {
  #video-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  #video-grid .media-tile {
    height: 260px;
  }

  #video-grid .media-tile video {
    height: 100%;
    object-fit: cover;
  }

  /* On mobile, videos just play in place with native controls — no
     lightbox click-catcher, so the whole video area (including
     fullscreen) behaves like a normal video. */
  #video-grid .video-open-lightbox {
    display: none;
  }
}

.grid-item {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.grid-item-caption {
  margin-top: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--beige-200);
  text-align: center;
}

.media-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--brown-800);
}

.media-tile.has-media {
  cursor: pointer;
  border: 1px solid rgba(207, 161, 95, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-tile.has-media:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.media-tile img,
.media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-tile .play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--beige-050);
  background: rgba(30, 18, 9, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.media-tile.has-media:hover .play-badge { opacity: 1; }

.media-tile .tile-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.75rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--beige-100);
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.media-tile.has-media:hover .tile-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Placeholder tiles */

.media-tile.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1.5px dashed rgba(207, 161, 95, 0.35);
  color: var(--tan-400);
  font-family: var(--font-sans);
}

.media-tile.placeholder .placeholder-icon {
  font-size: 1.6rem;
  opacity: 0.55;
}

.media-tile.placeholder .placeholder-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 9, 4, 0.92);
  backdrop-filter: blur(2px);
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-media-wrap {
  width: 100%;
  max-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-media[hidden] { display: none; }

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: var(--beige-100);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(61, 36, 21, 0.55);
  border: 1px solid rgba(207, 161, 95, 0.3);
  color: var(--beige-100);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-nav:hover { background: rgba(207, 161, 95, 0.35); }
.lightbox-nav[hidden] { display: none; }
.lightbox-prev { left: -1rem; }
.lightbox-next { right: -1rem; }

@media (max-width: 640px) {
  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
  .lightbox-close { top: 0.5rem; right: 0.5rem; }
}

.lightbox-caption {
  margin-top: 1rem;
  text-align: center;
  color: var(--beige-200);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.lightbox-counter {
  display: block;
  margin-top: 0.25rem;
  color: var(--tan-400);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
