html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
    font-family: 'Noto Serif JP', serif;
    margin: 0;
    padding: 0;
    background-color: #f4f2f8;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

body::-webkit-scrollbar, html::-webkit-scrollbar {
    display: none;
}

.site-banner {
  background: linear-gradient(135deg, #dcd6f7, #e7e9f9, #f0f1f6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  color: #111;
  font-size: 1rem;
  height: 6%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;      
  justify-content: center; 
  align-items: center;
  text-align: center; 
}

header {
    background-color: transparent;
    color: black;
    height: 23%;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    width:100%;
    margin: 0 auto;
    box-sizing: border-box;
    margin-top: 3%; 
}

header .logo {
  width: 100%; 
  height: 80%; 
}

nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px; 
}

nav ul li {
    flex: none; 
}

nav ul li a {
    color: #444;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: #7d6bc5;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

nav ul li a:hover {
    color: #7d6bc5;
}

nav ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  box-sizing: border-box;
}

#thumbnails-container {
    width: 80%;
    margin: 20px auto;  
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 20px;
    row-gap: 10px;
    justify-items: center;
    align-items: start; 
    padding: 20px;   
    box-sizing: border-box; 
}

.thumbnail-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background-color: #fff;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

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

footer {
  background: #f9f9f9; 
  color: #444;
  font-size: 0.8rem;
  font-family: 'Noto Serif JP', serif;
  font-weight: 300; 
  height: 5%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: none;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.08); /* 影で自然に区切る */
}

footer .footer-inner {
  opacity: 0.8;
}

a {
    color: inherit; 
    text-decoration: none;  
}

/* =========================
   タブレット対応（～1024px）
   ========================= */
@media (max-width: 1024px) {
  .site-banner {
    position: fixed;    
    top: 0;
    left: 0;
    right: 0;
    height: auto;  
    white-space: normal;   
    padding: 0.8rem 1rem;  
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000;
    flex-wrap: wrap;    
  }

  .site-banner strong {
    display: inline;   
    font-weight: bold;
  }

  header {
    margin-top: 80px;    
    flex-direction: column;
    padding-top: 10%;
    height: auto;
  }

  nav ul {
    gap: 30px;
  }

  #thumbnails-container {
    grid-template-columns: repeat(2, 1fr);
  }

  #thumbnails-container .thumbnail-cell:nth-child(n+5) {
    display: none !important;
  }
}

/* =========================
   スマホ対応（～768px）
   ========================= */

@media (max-width: 768px) {
.site-banner {
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  flex-wrap: wrap;
}

header {
  margin-top: 100px;  
  flex-direction: column;
  align-items: center;
  height: auto;
  padding-top: 60px;
}

nav {
  margin-top: 10px;
  width: 100%;
}

nav ul {
  flex-direction: column;
  gap: 15px;
  padding: 1rem 0;
}

nav ul li a {
  font-size: 1rem;
  padding: 0.5rem;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center; 
  padding: 1rem;
}

#thumbnails-container {
  display: flex;
  justify-content: center;
  width: 90%;
  margin: 0; 
  padding: 0;
}

#thumbnails-container .thumbnail-cell {
  max-width: 100%;
  max-height: 70vh; 
}

#thumbnails-container .thumbnail-cell img {
  max-width: 100%;
  max-height: 70vh;
  height: auto;     
  width: auto;     
  object-fit: contain; 
}

#thumbnails-container .thumbnail-cell:nth-child(n+2) {
  display: none !important;
}

footer {
  font-size: 0.7rem;
  padding: 0;
  height: 3%;
}

  html, body {
    height: 100%;
    margin: 0;
    padding: 0;
  }

header .logo {
  width: 100%; 
  height: 70%; 
}

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;       /* 横中央 */
    justify-content: center;   /* 縦中央 */
    width: 100%;
    padding: 1rem;             /* 元のpaddingを維持 */
    box-sizing: border-box;
  }

  #thumbnails-container {
    justify-content: center;   /* サムネイル横中央 */
    width: 90%;
    margin: 0 auto;
  }

  #thumbnails-container .thumbnail-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 70vh;
  }

  #thumbnails-container .thumbnail-cell img {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    width: auto;
    object-fit: contain;
  }

  #thumbnails-container .thumbnail-cell:nth-child(n+2) {
    display: none !important;
  }
}

