:root{
  --bg:#000000;
  --panel:#1e1a16;
  --text:#f6f2ee;
  --muted:#cfc7bf;
  --accent:#f6c288;
  --accent-strong:#ff9f43;
  --line:#2a2521;
  --maxw:1100px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic",Meiryo,sans-serif;
  color:var(--text);
  background:#000;
  line-height:1.65;
}

.container{width:100%;max-width:var(--maxw);margin-inline:auto;padding-inline:clamp(16px,4vw,24px)}
section{padding:clamp(56px,8vw,50px) 0}
h1,h2,h3{line-height:1.25;margin:0 0 .3em}
h2{
  font-size: clamp(28px,4vw,40px);
  font-family: YuMincho, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 100;
}
p{margin:0 0 1em}
a{color:var(--accent);text-decoration:none}
a:hover{opacity:.9}

.grid{display:grid;gap:20px}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.grid.cols-2{grid-template-columns:repeat(2,1fr)}
@media (max-width:900px){.grid.cols-3{grid-template-columns:1fr 1fr}}
@media (max-width:680px){.grid.cols-3,.grid.cols-2{grid-template-columns:1fr}}
.card{background:var(--panel);border-radius:16px;padding:20px}
.badge{display:inline-block;padding:.25em .6em;border-radius:8px;background:#231e1a;border:1px solid var(--line);font-size:.9rem}

.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid var(--line);padding:12px 10px;text-align:left}
.table th{color:var(--muted);font-weight:600}

.image-cover{position:relative;overflow:hidden;border-radius:16px}
.image-cover img{width:100%;height:100%;object-fit:cover;display:block}

.image-cover02{position:relative;overflow:hidden}
.image-cover02 img{width:100%;height:100%;object-fit:cover;display:block}

.reveal{opacity:0;transform:translateY(24px);transition:opacity .8s ease,transform .8s ease}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion: reduce){.reveal,.reveal.in{opacity:1;transform:none}}

.muted{color:var(--muted)}
.center{text-align:center}

/* Hero Section */
#hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 0;
}

#hero {
  margin-top: 0;
  padding-top: 0;
  position: relative;
  top: 0;
}
body {
  margin: 0;
}

.hero-container {
  width: 100%;
  max-width: 1200px; /* コンテンツの最大幅 */
  overflow: hidden;
}

.hero-container video,
.hero-container img {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: center center;
  transition: transform 0.3s ease;
}

/* Slider */
.slider{position:relative;overflow:hidden;border-radius:16px}
.track{
  display:flex;
  width:max-content;
  gap:20px;
  will-change: transform;
}
.slide{flex:0 0 auto;width:min(100%,400px)}
.slide img{width:100%;height:auto;object-fit:cover;display:block;border-radius:16px}

/* HeroとSliderの間を詰める */
#gallery {
  padding-top: 0 !important;
	margin-top: -20px;/* 上の余白を小さく */
}

#program .image-cover02 {
  margin-bottom: 8px;
}

#program .card > p:last-child {
  margin-bottom: 0;
}

/* Photo Gallery 専用スタイル */

/* --- PC（900px以上）は4列 --- */
#gallery-photo .grid.cols-3 {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* --- タブレット・スマホ（〜899px）は2列 --- */
@media (max-width: 899px) {
  #gallery-photo .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

#gallery-photo .grid {
  gap: 10px; /* 隙間を少し狭く */
}

#gallery-photo .image-cover {
  border-radius: 8px;
  overflow: hidden;
}

#gallery-photo .image-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================
   Photo Gallery Popup (Lightbox)
============================ */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-overlay.active {
  display: flex;
}

/* 画像と×ボタンを囲むコンテナ */
.popup-content {
  position: relative;
  display: inline-block;
}

.popup-content img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
}

/* ×ボタンを画像の右上に */
.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 28px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}


/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 200px;
  height: auto;
  opacity: 0;
  transform: translateY(100%);
  transition: all 1s ease;
  z-index: 999;
}
.back-to-top img {
  width: 100%;
  height: auto;
  display: block;
}
.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}
