/* ============================================
   Aisho 相性占い スタイル v2.0
   ============================================ */

#aisho-uranai-wrapper {
  max-width: 620px;
  margin: 0 auto;
  font-family: inherit;
  box-sizing: border-box;
}

#aisho-uranai-wrapper *,
#aisho-uranai-wrapper *::before,
#aisho-uranai-wrapper *::after {
  box-sizing: border-box;
}

/* ---- フォーム ---- */
#aisho-uranai-wrapper .aisho-form {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  border-radius: 15px;
  color: #fff;
}

#aisho-uranai-wrapper .aisho-form h2 {
  text-align: center;
  font-size: 1.6em;
  margin: 0 0 8px;
  color: #fff;
  border: none;
}

#aisho-uranai-wrapper .aisho-form>p {
  text-align: center;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* ---- 入力ブロック ---- */
#aisho-uranai-wrapper .person-block {
  background: rgba(255, 255, 255, 0.15);
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 14px;
}

#aisho-uranai-wrapper .person-block h3 {
  margin: 0 0 10px;
  font-size: 1.05em;
  color: #fff;
  border: none;
}

#aisho-uranai-wrapper .person-block label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88em;
  opacity: 0.9;
}

#aisho-uranai-wrapper .person-block input {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 1em;
  color: #333;
  background: #fff;
}

#aisho-uranai-wrapper .person-block input:focus {
  outline: 3px solid #ffdd57;
}

/* ---- AI選択 ---- */
#aisho-uranai-wrapper .aisho-ai-selector {
  background: rgba(255, 255, 255, 0.15);
  padding: 15px 18px;
  border-radius: 10px;
  margin-bottom: 14px;
}

#aisho-uranai-wrapper .aisho-ai-selector label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95em;
  color: #fff;
  font-weight: bold;
}

#aisho-uranai-wrapper #aisho-ai-provider {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  color: #333;
  background: #fff;
  cursor: pointer;
}

#aisho-uranai-wrapper .aisho-ai-note {
  margin: 8px 0 0;
  font-size: 0.85em;
  opacity: 0.85;
  color: #fff;
}

/* ---- 占うボタン ---- */
#aisho-uranai-wrapper #aisho-uranai-btn {
  width: 100%;
  padding: 14px;
  background: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.2em;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.3s, transform 0.1s;
}

#aisho-uranai-wrapper #aisho-uranai-btn:hover {
  background: #ff5252;
  transform: translateY(-1px);
}

#aisho-uranai-wrapper #aisho-uranai-btn:active {
  transform: translateY(0);
}

#aisho-uranai-wrapper #aisho-uranai-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* ---- ローディング ---- */
#aisho-uranai-wrapper #aisho-loading {
  text-align: center;
  padding: 30px;
  color: #667eea;
}

#aisho-uranai-wrapper .aisho-spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: aisho-spin 0.8s linear infinite;
  margin: 0 auto 15px;
}

@keyframes aisho-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- 結果エリア ---- */
#aisho-uranai-wrapper #aisho-result {
  background: #fff;
  border: 2px solid #667eea;
  border-radius: 15px;
  padding: 28px;
  margin-top: 20px;
}

#aisho-uranai-wrapper #aisho-result h2 {
  text-align: center;
  color: #667eea;
  margin: 0 0 20px;
  border: none;
}

/* ---- スコア一覧 ---- */
#aisho-uranai-wrapper .aisho-scores {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

#aisho-uranai-wrapper .aisho-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f3f0ff;
  border-radius: 10px;
  padding: 12px 18px;
  min-width: 80px;
}

#aisho-uranai-wrapper .aisho-score-item--total {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

#aisho-uranai-wrapper .aisho-score-label {
  font-size: 0.8em;
  margin-bottom: 4px;
  opacity: 0.8;
}

#aisho-uranai-wrapper .aisho-score-value {
  font-size: 1.4em;
  font-weight: bold;
  color: #667eea;
}

#aisho-uranai-wrapper .aisho-score-item--total .aisho-score-value {
  color: #fff;
}

