/* 文字コード設定
   TearaPad UTF-8N 改行LF */
@charset "utf-8";
/* CSS Reset p108*/
*,
::before,
::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* メインコンテンツ */
main.main {
  max-width: 800px;
  margin: 5px auto;
  padding: 2px 16px;
  background: rgba(255,255,255,0.98);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(180, 138, 0, 0.06);
}


/* セクション */
section {
  margin:  10px 10px 10px 10px;
  padding: 15px 15px 15px 15px;
  background: #fff;
  border-radius: 8px;
  border: 0.2px solid #f0f0f0;
  box-shadow: 0px 1px 2px rgba(0,0,0,0.1)
}

/* タイトル */
h2 {
  display: inline-block;
  padding: 0.3em 1.2em 0.1em 1.1em;
  margin-bottom: 0.5em;
  font-size: 1.1em;
  font-weight: bold;
  color: #000;
  background: linear-gradient(90deg, #e3f0ff 60%, #ffe4ec 100%);
  border-left: 8px solid #ffe082;
  border-bottom: 1.5px solid #f8bbd0;
  box-shadow: 0 2px 8px rgba(180, 138, 0, 0.04);
  letter-spacing: 0.01em;
  white-space: nowrap; 
}

/*
/*h3
/*

/* 本日の星座占い */
.daily-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: nowrap; 
}

.daily-date  {
  font-size: 1.0em;
  margin :8px 0px 2px 0px;
  margin-bottom: 0px;
  padding-left: 15px;
  text-align: center;
}

/*あなたの星座を設定*/
.set-zodiac-block-position {
  text-align: right;
  width: 100%;
}

/*▼あなたの星座*/
.set-zodiac-block {
  display: inline-block;      /* 文字幅に合わせる */
  width: auto;
  min-width: 120px;
  background: #f8fbff;
  border: 1px solid #bcd;
  border-radius: 8px;
  margin-left: 3px;
  padding: 0.3em;
  font-size: 0.9em;
  text-align: center;
  box-shadow: 0 2px 8px rgba(180, 200, 220, 0.08);
}

/*▼あなた星座のリンク*/
.set-zodiac-block a {
  font-weight: bold;
  font-size: 0.9em;
  color: #4313f2;
  text-decoration: underline;
}

#set-zodiac-message2 p{
  margin: 0.3em 0 0 0;
  font-size: 0.8em;
  line-height: 1em;
  text-align: center;
}


#set-zodiac-complete-message2 p{
  margin: 0.3em 0 0 0;
  font-size: 0.8em;
  line-height: 1em;
  text-align: center;
}


.set-zodiac-block p {
  margin: 0.3em 0 0 0;
  font-size: 0.8em;
  line-height: 0.8em;
}


/* ▼本日の星座占い */
/* 星座占いリスト全体の枠 */

.zodiac-content {
  display: grid;
  grid-template-columns: 1fr 3fr;      /* 1列目:アイコン, 2列目:内容 */
  grid-template-rows: 1fr 3fr 0.5fr 0.5fr;  /* 4行 */
  column-gap: 0px;
  row-gap: 0px;
  align-items: center;

  margin: 5px 0px 5px 0px;
  padding: 8px 8px 8px 8px;

  background: #fffbe6;
  border: 2px solid #ffe082;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(180, 138, 0, 0.08);

}

ul{
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}


.zodiac-icon {
  grid-row: 1 / 5;      /* 1行目から4行目まで結合（5は終点） */
  grid-column: 1 / 2;   /* 1列目 */
}

.zodiac-icon img {
  width: 110px;   /* お好みのサイズに調整 */
  height: 110px;
  object-fit: cover;
  border-radius: 20%; /* 丸くしたい場合 */
  display: block;
  margin: 0 auto;

}

.zodiac-name {
  grid-row: 1 / 2;      /* 2列目1行目 */
  grid-column: 2 / 3;
  font-weight: bold;
  font-size: 1.0em;
  color: #b48a00;
}

