*,
*::before,
*::after {
  min-width: 0px;
  min-height: 0px;
}

html {
  /* 最小値13pxを保証し、1200px未満では最大22pxまでフォントサイズが流動する */
  font-size: clamp(13px, var(--font-size-base), 22px);

  @media screen and (min-width: 1200px) {
    font-size: clamp(0.1rem, var(--font-size-base), 24px);
  }
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--snow);
  letter-spacing: 0.04em;
}

#root {
  margin: 0 auto;
}

p, h1, h2, h3, h4, h5, h6 {
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  line-height: inherit;
}

img, iframe {
  max-width: 100%;
}
iframe {
  border: none;
  box-shadow: none;
}

a, a:hover {
  color: var(--ink);
}

[id] {
  scroll-margin-top: 3.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

button {
  position: relative;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
  border: 0;
  outline: none;
  background: none;
  padding: 0;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1.5rem;
  list-style: disc outside none;

  & > p {
    margin: 0;
    display: list-item;
  }
}

.webgene-pagination {
  & ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0;
    margin: 0;

    & li {
      & a {
        display: inline-block;
        width: 3rem;
        line-height: 3rem;
        text-align: center;
        border-radius: 9999px;
        font-family: var(--font-title-1);
        background-color: hsl(from var(--ink) h s l / 20%);
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          background-color: var(--lime);
          &:hover {}
        }
      }
    }
  }
}

.webgene-no-items {
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
}

