/* 共通部分 */
body {
  margin: 0;
  background: #fdf6fb;
  color: #333;
}
section {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}
h2 {
  color: 	#6f75c7;
  border-bottom: 1px solid #e3f2fd;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
/* ギャラリーページへのリンク色をh2に合わせておく */
h2 a {
  color: #6f75c7 !important;
  text-decoration: none;
  pointer-events: auto; /* 念のため */
}

h3 {
  color: #333;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

/* トップページでカードの例だすやつ */
.card-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center; /* 子要素を中央揃え */
}

.card-preview img {
  width: 100%;
  max-width: 180px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 泡エフェクトのスタイル */
#bubbles {
  position: fixed; /* 画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* 泡がクリックの邪魔をしないようにする */
  overflow: hidden;
  z-index: 0; 
}

.bubble {
  position: absolute;
  width: 15px;
  height: 15px;
  background: #cceeff;
  border-radius: 50%;
}

/* note埋め込みのいろいろ */
.note-embed-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  /* 以下二行でどうやってもバー出さないようにする */
  max-height: auto;
  overflow: hidden;
}

.note-embed-container iframe {
  flex: 1 1 calc(50% - 10px); /* 画面幅が広い場合に2つ並べる */
}

.note-embed-container:has(iframe:only-child) iframe {
  max-width: calc(50% - 10px); /* 1つだけの場合でも2つ並びの時と同じサイズにする */
  justify-content: center;
}

@media (max-width: 768px) {
    .note-embed-container iframe {
        flex: 1 1 100%; /* 画面幅が狭い場合は1列にする */
    }
    .note-embed-container:has(iframe:only-child) iframe {
        max-width: 100%; /* 1つだけの場合は100%にする */
    }
}

/* リンク関連 */

a {
  color: #333;
  text-decoration: underline;
  text-decoration-color: #f0c5d5;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:visited {
  color: #5e2c6f; /* 紫寄りで差をつける */
}

a:active {
  color: #d07fa2;
}
a:hover {
  text-decoration: underline;
}

button {
  background: #fff;
  border-radius: 20px;
  padding: 0.6em 1.2em;
  border: none;
  font-size: 0.95rem;
  color: #333;
  margin: 0.5em;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background 0.3s;
}

button:hover {
  background: #ffd1e3;
}

/* リストをおしゃれにしたいような */
ul {
  list-style: none;
  padding-left: 0;
}

ul li::before {
  content: "・ ";
  color: #6f75c7;
}

ul li {
  margin: 6px 0;
  margin-bottom: 0.4em;
  font-size: 1rem;
}

.new {
  font-size: 0.7em;
  color: white;
  background: #ff5f90;
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 0.5em;
}


/* ===================================
   Fortune Page Styles
   /fortune.html
   =================================== */
#card {
  width: 200px;
  height: 300px;
  margin: 2rem auto;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 0 10px #aaa;
}

#card .inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  position: relative;
  border-radius: 10px;
}

#card .front, #card .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
}

#card .front {
  background-image: url('images/card-back.png');
}

#card .back {
  transform: rotateY(180deg);
}

#card.is-revealed {
  cursor: default;
}

#result {
  margin-top: 1rem;
  display: none;
}

#title {
  /* 上下の余白や見た目の調整はそのまま */
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e3f2fd;
}

#error {
  color: #b00;
  margin-top: 2rem;
}

#result-actions {
  display: flex;
  flex-direction: column; /* 子要素を縦方向に並べる */
  align-items: center;   /* 子要素を水平方向の中央に揃える */
  
  /* ボタンやリンクだけでなく、h3などのテキストも中央に揃える */
  text-align: center; 
  
  /* 上の結果テキストとの間に少し余白を持たせる */
  margin-top: 2rem; 
}


/* ===================================
   Gallery Page Styles
   /gallery.html
   =================================== */

main h1,
section h1 {
  font-size: 1.6rem;
  font-weight: normal;
  color: #e75480;
  text-align: center;
  margin: 2rem auto 1rem;
  border-bottom: 2px solid #e89aae;
  padding-bottom: 0.5rem;
  max-width: 600px;
  font-family: "Georgia", serif;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 1rem;
  background: linear-gradient(to bottom, #fff0f5, #ffffff);
}

.gallery .card {
  background: #ffffffcc;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(255, 182, 193, 0.2);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(255, 182, 193, 0.3);
}

.gallery .card img {
  height: 240px;
  width: 160px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.gallery .card h3 {
  margin: 0.75rem 0 0.3rem;
  font-size: 1.05rem;
  color: #e75480;
  font-family: "Georgia", serif;
  text-align: center;
}

.gallery .card p {
  font-size: 0.85rem;
  margin: 0.2rem 0;
  color: #6b4c5d;
  text-align: center;
  line-height: 1.4;
}

.gallery .notes {
  font-size: 0.7rem;
  color: #999;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed #ccc;
  width: 100%;
  text-align: center;
  font-style: italic;
}

/* =============================
   Top-page “card-grid” preview
   /index.html
   ============================= */

#card-grid {
  /* 4枚並べても窮屈にならないグリッド */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.2rem;
  justify-items: center;
  padding: 1rem 0;
}

#card-grid img {
  width: 100%;              /* グリッド幅いっぱい */
  max-width: 120px;         /* デスクトップでも小ぶりに */
  aspect-ratio: 2 / 3;      /* 画像比率を強制（Chrome 88+） */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transition: transform .3s ease, box-shadow .3s ease;
  opacity: 0;               /* ↓ ふわっとアニメ */
  animation: cardPop .5s forwards;
}

#card-grid img:hover {
  transform: translateY(-4px) rotate(-2deg);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .20);
}

/* ふわっと表示する簡単アニメ */
@keyframes cardPop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1);  }
}



/* ===================================
   header Footer Styles
   components/header.html footer.html
   =================================== */

header {
  background: linear-gradient(to right, #dabce7, #ffc3cd);
  color: #fff;
  text-align: center;
  padding: 1rem 2rem;
}

@media (max-width: 768px) {
  header {
    background: linear-gradient(to right, #dabce7, #ffc3cd);
    padding: 10px 10px;
  }
  .header h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: normal;
  }
  .header p {
    font-size: 1rem;
    margin-top: 1rem;
  }
}


header a {
  color: #fff; /* ヘッダー内のリンクの色を指定 */
  text-decoration: none; /* 下線を消す */
  font-family: "Georgia", serif;
}
header a:hover {
  text-decoration: none; /* ホバー時に下線を追加 */
}
header a:visited {
  color: #fff;
}

header h1, header p {
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}
header h1 {
  font-size: 2.5rem;
  margin: 0;
  font-weight: normal;
}
header p {
  font-size: 1.2rem;
  margin-top: 1rem;
}

footer {
  background: #f0e6f7;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #666;
}
.footer-wapper{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===================================
   Social Link Button Styles
   =================================== */
.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* スマホ表示で折り返すように */
  gap: 1rem; /* ボタン間の隙間 */
  margin-top: 2rem;
}

.social-link-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px; /* 角を丸くして可愛い印象に */
  text-decoration: none;
  font-weight: bold;
  color: #fff;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
}

.social-link-btn:hover {
  transform: translateY(-3px); /* 少し浮き上がるような動き */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Twitter用の配色 */
.social-link-btn.twitter {
  background-color: #1DA1F2; /* Twitter公式の青 */
}

/* マシュマロ用の配色 */
.social-link-btn.marshmallow {
  background-color: #f4b6c2; /* マシュマロをイメージしたソフトなピンク */
}