* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 54px;
}

body {
  font-family: "Zen Maru Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  background: linear-gradient(#bfe3ef 0%, #d6ebcb 30%, #d4edaa 60%, #c3e295 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-top: 54px;
}

h2 {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 24px;
  color: #222;
}

/* ナビゲーション */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 6px;
  background: linear-gradient(#4a8042, #3a6a35);
  border-bottom: 3px solid #2c5230;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
}

nav a {
  display: inline-block;
  padding: 4px 12px;
  border: 2px solid #2c5230;
  color: #2c5230;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  background-color: #f4f1e0;
  border-radius: 16px;
  transition: background-color 0.2s, transform 0.1s;
}

nav a:hover {
  background-color: #fff8e8;
  transform: translateY(-1px);
}

/* リンク群（PCでは横並び、そのまま） */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ハンバーガー（PCでは非表示） */
.nav-toggle {
  display: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 32px;
  padding: 5px 6px;
  cursor: pointer;
  background-color: #f4f1e0;
  border: 2px solid #2c5230;
  border-radius: 6px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #2c5230;
  border-radius: 2px;
}

.nav-logo {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}

/* メインコンテンツ */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* タイトル画像 */
.title-img-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.title-img {
  max-width: 480px;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* スマホ専用の改行（PCでは無効） */
.sp-br {
  display: none;
}

/* 説明文 */
.description {
  font-size: 18px;
  line-height: 1.8;
  color: #222;
  margin-bottom: 32px;
}

/* スマホ向けの操作ヒント */
.tree-hint {
  display: none;
  margin: -8px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #3a6a35;
}

/* ツリーセクション */
.tree-section {
  position: relative;
  width: 100%;
  min-height: 500px;
  margin-bottom: 32px;
}

.tree-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  position: relative;
  height: 500px;
}

/* 地面（草地の丘・奥） */
.tree-container::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(#86c057, #5f9438);
  border-radius: 50% 50% 0 0 / 22px 22px 0 0;
  box-shadow: inset 0 4px 10px rgba(255, 255, 255, 0.25);
  z-index: 1;
}

/* 手前の草の縁（幹の根元にかぶせて植わって見せる） */
.tree-container::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background: linear-gradient(#8ac559, #629a3a);
  border-radius: 50% 50% 0 0 / 14px 14px 0 0;
  z-index: 40;
}

/* 手前の木は地面より前に */
.tree-center,
.tree-left,
.tree-right {
  z-index: 2;
}

/* ホバー時は前面に出して写真カードを隠さない */
.tree-center:hover,
.tree-left:hover,
.tree.is-open {
  z-index: 30;
}

/* 奥に霞む木立 */
.tree-back {
  z-index: 0;
  opacity: 0.5;
  filter: blur(1px);
}

.tree-back .tree-canopy {
  width: 120px;
  height: 110px;
  background-color: #82bd6a;
  box-shadow: none;
}

.tree-back .tree-trunk {
  width: 16px;
  height: 46px;
}

.tree-back-1 {
  bottom: 30px;
  left: 20%;
}

.tree-back-2 {
  bottom: 38px;
  right: 18%;
}

.tree-back-3 {
  bottom: 26px;
  left: 40%;
  opacity: 0.4;
}

.tree-back-3 .tree-canopy {
  width: 95px;
  height: 88px;
  background-color: #93c879;
}

/* 木のスタイル */
.tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  cursor: pointer;
}

.tree-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.tree-left {
  bottom: 0;
  left: 4%;
}

.tree-right {
  bottom: 0;
  right: 4%;
}

.tree-canopy {
  border-radius: 50%;
  position: relative;
  isolation: isolate;
  background-image: radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 55%);
  box-shadow: inset -10px -12px 26px rgba(0, 0, 0, 0.18);
}

/* 葉の塊（こんもりした立体感） */
.tree-canopy::before,
.tree-canopy::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background-color: inherit;
  background-image: inherit;
  z-index: -1;
}

.tree-canopy::before {
  width: 68%;
  height: 68%;
  top: -20%;
  left: 6%;
}

.tree-canopy::after {
  width: 56%;
  height: 56%;
  top: -6%;
  right: 2%;
}

.tree-center .tree-canopy {
  width: 200px;
  height: 180px;
  background-color: #6ab04c;
  box-shadow: inset -8px -8px 20px rgba(0, 0, 0, 0.15);
}

.tree-left .tree-canopy {
  width: 170px;
  height: 155px;
  background-color: #8dc44a;
  box-shadow: inset -6px -6px 16px rgba(0, 0, 0, 0.15);
}

.tree-right .tree-canopy {
  width: 160px;
  height: 145px;
  background-color: #78b840;
  box-shadow: inset -6px -6px 16px rgba(0, 0, 0, 0.15);
}

