body {
    font-family: 'Dosis', 'Noto Sans JP', sans-serif;
    color: #222222;
    background-color: #e6ecf0;
    margin: 0;
    padding: 0;
    text-align: center;
}


a {
    text-decoration-line: none;
}

a:link {
    color: #777777;
}

a:visited {
    color: #FF0099;
}

a:hover {
    color: #00b7ff;
}

a:active {
    color: #33CC00;
}

header a {
    text-decoration-line: underline;
    text-decoration-style: dashed;
}



header,
#info,
#Contents,
#Thanks,
footer {
    max-width: 300px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    margin: 20px auto 20px auto;
    padding: 10px 20px 10px 20px;
    text-align: left;
}

header h1 {
    margin: 0;
    font-size: 23px;
    margin-bottom: 0;
}

header p {
    margin: 0;
    font-size: 12px;
}

#info,
#Contents,
#Thanks {
    padding: 1px 20px 10px 20px;
}

#info h2,
#Contents h2,
#Thanks h2 {
    margin: 8px 0 0 0;
    font-size: 18px;
}

#info p,
#Contents p,
#Thanks p {
    margin: 0;
    font-size: 12px;
}

.pt {
    padding-top: 10px;
}

footer {
    padding: 1px 20px 1px 20px;
    text-align: center;
    font-size: 12px;
}

li {
    margin: 0;
    font-size: 14px;
}

button {
    height: 22px;
    font-size: 12px;
    border: 1px solid #cccccc;
    text-align: center;
}

.top-gallery {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 4px;
      max-width: 800px;
      margin: 0 auto;
    }

    .top-gallery img {
      width: 56%;
      height: auto;
    }






.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 100%;
  height: 100%;
  max-width: 540px;
}

.thumbnail img {
  width: 100%;
  height: auto;
  margin: 0 0 -4px 0;
  cursor: pointer;
}

/* モーダル背景 */
.modal {
  opacity: 1;                  /* ← 表示非表示は opacity ではなく display で切り替える */
  pointer-events: auto;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8); /* ← 背景即表示 */
  display: none;               /* ← 初期状態は非表示 */
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;               /* ← 表示時は即 flex */
}

/* モーダル本体 */
.modal-content {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 540px;
  position: relative;
  transform: scale(1);
  opacity: 1;
}




.modal-content img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}



.modal.withAnimation .modal-content {
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.withAnimation.show .modal-content {
  transform: scale(1);
  opacity: 1;
}









/* 投稿番号 */
.modal-content .number {
  font-weight: bold;
  font-size: 1.2em;
  margin-top: 10px;
}

/* コメント */
.modal-content .comment {
  margin-top: 5px;
  font-size: 0.95em;
  color: #666;
}

/* 閉じるボタン */
.close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
}
