* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html:has(body.is-fixed) {
    overscroll-behavior: none; 
}

body {
    margin: 0;
    font-family: sans-serif;
    background-color: #fbf9f4;
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", 游ゴシック, "Yu Gothic", メイリオ, Meiryo, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body.no-scroll {
    overflow: clip; 
    overscroll-behavior: none;
}  

.hero {
    margin: 80px 20px 30px;
    text-align: center;
}
.hero h1 img {
    width: 320px;
    min-width: 200px;
    height: auto;
}
.hero .period {
    margin-top: -10px;
    font-size: 14px;
    letter-spacing: .05em;
    font-weight: 500;
} 
.hero .period,
#copyright {
    font-family: "Roboto", sans-serif;
}
#copyright {
    margin: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 300;
}
#copyright a {
    color: #000;
}
.hero .description {
    margin: 60px 0;
    font-weight: 200;
}
/* ===== ギャラリー ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    display: block;
    aspect-ratio: 1 / 1;  /* ⭐重要！読み込み前に枠を確保する */
}

/* ===== モーダル ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.modal img {
    max-width: 95vw;
    max-height: 95vh;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 36px;
    cursor: pointer;
    padding: 10px 20px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s ease;
}

.nav-btn:active {
  background-color: rgba(255, 255, 255, 0.15);
}
.nav-btn:focus {
  outline: none;
}
#prev { left: 20px; }
#next { right: 20px; }

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
}

.gallery-item {
    position: relative;
}
.date-label {
  position: absolute;
  bottom: 0;
  right: 6px;
  color: #666;
  font-size: 11px;
  font-weight: 200;
  padding: 8px 4px;
  pointer-events: none;
  font-family: "Inter", sans-serif;
}
