:root {
  color-scheme: light;
  --red: #ed0016;
  --ink: #000;
  --page: #fff;
  --slide-width: min(54.5vw, 714px);
  --slide-gap: 26px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Arial, Helvetica, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(50px, 8.4vh, 110px); padding-block: clamp(60px, 11vh, 170px) clamp(40px, 7vh, 100px); }
.gallery { width: 100%; overflow: hidden; }
.gallery__track { display: flex; gap: var(--slide-gap); overflow-x: auto; scroll-snap-type: none; scroll-behavior: auto; padding-inline: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-y; cursor: grab; user-select: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-dragging { cursor: grabbing; }
.gallery__track:focus-visible { outline: 3px solid #777; outline-offset: -3px; }
.gallery__slide { flex: 0 0 var(--slide-width); min-width: 0; margin: 0; }
.gallery__placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: #ccc; border: 3px solid var(--ink); color: var(--ink); font-size: clamp(25px, 3.3vw, 52px); font-weight: 400; }
/* To use your work images, replace the placeholder div with:
   <img class="gallery__image" src="images/01.jpg" alt="作品の説明"> */
.gallery__image { display: block; width: 100%; height: auto; aspect-ratio: 1.094 / 1; object-fit: cover; border: 0; }
.gallery__caption { margin-top: 12px; font-size: 12px; line-height: 1.5; color: #999999; letter-spacing: .08em; text-align: center; }
.navigation { width: min(calc(100% - 48px), 720px); margin-inline: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.navigation__link { min-height: 48px; padding: 14px 8px; color: #222; display: flex; justify-content: center; align-items: center; text-decoration: none; text-underline-offset: 8px; text-decoration-thickness: 1px; font-size: 14px; font-weight: 400; letter-spacing: .14em; transition: color .2s ease; }
a.navigation__link:hover { color: #777; text-decoration: underline; }
.navigation__link:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
@media (max-width: 700px) {
  :root { --slide-width: 78vw; --slide-gap: 14px; }
  .home { justify-content: center; gap: 44px; padding-block: 54px 42px; }
  .gallery__image { aspect-ratio: 1 / 1.05; }
  .gallery__placeholder { border-width: 2px; }
  .gallery__placeholder { font-size: clamp(22px, 6vw, 34px); }
  .navigation { width: min(calc(100% - 48px), 440px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
  .navigation__link { min-height: 48px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .navigation__link { transition: none; } }

/* Brand mark: replace text with a logo image later if desired. */
.site-header { position: absolute; z-index: 5; top: 30px; left: clamp(24px, 3.7vw, 54px); }
.site-logo { display: inline-block; color: #000; font-size: clamp(20px, 2vw, 29px); letter-spacing: -.055em; font-weight: 800; text-decoration: none; line-height: 1.1; }
.site-logo:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
@media (max-width:700px) { .site-header { top: 22px; left: 24px; } .site-logo { font-size: 21px; } .home { padding-top: 93px; } }

/* The gallery is a seamless continuous loop; disable image dragging. */
.gallery__track img { -webkit-user-drag: none; user-select: none; pointer-events: none; }

/* Safari-safe animation: animate the strip with transform instead of scrollLeft. */
.gallery { overflow: hidden; }
.gallery__track { width: max-content; max-width: none; overflow: visible; padding: 0; touch-action: pan-y; will-change: transform; -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }
.gallery__track.is-dragging { cursor: grabbing; }

/* Minimal footer credit */
body { min-height: 100svh; display: flex; flex-direction: column; }
.home { flex: 1 0 auto; min-height: 0; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 clamp(24px, 3.7vw, 54px) 24px; font-size: 10px; letter-spacing: .12em; line-height: 1.5; color: #777; text-transform: uppercase; }
@media (max-width: 700px) { .site-footer { flex-direction: column; gap: 4px; text-align: center; padding-bottom: 22px; font-size: 9px; } }
