:root {
  --ink: #333537;
  --ink-soft: #5c5f62;
  --paper: #faf7f2;
  --line: rgba(51, 53, 55, 0.28);
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font-en: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --header-h: 76px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ja);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

a { color: inherit; }

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

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
}

/* 色付きは、ヘッダーより下まで延ばしてから透明へ消える */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -48px 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(250, 247, 242, 0.85) 0%, rgba(250, 247, 242, 0.7) 50%, rgba(250, 247, 242, 0) 100%);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  text-decoration: none;
}

.logo img { height: 44px; width: auto; display: block; }

.logo-text { display: grid; gap: 3px; line-height: 1; }
.logo-ja { font-size: 15px; letter-spacing: 0.14em; }
.logo-en { font-family: var(--font-en); font-size: 8.5px; letter-spacing: 0.2em; color: var(--ink-soft); }

.site-nav ul {
  display: flex;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 6px 0;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current] { border-bottom-color: var(--ink); }

/* メンバー向けの内部ページ（要ログイン）は、ほかの項目と区別するため、グレーにする */
.site-nav .nav-members { color: #707478; }

.header-sns {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.header-sns svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- top: hero slideshow ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  background: var(--paper);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-fade 21s infinite;
}

/* h1 が先頭の子なので、画像（picture）は2〜4番目。4番目（楽譜）が読み込み直後から表示され、2番目・3番目が続く */
.hero picture:nth-child(2) img { animation-delay: 5s; }
.hero picture:nth-child(3) img { animation-delay: 12s; }

@keyframes hero-fade {
  0%   { opacity: 0; }
  7%   { opacity: 1; }
  33%  { opacity: 1; }
  40%  { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero img { animation: none; }
  .hero img:first-child { opacity: 1; }
}

/* ---------- panels: 縦につなげる各セクション ---------- */

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: calc(var(--header-h) + 16px) 0 56px;
  overflow: hidden;
  background: var(--paper);
}

.panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* 文字のあるブロックだけに、紙色のベールを重ねる。文字の周りに余白を取り、縁ははっきりさせる */
.text-block {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 48px));
  padding: 40px 56px;
  background: rgba(250, 247, 242, 0.88);
}

.text-block + .text-block { padding-top: 0; }

/* 同じセクションの複数のブロックは、1つのベールにつなげて、細い線で区切る */
.text-block + .text-block::before {
  content: "";
  display: block;
  margin-bottom: 40px;
  border-top: 1px solid var(--line);
}


.calendar {
  display: block;
  width: 100%;
  height: clamp(420px, 72svh, 640px);
  margin-top: 20px;
  border: 0;
  background: #fff;
}
/* 月間表示は広い画面、リスト表示は狭い画面だけ使う */
.calendar-agenda { display: none; }

.text-block a { text-underline-offset: 3px; }

.repertoire, .history { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 13.5px; line-height: 1.7; }
.repertoire td, .repertoire th, .history td { padding: 6px 12px 6px 0; vertical-align: top; text-align: left; }
.history td:last-child { white-space: nowrap; }
.repertoire td:first-child, .history td:first-child { white-space: nowrap; font-family: var(--font-en); letter-spacing: 0.06em; }

.map {
  display: block;
  width: 100%;
  height: clamp(260px, 42svh, 420px);
  margin-top: 20px;
  border: 0;
}

.legend { margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.9; }
.legend li { display: flex; align-items: center; gap: 10px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot-regular { background: #f4511e; }
.dot-nopiano { background: #4986e7; }

.text-block h2 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.text-block h2 .en {
  display: block;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}

.text-block p { margin: 0 0 1em; }
.text-block p:last-child { margin-bottom: 0; }

.link-line {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.link-line:hover { opacity: 0.6; }
.text-block p.center { text-align: center; }

/* コピーライトは画面の下端に固定する（ページの切り替えに余分な領域を足さない） */
.site-footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 5;
  padding: 14px 24px 16px;
  text-align: center;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink);
  pointer-events: none;
  text-shadow: 0 0 10px rgba(250, 247, 242, 0.95), 0 0 3px rgba(250, 247, 242, 0.9);
}

/* ---------- narrow screens: menu button ---------- */

.nav-toggle { display: none; }

@media (max-width: 1200px) {
  /* JavaScript が使えない場合は、メニューを2段目に並べる */
  :root:not(.js) { --header-h: 96px; }
  :root:not(.js) .site-header { grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-content: center; row-gap: 6px; padding: 8px 16px; }
  :root:not(.js) .site-nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  :root:not(.js) .site-nav ul { gap: 4px 9px; flex-wrap: wrap; justify-content: center; }
  :root:not(.js) .site-nav a { font-size: 11px; letter-spacing: 0.06em; }

  /* ヘッダーの高さと左右の余白、ロゴの大きさは、デスクトップのまま変えない（ボタンの余白の分だけ右を詰め、3本線を右端の32pxに揃える） */
  .js .site-header { grid-template-columns: 1fr auto auto; gap: 4px; padding: 0 22px 0 32px; }

  .js .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
  }
  .nav-toggle .bar { display: block; width: 24px; height: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
  .nav-toggle.is-open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.is-open .bar:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .js .site-nav {
    position: absolute;
    top: calc(100% - 8px);
    right: 8px;
    width: min(280px, calc(100vw - 16px));
    background: rgba(250, 247, 242, 0.97);
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(51, 53, 55, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  }
  .js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav li + li { border-top: 1px solid var(--line); }
  .js .site-nav a { display: block; padding: 14px 20px; font-size: 14px; letter-spacing: 0.14em; border-bottom: 0; }
  .js .site-nav a:hover { background: rgba(51, 53, 55, 0.05); }
  .js .site-nav a[aria-current] { box-shadow: inset 3px 0 0 var(--ink); }
}

@media (max-width: 1200px) and (prefers-reduced-motion: reduce) {
  .js .site-nav, .nav-toggle .bar { transition: none; }
}

/* ---------- mobile ---------- */

@media (max-width: 760px) {
  .header-sns span { display: none; }

  .text-block { padding: 32px 24px; }
  /* Google カレンダーの月間表示は幅が足りないと右端が切れるため、文字ブロックの余白の分だけ広げる */
  .calendar-month { display: none; }
  .calendar-agenda { display: block; }
  .calendar { width: calc(100% + 48px); max-width: none; margin-left: -24px; }
  .text-block + .text-block { padding-top: 0; }
  .text-block + .text-block::before { margin-bottom: 32px; }
    /* 表は2列に組み直し、3列目（編成）はタイトルの下に小さく出す */
  .repertoire tr, .history tr { display: grid; grid-template-columns: 6.8em 1fr; padding: 6px 0; }
  .repertoire td, .history td { padding: 0; }
  .repertoire td:nth-child(3), .history td:nth-child(3) { grid-column: 2; font-size: 12px; color: var(--ink-soft); }
  .history td:last-child { white-space: normal; }
}
