.wrap__ajax-work {
  width: 100%;
  opacity: 1;
  filter: blur(0px);
  transform: none;
  overflow-x: hidden;
}

@media screen and (max-width: 768px) {
  .wrap__ajax-work {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
}

.ajax-work__mobile-title {
  border-bottom: 1px solid #000;
  display: none;
  font-family: 'Shippori Mincho B1', serif;
  font-size: max(2vw, 20px);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 55px;
  padding-bottom: 10px;
}

@media screen and (max-width: 768px) {
  .ajax-work__mobile-title {
    display: block;
  }
}

.pageTitle-module--title--d8f9g {
  margin-bottom: 10vh;
}

.ajax-work__main {
  padding-left: 24.3vw;
}

@media screen and (max-width: 768px) {
  .pageTitle-module--title--d8f9g {
    margin-bottom: 40px;
  }
}

.pageTitle-module--title__en--e0a1h {
  font-family: 'neue-haas-grotesk-display', sans-serif;
  font-size: max(7vw, 52px);
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.1;
  margin: 0;
}


.ajax-work__filter {
  position: relative;
  display: grid;
  grid-template-columns: calc((100vw - 14vw) / 4) calc((100vw - 14vw) / 4) calc((100vw - 14vw) / 4);
  gap: calc((14vw) / 5);
  margin-bottom: 8vh;
  padding-bottom: 40px;
}

@media screen and (max-width: 768px) {
  .ajax-work__filter {
    grid-template-columns: 1fr;
    gap: 20px 10px;
    margin-bottom: 60px;
    padding-bottom: 20px;
  }
}

.ajax-work__filter-item {
  position: relative;
  border: none;
}

.ajax-work__filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 1vw;
  border: none;
  border-bottom: 1px solid black;
  font-size: max(1.3vw, 16px);
  padding: 0 0 15px;
  font-weight: 600;
  font-family: 'neue-haas-grotesk-display', sans-serif;
  line-height: 1;
  width: 100%;
  background: none;
  cursor: pointer;
  color: inherit;
}

.ajax-work__filter-heading.ajax-work__active .ajax-work__line1 {
  transform: rotate(0);
}

.ajax-work__filter-state {
  position: relative;
  width: 17px;
  height: 17px;
}

@media screen and (max-width: 768px) {
  .ajax-work__filter-state {
    width: 15px;
    height: 15px;
  }
}

.ajax-work__line1,
.ajax-work__line2 {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  display: inline-block;
  width: 17px;
  height: 2px;
  background-color: black;
  transition: transform 0.5s ease-in-out;
}

@media screen and (max-width: 768px) {

  .ajax-work__line1,
  .ajax-work__line2 {
    width: 15px;
  }
}

.ajax-work__line1 {
  transform: rotate(90deg);
  transform-origin: center;
}

