/* Access page body only. Header, FV, shared footer map, reservation and footer are separate components. */
.access-page {
  --access-gold: #a18b1e;
  --access-line: #c8b96c;
  --access-ink: #454545;
  color: var(--access-ink);
  background: #fdfcf8;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.9;
}
.access-page *, .access-page *::before, .access-page *::after { box-sizing: border-box; }
.access-page p { margin: 0; }
.access-map-full {
  position: relative;
  width: 100vw;
  height: clamp(300px, 38vw, 560px);
  margin-inline: calc(50% - 50vw);
  overflow: hidden;
  background: #eee;
}
.access-map-full iframe,
.access-map-full > div,
.access-map-full > img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.access-page__content {
  width: min(100% - 48px, 960px);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 68px) 0 clamp(56px, 8vw, 104px);
}
.access-info__row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--access-line);
}
.access-info__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--access-gold);
  border-radius: 50%;
  color: var(--access-gold);
  font-size: 20px;
  line-height: 1;
}
.access-info__title {
  margin: 0 0 10px;
  color: var(--access-gold);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}
.access-info__body p + p { margin-top: 8px; }
.access-info__body p { font-size: 14px; line-height: 1.9; }
.access-info__subheading {
  margin: 20px 0 6px;
  color: var(--access-gold);
  font-size: 14px;
  font-weight: 500;
}
.access-info__parking { margin-top: 18px; }
.access-info__parking p:first-child { color: var(--access-gold); font-weight: 600; }
.access-gallery { margin-top: clamp(44px, 7vw, 80px); }
.access-gallery__title {
  margin: 0 0 18px;
  color: var(--access-gold);
  font-size: 16px;
  font-weight: 500;
}
.access-gallery__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
}
.access-gallery__main,
.access-gallery__thumb {
  display: block;
  overflow: hidden;
  background: #eee;
}
.access-gallery__main { aspect-ratio: 1.45; }
.access-gallery__main img,
.access-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.access-gallery__thumbs { display: grid; grid-template-rows: repeat(5, 1fr); gap: 8px; }
.access-gallery__thumb { min-height: 0; }

@media (max-width: 767px) {
  .access-page { font-size: 14px; }
  .access-map-full { height: 58vw; min-height: 240px; max-height: 380px; }
  .access-page__content { width: min(100% - 32px, 640px); padding: 28px 0 64px; }
  .access-info__row { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 20px 0; }
  .access-info__icon { width: 38px; height: 38px; font-size: 17px; }
  .access-info__title { margin-bottom: 8px; font-size: 15px; }
  .access-info__body p { font-size: 13px; }
  .access-gallery { margin-top: 44px; }
  .access-gallery__layout { grid-template-columns: minmax(0, 1fr) 72px; gap: 7px; }
  .access-gallery__thumbs { gap: 5px; }
  .access-gallery__main { aspect-ratio: 1.15; }
}


/* Access gallery: large image with selectable vertical thumbnails. */
.access-gallery__slider {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 162px;
  gap: 18px;
  align-items: stretch;
}
.access-gallery__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.access-gallery__viewport {
  min-width: 0;
  aspect-ratio: 1.45;
  overflow: hidden;
  background: #eee;
}
.access-gallery__slide { display: none; width: 100%; height: 100%; }
.access-gallery__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
#access-gallery-slide-1:checked ~ .access-gallery__viewport .access-gallery__slide:nth-child(1),
#access-gallery-slide-2:checked ~ .access-gallery__viewport .access-gallery__slide:nth-child(2),
#access-gallery-slide-3:checked ~ .access-gallery__viewport .access-gallery__slide:nth-child(3),
#access-gallery-slide-4:checked ~ .access-gallery__viewport .access-gallery__slide:nth-child(4),
#access-gallery-slide-5:checked ~ .access-gallery__viewport .access-gallery__slide:nth-child(5) { display: block; }
.access-gallery__thumbs { display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 8px; min-height: 0; }
.access-gallery__thumb { display: block; min-height: 0; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #eee; }
.access-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
#access-gallery-slide-1:checked ~ .access-gallery__thumbs label:nth-child(1),
#access-gallery-slide-2:checked ~ .access-gallery__thumbs label:nth-child(2),
#access-gallery-slide-3:checked ~ .access-gallery__thumbs label:nth-child(3),
#access-gallery-slide-4:checked ~ .access-gallery__thumbs label:nth-child(4),
#access-gallery-slide-5:checked ~ .access-gallery__thumbs label:nth-child(5) { border-color: var(--access-gold); }
.access-gallery__thumb:focus-visible { outline: 2px solid var(--access-gold); outline-offset: 2px; }
@media (max-width: 767px) {
  .access-gallery__slider { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .access-gallery__viewport { aspect-ratio: 1.15; }
  .access-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 6px; }
  .access-gallery__thumb { flex: 0 0 84px; height: 64px; }
}

/* Gallery layout: show the selected image first, with five thumbnails in one row. */
.access-gallery__slider { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.access-gallery__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: none; gap: 8px; align-content: start; }
.access-gallery__thumb { aspect-ratio: 1.3; height: auto; }
@media (max-width: 767px) {
  .access-gallery__slider { grid-template-columns: minmax(0, 1fr); }
  .access-gallery__thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); display: grid; overflow: visible; padding: 2px 0 6px; }
  .access-gallery__thumb { flex: initial; width: 100%; height: auto; }
}

