body {
  font-family: sans-serif;
  margin: 0;
  padding: 20px;
  background: #f9f9f9;
}

.container {
  max-width: 500px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-collapse: collapse;
  border: 2px solid #007BFF; /* 青い外枠 */
  position: relative;
  padding-top: 100px;   /* 上の画像分のスペース */
  padding-bottom: 100px; /* 下の画像分のスペース */
  background-color: #fff;
  overflow: hidden;
}

/* PC表示時のコンテナ幅拡張 */
@media (min-width: 768px) {
  .container {
    max-width: 1400px;
    padding: 30px;
    padding-top: 120px; /* 上部背景画像分のスペースを確保 */
    padding-bottom: 120px; /* 下部背景画像分のスペースを確保 */
  }
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('back_top.png') no-repeat center top;
  background-size: contain;
  pointer-events: none;
}

/* PC表示時の背景画像を横にループ */
@media (min-width: 768px) {
  .container::before {
    background: url('back_top.png') repeat-x center top;
    background-size: auto 100px; /* 縦幅を固定（100px） */
    height: 100px; /* 高さを固定 */
  }
}

.container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('back_bottom.png') no-repeat center bottom;
  background-size: contain;
  pointer-events: none;
}

/* PC表示時の背景画像を横にループ */
@media (min-width: 768px) {
  .container::after {
    background: url('back_bottom.png') repeat-x center bottom;
    background-size: auto 100px; /* 縦幅を固定（100px） */
    height: 100px; /* 高さを固定 */
  }
}

input, select, button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

input[type="file"] {
  padding: 10px; /* 上下左右の余白 */
  font-size: 16px;
  box-sizing: border-box;
}

button {
  background: #007BFF;
  color: white;
  border: none;
  border-radius: 5px;
}

button:hover {
  background: #0056b3;
}

#preview img, #preview video {
  margin-top: 10px;
}

table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
  border: 2px solid #007BFF; /* 青い外枠 */
}

table th, table td {
  border: 1px solid #007BFF; /* 青い内枠 */
  padding: 8px;
  text-align: center;
}

table th {
  background-color: #E6F0FF; /* ヘッダーを薄い青で強調（任意） */
}
body {
  font-family: sans-serif;
  margin: 0;
  padding: 20px;
  background: #f9f9f9;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}


/* PC表示時のタイトル位置調整 */
@media (min-width: 768px) {
  h2 {
    margin-top: 20px; /* 上部背景画像との間隔を確保 */
    margin-bottom: 30px;
  }
}

h3 {
  margin-top: 20px;
  font-size: 18px;
  color: #333;
}

label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
}

input, select, button {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  font-size: 16px;
  box-sizing: border-box;
}

button {
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #2980b9;
}

.message {
  padding: 20px;
  background-color: #e6ffe6;
  border: 1px solid #0bba0b;
  border-radius: 8px;
  font-weight: bold;
  color: #007700;
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #3498db;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

.back-link:hover {
  background-color: #2980b9;
}

.gallery { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    justify-content: flex-start;
}

.card { 
    flex: 0 0 calc(20% - 12px); /* PC 5列 */
    border: 1px solid #ccc; 
    border-radius: 10px; 
    padding: 8px; 
    box-sizing: border-box; 
    background: #fff; 
    text-align: center; 
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card img, .card video { 
    width: 100%; 
    max-width: 200px; /* サムネイルサイズを大きく */
    height: auto; 
    border-radius: 5px; 
    cursor: pointer; 
    display: block;
    margin: 0 auto;
}

.card h3 { 
    margin: 8px 0 0 0; 
    font-size: 0.9em; 
}

.card p { 
    margin: 0; 
    font-size: 0.8em; 
    color: #555; 
}

/* タブレット表示（768px以上） */
@media (min-width: 768px) and (max-width: 1024px) {
    .card { 
        flex: 0 0 calc(33.333% - 10px); /* タブレット 3列 */
    }
    .card img, .card video {
        max-width: 180px;
    }
}

/* スマホ表示（768px未満） */
@media (max-width: 767px) {
    .card { 
        flex: 0 0 calc(50% - 8px); /* スマホ 2列 */
    }
    .card img, .card video {
        max-width: 150px;
    }
}

/* 小さなスマホ表示（480px未満） */
@media (max-width: 480px) {
    .card { 
        flex: 0 0 calc(50% - 5px); 
    }
    .card img, .card video {
        max-width: 120px;
    }
}

/* 大画面PC表示（1200px以上） */
@media (min-width: 1200px) {
    .container {
        max-width: 1600px;
        padding-top: 130px; /* 大画面ではさらに上部スペースを確保 */
        padding-bottom: 130px; /* 大画面ではさらに下部スペースを確保 */
    }
    .card { 
        flex: 0 0 calc(20% - 12px); /* 大画面PC 5列 */
    }
    .card img, .card video {
        max-width: 220px; /* 大画面用の大きなサムネイル */
    }
}
#bulkDownloadBtn { 
    margin-left:20px; 
    padding:4px 8px; 
    font-size:0.9em; 
    background:#f39c12; /* オレンジ色 */
    color:#fff; 
    border:1px solid #e67e22; 
    border-radius:5px; 
    cursor:pointer;
}
#bulkDownloadBtn:hover {
    background:#e67e22; /* ホバー時の濃いオレンジ */
}