.horoscope-text p{
  grid-row: 2 / 3;      /* 2列目2行目 */
  grid-column: 2 / 3;
  font-size: 1.0em;
  font-weight: bold;
  display: inline;
  background-image: linear-gradient(#ffe4f4, #ffe4f4);
  background-repeat: no-repeat;
  background-size: 100% 0.5em; /* 下線の厚さ */
  background-position: 0 90%; /* 下線の位置（テキストの下） */
}

.lucky-label {
  grid-row: 3 / 4;      /* 2列目3行目 */
  grid-column: 2 / 3;
  font-size: 0.75em;
  color: #888;
}

.lucky-item p{
  grid-row: 4 / 5;      /* 2列目4行目 */
  grid-column: 2 / 3;
  font-size: 1.0em;
  font-weight: bold;
  color: #3900b4;
  display: inline;
  background-image: linear-gradient(#ffe4f4, #ffe4f4);
  background-repeat: no-repeat;
  background-size: 100% 0.5em; /* 下線の厚さ */
  background-position: 0 90%; /* 下線の位置（テキストの下） */
}

/* 他の星座を見る */
#open-zodiac-list {
  display: inline-block;
  padding: 8px 24px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

#open-zodiac-list a{
  font-weight: bold;
  font-size: 0.95em;
  color: #4313f2;
  text-decoration: underline;
  text-align: center; /*不要か*/
}

/* ▼本日の星座占い */
/* 他の星座リストモーダル */

/*モーダル全体の枠*/
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(255, 236, 179, 0.18);
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal h3{
  font-size: 1.2em;
  margin-bottom: 0.5em;
  text-align: center;
}

.modal-content {
  background: #fff;
  padding: 2em 1.2em 1.2em 1.2em;
  border-radius: 18px;
  max-width: 420px;
  width: 95%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(180, 138, 0, 0.12);
}

.zodiac-content_modal {
  display: grid;
  grid-template-columns: 1fr 3fr;      /* 1列目:アイコン, 2列目:内容 */
  grid-template-rows: 1fr 3fr 0.5fr 0.5fr;  /* 4行 */
  column-gap: 0px;
  row-gap: 0px;
  align-items: center;
  margin: 5px 0px 5px 0px;
  padding: 8px 8px 8px 8px;
  background: #fffbe6;
  border: 2px solid #ffe082;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(180, 138, 0, 0.08);
}

.zodiac-icon_modal {
  grid-row: 1 / 5;      /* 1行目から4行目まで結合（5は終点） */
  grid-column: 1 / 2;   /* 1列目 */
}

.zodiac-icon_modal img {
  width: 72px;
  height: 72px;
  margin-top: 5px;
  object-fit: cover;
  border-radius: 50%; /* 丸くしたい場合 */
  display: block;
  margin: 0 auto;
}

.zodiac-name_modal {
  grid-row: 1 / 2;      /* 2列目1行目 */
  grid-column: 2 / 3;
  font-weight: bold;
  font-size: 1.0em;
  color: #b48a00;
}

.zodiac-horoscope-text_modal p{
  grid-row: 2 / 3;      /* 2列目2行目 */
  grid-column: 2 / 3;
  font-size: 1.0em;
  font-weight: bold;
  display: inline;
  background-image: linear-gradient(#ffe4f4, #ffe4f4);
  background-repeat: no-repeat;
  background-size: 100% 0.5em; /* 下線の厚さ */
  background-position: 0 90%; /* 下線の位置（テキストの下） */
}

.zodiac-label_modal {
  grid-row: 3 / 4;      /* 2列目3行目 */
  grid-column: 2 / 3;
  font-size: 0.75em;
  color: #888;
}

.zodiac-item_modal p{
  grid-row: 4 / 5;      /* 2列目4行目 */
  grid-column: 2 / 3;
  font-size: 1.0em;
  font-weight: bold;
  color: #3900b4;
  display: inline;
  background-image: linear-gradient(#ffe4f4, #ffe4f4);
  background-repeat: no-repeat;
  background-size: 100% 0.5em; /* 下線の厚さ */
  background-position: 0 90%; /* 下線の位置（テキストの下） */
}



/*close（×）ボタン*/
.close {
  position: sticky;
  top: 1px;
  right: 1px;
  float: right;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  z-index: 10;
  background: #E5E5E5;
  border-radius: 50%;
  padding: 0 5px 0 5px;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.close:hover {
  background: #fff9c4;
}

.modal-footer {
  text-align: center;
  margin-top: 2em;
}

/*閉じるリンク*/
.close-link {
  color: #b48a00;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1.1em;
  display: inline-block;
}

/* フォーム */
.warning_message p{
  font-size: 0.9em;
  font-weight: bold;
  color:#f29d13;;
  margin-top: 8px;
  display: block;
  text-align: center;
}

textarea {
  min-height: 180px;
}

textarea, input[type="text"], select {
  width: 100%;
  padding: 8px;
  font-size: 1em;
  line-height: 1.5em;
  box-sizing: border-box; /* ← これを追加 */
  border-radius: 8px;
  margin: 5px 0 5px 0;
  background: #fffde7;
  transition: border 0.2s;
  resize: vertical; /* 縦方向のみリサイズ可 */
  border: 2px solid #ffe082;
  box-shadow: 0 0 8px rgba(180, 138, 0, 0.2);
}

textarea:focus, input[type="text"]:focus, select:focus {
  outline: none; 
  box-shadow: 0 0 0 3px #e4c467; /* 外側に色付き1px枠線 */
}

.yumeresult {
  white-space: pre-wrap; /* ←これを追加 */
  word-break: break-all; /* 長い単語も折り返す場合はこれも追加 */
  max-width: 700px;
  margin: 15px auto;
  padding: 10px 15px 20px 15px;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(180, 138, 0, 0.06);
}

.yumeresult_div {
  padding: 10px 10px 10px 10px;
  border-radius: 8px;
  background-color:#CDF2FF
}

/*あなたが見た夢*/
.yumeresult_div h4{
  font-size: 1.1em;
  color: #333;
  margin-bottom: 6px;
  font-weight: bold;
  display: block;      
  text-align: left;
  border-bottom: 1px solid #333333; /* 下線を追加 */
  padding-bottom: 0.2em;            /* 下線と文字の間に余白 */
}

/*あなたが見た夢の診断結果です*/
.dream_result_title {
  text-align: center; /* 親で中央寄せ */
}

.dream_result_title p{
  font-size: 1.1em;
  color: #333;
  margin-bottom: 6px;
  font-weight: bold;
  border-radius: 4px;
  text-align: center;

  display: inline-block; /* ← ここを inline-block に */       
  background-image: linear-gradient(#ffe4f4, #ffe4f4);
  background-repeat: no-repeat;
  background-size: 100% 0.5em; /* 下線の厚さ */
  background-position: 0 90%; /* 下線の位置（テキストの下） */
}

.yumeresult h3 {
  font-size: 1.1em;
  color: #333;
  margin-bottom: 6px;
  font-weight: bold;
  border-radius: 4px;
  display: block;         /* ← ここを block に */
  text-align: left;
  background-image: linear-gradient(#ffe4f4, #ffe4f4);
  background-repeat: no-repeat;
  background-size: 100% 0.5em; /* 下線の厚さ */
  background-position: 0 90%; /* 下線の位置（テキストの下） */
}

.yumeresult p {
  font-size: 1.0em;
  line-height: 1.5em;
  margin-bottom: 5px;
  padding: 0px 0px 0px 0px;
}

/* 夢診断結果テーブル用デザイン */
.yume-table {
  width: 100%;
  max-width: 600px;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 1em;
  background: #fffde7;
  box-shadow: 0 2px 8px rgba(180, 138, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}
.yume-table th, .yume-table td {
  border: 1px solid #ffe082;
  padding: 5px 8px;
  text-align: left;
}
.yume-table th {
  background: #ffe082;
  color: #b48a00;
  font-weight: bold;
}
.yume-table tr:nth-child(even) {
  background: #f8fbff;
}
.yume-table tr:hover {
  background: #fff3cd;
}

/* ▼夢テキストの省略表示用 */
.dream-text-short {
  max-height: 4.5em; /* 1.5em × 5行分 */
  white-space: pre-wrap;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s;
  line-height: 1.5em; /* 行間を調整 */
}
.dream-text-full {
  white-space: pre-wrap;
  max-height: none;
  overflow: visible;
  line-height: 1.5em; /* 行間を調整 */
}

/* 省略表示のための「全部見る」「閉じる」リンク */
.show-more-link {
  color: #4313f2;
  font-size: 0.8em;
  cursor: pointer;
  text-decoration: underline;
  display: block;
  margin-top: 1em;
  text-align: center;
}



/* 診断するボタン */
button {
  background: linear-gradient(90deg, #ffe082 0%, #b48a00 100%);
  color: #fff;
  margin: 10px 0 20px 0;
  padding: 10px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(180, 138, 0, 0.08);
  transition: background 0.2s;
}

#dream-form {
  text-align: center;
}
#dream-form button {
  margin-left: auto;
  margin-right: auto;
  display: inline-block;
}

button:hover {
  background: linear-gradient(90deg, #b48a00 0%, #ffe082 100%);
}

/*▼画像で保存するモーダルスタイル*/
/* 画像保存モーダル表示ボタン  */
#open-save-container {
    text-align: center;
    margin: 1em 0;
}
/* モーダルの黒背景 */
#save-modal {
    display: none;                 /* 初期状態は非表示。JS で display:block に切り替え */
    position: fixed;
    z-index: 10000;
    left: 0; top: 0; width: 100vw; height: 100vh;
/*    inset: 0;                      /* left:0; top:0; width/height:100% と同義 */
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, .6);
    justify-content: center;
    align-items: center;  
}

/* モーダルがアクティブなときの表示 */
#save-modal.active {
  display: flex;
}

/* モーダル本体 */
#save-modal-content {
    background: #fff;
    padding: 2em;
    border-radius: 10px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    text-align: center;

    /* 画面中央付近に配置（任意） */
    margin: 5vh auto 0;
}

/* 閉じるボタン */
#close-save-modal-btn {
    position: absolute;
    right: 1em;
    top: 1em;
}

/* 診断結果コンテナ */
#result-area-for-image {
    margin-bottom: 1em;
}

/* 画像保存ガイド */
#save-image-guide {
    margin-top: 1em;
    font-size: 0.9em;
    color: #666;
    display: none;                 /* JS で表示切替 */
}




/* もう一度診断するボタン */
.retry_link {
  background: linear-gradient(90deg, #ffe082 0%, #b48a00 100%);
  color: #fff;
  margin: 10px 0 20px 0;
  padding: 10px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(180, 138, 0, 0.08);
  transition: background 0.2s;
  text-decoration: none; /* 下線を消したい場合 */
  display: inline-block; /* ボタン風にしたい場合 */
  border: none;
}

.retry_link-center {
  text-align: center;
}

.retry_link:hover {
  background: linear-gradient(90deg, #b48a00 0%, #ffe082 100%);
}