/* Make every gallery image visible in the CMS editor preview for image editing. */
.gjs-dashed .access-gallery__slide { display: block !important; }

/* JavaScript gallery: main photo left, five selectable thumbnails on the right. */
.access-gallery__slider { display: grid !important; grid-template-columns: minmax(0, 1fr) clamp(86px, 16vw, 162px); gap: clamp(10px, 2vw, 18px); align-items: stretch; }
.access-gallery__viewport { min-width: 0; aspect-ratio: 1.45; overflow: hidden; background: #eee; }
.access-gallery__slide { display: block !important; width: 100%; height: 100%; object-fit: cover; }
.access-gallery__thumbs { display: grid !important; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 8px; min-height: 0; }
.access-gallery__thumb { display: block; width: 100%; min-height: 0; aspect-ratio: 1.3; overflow: hidden; padding: 0; border: 2px solid transparent; background: #eee; cursor: pointer; }
.access-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.access-gallery__thumb.is-active { border-color: var(--access-gold); }
.access-gallery__thumb:focus-visible { outline: 2px solid var(--access-gold); outline-offset: 2px; }
@media (max-width: 767px) {
  .access-gallery__slider { grid-template-columns: minmax(0, 1fr) 70px; gap: 8px; }
  .access-gallery__viewport { aspect-ratio: 1.15; }
  .access-gallery__thumbs { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .access-gallery__thumb { aspect-ratio: 1.2; }
}


/* Keep the main access image and thumbnail rail in separate grid columns. */
.access-gallery__slider {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) clamp(90px, 17%, 162px) !important;
  gap: 18px !important;
  align-items: stretch;
}

.access-gallery__viewport {
  grid-column: 1;
  grid-row: 1;
  width: auto !important;
  min-width: 0;
}

.access-gallery__slide {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.access-gallery__thumbs {
  grid-column: 2;
  grid-row: 1;
  width: auto !important;
  min-width: 0;
}

.access-gallery__thumb {
  min-width: 0;
  max-width: 100%;
}

.access-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Prevent the viewport's percentage width from extending beneath the thumbnail rail. */
.access-gallery__viewport {
  width: calc(100% - clamp(90px, 17%, 162px) - 18px) !important;
  max-width: 100%;
}

@media (max-width: 767px) {
  .access-gallery__slider {
    grid-template-columns: minmax(0, 1fr) 70px !important;
    gap: 8px !important;
  }

  .access-gallery__viewport {
    width: calc(100% - 78px) !important;
  }
}


/* メイン画像の表示枠をグリッドの列幅いっぱいにし、サムネイルとのgap直前まで使う */
.access-gallery__viewport {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

/* Highlight the selected gallery thumbnail in the requested gold. */
.access-gallery__thumb.is-active,
.access-gallery__thumb[aria-pressed="true"] { border-color: #a48d12; }
.access-gallery__thumb:focus-visible { outline-color: #a48d12; }

.access-gallery__thumb:focus { outline: 2px solid #a48d12; outline-offset: 2px; }
