body.cj-page {
  background: radial-gradient(ellipse 650px 750px at 95% 450px, #BB133E0d, transparent 85%), #f3f6fa
}

body.cj-page.dark-mode {
  background: radial-gradient(ellipse 650px 750px at 95% 450px, #BB133E22, transparent 85%), #061123
}

.cj-intro {
  padding: 25px 0 20px
}

.cj-back {
  display: inline-block;
  color: var(--body-text);
  font-size: 13px;
  margin-bottom: 28px
}

.cj-intro h1 {
  font-size: clamp(42px, 5.5vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -2.5px;
  margin: 18px 0 22px
}

.cj-intro>p:last-of-type {
  font-size: 18px
}

.cj-jump {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 27px
}

.cj-jump label,
.cj-jump>span {
  font-size: 12px;
  color: var(--body-text);
  margin: 0
}

.cj-jump select {
  max-width: 100%;
  border-radius: 26px;
  padding: 11px 17px;
  border: 1px solid var(--fs-edge);
  background: var(--fs-glass);
  color: var(--page-text);
  font-size: 14px;
  box-shadow: var(--fs-shadow);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px)
}

.cj-chapter {
  padding-top: 30px;
  margin-top: 20px;
  scroll-margin-top: 115px
}

.cj-heading {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 25px;
  align-items: start;
  margin-bottom: 18px
}

.cj-date {
  font: 12px/1.7 'Space Grotesk', Arial, sans-serif;
  color: var(--body-text);
  margin: 4px 0 0
}

.cj-heading h2 {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 0
}

.cj-gallery {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  grid-template-rows: 190px 190px;
  gap: 14px
}

.cj-gallery button {
  padding: 0;
  border: 0;
  background: var(--panel-bg);
  min-width: 0;
  border-radius: 27px;
  overflow: hidden;
  box-shadow: 0 12px 30px #00214713;
  position: relative
}

.cj-gallery button:after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px #ffffff70
}

.cj-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit
}

.cj-main {
  grid-column: 1;
  grid-row: 1/3
}

.cj-small-one {
  grid-column: 2;
  grid-row: 1
}

.cj-small-two {
  grid-column: 2;
  grid-row: 2
}

.cj-count {
  position: absolute;
  left: 17px;
  bottom: 17px;
  padding: 9px 14px;
  border: 1px solid #ffffffa0;
  border-radius: 30px;
  background: #ffffffab;
  color: #002147;
  box-shadow: 0 5px 17px #0021471b, inset 0 1px 0 #ffffff90;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  font-size: 12px
}

.cj-gallery .cj-arrows {
  position: absolute;
  bottom: 17px;
  right: calc(35.7% + 17px);
  z-index: 1;
  display: flex;
  gap: 9px
}

.cj-gallery .cj-arrows button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid #ffffffaa;
  background: #ffffffab;
  color: #002147;
  box-shadow: 0 5px 17px #00214720, inset 0 1px 0 #ffffff90;
  border-radius: 50%;
  font-size: 22px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%)
}

.cj-film {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 10px 12px;
  margin-top: 14px;
  background: var(--fs-glass);
  border: 1px solid var(--fs-edge);
  border-radius: 25px;
  box-shadow: var(--fs-shadow);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%)
}

.cj-thumb {
  display: block;
  width: 67px;
  height: 51px;
  border: 2px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 0;
  overflow: hidden
}

.cj-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px
}

.cj-thumb[aria-pressed=true] {
  border-color: var(--flag-red);
  box-shadow: 0 0 0 2px #ffffff70
}

.cj-caption {
  font-size: 12px;
  color: var(--body-text);
  margin: 10px 2px 0
}

.cj-single .cj-gallery {
  grid-template-columns: 1fr;
  grid-template-rows: 350px
}

.cj-single .cj-main {
  grid-column: 1;
  grid-row: 1
}

.cj-pair .cj-small-one {
  grid-row: 1/3
}

.cj-footer {
  border-top: 1px solid var(--divider);
  padding: 27px 0 35px;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--body-text);
  font-size: 13px
}

.cj-lightbox {
  padding: 50px 55px 37px;
  border: 1px solid #ffffff50;
  border-radius: 24px;
  background: #071629ee;
  max-width: 96vw;
  max-height: 96vh;
  color: white;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px)
}

