/* ========== 基本設定 ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.7;
  color: #333;
  background: #f9f7f3;
  min-height: 100vh;
}

/* ========== ヘッダー ========== */
header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #6b5b7a 0%, #8b7a9e 100%);
  color: #fff;
}

header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.header-link {
  margin-top: 0.5rem;
}

.header-link a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.header-link a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.site-title {
  cursor: pointer;
}

.site-title:hover {
  opacity: 0.8;
}

/* ========== メイン ========== */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ========== ステップ表示制御 ========== */
.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 見出し ========== */
.step h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #5a4a6a;
}

.question-text {
  text-align: center;
  margin-bottom: 1rem;
  color: #666;
}

.result-context {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: #efe9f4;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #6b5b7a;
}

/* ========== 入口カード（3択） ========== */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: #fff;
  border: 2px solid #e0d8e6;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice-card:hover {
  border-color: #8b7a9e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 91, 122, 0.15);
}

.choice-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.choice-title {
  font-weight: bold;
  color: #5a4a6a;
  margin-bottom: 0.25rem;
}

.choice-desc {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
}

/* ========== 選択肢リスト ========== */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.choice-btn {
  padding: 1rem 1.25rem;
  background: #fff;
  border: 2px solid #e0d8e6;
  border-radius: 8px;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice-btn:hover {
  border-color: #8b7a9e;
  background: #faf8fc;
}

/* ========== 占術ボタン ========== */
.method-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.method-btn {
  padding: 0.75rem 1.25rem;
  background: #6b5b7a;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.method-btn:hover {
  background: #5a4a6a;
}

.method-btn.active {
  background: #4a3a5a;
  box-shadow: 0 2px 8px rgba(107, 91, 122, 0.3);
}

/* ========== 占術詳細 ========== */
.method-detail {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.method-detail.open {
  padding: 1.5rem;
  max-height: 1000px;
  margin-bottom: 1.5rem;
  border: 2px solid #e0d8e6;
}

.method-detail h3 {
  font-size: 1.1rem;
  color: #5a4a6a;
  margin-bottom: 1rem;
}

.method-detail h4 {
  font-size: 0.95rem;
  color: #6b5b7a;
  margin: 1rem 0 0.5rem;
}

.method-detail p,
.method-detail ul {
  font-size: 0.9rem;
  color: #555;
}

.method-detail ul {
  padding-left: 1.25rem;
}

.method-detail li {
  margin-bottom: 0.25rem;
}

.method-detail .detail-link {
  display: inline-block;
  margin-top: 1rem;
  color: #6b5b7a;
  text-decoration: none;
  font-weight: bold;
}

.method-detail .detail-link:hover {
  text-decoration: underline;
}

/* ========== 戻る・リセットボタン ========== */
.back-btn,
.reset-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover,
.reset-btn:hover {
  border-color: #999;
  color: #333;
}

.reset-btn {
  margin-left: 0.5rem;
}

/* ========== フッター ========== */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #999;
  font-size: 0.85rem;
}

/* ========== レスポンシブ ========== */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.4rem;
  }
  
  .choice-grid {
    grid-template-columns: 1fr;
  }
  
  .method-list {
    flex-direction: column;
  }
  
  .method-btn {
    width: 100%;
    text-align: center;
  }
}