.ajax-work__filter-selected {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  min-height: 0;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.ajax-work__filter-selected.ajax-work__active {
  margin: 15px 0 20px;
  min-height: 35px;
}

@media screen and (max-width: 768px) {
  .ajax-work__filter-selected.ajax-work__active {
    margin: 20px 0 20px;
  }
}

.ajax-work__filter-pill {
  display: none;
  align-items: center;
  gap: 0.7vw;
  font-size: max(0.8vw, 12px);
  border-radius: 30px;
  border: 0.7px solid black;
  margin: 0;
  padding: 5px 10px;
  background: none;
  cursor: pointer;
}

.ajax-work__filter-pill.ajax-work__active {
  display: flex;
}

.ajax-work__filter-container {
  position: absolute;
  width: 100%;
  top: calc(max(1.3vw, 16px) + 16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  background: white;
  padding: 30px 30px;
  z-index: 1;
}

.ajax-work__filter-container.ajax-work__active {
  opacity: 1;
  visibility: visible;
}

.ajax-work__filter-row {
  margin: 5px 0;
  display: flex;
  align-items: center;
  gap: 0 1vw;
  accent-color: black;
  font-size: max(1.1vw, 13px);
  cursor: pointer;
}

/* ↓ これを追加 */
.works-filter-checkbox {
  flex-shrink: 0; 
  width: 1em;   /* フォントサイズに比例させたい場合 */
  height: 1em;  /* フォントサイズに比例させたい場合 */
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .ajax-work__filter-row {
    margin: 12px 0;
    gap: 0 3vw;
  }
}

.ajax-work__filter-row input[type='radio'],
.ajax-work__filter-row input[type='checkbox'] {
  margin: 0;
  inline-size: 17px;
  block-size: 17px;
  transform: translateY(1px);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid black;
  border-radius: 50%;
  position: relative;
  background: white;
  transition: all 0.2s ease;
}

@media screen and (max-width: 768px) {

  .ajax-work__filter-row input[type='radio'],
  .ajax-work__filter-row input[type='checkbox'] {
    inline-size: 15px;
    block-size: 15px;
  }
}

.ajax-work__filter-row input[type='radio']:checked,
.ajax-work__filter-row input[type='checkbox']:checked {
  background: black;
  border-color: black;
}

.ajax-work__filter-row input[type='radio']:checked::after,
.ajax-work__filter-row input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: white;
  border-radius: 50%;
}

@media screen and (max-width: 768px) {

  .ajax-work__filter-row input[type='radio']:checked::after,
  .ajax-work__filter-row input[type='checkbox']:checked::after {
    width: 5px;
    height: 5px;
  }
}

.ajax-work__filter-row input[type='radio']:hover,
.ajax-work__filter-row input[type='checkbox']:hover {
  border-color: #666;
}

.ajax-work__grid {
  display: grid;
  gap: calc(calc((14vw) / 5) / 2);
  grid-template-columns: calc(calc((100vw - 14vw) / 4) + (calc((14vw) / 5) / 2)) calc((100vw - 14vw) / 4) calc(calc((100vw - 14vw) / 4) + (calc((14vw) / 5) / 2));
}

@media screen and (max-width: 768px) {
  .ajax-work__grid {
    grid-template-columns: 100%;
    gap: 50px 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.ajax-work__grid-item {
  position: relative;
  text-decoration: none;
  color: inherit;
}

.ajax-work__grid-item:nth-child(4n-3) {
  grid-column: 1/3;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n-3) {
    grid-column: 1/2;
  }
}

.ajax-work__grid-item:nth-child(4n-3) .ajax-work__thumbnail-vertical {
  display: none;
}

.ajax-work__grid-item:nth-child(4n-3) .ajax-work__thumbnail-sideway {
  display: block;
}

.ajax-work__grid-item:nth-child(4n-2) {
  grid-column: 3/4;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n-2) {
    grid-column: 1/2;
  }
}

.ajax-work__grid-item:nth-child(4n-2) .ajax-work__thumbnail-vertical {
  display: block;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n-2) .ajax-work__thumbnail-vertical {
    display: none;
  }
}

.ajax-work__grid-item:nth-child(4n-2) .ajax-work__thumbnail-sideway {
  display: none;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n-2) .ajax-work__thumbnail-sideway {
    display: block;
  }
}

.ajax-work__grid-item:nth-child(4n-1) {
  grid-column: 1/2;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n-1) {
    grid-column: 1/2;
  }
}

.ajax-work__grid-item:nth-child(4n-1) .ajax-work__thumbnail-vertical {
  display: block;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n-1) .ajax-work__thumbnail-vertical {
    display: none;
  }
}

.ajax-work__grid-item:nth-child(4n-1) .ajax-work__thumbnail-sideway {
  display: none;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n-1) .ajax-work__thumbnail-sideway {
    display: block;
  }
}

.ajax-work__grid-item:nth-child(4n) {
  grid-column: 2/4;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-item:nth-child(4n) {
    grid-column: 1/2;
  }
}

.ajax-work__grid-item:nth-child(4n) .ajax-work__thumbnail-vertical {
  display: none;
}

.ajax-work__grid-item:nth-child(4n) .ajax-work__thumbnail-sideway {
  display: block;
}

.ajax-work__thumbnail {
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media screen and (max-width: 768px) {
  .ajax-work__thumbnail {
    aspect-ratio: 3/2;
  }
}

.ajax-work__grid-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.5vw 2vw;
  background: rgba(255, 255, 255, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  line-height: 2;
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-hover {
    position: relative;
    opacity: 1;
    background: none;
    width: auto;
    height: auto;
    display: block;
    padding: 0;
    margin-top: 10px;
  }
}


.works-loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.works-loading-overlay.active {
  display: flex !important;
}

.works-loading-content {
  text-align: center;
}

.works-loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #000;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: works-spinner-rotate 1s linear infinite;
  margin: 0 auto;
}