.tree-trunk {
  background: linear-gradient(90deg, #6e4a2b, #8a5e38 45%, #74502f);
  border-radius: 3px 3px 0 0;
  box-shadow: inset -3px 0 6px rgba(0, 0, 0, 0.25);
}

.tree-center .tree-trunk {
  width: 28px;
  height: 70px;
}

.tree-left .tree-trunk {
  width: 22px;
  height: 60px;
}

.tree-right .tree-trunk {
  width: 20px;
  height: 55px;
}

/* ツリーラベル */
.tree-label {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  position: absolute;
}

.tree-center .tree-label {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tree-left .tree-label {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tree-right .tree-label {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ホバー吹き出し（活動写真の木札風カード） */
.speech-bubble {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 520px;
  padding: 14px;
  background: #fbf6ea;
  border: 3px solid #6e9e3f;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(40, 60, 20, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #6e9e3f;
}

.speech-bubble-title {
  display: block;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #3a6a35;
  margin-bottom: 8px;
}

.speech-photos {
  display: flex;
  gap: 8px;
}

.speech-photos figure {
  flex: 1;
  margin: 0;
}

.speech-photos img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #cbb083;
}

.speech-photos figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: #5a4a33;
}

.speech-caption {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: #5a4a33;
}

.speech-photo-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #3a6a35;
}

.tree-center.is-open .speech-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 左の木の吹き出しは左端に寄せて画面外にはみ出さないように */
.tree-left .speech-bubble {
  left: 0;
  transform: translateY(8px);
}

.tree-left .speech-bubble::after {
  left: 85px;
}

.tree-left.is-open .speech-bubble {
  opacity: 1;
  transform: translateY(0);
}

/* マウス操作のできる端末だけホバーでも表示（タップの邪魔をしない） */
@media (hover: hover) {
  .tree-center:hover .speech-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .tree-left:hover .speech-bubble {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-name {
  font-size: 25px;
}

/* プロフィールセクション */
.profile-section {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-photo {
  width: 130px;
  height: 130px;
  background-color: #a8c8e8;
  border: 3px solid #888;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 13px;
  text-align: center;
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-bubble-wrap {
  flex: 1;
  position: relative;
}

.profile-bubble {
  background-color: #fff;
  border: 2px solid #888;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 16px;
  line-height: 1.9;
  color: #222;
  position: relative;
}

.profile-bubble::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 28px;
  border: 9px solid transparent;
  border-right-color: #888;
}

.profile-bubble::after {
  content: '';
  position: absolute;
  left: -14px;
  top: 30px;
  border: 7px solid transparent;
  border-right-color: #fff;
}

/* Facebook埋め込みセクション */
.fb-embed-section {
  margin-top: 32px;
  margin-bottom: 8px;
}

.fb-embed-section h2 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fb-embed-section h2::before {
  content: 'f';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: #1877f2;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: bold;
  border-radius: 4px;
}

.fb-embed-wrapper {
  border: 2px solid #cc4400;
  background-color: #fff8f0;
  padding: 8px;
  display: block;
  width: 100%;
  text-align: center;
  overflow: hidden;
}

/* 埋め込み本体を枠の幅に合わせて中央に */
.fb-embed-wrapper .fb-page,
.fb-embed-wrapper .fb-page span,
.fb-embed-wrapper .fb-page iframe {
  max-width: 100% !important;
}

/* フッター */
footer {
  border-top: 4px solid #5f9438;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  background: linear-gradient(#9ac766, #79ad4f);
  text-align: center;
}

.footer-org {
  font-size: 16px;
  font-weight: bold;
}

.footer-name {
  font-weight: bold;
}

footer a {
  color: #000;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 580px) {
  h1 {
    font-size: 36px;
  }

  .sp-br {
    display: inline;
  }

  .description {
    font-size: 16px;
  }

  /* ナビ：リンクを隠してハンバーガー表示 */
  .nav-hamburger {
    display: flex;
    margin-left: auto;
    order: 2;
  }

  .nav-logo {
    margin-left: 0;
    order: 1;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle:checked~.nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(#4a8042, #3a6a35);
    border-bottom: 3px solid #2c5230;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
  }

  .nav-toggle:checked~.nav-links a {
    text-align: center;
  }

  /* 木：背を高くして重ならないように */
  .tree-section {
    min-height: 540px;
  }

  .tree-container {
    height: 460px;
  }

  .tree-left {
    left: 0;
  }

  .tree-right {
    right: 0;
  }

  .tree-center .tree-canopy {
    width: 156px;
    height: 140px;
  }

  .tree-left .tree-canopy {
    width: 112px;
    height: 104px;
  }

  .tree-right .tree-canopy {
    width: 104px;
    height: 96px;
  }

  .tree-center .tree-trunk {
    height: 96px;
  }

  .tree-left .tree-trunk {
    height: 60px;
  }

  .tree-right .tree-trunk {
    height: 52px;
  }

  .tree-label {
    font-size: 16px;
  }

  .tree-hint {
    display: block;
  }

  /* 吹き出し：画面幅に収める */
  .speech-bubble {
    width: min(520px, calc(100vw - 24px));
    padding: 12px;
  }

  .speech-photos img {
    height: 170px;
  }

  .tree-left .speech-bubble::after {
    left: 56px;
  }

  /* プロフィール：吹き出しを写真の下に */
  .profile-section {
    flex-direction: column;
    align-items: center;
  }

  .profile-bubble-wrap {
    width: 100%;
  }

  .profile-bubble::before {
    left: 50%;
    top: -18px;
    transform: translateX(-50%);
    border-color: transparent;
    border-bottom-color: #888;
  }

  .profile-bubble::after {
    left: 50%;
    top: -14px;
    transform: translateX(-50%);
    border-color: transparent;
    border-bottom-color: #fff;
  }
}