/* ==========================================
   0. Base Resets & Modern Layout System
   ========================================== */
html {
    box-sizing: border-box;
    font-size: 62.5%;
}
*, *:before, *:after {
    box-sizing: inherit;
}
body {
    color: #000;
    /* 
       ★対策2：OS・デバイス別の最適なシステムフォント指定★
       Mac/iOS: Hiragino Kaku Gothic ProN / Hiragino Sans（高解像度で滑らか）
       Windows: BIZ UDPGothic / Meiryo（EdgeやChromeで太さが安定し、くっきり読みやすい）
       ※システムフォントのためオフラインテストでも完全に動作します。
    */
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Meiryo", sans-serif;
    background: #fff;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}
h1 { font-size: 3.2rem; line-height: 1.2; }
h2 { font-size: 3.0rem; line-height: 1.25; }
h3 { font-size: 2.8rem; line-height: 1.3; }
h4 { font-size: 2.4rem; line-height: 1.35; }
h5 { font-size: 1.8rem; line-height: 1.5; }
h6 { font-size: 1.5rem; line-height: 1.6; }
@media (min-width: 550px) {
    h1 { font-size: 3.0rem; }
    h2 { font-size: 2.8rem; }
    h3 { font-size: 2.5rem; }
    h4 { font-size: 2.0rem; }
    h5 { font-size: 1.8rem; }
    h6 { font-size: 1.5rem; }
}
p { margin-top: 0; margin-bottom: 1rem; }
ul { list-style: circle inside; padding-left: 0; margin-top: 0; margin-bottom: 1rem; }
ol { list-style: decimal inside; padding-left: 0; margin-top: 0; margin-bottom: 1rem; }
li { margin-bottom: 1rem; }
hr { margin-top: 3rem; margin-bottom: 3.5rem; border-width: 0; border-top: 1px solid #E1E1E1; }
table { border-collapse: collapse; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #E1E1E1; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }

/* Custom Layout System */
.l-container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 2.0rem;
    position: relative;
}
.l-row {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.l-col {
    display: block;
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
}
@media (min-width: 768px) {
    .l-row {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .l-col { margin-left: 4%; }
    .l-col:first-child,
    .l-row > .l-col:first-child { margin-left: 0; }
    
    .l-span-1 { flex: 0 0 4.66666666667%; max-width: 4.66666666667%; }
    .l-span-2 { flex: 0 0 13.3333333333%; max-width: 13.3333333333%; }
    .l-span-3 { flex: 0 0 22%; max-width: 22%; }
    .l-span-4 { flex: 0 0 30.6666666667%; max-width: 30.6666666667%; }
    .l-span-5 { flex: 0 0 39.3333333333%; max-width: 39.3333333333%; }
    .l-span-6 { flex: 0 0 48%; max-width: 48%; }
    .l-span-7 { flex: 0 0 56.6666666667%; max-width: 56.6666666667%; }
    .l-span-8 { flex: 0 0 65.3333333333%; max-width: 65.3333333333%; }
    .l-span-9 { flex: 0 0 74.0%; max-width: 74.0%; }
    .l-span-10 { flex: 0 0 82.6666666667%; max-width: 82.6666666667%; }
    .l-span-11 { flex: 0 0 91.3333333333%; max-width: 91.3333333333%; }
    .l-span-12 { flex: 0 0 100%; max-width: 100%; margin-left: 0; }
    
    .l-offset-1 { margin-left: 8.66666666667%; }
    .l-offset-2 { margin-left: 17.3333333333%; }
    .l-offset-3 { margin-left: 26%; }
    .l-offset-4 { margin-left: 34.6666666667%; }
    .l-offset-5 { margin-left: 43.333333333%; }
    .l-offset-6 { margin-left: 52%; }
    .l-offset-7 { margin-left: 60.6666666667%; }
    .l-offset-8 { margin-left: 69.3333333333%; }
    .l-offset-9 { margin-left: 78.0%; }
    .l-offset-10 { margin-left: 86.6666666667%; }
    .l-offset-11 { margin-left: 95.3333333333%; } 
}

/* ==========================================
   🎨 1. デザイン変数（カスタムプロパティ）
   ========================================== */
:root {
  --color-text-main: #333333;
  --color-text-light: #666666;
  --color-text-hover: #999999;
  
  --color-primary: #005366;
  --color-primary-hover: #00D0FF;
  
  --color-bg-gray: #f4f4f4;
  --color-bg-light: #f7f7f7;
  --color-bg-card: #fafafa;
  
  --color-border: #cccccc;
  
  --color-marker-blue: #afeeee;
  --color-marker-yellow: #ffff00;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;
  --space-xxxl: 5rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-btn: 2px;
}

/* ==========================================
   🔧 2. 基本設定 (Base Elements)
   ========================================== */
html {
  scroll-behavior: smooth; /* ブラウザのネイティブスムーズスクロール */
  scroll-padding-top: 120px; /* 固定ヘッダー分のジャンプずれ防止 */
}

/* ページ内リンクで固定ヘッダーに隠れないように余白を設定 */
section[id],
:target {
    scroll-margin-top: 120px;
}

img { max-width: 100%; height: auto; }
a { display: block; color: var(--color-text-light); text-decoration-line: none; }
a:hover { color: var(--color-text-hover); }
a:focus { outline: 2px dashed var(--color-primary-hover); outline-offset: 2px; }
p.b-break { word-break: break-all; }

/* ==========================================
   🛠 3. ユーティリティ (Utilities)
   ========================================== */
.col { min-width: 0; overflow-wrap: break-word; }
.responsive-text { width: 60%; margin: 0 auto; text-align: left; }
.centering-block { text-align: center; }
.centering-block .centering-block-inner { text-align: left; display: inline-block; }
.center { text-align: center; margin-bottom: var(--space-xxl); }
.under { background: linear-gradient(transparent 70%, var(--color-marker-blue) 0%); }
.marker { background: linear-gradient(transparent 70%, var(--color-marker-yellow) 0%); }
.gray-back { background-color: var(--color-bg-gray); }
.original-gradient { width: 100%; background-image: linear-gradient(90deg, rgba(57, 210, 248, 1), rgba(158, 226, 224, 1) 36%); }

/* リンク・画像・余白用の共通クラス */
p a:not(.btn-link), .inline-link { display: inline; color: var(--color-primary); text-decoration: underline; }
p a:not(.btn-link):hover, .inline-link:hover { color: var(--color-primary-hover); }
p a.btn-link { display: inline-block; text-decoration: none; width: 100%; }
p a.btn-link:hover { text-decoration: none; }

.img-w80 { width: 80%; height: auto; margin: 0 auto; }
.img-w60 { width: 60%; height: auto; }
.img-w25 { width: 25%; height: auto; }
.mt-sm { margin-top: var(--space-sm) !important; }
.mt-md { margin-top: var(--space-md) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
.mt-xl { margin-top: var(--space-xl) !important; }
.mt-xxl { margin-top: var(--space-xxl) !important; }
.mb-sm { margin-bottom: var(--space-sm) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }
.mb-xl { margin-bottom: var(--space-xl) !important; }
.mb-xxl { margin-bottom: var(--space-xxl) !important; }

.h-100 { height: 100%; }
.img-w90 { width: 90%; height: auto; }
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.03); }

/* ==========================================
   🚀 4. 各セクション＆コンポーネント
   ========================================== */
header {
  position: sticky; top: 0; z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); padding-bottom: 10px;
}
.header { display: flex; flex-direction: row; padding: var(--space-lg) 0 0 0; }
.header-box { margin-left: auto; margin-top: 8px; font-size: 0.9em; }
.header-box a { display: inline-block; padding: 0 4px; font-weight: bold; }
main { margin: var(--space-xxxl) 10px 10px 10px; }
section { margin: var(--space-xxxl) 0; padding: var(--space-xl) 0; }
.catch { text-align: center; }
.catch h2 { padding-bottom: var(--space-sm); }
.flow.row { margin-bottom: var(--space-xl); }
footer { background-color: var(--color-bg-light); padding: var(--space-xxxl) 0; }
footer h4 { border-bottom: 3px solid var(--color-border); }

.footer-project-name { font-weight: normal; font-size: 0.9em; opacity: 0.8; }
.copyright { text-align: center; width: 100%; background-image: linear-gradient(90deg, rgba(57, 210, 248, 1), rgba(158, 226, 224, 1) 36%); padding: var(--space-lg) 0; }
.copyright a { color: #fff; text-decoration: none; display: inline; }

.contact-button { 
  display: inline-flex; align-items: center; justify-content: center; 
  min-height: 44px; box-sizing: border-box; 
  padding: var(--space-sm) 2.5rem; 
  border: 2px solid var(--color-text-main); 
  border-radius: var(--radius-btn); 
  background-color: #fff; 
  font-weight: bold; 
  color: var(--color-text-main); 
  transition: all 0.3s ease; 
  width: 100%; max-width: 340px; 
}
a:hover .contact-button, a:focus .contact-button { background-color: #000; color: #fff; }

nav ul { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-around; list-style: none; margin: var(--space-sm) 0 0 0; }
nav li { flex: 1 0 auto; }
nav li a { text-decoration: none; text-align: center; width: 100%; padding: var(--space-xs); }
nav a:hover { background-color: var(--color-bg-light); }

/* --- ページトップボタン --- */
#pagetop { 
  position: fixed; 
  bottom: 15px; 
  right: 15px; 
  z-index: 99; 
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#pagetop.is-visible {
  opacity: 1;
  visibility: visible;
}
#pagetop a { display: block; background: var(--color-primary); color: #fff; width: 50px; padding: 10px 5px; text-align: center; }
#pagetop a:hover, #pagetop a:focus { background: var(--color-primary-hover); }

.mainimg img { width: 100vw; }
.fbicon img { width: 6vh; }
.yticon img { width: 24vh; }
.youtube { position: relative; width: 100%; padding-top: 56.25%; }
.youtube iframe { position: absolute; top: 0; right: 0; width: 100%; height: 100%; }

.table { margin: var(--space-xxl) 0; }
.table th { width: 250px; }

.schedule-list { width: 100%; }
.schedule-item { display: flex; padding: var(--space-md) 0; border-bottom: 1px dashed var(--color-border); }
.schedule-item:last-child { border-bottom: none; }
.schedule-item dt { flex: 0 0 180px; font-weight: bold; }
.schedule-item dd { flex: 1; margin: 0; line-height: 1.6; }

.event-card { text-align: left; padding: var(--space-lg) var(--space-xl); background-color: var(--color-bg-card); border-radius: var(--radius-md); }
.event-card h3 { font-weight: bold; margin-bottom: var(--space-md); line-height: 1.4; }
.event-card p { margin-bottom: var(--space-md); }
.event-buttons { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 2.5rem; }
.event-buttons a { display: block; text-align: center; width: 100%; }
.event-buttons .contact-button { letter-spacing: 0.1em; }

.supporter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl) var(--space-lg); margin-bottom: var(--space-lg); }
.supporter-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--color-text-main); transition: transform 0.2s ease, opacity 0.2s ease; }
.supporter-item:hover, .supporter-item:focus { transform: translateY(-5px); opacity: 0.8; }
.supporter-item:focus { outline: 2px dashed var(--color-primary); outline-offset: 4px; }
.supporter-item img { max-width: 60%; height: auto; margin-bottom: var(--space-sm); }
.supporter-item p { margin: 0; line-height: 1.5; font-size: 0.95rem; text-align: center; }

