/* 神子花の守護神診断『花守』 CSS */

/* ============================================
   フォーム
============================================ */

.hanamori-form,
.hanamori-form-detail {
  max-width: 600px;
  margin: 40px auto;
  padding: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.hanamori-title {
  color: #fff;
  text-align: center;
  font-size: 28px;
  margin-bottom: 10px;
  font-weight: bold;
}

.toptxt {
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-bottom: 30px;
  font-size: 16px;
}

.detail-note {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: 14px;
  margin-top: -15px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
}

/* フォーム要素 */
.form {
  margin-bottom: 25px;
  text-align: center;
}

.hanamori-form .form label,
.hanamori-form-detail .form label {
  color: #fff;
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 18px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 白背景フォーム（EC版・簡易版）用ラベル 強制上書き */
.hanamori-ec-form .form label,
.hanamori-simple-form .form label,
.hanamori-ec-form .gender-select>label,
.hanamori-simple-form .gender-select>label,
.hanamori-ec-form .radio-group label,
.hanamori-simple-form .radio-group label,
.hanamori-ec-form .form.late-birth-check label {
  color: #333 !important;
  text-shadow: none !important;
}

/* タイトルと説明文も必要に応じて調整 */
.hanamori-ec-form .hanamori-title,
.hanamori-simple-form .hanamori-title {
  color: #333 !important;
}

.hanamori-ec-form .toptxt,
.hanamori-simple-form .toptxt {
  color: #666 !important;
}

.form select {
  padding: 12px 15px;
  border: 2px solid #fff;
  border-radius: 8px;
  font-size: 16px;
  margin: 0 5px 10px 5px;
  background: #fff;
  min-width: 120px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form select:focus {
  outline: none;
  border-color: #ffa07a;
  box-shadow: 0 0 0 3px rgba(255, 160, 122, 0.3);
}

.form select:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 性別選択 */
.gender-select {
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.15);
  padding: 25px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.hanamori-form .gender-select>label,
.hanamori-form-detail .gender-select>label {
  color: #fff;
  display: block;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 18px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hanamori-ec-form .gender-select>label,
.hanamori-simple-form .gender-select>label {
  color: #333;
  display: block;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 18px;
}

.radio-group {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.hanamori-form .radio-group label,
.hanamori-form-detail .radio-group label {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 18px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 重複を避けるため、以前の定義をクリーンアップ */

.radio-group input[type="radio"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: #ff6b9d;
}

/* チェックボックス */
.form input[type="checkbox"] {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #ff6b9d;
}

.form label {
  cursor: pointer;
}

/* 送信ボタン */
.submitBtn {
  text-align: center;
  margin-top: 30px;
}

.send {
  background: linear-gradient(90deg, #ff6b9d 0%, #ffa07a 100%);
  color: #fff;
  border: none;
  padding: 15px 60px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.send:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   結果表示
============================================ */

.hanamori-result {
  max-width: 700px;
  margin: 40px auto;
  padding: 0;
  animation: fadeIn 0.6s ease-out;
}

.kami-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* 神様メイン情報 */
.kami-main-info {
  text-align: center;
  padding: 50px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.kami-title {
  font-size: 18px;
  margin: 0 0 15px 0;
  font-weight: 300;
  opacity: 0.9;
}

.kami-name {
  font-size: 36px;
  font-weight: bold;
  margin: 0 0 25px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}

.kami-meta {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.suukon-badge,
.element-badge {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* 詳細情報 */
.kami-details {
  padding: 40px 30px;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9ff;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background: #f0f2ff;
  transform: translateX(5px);
}

.detail-icon {
  font-size: 32px;
  margin-right: 15px;
  min-width: 40px;
  text-align: center;
}

.detail-content {
  flex: 1;
}

.detail-content h4 {
  margin: 0 0 8px 0;
  color: #667eea;
  font-size: 18px;
  font-weight: bold;
}

.detail-content p {
  margin: 0;
  color: #555;
  font-size: 16px;
  line-height: 1.7;
}

/* 特殊アイテム */
.detail-item.description {
  background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.detail-item.description .detail-content h4 {
  color: #4a5568;
}

.detail-item.kotodama {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border: 2px solid #f5576c;
}

.kotodama-text {
  font-size: 18px !important;
  font-weight: bold;
  color: #8b4513 !important;
  font-style: italic;
}

/* 詳細版専用セクション */
.detail-section-header {
  text-align: center;
  margin: 30px 0 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border-radius: 15px;
}

.detail-section-header h3 {
  margin: 0;
  color: #8b4513;
  font-size: 22px;
  font-weight: bold;
}

.detail-item.premium {
  background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
  border: 2px solid #667eea;
}

.detail-item.premium .detail-content p strong {
  color: #667eea;
  font-size: 20px;
}

.detail-item.diagnosis {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.detail-item.diagnosis .detail-content h4 {
  color: #8b4513;
}

/* もう一度診断するボタン */
.result-actions {
  text-align: center;
  padding: 30px 20px 20px 20px;
}

.btn-retry {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  padding: 15px 50px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================
   アニメーション
============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   レスポンシブ対応
============================================ */

@media (max-width: 768px) {

  .hanamori-form,
  .hanamori-form-detail {
    margin: 20px 15px;
    padding: 30px 20px;
  }

  .hanamori-result {
    margin: 20px 15px;
  }

  .hanamori-title {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .toptxt {
    font-size: 15px;
    margin-bottom: 25px;
  }

  .detail-note {
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 20px;
    padding: 10px;
  }

  .form {
    text-align: left;
    margin-bottom: 20px;
  }

  .form label {
    margin-bottom: 10px;
    font-size: 17px;
  }

  .form select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: auto;
    margin: 0 0 12px 0;
    padding: 15px;
    font-size: 17px;
  }

  /* 横並びグループ (モバイル対応) */
  .input-group-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
  }

  .input-group-row select {
    display: block;
    /* フレックスアイテムとして振る舞う */
    width: auto;
    flex: 1;
    margin: 0;
    padding: 12px 5px;
    /* パディング調整 */
    text-align: center;
  }

  .gender-select {
    margin-bottom: 20px;
    padding: 20px;
  }

  .gender-select>label {
    margin-bottom: 12px;
    font-size: 17px;
  }

  .radio-group {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .radio-group label {
    font-size: 17px;
  }

  .submitBtn {
    margin-top: 25px;
  }

  .send,
  .btn-retry {
    width: 100%;
    padding: 16px 30px;
    font-size: 18px;
  }

  .kami-name {
    font-size: 26px;
  }

  .detail-item {
    flex-direction: column;
    padding: 18px;
    margin-bottom: 18px;
  }

  .detail-icon {
    margin-right: 0;
    margin-bottom: 10px;
    font-size: 30px;
  }

  .detail-content h4 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .detail-content p {
    font-size: 15px;
    line-height: 1.7;
  }

  .kami-main-info {
    padding: 30px 20px;
  }

  .kami-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .kami-name {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .kami-meta {
    gap: 12px;
  }

  .suukon-badge,
  .element-badge {
    padding: 10px 18px;
    font-size: 15px;
  }

  .kami-details {
    padding: 25px 15px 30px 15px;
  }

  .detail-section-header {
    margin: 30px 0 20px 0;
    padding: 18px;
  }

  .detail-section-header h3 {
    font-size: 19px;
  }

  .result-actions {
    padding: 25px 15px 30px 15px;
  }

  .kotodama-text {
    font-size: 16px !important;
  }
}

/* ============================================
   守護神商品リンクボタン
   ============================================ */
.hanamori-product-link {
  text-align: center;
  clear: both;
}

.hanamori-btn-link {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 50px;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.hanamori-btn-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
  background: linear-gradient(135deg, #ec407a 0%, #d81b60 100%);
  color: #fff !important;
}

.hanamori-btn-link:active {
  transform: translateY(0);
}

.hanamori-btn-link.full-width {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* レスポンシブ調整 */
@media screen and (max-width: 480px) {
  .hanamori-btn-link {
    padding: 12px 20px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
  }
}