.thumbnail {
  position: relative;

  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }
  &.thumbnail--3x2 {
    padding-top: 66.6666666667%;
  }

  & img,
  &:empty::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &:empty::before {
    content: "";
    background-image: url("/system_panel/uploads/images/ogp.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }
}

.article-body {  
  & > p {
    margin: 1em 0;
  }

  & > h1,
  & > h2,
  & > h3,
  & > h4,
  & > h5,
  & > h6 {
    margin: 2em 0 1em;
  }

  & > *:first-child {
    margin-top: 0;
  }

  & > *:last-child {
    margin-bottom: 0;
  }

  & a,
  & a:hover {
    color: var(--blue);
    text-decoration: underline;
  }
  
  & .article-content {
    display: grid;
    gap: 1rem;
  }
}

.backdrop-object {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.__mat.__mat--processed {
  word-break: keep-all;
  word-wrap: break-word;
}

.page-hero {
  position: relative;
  overflow: hidden;
  height: 22.5rem;
  padding: 1rem;
  @media (min-width: 768px) {
    padding: 2rem;
  }
  @media (min-width: 1024px) {
    height: 25rem;
    padding: 2.5rem;
  }
  @media (min-width: 1200px) {
    height: 30rem;
    padding: 3rem;
  }
  
  & .page-hero__content {
    position: relative;
    overflow: hidden;
    padding: 11.25rem 1.25rem 5rem;
    border-radius: 3rem;
    box-shadow: var(--elevation-2);
    width: 100%;
    height: 100%;
    background-image: var(--grad-lime-yellow);
    @media (min-width: 768px) {
      padding-left: 2.5rem;
      padding-right: 2.5rem;
    }
    @media (min-width: 1024px) {
      padding-left: 3.75rem;
      padding-right: 3.75rem;
    }
    @media (min-width: 1200px) {
      padding-left: 5rem;
      padding-right: 5rem;
    }
  }
  
  & .page-hero__image {
    object-fit: cover;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 15%;
  }
  
  & .page-hero__title {
    position: relative;
    display: grid;
    line-height: 1;
    text-align: center;
    --title-en-size: 2rem;
    & .page-hero__title-en {
      letter-spacing: 0;
      font-family: var(--font-title-2);
      font-weight: 400;
      font-size: var(--title-en-size);
      color: var(--snow);
    }
    & .page-hero__title-ja {
      letter-spacing: 0.12em;
      font-family: var(--font-title-1);
      font-weight: 700;
      font-size: 2.25rem;
      margin-top: calc(var(--title-en-size) / -2);
    }
    @media (min-width: 768px) {
      --title-en-size: 2.5rem;
      & .page-hero__title-ja {
        font-size: 3rem;
      }
    }
    @media (min-width: 1024px) {
      --title-en-size: 3rem;
      & .page-hero__title-ja {
        font-size: 3.5rem;
      }
    }
    @media (min-width: 1200px) {
      --title-en-size: 3.5rem;
      & .page-hero__title-ja {
        font-size: 4rem;
      }
    }
  }
}

.breadcrumbs-container {
  padding-left: 1rem;
  padding-right: 1rem;
  @media (min-width: 768px) {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  @media (min-width: 1024px) {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  @media (min-width: 1200px) {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.breadcrumbs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background-image: var(--grad-lime-yellow);
  color: var(--snow);
  line-height: 1.25;
  font-family: var(--font-title-1);
  font-weight: 700;
  & a, a:hover {
    color: var(--snow);
  }
  @media (min-width: 768px) {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  @media (min-width: 1024px) {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  @media (min-width: 1200px) {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.bg-cloud::before {
  pointer-events: none;
  content: "";
  aspect-ratio: 1600 / 403;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  background-image: url("/system_panel/uploads/images/bg-cloud.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: blur(4px);
}

.section-title {
  position: relative;
  display: grid;
  line-height: 1;
  --title-en-size: 1.5rem;
  
  & .section-title__bg-illust {
    width: 10rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 25%;
  }
  
  & .section-title__en {
    position: relative;
    letter-spacing: 0;
    font-family: var(--font-title-2);
    font-weight: 400;
    font-size: var(--title-en-size);
    color: var(--lime);
  }
  & .section-title__ja {
    position: relative;
    letter-spacing: 0.12em;
    font-family: var(--font-title-1);
    font-weight: 700;
    font-size: 2rem;
    margin-top: calc(var(--title-en-size) / -2);
  }
  @media (min-width: 768px) {
    --title-en-size: 1.75rem;
    & .section-title__ja {
      font-size: 2.25rem;
    }
  }
  @media (min-width: 1024px) {
    --title-en-size: 2rem;
    & .section-title__ja {
      font-size: 2.5rem;
    }
  }
  @media (min-width: 1200px) {
    --title-en-size: 2.5rem;
    & .section-title__ja {
      font-size: 3rem;
    }
  }
  
  &.section-title--sm {
    & .section-title__ja {
      font-size: 1.5rem;
    }
    @media (min-width: 768px) {
      & .section-title__ja {
        font-size: 1.75rem;
      }
    }
    @media (min-width: 1024px) {
      & .section-title__ja {
        font-size: 2rem;
      }
    }
    @media (min-width: 1200px) {
      & .section-title__ja {
        font-size: 2.25rem;
      }
    }
  }
  
  &.section-title--center {
    text-align: center;
  }
  &.section-title--yellow .section-title__en {
    color: var(--yellow);
  }
  &.section-title--sky .section-title__en {
    color: var(--sky);
  }
  &.section-title--snow .section-title__en {
    color: var(--snow);
  }
  &.section-title--ink .section-title__en {
    color: hsl(from var(--ink) h s l / 20%);
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(from var(--ink) h s l / 20%);
  box-shadow: var(--elevation-1);
  line-height: 1;
  letter-spacing: 0.04em;
  background-color: var(--snow);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--ink);
  transition: all ease 200ms;
  &:hover {
    text-decoration: none;
    opacity: 90%;
    transform: scale(0.95);
  }
}

.footer-contact-typo {
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--lime);
  position: absolute;
  top: -4rem;
  left: calc(50% - 0.625rem);
  transform: translateX(-50%) rotate(2.2deg);
  @media (min-width: 768px) {
    left: calc(50% - 1rem);
  }
  @media (min-width: 1024px) {
    left: calc(50% - 1.25rem);
  }
}

.footer-contact-title {
  letter-spacing: 0.12em;
  font-family: var(--font-title-1);
  font-weight: 700;
  text-align: center;
  @media (min-width: 768px) {
    & br:first-child {
      display: none;
    }
  }
}

.footer-bg-image {
  position: absolute;
  inset: 0;
  &::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, #FFF 43.75%, rgba(255, 255, 255, 0.80) 66.83%, rgba(255, 255, 255, 0.40) 100%);
  }
  & img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

.blog-category {
  & .webgene-blog {
    display: grid;
    gap: 1rem;
  }
  & .webgene-item {
    display: grid;
  }
}

.blog-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;
    @media (min-width: 768px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      & .webgene-pagination,
      & .webgene-no-items {
        grid-column: span 2 / span 2;
      }
    }
    @media (min-width: 1200px) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      & .webgene-pagination,
      & .webgene-no-items {
        grid-column: span 3 / span 3;
      }
    }
  }
}

.property-list {
  & .webgene-blog {
    display: grid;
    gap: 2rem;
    & .webgene-pagination {
      margin-top: 1rem;
    }
    @media (min-width: 768px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      & .webgene-pagination,
      & .webgene-no-items {
        grid-column: span 2 / span 2;
      }
    }
    @media (min-width: 1200px) {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      & .webgene-pagination,
      & .webgene-no-items {
        grid-column: span 4 / span 4;
      }
    }
  }  
}

.item-images.swiper {
  display: grid;
  gap: 1.25rem;
  --swiper-pagination-color: var(--lime);
  --swiper-navigation-size: auto;
  & .swiper-slide {
    border-radius: 1.5rem;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    & img {
      object-fit: cover;
      width: 100%;
      height: 100%;
    }
  }
  
  & .swiper-pagination,
  & .swiper-button-prev,
  & .swiper-button-next {
    position: relative;
    margin: 0;
    position: static;
  }
  & .swiper-pagination {
    width: auto;
  }
  & .swiper-button-prev,
  & .swiper-button-next {
    width: 1rem;
    & > svg {
      display: none;
    }
    & img {
      width: 100%;
    }
  }
  & .swiper-button-next img {
    transform: scaleX(-1);
  }
}

.property-floor-plan {
  background-color: var(--snow);
  & img {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }
}

.property-map {
  & iframe {
  	width: 100%;
    height: 100%;
  }
}

.hidden-field {
  display: none;
}

[data-target="check-group"] {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  row-gap: 0.75rem;
  align-items: center;
  
  & label {
    display: inline-flex;
    border: 1px solid var(--lime);
    color: var(--ink);
    background-color: var(--snow);
    gap: 0.75rem;
    align-items: center;
    padding-block: 0.5rem;
    padding-inline-start: 0.75rem;
    padding-inline-end: 1rem;
    border-radius: 0.5rem;
    margin: 0;
    line-height: 1;
    font-weight: 700;
    box-shadow: var(--elevation-1);
    cursor: pointer;
  }
  
  & [type="checkbox"] {
    width: 0.875rem;
  }
}

.webgene-search-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* コンテナ */
.range-slider__ui {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* ラベル + スライダーの1行 */
.range-slider__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-slider__label {
  flex-shrink: 0;
  width: 88px;
  font-size: 14px;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

/* レンジ入力 */
.range-slider__input {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #e5e5e5;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 0;
}

/* トラック（Firefox） */
.range-slider__input::-moz-range-track {
  height: 4px;
  background: #e5e5e5;
  border-radius: 999px;
  border: none;
}

/* つまみ（WebKit） */
.range-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--snow);
  border: 2px solid var(--lime);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.range-slider__input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}
.range-slider__input::-webkit-slider-thumb:active {
  transform: scale(1.05);
  background: var(--lime);
}

/* つまみ（Firefox） */
.range-slider__input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--lime);
  cursor: pointer;
}

/* つまみより左側の塗り（Firefox のみネイティブ対応） */
.range-slider__input::-moz-range-progress {
  height: 4px;
  background: var(--lime);
  border-radius: 999px;
}

/* 表示エリア */
.range-slider__display {
  text-align: center;
  font-size: 14px;
  margin-top: 4px;
  color: inherit;
}