/* ==========================================
   ✨ 5. アニメーション（フェードイン）
   ========================================== */
.animation-enabled .js-fade-target { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.animation-enabled .js-fade-target.is-active { opacity: 1; transform: translateY(0); }

/* ==========================================
   📱 6. メディアクエリ (レスポンシブ対応)
   ========================================== */
@media screen and (min-width: 1025px) {
  #open, #close { display: none !important; }
  #navi { display: block !important; }
}

@media screen and (max-width: 1024px) {
  .header { flex-direction: column; margin-bottom: 10px; }
  .header-box { display: none; }
  
  /* スマホ用ハンバーガーボタン */
  #open, #close { 
    position: absolute; 
    top: 25px; 
    right: 20px; 
    width: 40px; 
    border: none; 
    z-index: 1001; 
    cursor: pointer;
  }
  #open { display: block; }
  #close { display: none; }

  /* ナビゲーションメニュー */
  #navi { display: none; }
  body.nav-open #navi { display: block; }
  body.nav-open #open { display: none; }
  body.nav-open #close { display: block; }

  nav ul { flex-direction: column; }
  .header li { padding-top: 0; }
}

@media screen and (max-width: 992px) {
  .supporter-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 768px) {
  .responsive-text { width: 90%; }
  .table th { width: 100%; display: block; }	
  .table td { display: block; }
  .img-w60 { width: 95%; }
  .img-w80 { width: 100%; }
  .schedule-item { flex-direction: column; }
  .schedule-item dt { margin-bottom: var(--space-xs); color: var(--color-primary); }
  .event-card { padding: var(--space-md); }
  .supporter-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg) var(--space-sm); }
  .supporter-item img { max-width: 70%; }
}

/* タブメニュー用デザイン */
.tab-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}
.tab-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-weight: bold;
    transition: all 0.3s ease;
}
.tab-button:hover {
    background-color: #e2e6ea;
}
.tab-button.active {
    background-color: #036eb8;
    color: #fff;
    border-color: #036eb8;
}