.cj-lightbox::backdrop {
  background: #000b;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px)
}

.cj-lightbox>img {
  display: block;
  max-width: 82vw;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain
}

.cj-lightbox button {
  position: absolute;
  background: #ffffffb8;
  color: #002147;
  border: 1px solid #ffffffa0;
  border-radius: 25px;
  padding: 8px 13px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px)
}

.cj-close {
  top: 10px;
  right: 15px;
  font-size: 13px
}

.cj-lightbox-prev {
  left: 8px;
  top: 48%;
  font-size: 22px
}

.cj-lightbox-next {
  right: 8px;
  top: 48%;
  font-size: 22px
}

.cj-lightbox p {
  font-size: 12px;
  text-align: center;
  color: #fff;
  margin: 10px 0 0
}

@media(max-width:767px) {
  .cj-heading {
    grid-template-columns: 1fr;
    gap: 8px
  }

  .cj-heading h2 {
    font-size: 29px
  }

  .cj-gallery {
    grid-template-rows: 150px 150px;
    gap: 11px
  }

  .cj-thumb {
    width: 57px;
    height: 45px
  }
}

@media(max-width:575px) {
  .cj-intro h1 {
    font-size: 46px;
    letter-spacing: -2px
  }

  .cj-intro>p:last-of-type {
    font-size: 16px
  }

  .cj-jump {
    gap: 10px
  }

  .cj-jump>span {
    width: 100%
  }

  .cj-chapter {
    padding-top: 24px;
    margin-top: 18px
  }

  .cj-heading h2 {
    font-size: 26px
  }

  .cj-date {
    font-size: 11px
  }

  .cj-gallery {
    grid-template-rows: 115px 115px;
    gap: 8px
  }

  .cj-gallery button {
    border-radius: 19px
  }

  .cj-count {
    left: 10px;
    bottom: 10px;
    padding: 7px 10px;
    font-size: 11px
  }

  .cj-gallery .cj-arrows {
    bottom: 10px;
    right: calc(35.7% + 10px);
    gap: 6px
  }

  .cj-gallery .cj-arrows button {
    width: 32px;
    height: 32px;
    font-size: 18px
  }

  .cj-film {
    padding: 8px;
    gap: 6px;
    border-radius: 20px
  }

  .cj-thumb {
    width: 48px;
    height: 39px;
    border-radius: 10px
  }

  .cj-caption {
    font-size: 11px
  }

  .cj-single .cj-gallery {
    grid-template-rows: 230px
  }

  .cj-footer {
    font-size: 12px;
    flex-direction: column
  }

  .cj-lightbox {
    padding: 46px 37px 30px
  }

  .cj-lightbox>img {
    max-width: 74vw
  }

  .cj-lightbox button {
    padding: 6px 10px
  }

  .cj-lightbox-prev {
    left: 4px
  }

  .cj-lightbox-next {
    right: 4px
  }
}

@media(prefers-reduced-transparency:reduce) {

  .cj-count,
  .cj-gallery .cj-arrows button {
    background: #fff;
    backdrop-filter: none
  }

  .cj-film {
    backdrop-filter: none;
    background: var(--panel-bg)
  }
}

/* Natural masonry preserves the complete frame. */
.cj-masonry {
  columns: 3;
  column-gap: 14px;
  max-width: 100%
}

.cj-masonry .cj-photo {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0 0 14px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  break-inside: avoid;
  background: var(--fs-glass);
  box-shadow: 0 8px 24px #00214714;
  cursor: zoom-in
}

.cj-photo:after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px #ffffff50
}

.cj-masonry .cj-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain
}

.cj-photo:focus-visible {
  outline: 3px solid var(--flag-red);
  outline-offset: 3px
}

.cj-chapter:has(.cj-photo:only-child) .cj-masonry {
  columns: 1;
  max-width: 680px
}

.cj-chapter:has(.cj-photo:nth-child(2):last-child) .cj-masonry {
  columns: 2
}

@media(max-width:767px) {
  .cj-masonry {
    columns: 2;
    column-gap: 10px
  }

  .cj-masonry .cj-photo {
    margin-bottom: 10px;
    border-radius: 16px
  }
}

@media(max-width:420px) {
  .cj-masonry {
    column-gap: 8px
  }

  .cj-masonry .cj-photo {
    margin-bottom: 8px;
    border-radius: 13px
  }
}