.photo_detail #photo_list,
.photo_detail [data-photo-page-part="top"] {
  scroll-margin-top: 140px;
}

.photo_detail .photo-list-current-album {
  display: block;
  margin-top: 4px;
  font-size: .875rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .photo_detail .photo-list-current-album {
    display: inline;
    margin-inline-start: .5em;
  }
}

.photo_detail .photo-list-navigation {
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: clamp(8px, 2vw, 12px);
  margin: 24px 0 28px;
  overflow-x: auto;
  padding: 4px 0;
  text-align: left;
}

.photo_detail .photo-list-navigation__link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  min-height: 44px;
  padding: 8px clamp(10px, 3vw, 20px);
  border: 1px solid #d9d9d9;
  border-radius: 9999px;
  background: #fff;
  color: #323232;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}

.photo_detail .photo-list-navigation__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.photo_detail [data-photo-page-part="top"] a:active,
.photo_detail [data-photo-page-part="bottom"] a:active,
.photo_detail a[data-photo-page-loading] {
  filter: brightness(.8);
}

.photo_detail a[data-photo-page-loading] {
  position: relative;
}

.photo_detail a[data-photo-page-loading]::after {
  content: "読み込み中…";
  position: absolute;
  z-index: 1;
  inset-block-end: calc(100% + 4px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: 6px;
  background: #282828;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}

.photo_detail .photo-page-count {
  display: none;
}

.modal_exp-photo .photo-magnifier {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  border-radius: 0;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 2px #fff, 0 2px 8px #0009;
  pointer-events: none;
}

.modal_exp-photo .photo-magnifier--touch {
  pointer-events: auto;
  touch-action: none;
}

@media (any-hover: hover) {
  .modal_exp-photo .photo_thumb {
    cursor: zoom-in;
  }
}

@media (max-width: 779px) {
  .photo_detail [data-photo-page-part="top"] .pagination,
  .photo_detail [data-photo-page-part="bottom"] .pagination {
    margin-bottom: 8px;
  }

  .photo_detail .photo-page-count {
    display: block;
    margin: 0 0 24px;
    text-align: center;
    font-size: .875rem;
    font-weight: 700;
  }
}
