:root {
  --bg: #000;
  --card: #121212;
  --text: #f2f2f2;
  --acc: #fff;
  --link: #4da3ff;
  --hover: #6bb3ff;
}

*, *::before, *::after {
  box-sizing: border-box;
  min-width: 0;
}
html, body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Noto Sans JP', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ナビゲーション */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8rem 1rem;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}
nav h1 {
  font-size: 1.2rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}
nav h1 img {
  height: 32px;
  width: auto;
  vertical-align: middle;
}
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
nav ul li a {
  display: block;
  padding: 0.25rem 0.25rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}
nav ul li a:hover {
  color: var(--hover);
}

header {
  position: relative;
  text-align: center;
  padding: 8rem 1rem 5rem; /* 高さを確保 */
  margin-top: 3.5rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)), url('/images/5.png') center/cover no-repeat;
  background-size: cover;
  background-position: center;
}

header h2 {
  font-size: 4.4rem; /* 元の2.2remから倍に */
  margin: 0.5rem 0;
  animation: fadeInDown 1s ease-out;
}

header p {
  font-size: 1.5rem; /* 読みやすく少し大きめに */
  animation: fadeInUp 1s ease-out;
}

/* メインコンテンツ */
main {
  max-width: min(900px, 100% - 2rem);
  margin: 2rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
  animation: fadeIn 1.2s ease-in;
}
h2 {
  border-left: 4px solid var(--acc);
  padding-left: 10px;
  color: var(--acc);
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--hover);
  text-decoration: underline;
}
code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #888;
  font-size: 0.9rem;
}

/* ギャラリー */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
}
.gallery figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s, box-shadow 0.3s;
}
.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}
.btn:hover {
  background: #666;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* アニメーション */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(20px);}
  to {opacity: 1; transform: translateY(0);}
}
@keyframes fadeInDown {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}
@keyframes fadeInUp {
  from {opacity: 0; transform: translateY(20px);}
  to {opacity: 1; transform: translateY(0);}
}
.fade-in     { animation: fadeIn 1s ease-in; }
.fade-in-up  { animation: fadeInUp 1s ease-out; }
.fade-in-down{ animation: fadeInDown 1s ease-out; }

/* モバイル対応 */
@media (max-width: 360px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}