.works-loading-text {
  margin-top: 20px;
  font-size: 14px;
  color: #000;
  font-weight: 500;
}

@keyframes works-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.worksMain-module--worksFilter__radio__selected--l4h5o {
  margin-bottom: 15px;
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.worksMain-module--worksFilter__radio__selected--l4h5o.worksMain-module--active--m6i7p {
  margin-bottom: 20px;
}

.worksMain-module--worksFilter--f2b3i {
  margin-bottom: 50px;
}

.ajax-work__grid-item:hover .ajax-work__grid-hover {
  opacity: 1;
}

.ajax-work__grid-summary {
  font-size: max(0.6vw, 11px);
}

@media screen and (max-width: 768px) {
  .ajax-work__grid-summary {
    font-size: max(.6vw, 11px);
  }
}

.ajax-work__grid-title {
  font-size: max(1.6vw, 17px);
  font-family: inherit;
  margin: 0;
  font-weight: 300;
  line-height: 1.2;
}

.ajax-work__grid-empty {
  display: block;
  grid-column: 1/-1;
}

.ajax-work__empty-heading {
  font-size: max(7vw, 52px);
  font-family: 'neue-haas-grotesk-display', sans-serif;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.1;
}

@media screen and (max-width: 768px) {
  .ajax-work__empty-heading {
    margin-top: 20px;
  }
}

.ajax-work__empty-description {
  font-size: max(1.1vw, 12px);
  font-weight: 500;
  margin-top: 3vw;
}

@media screen and (max-width: 768px) {
  .ajax-work__empty-description {
    margin-top: 20px;
  }
}

.ajax-work__pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0 5vw;
  font-family: 'neue-haas-grotesk-display', sans-serif;
  line-height: 1;
  margin-top: 9vw;
  margin-bottom: 5vw;
  font-weight: 600;
}

.ajax-work__pagination-desktop {
  display: flex;
  justify-content: flex-end;
  gap: 0 5vw;
}

.ajax-work__pagination-mobile {
  display: none;
}

