/* ============================================================
   トップページ専用スタイル  /css/home.css
   ============================================================ */

/* ===== ベース（トップページ全体） ===== */
main.home-page {
  display: flex;
  flex-direction: column;
  flex: 1; /* home.php から移植：コンテンツを縦いっぱいに広げる */
  color: #121212;
  text-align: center;
  padding: 2em;
  /* サイドバー（80px）＋余白分、コンテンツが隠れないよう右に余白 */
  padding-right: 120px;
  box-sizing: border-box;
}

/* レスポンシブ：スマホ・タブレット時は右の固定バーが消えるため余白を戻す */
@media (max-width: 900px) {
  main.home-page {
    padding-right: 2em;
  }
}

main.home-page > * {
  flex-shrink: 0;
}

main.home-page > .illust-box-wrapper {
  flex: 1;
}

/* ===== プロフィール ===== */
.profile-image {
  width: 200px;
  height: 200px;
  margin-top: 0.5em;
  margin-right: auto;
  margin-bottom: 0em;
  margin-left: auto;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .profile-image {
    margin-bottom: 1.5em;
    margin-top: 1em;
    margin-right: 1em;
    margin-left: 1em;
  }
}

.profile-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
}

@media (min-width: 600px) {
  .profile-box {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }
}

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

.namae {
  color: #636363;
  margin-top: -1em;
  margin-bottom: 1em;
  font-size: 1.1em;
  text-align: center;
}

@media (min-width: 600px) {
  .namae {
    text-align: left;
  }
}

.desktop-profile-link {
  display: none;
}

/* ===== メールボタン ===== */
#email {
  display: inline-block;
  padding: 0.3em 1em;
  background: linear-gradient(90deg, #ff9999, #c9a0dc);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1em;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

#email:hover {
  background: linear-gradient(90deg, #c9a0dc, #ff9999);
  transform: scale(1.05);
}

#email-line { text-align: center; }

/* ===== カード系ボックス ===== */
.osirase, .profile-box2 {
  width: 90%;
  max-width: 600px;
  margin: 0 auto 1em auto;
  padding: 0.8em;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  text-align: left;
  line-height: 1.6;
  font-size: 1em;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.illust-box, .chart-container {
  width: 90%;
  max-width: 600px;
  margin: 0 auto 1em auto;
  padding: 0.8em;
  background: rgba(255, 255, 255);
  border-radius: 8px;
  text-align: left;
  line-height: 1.6;
  font-size: 1em;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.jikosho {
  width: 90%;
  max-width: 600px;
  margin: 1em auto;
  padding: 0.8em;
  border-radius: 8px;
  text-align: left;
  line-height: 1.6;
  font-size: 1em;
}

.jikosho h1 {
  margin-top: 0;
}

.chart-container { max-height: 150px; }
.chart-container canvas { width: 100% !important; }

/* ===== リンクボタン（小画面） ===== */
.links a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0.5em auto;
  padding: 0.8em;
  width: 90%;
  max-width: 600px;
  background: #fff;
  color: #1e1e1e;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.3s ease, background 0.3s ease;
  font-family: sans-serif;
}

.links a:hover {
  transform: scale(1.05);
  background: #fdfdfd;
}

.links a .icon {
  height: 35px;
  margin-right: 0.8em;
  flex-shrink: 0;
}

/* ===== 見出し・段落 ===== */
.para, .para1, .para2, .para-illust {
  margin: 0 auto;
  width: 90%;
  max-width: 600px;
  font-size: 1.7em;
}

/* ===== イラストスクロール ===== */
.scroll-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 1em;
}

.scroll-track {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: scrollImages 500s linear infinite;
}

.scroll-image {
  height: 260px;
  width: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@keyframes scrollImages {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 5px)); }
}

.more-link { text-align: center; }

.more-link a {
  display: inline-block;
  padding: 0.3em 1em;
  background: linear-gradient(90deg, #ff9999, #c9a0dc);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1em;
  transition: transform 0.3s ease;
}

.more-link a:hover {
  background: linear-gradient(90deg, #c9a0dc, #ff9999);
  transform: scale(1.05);
}

/* ===== サイドリンク ===== */
.side-links {
  display: none;
}

@media (min-width: 900px) {
  .para1 { display: none; }
  .links { display: none; }

  /* 背景バー（幅80px） */
  .side-links-bar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 80px;
    background-color: rgba(255, 255, 255, 0.5);
    border-left: 1px solid #dcdcdc;
    z-index: 100;
  }

  .side-links {
    position: fixed;
    top: 175px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 1000;
  }

  .side-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    background: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
  }

  .side-links a:hover { transform: scale(1.1); }

  .side-links img {
    width: 28px;
    height: 28px;
    object-fit: contain;
  }
}

/* ===== 画面幅 1300px 以上の大画面設定 ===== */
@media (min-width: 1300px) {
  .profile-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 90%;
    max-width: 1000px;
    margin: 2em auto 2em auto;
  }

  .jikosho {
    margin: 0 !important;
    width: auto;
    flex-shrink: 0;
  }

  .profile-box2 {
    display: none !important;
  }

  .desktop-profile-link {
    display: block;
    text-align: left;
  }

  .illust-box {
    margin-left: -2em !important;
    margin-right: -120px !important;
    width: calc(100% + 2em + 120px) !important;
    max-width: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    margin-bottom: 2em !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 0.5em !important;
    padding-bottom: 0.5em !important;
  }

  .illust-box.dynamic-height {
    justify-content: center;
  }

  .illust-box.dynamic-height .scroll-container {
    height: 100%;
    max-height: none !important;
    min-height: 260px;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
  }

  .illust-box.dynamic-height .scroll-track {
    height: 100%;
  }

  .illust-box.dynamic-height .scroll-image {
    height: 100%;
    width: auto;
  }
}

/* ===== コメントボタン ===== */
.fixed-comment-button {
  position: fixed;
  top: 75px;
  right: 15px;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  z-index: 1001;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.fixed-comment-button.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

.comment-text {
  background: #c9a0dc;
  color: #fff;
  font-size: 0.7em;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  white-space: nowrap;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-family: sans-serif;
  transform: translateX(-25px);
}

.comment-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(calc(-50% + 25px));
  border: 5px solid transparent;
  border-top-color: #c9a0dc;
}

.comment-icon {
  width: 50px;
  height: 50px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.comment-icon svg path {
  fill: url(#icon-gradient);
}

.fixed-comment-button:hover:not(.hidden) { transform: translateY(-5px); }

@media (max-width: 600px) {
  .fixed-comment-button { top: 65px; right: 25px; }
}
