/* =========================
   Base & Reset
   ========================= */
:root {
  --primary-color: #4b0082; /* インディゴ */
  --accent-color: #9370db;  /* ラベンダー */
  --bg-gradient: linear-gradient(135deg, #fdfdfd 0%, #f0f8ff 100%);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --text-color: #333;
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: 'Noto Serif JP', serif;
  margin: 0;
  padding: 0;
  background: var(--bg-gradient);
  color: var(--text-color);
  line-height: 1.8;
  word-break: break-word;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   Header
   ========================= */
.header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(147, 112, 219, 0.1);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 20px;
}

.brand {
  text-decoration: none;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.05em;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
}

.primary-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.primary-nav a:hover {
  color: var(--accent-color);
}

.primary-nav a:hover::after {
  width: 100%;
}

/* Search Form */
.site-search {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 20px;
  padding: 2px 5px 2px 15px;
}

.site-search input {
  background: transparent;
  border: none;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  outline: none;
  width: 120px;
}

.site-search button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.site-search button:hover {
  transform: scale(1.2);
}

/* =========================
   Hero Section
   ========================= */
.hero {
  position: relative;
  padding: 8rem 0;
  background-image: url("image/background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* パララックス効果 */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ヒーローのオーバーレイをグラデーションで洗練 */
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.8) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-inner h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.hero-inner p {
  font-size: 1.15rem;
  color: #555;
  letter-spacing: 0.05em;
}

/* =========================
   Content Sections
   ========================= */
.main-content {
  padding: 4rem 20px;
}

.explain {
  max-width: 750px;
  margin: 0 auto 4rem;
  padding: 3rem;
  background: var(--glass-bg);
  backdrop-filter: blur(5px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(147, 112, 219, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.explain p {
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
  color: #444;
}

.explain p strong {
  color: var(--primary-color);
  font-weight: 700;
  border-bottom: 1px solid var(--accent-color);
}

/* Consult Section */
.consult {
  text-align: center;
}

.consult p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  font-weight: 500;
  color: var(--primary-color);
}

.mine-btn {
  background: linear-gradient(135deg, #9370db 0%, #ba55d3 100%);
  color: #fff;
  border: none;
  padding: 1rem 3rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(147, 112, 219, 0.3);
  transition: var(--transition);
  letter-spacing: 0.1em;
}

.mine-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(147, 112, 219, 0.4);
  filter: brightness(1.1);
}

/* =========================
   Footer
   ========================= */
.site-footer {
  background: linear-gradient(to top, #fff0f5, #f0f8ff);
  padding: 4rem 20px;
  text-align: center;
  border-top: 1px solid rgba(147, 112, 219, 0.1);
}

.footer-disclaimer {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.8;
}
#page-info{
  position: fixed;
  bottom: 10px;
  right: 20px;
  font-size: 0.75rem;
  color: #555;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
/* =========================
   Dialog (修正版)
   ========================= */
.dialog {
  display: none; /* ★ここが重要：最初は非表示にする */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* 背景を少し暗くして浮かび上がらせる */
  z-index: 2000; /* ヘッダー(1000)より手前に表示 */
  justify-content: center; /* 中身を中央に寄せる */
  align-items: center;
}

.dialog-content {
  background: #fff;
  color: #333;
  padding: 2.5rem;
  border-radius: 20px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  border: 1px solid #9370db;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 20px;
  }

  .primary-nav ul {
    gap: 1.2rem;
  }

  .site-search {
    width: 100%;
  }

  .site-search input {
    width: 100%;
  }

  .hero-inner h1 {
    font-size: 1.8rem;
  }

  .sp-only {
    display: block;
  }

  .explain {
    padding: 2rem 1.5rem;
  }
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Star Gimmick (星のギミック)
   ========================= */
.star-container {
  display: flex;
  justify-content: center; /* 中央に並べる */
  align-items: center;
  gap: 30px;              /* 星と星の間隔 */
  margin: 40px auto;      /* 上下の余白 */
  max-width: 1000px;
  min-height: 80px;       /* 領域を確保 */
}

.star-icon {
  width: 50px;            /* アイコンのサイズ */
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  /* 5つの星の色を変えて判別しやすくする（任意） */
  filter: drop-shadow(0 0 5px rgba(147, 112, 219, 0.4));
}

/* 5つの星にそれぞれ異なる色味をつける（ヒントになります） */
.star-0 { filter: hue-rotate(0deg); }    /* 元のピンク */
.star-1 { filter: hue-rotate(160deg); }         /* 緑（鮮やかな緑へ調整） */
.star-2 { filter: hue-rotate(220deg); }         /* 青（深い青へ調整） */
.star-3 { filter: hue-rotate(290deg); }         /* 紫（マゼンタ寄りの紫） */
.star-4 { filter: hue-rotate(45deg); }          /* オレンジ（赤みを帯びたオレンジ） */

.star-icon:hover {
  transform: scale(1.2) rotate(15deg); /* マウスを乗せたときのアニメーション */
}

.star-icon:active {
  transform: scale(0.9); /* クリックしたときの沈み込み */
}

#color-feedback {
    opacity: 0;
    pointer-events: none; /* クリックの邪魔をしない */
}

/* スマホ対応：星がはみ出さないように調整 */
@media (max-width: 768px) {
  .star-container {
    gap: 15px;
  }
  .star-icon {
    width: 40px;
  }
}

/* =========================
   Teller Page Image
   ========================= */
.small-image {
  /* 画像の最大幅を、親要素（ここでは.explain）の幅の40%に制限 */
  max-width: 40%;
  
  /* 元の画像の縦横比（アスペクト比）を維持する */
  height: auto;
  
  /* 以下はお好みで調整してください */
  display: block;       /* 画像をブロック要素化 */
  margin: 20px auto;    /* 上下に20pxの余白を空け、左右は中央寄せにする */
  border-radius: 10px;  /* 角を少し丸くして柔らかい印象に */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* うっすらと影をつける */
}

/* スマホなど画面が狭いときは、少し大きめに戻す（オプション） */
@media (max-width: 600px) {
  .small-image {
    max-width: 70%; /* スマホでは横幅の70%まで許容する */
  }
}

/* 占い師紹介セクション全体の設定 */
.explain {
  text-align: center; /* これで中のテキスト（h1, h3, p）がすべて中央寄せになります */
}

/* 占い師の名前（h3）の調整 */
.explain h3 {
  margin-top: 50px;       /* 占い師ごとの間隔を空ける */
  color: var(--primary-color);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--accent-color); /* 名前の下に細い線を入れるとお洒落です */
  display: inline-block;  /* 線の長さを文字に合わせる */
  padding-bottom: 5px;
  margin-bottom: 20px;
}

/* 写真の設定（前回の内容を中央寄せに最適化） */
.small-image {
  max-width: 40%;
  height: auto;
  display: block;
  margin: 0 auto 20px;    /* 左右をautoにして中央配置、下に余白 */
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 説明文（p）の調整 */
.explain p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  /* 改行（<br>）があっても、一行ずつが中央に配置されます */
}