@media screen and (max-width: 768px) {
  .ajax-work__pagination {
    align-items: center;
    justify-content: center;
    gap: 0 10vw;
    margin-top: 90px;
  }

  .ajax-work__pagination-desktop {
    display: none;
  }

  .ajax-work__pagination-mobile {
    display: flex;
    align-items: center;
    gap: 0 10vw;
    justify-content: center;
  }

  .ajax-work__pagination-mobile .ajax-work__pagination-mobile-prev,
  .ajax-work__pagination-mobile .ajax-work__pagination-mobile-next {
    align-items: flex-end;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    font-size: max(.9vw, 11px);
    gap: 0 .5vw;
    padding: 0;
  }

  .ajax-work__pagination-mobile .ajax-work__pagination-mobile-arrow {
    height: 15px;
    overflow: visible;
    width: 15px;
  }

  .ajax-work__pagination-mobile .ajax-work__pagination-mobile-arrow svg {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .ajax-work__pagination-mobile-select {
    flex: 0 0 100%;
    align-items: center;
    border: 1px solid #000;
    justify-content: center;
    max-width: 150px;
    position: relative;
    width: 100%;
  }

  .ajax-work__pagination-mobile-select:before {
    background: var(--rect-arrow) 50% / contain no-repeat;
    content: "";
    height: 10px;
    position: absolute;
    right: 15px;
    top: 30%;
    transform: rotate(90deg);
    transform-origin: center;
    width: 10px;
    z-index: -1;
  }

  .ajax-work__pagination-select {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: inherit;
    width: 100%;
    height: 100%;
    text-align: center;
    text-align: -webkit-center;
    font-family: 'neue-haas-grotesk-display', sans-serif;
    font-size: max(1vw, 11px);
    font-weight: 600;
    line-height: 1;
    border: none;
    padding: 7px 15px;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
  }

  .ajax-work__pagination-select option {
    box-pack: center;
    -webkit-box-pack: center;
    align-items: center;
    display: flex;
    justify-content: center;
    text-align: center;
    text-align: -webkit-center;
  }
}

.ajax-work__pagination-prev,
.ajax-work__pagination-next {
  display: flex;
  align-items: flex-end;
  background-color: transparent;
  border: none;
  cursor: pointer;
  gap: 0 0.5vw;
  font-size: max(0.9vw, 11px);
  padding: 0;
  text-decoration: none;
  color: inherit;
}

.ajax-work__pagination-prev:hover svg,
.ajax-work__pagination-next:hover svg {
  transform: translateX(calc(100% + 1vw));
}

@media screen and (max-width: 768px) {

  .ajax-work__pagination-prev:hover svg,
  .ajax-work__pagination-next:hover svg {
    transform: translateX(0) rotate(0);
  }
}

.ajax-work__pagination-arrow-prev,
.ajax-work__pagination-arrow-next {
  display: block;
  position: relative;
  width: 3vw;
  height: 10px;
  overflow: hidden;
}

@media screen and (max-width: 768px) {

  .ajax-work__pagination-arrow-prev,
  .ajax-work__pagination-arrow-next {
    width: 15px;
    height: 15px;
    overflow: visible;
  }
}

.ajax-work__pagination-arrow-prev svg,
.ajax-work__pagination-arrow-next svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  transition: all 0.3s ease-in-out;
  object-fit: contain;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.ajax-work__pagination-arrow-prev svg:first-child,
.ajax-work__pagination-arrow-next svg:first-child {
  left: calc(-100% - 1vw);
}

.ajax-work__pagination-arrow-prev svg:nth-child(2),
.ajax-work__pagination-arrow-next svg:nth-child(2) {
  left: 0;
}

.ajax-work__pagination-prev:hover svg {
  transform: translateX(calc(-100% - 1vw));
}

.ajax-work__pagination-prev svg:first-child {
  left: calc(100% + 1vw);
}

.ajax-work__pagination-prev svg:nth-child(2) {
  left: 0;
}

.ajax-work__pagination-num {
  display: flex;
  gap: 0 2vw;
  align-items: flex-end;
}

@media screen and (max-width: 768px) {

  .ajax-work__pagination-arrow-prev svg,
  .ajax-work__pagination-arrow-next svg {
    position: relative;
  }

  .ajax-work__pagination-arrow-prev svg:first-child,
  .ajax-work__pagination-arrow-next svg:first-child {
    left: 0;
  }

  .ajax-work__pagination-arrow-prev svg:nth-child(2),
  .ajax-work__pagination-arrow-next svg:nth-child(2) {
    left: 0;
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .ajax-work__pagination-prev:hover svg {
    transform: translateX(0);
  }
}

@media screen and (max-width: 768px) {
  .ajax-work__pagination-num {
    gap: 0 15px;
  }
}

.ajax-work__pagination-item {
  position: relative;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0 0.4vw;
  text-decoration: none;
  color: inherit;
}

.ajax-work__pagination-item.ajax-work__active::before {
  content: '';
  position: absolute;
  height: 3px;
  width: 100%;
  left: 0;
  right: 0;
  bottom: -1.2vw;
  background-color: black;
}

@media screen and (max-width: 768px) {
  .ajax-work__pagination-item.ajax-work__active::before {
    bottom: -8px;
  }
}

.ajax-work__pagination-dot {
  padding: 0 1vw;
}

@media screen and (max-width: 768px) {
  .ajax-work__pagination-dot {
    padding: 0 8px;
  }
}

.ajax-work__border {
  background-color: #b4b4b4;
  height: 1px;
  margin-top: 13vw;
  width: 100%;
}

@media screen and (max-width: 768px) {
  .ajax-work__border {
    margin-top: 110px;
  }
}

.ajax-work__loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.ajax-work__loading.active {
  display: flex !important;
}

.ajax-work__loading-content {
  text-align: center;
}

.ajax-work__loading-spinner {
  border-top: 4px solid #000;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: ajax-work-spinner-rotate 1s linear infinite;
  margin: 0 auto;
}

.ajax-work__loading-text {
  margin-top: 20px;
  font-size: 14px;
  color: #000;
  font-weight: 500;
}

@keyframes ajax-work-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 768px) {
  .page-template-works .wp-block-group {
    width: 100%;
  }

  .ajax-work__main {
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .main-works-page {
    padding: 140px 20px 14vh;
    display: block;
    justify-content: unset;
  }

  .ajax-work__filter-selected {
    margin-bottom: 0;
  }
}