/* ---- ゲージ ---- */
#aisho-uranai-wrapper .aisho-gauge-wrap {
  text-align: center;
  margin-bottom: 20px;
}

#aisho-uranai-wrapper .aisho-gauge-bar {
  background: #eee;
  border-radius: 20px;
  height: 26px;
  overflow: hidden;
  margin: 0 0 10px;
}

#aisho-uranai-wrapper #aisho-gauge-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #667eea, #ff6b6b);
  transition: width 1s ease;
  width: 0%;
}

#aisho-uranai-wrapper #aisho-result-comment {
  font-size: 1.05em;
  color: #555;
  line-height: 1.6;
}

/* ---- セクション ---- */
#aisho-uranai-wrapper .aisho-result-section {
  background: #f8f8ff;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 14px;
  border-left: 4px solid #667eea;
}

#aisho-uranai-wrapper .aisho-result-section--ai {
  border-left-color: #764ba2;
  background: #fdf8ff;
}

#aisho-uranai-wrapper .aisho-result-section h3 {
  color: #764ba2;
  margin: 0 0 8px;
  font-size: 1em;
  border: none;
}

#aisho-uranai-wrapper .aisho-provider-note {
  font-size: 0.8em;
  color: #999;
  margin: 10px 0 0;
}

/* ---- ココナラCTA ---- */
#aisho-uranai-wrapper .aisho-cta {
  background: linear-gradient(135deg, #f6d365, #fda085);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}

#aisho-uranai-wrapper .aisho-cta p {
  color: #fff;
  font-weight: bold;
  margin-bottom: 12px;
}

#aisho-uranai-wrapper .aisho-cta-btn {
  display: inline-block;
  background: #fff;
  color: #e06030;
  font-weight: bold;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

#aisho-uranai-wrapper .aisho-cta-btn:hover {
  transform: scale(1.05);
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ---- リセットボタン ---- */
#aisho-uranai-wrapper #aisho-reset-btn {
  display: block;
  margin: 15px auto 0;
  background: #667eea;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.3s;
}

#aisho-uranai-wrapper #aisho-reset-btn:hover {
  background: #5a6fd6;
}

/* ---- レスポンシブ ---- */
@media (max-width: 480px) {

  #aisho-uranai-wrapper .aisho-form,
  #aisho-uranai-wrapper #aisho-result {
    padding: 18px 14px;
  }

  #aisho-uranai-wrapper .aisho-scores {
    gap: 6px;
  }

  #aisho-uranai-wrapper .aisho-score-item {
    padding: 10px 12px;
    min-width: 68px;
  }
}

/* ============================================
   追加修正：セレクトボックスとAI文章の調整
   ============================================ */

/* 選択肢の文字切れを直す */
#aisho-uranai-wrapper select#aisho-ai-provider {
  height: auto !important;
  line-height: 1.5 !important;
  padding: 12px !important;
  font-size: 16px !important;
  /* スマホでのズーム防止 */
  -webkit-appearance: auto !important;
  box-sizing: border-box !important;
}

/* AI鑑定文の見出し(###)を綺麗にする */
#aisho-uranai-wrapper #aisho-ai-reading h4 {
  color: #764ba2;
  font-size: 1.1em;
  margin: 1.5em 0 0.5em;
  padding-bottom: 5px;
  border-bottom: 2px dashed #d1c4e9;
  background: none;
}

/* 鑑定文全体の行間を読みやすく */
#aisho-uranai-wrapper #aisho-ai-reading {
  line-height: 1.8;
  color: #444;
}

/* ============================================
   保存・シェア用ボタン
   ============================================ */
#aisho-uranai-wrapper .aisho-action-btn {
  display: inline-block;
  margin: 5px;
  padding: 10px 15px;
  background: #fff;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
}

#aisho-uranai-wrapper .aisho-action-btn:hover {
  background: #667eea;
  color: #fff;
}

@media (max-width: 480px) {
  #aisho-uranai-wrapper .aisho-action-btn {
    width: 100%;
    margin: 5px 0;
  }
}