/* ==========================================================================
  基本設定
  -------------------------------------------------------------------------- */
:root {
  --bg-image: url('./img/haikei/haikei.png');
  --brand: rgb(255, 138, 220);
  --brand-contrast: #ffffff;
  --panel-bg: #0f0f14;
  --panel-text: #000;
  --muted: #9aa2b1;
  --card: #ffffff;
  --card-border: #1d1d27;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  color: var(--panel-text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'BIZ UDPGothic', sans-serif;
  line-height: 1.6;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.container { width: min(1100px, 92%); margin-inline: auto; }
.section { padding: 64px 0; }
.section-title { margin: 0 0 24px; font-size: clamp(22px, 3vw, 32px); font-weight: 800; letter-spacing: .02em; }
.section-title span { background-color: #fff; padding: 0 8px; border-radius: 6px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
  background: color-mix(in oklab, rgba(10,10,15,.6), transparent 20%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  min-width: 0;
}
.logo {
  color: white;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .5px;
  font-size: clamp(18px, 2.5vw, 22px);
  white-space: nowrap;
}
.logo span { color: var(--brand); }

.nav { flex: 1 1 auto; min-width: 0; }
.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: clamp(10px, 2vw, 24px);
  flex-wrap: nowrap;          /* 改行防止 */
  overflow-x: auto;           /* 狭い幅では横スクロールで崩れ回避 */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;        /* ラベルの折返し防止 */
}
.nav a:hover,
.nav a:focus-visible { background: rgba(255,255,255,.08); outline: none; }

/* カルーセル */
.hero { padding: 56px 0 24px; }
.carousel-frame {
  position: relative;
  border-radius: 18px;
  background: var(--panel-bg);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
/* カルーセル（オリジナル風：1枚表示、画像は自然比率） */
.hero { padding: 56px 0 24px; }
.carousel-frame {
  position: relative;
  border-radius: 18px;
  background: var(--panel-bg);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
.carousel { position: relative; 
  height: clamp(220px, 40vw, 520px);

  overflow: hidden
}
.slide { display: none; 
  height: 100%
}
.slide.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.slide-link, .slide img {
  display: block;
  height: 100%;
  width: auto;
  margin: 0 auto;
  border-radius: 14px;
}

/* コントロール */
.ctrl {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: rgba(0,0,0,.6);
  color: white;
  border: 1px solid #fff;
  cursor: pointer;
  z-index: 5;
}
.ctrl.prev { left: 12px; }
.ctrl.next { right: 12px; }
.indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.dot { width: 10px; height: 10px; border-radius: 999px; background: rgba(0,0,0,.6); border: 1px solid #fff; cursor: pointer; }
.dot.is-active { background: var(--brand); }

/* ニュース */
.news-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.news-item {
  background: color-mix(in oklab, var(--card), black 0%);
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #12121a;
}
.news-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}
.news-link time {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: #444;
  white-space: nowrap;
  background-color: #fff;
  padding: 0 6px;
  border-radius: 6px;
}
.news-text { font-weight: 600; color: #000; background-color: #fff; padding: 0 6px; border-radius: 6px; }

/* 紹介 */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.about-card {
  background: color-mix(in oklab, var(--card), black 0%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.about-card h3 { margin-top: 0; margin-bottom: 8px; }
.features { margin: 0; padding-left: 18px; }

/* 主な活動履歴（中央寄せ・1行1件・白背景） */
.history-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.history-list li {
  margin-inline: auto;
  width: min(860px, 100%);
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.history-list .date {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: #333;
  background: #fff;
  padding: 0 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.history-list .desc { font-weight: 600; color: #000; }

/* フッター */
.site-footer {
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  background: color-mix(in oklab, rgba(10,10,15,.7), transparent 10%);
  backdrop-filter: blur(6px);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.copy { margin: 0; color: var(--muted); }
.footer-links { margin: 0; padding: 0; list-style: none; display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* 固定配置：最上部へ戻るボタン */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.95);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
  border: 1px solid rgba(0,0,0,.1);
  z-index: 1000;
}
.back-to-top img { width: 56px; height: 56px; display: block; }

/* レスポンシブ補助（タブレット） */
@media (min-width: 700px) {
  .news-list { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}

/* レスポンシブ補助（デスクトップ） */
@media (min-width: 1020px) {
  .news-list { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 5fr 4fr 3fr; }
}

/* 動きを減らす（OS設定に追従） */
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
  .ctrl { transition: none; }
}


/* === Universal (all devices) dropdown menu at top-right === */
.header-inner { position: relative; }

/* Toggle button always visible; push to right */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  appearance: none;
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.menu-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.menu-toggle .menu-icon {
  position: relative;
  width: 20px;
  height: 2px;
  background: currentColor;
  display: inline-block;
  vertical-align: middle;
}
.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}
.menu-toggle .menu-icon::before { top: -6px; }
.menu-toggle .menu-icon::after { top: 6px; }

/* Dropdown menu */
.site-header .nav {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 220px;
  max-width: min(90vw, 420px);
  background: color-mix(in oklab, rgba(10,10,15,.96), transparent 0%);
  border: 1px solid rgba(255,255,255,.12);
  border-top: 0;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  padding: 8px 0;
  border-radius: 12px;
  display: none;          /* default hidden on ALL devices */
  visibility: hidden;
  z-index: 120;
}
.site-header .nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.site-header .nav a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .nav a:hover,
.site-header .nav a:focus-visible {
  background: rgba(255,255,255,.08);
  outline: none;
}

/* Open state (beats any other previous hide rules) */
.site-header.nav-open .nav {
  display: block !important;
  visibility: visible !important;
}

/* Ensure legacy inline layout rules don't interfere */
.nav { margin-left: 0 !important; min-width: 0; }
.nav ul { overflow: visible !important; }

