/* ========================================
   趣味診断アプリ - WordPress Plugin CSS
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;600&display=swap');

/* リセット・ベース */
#hobby-diagnosis-app,
#hobby-diagnosis-app * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none !important;
}

/* テーマの目次プラグイン（TOC系）がh2を拾うのを防ぐ */
#hobby-diagnosis-app .hd-top-title,
#hobby-diagnosis-app .hd-result-title {
  display: block !important;
}

.hd-app {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
  color: #1a1a1a;
  line-height: 1.8;
}

/* ── スクリーン切り替え ── */
.hd-screen { display: none; }
.hd-screen--active { display: block; }
.hd-fade-in {
  animation: hdFadeIn 0.35s ease both;
}
@keyframes hdFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── ボタン共通 ── */
.hd-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  border-radius: 999px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  text-align: center;
}
.hd-btn--primary {
  background: #1a1a1a;
  color: #fff;
  border: none;
}
.hd-btn--primary:hover { opacity: 0.8; }
.hd-btn--link {
  display: block;
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  background: #fff;
  color: #1a1a1a !important;
  border: 1.5px solid #1a1a1a;
  border-radius: 999px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hd-btn--link:hover {
  background: #1a1a1a;
  color: #fff !important;
  text-decoration: none !important;
}
/* ④ othersカード内のリンクボタン */
.hd-other-link {
  display: block;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  color: #1a1a1a !important;
  border: 1px solid #1a1a1a;
  border-radius: 999px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.04em;
}
.hd-other-link:hover {
  background: #1a1a1a;
  color: #fff !important;
  text-decoration: none !important;
}
.hd-btn--outline {
  background: transparent;
  color: #888;
  border: 1px solid #ddd;
  font-size: 14px;
}
.hd-btn--outline:hover { background: #f5f5f5; }

/* ─── TOP SCREEN ─── */
.hd-top-header {
  text-align: center;
  padding: 2.5rem 0 2rem;
}
/* SVGエンブレム - Cocoonのスタイル干渉を避けるため非表示 */
.hd-emblem-svg {
  display: none !important;
}
/* 二重丸エンブレムはSVGに置き換えるのでdiv版は非表示 */
.hd-emblem,
.hd-emblem-inner {
  display: none !important;
  border: none !important;
  list-style: none !important;
}
.hd-top-title {
  font-family: 'Noto Serif JP', 'Georgia', serif;
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  line-height: 1.5 !important;
  margin: 0 0 0.5rem !important;
  padding: 1.5rem 0 0 !important;
  border: none !important;
  color: #1a1a1a !important;
  background: none !important;
}
/* タイトル前に細いアクセントラインを装飾として追加 */
.hd-top-title::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: #1a1a1a;
  margin: 0 auto 1.25rem;
}
.hd-top-subtitle {
  font-size: 12px;
  color: #888;
  letter-spacing: 0.15em;
  margin: 0 0 2rem !important;
  padding: 0 !important;
  line-height: 1.6 !important;
}
.hd-top-desc {
  background: #f7f7f5;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  font-size: 14px;
  line-height: 2.0 !important;
  color: #555;
  margin: 0 0 1.5rem !important;
}
.hd-top-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin: 0 0 2rem !important;
  padding: 0 !important;
}
.hd-tag {
  background: #f0f0ee;
  border: 1px solid #e0e0de;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  color: #666;
  letter-spacing: 0.04em;
}

/* ─── QUESTION SCREEN ─── */
.hd-progress-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1.75rem;
  padding-top: 0.5rem;
}
.hd-progress-bg {
  flex: 1; height: 3px;
  background: #e0e0de;
  border-radius: 999px; overflow: hidden;
}
.hd-progress-fill {
  height: 100%;
  background: #1a1a1a;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
  width: 0%;
}
.hd-progress-num {
  font-size: 12px;
  color: #888;
  letter-spacing: 0.05em;
  min-width: 42px;
  text-align: right;
}
.hd-q-card {
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 20px;
  padding: 1.75rem 1.5rem 1.5rem;
  margin-bottom: 1.25rem;
  min-height: 110px;
}
.hd-q-category {
  font-size: 11px !important;
  letter-spacing: 0.15em;
  color: #999;
  margin: 0 0 0.875rem !important;
  padding: 0 !important;
  line-height: 1.6 !important;
  text-transform: uppercase;
}
.hd-q-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.75 !important;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  border: none !important;
  color: #1a1a1a !important;
  background: none !important;
}
.hd-q-hint {
  font-size: 12px !important;
  color: #aaa;
  line-height: 1.6 !important;
  margin: 0.5rem 0 0 !important;
  padding: 0 !important;
}
.hd-options {
  display: grid; gap: 10px;
}
.hd-option {
  background: #f7f7f5;
  border: 1px solid #e8e8e6;
  border-radius: 14px;
  padding: 0.875rem 1.1rem;
  text-align: left;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; align-items: center; gap: 10px;
  color: #1a1a1a;
  width: 100%;
}
.hd-option:hover {
  background: #fff;
  border-color: #bbb;
  transform: translateY(-1px);
}
.hd-option.hd-selected {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.hd-option-icon {
  font-size: 18px; width: 26px; text-align: center; flex-shrink: 0;
}

/* ─── LOADING SCREEN ─── */
.hd-loading-wrap {
  text-align: center;
  padding: 4rem 0;
}
.hd-spinner {
  width: 56px; height: 56px;
  border: 2px solid #e0e0de;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  margin: 0 auto 2rem;
  animation: hdSpin 1s linear infinite;
}
@keyframes hdSpin { to { transform: rotate(360deg); } }
.hd-loading-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0.4rem !important;
}
.hd-loading-sub {
  font-size: 13px; color: #888;
  letter-spacing: 0.04em;
}

/* ─── RESULT SCREEN ─── */
/* ③ 結果画面を中央揃え */
.hd-result-header {
  text-align: center;
  padding: 1.5rem 0 1.25rem;
}
.hd-result-label {
  font-size: 11px; letter-spacing: 0.2em;
  color: #999; margin: 0 0 0.5rem !important;
  padding: 0 !important; line-height: 1.6 !important;
  text-transform: uppercase;
}
.hd-result-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 28px !important; font-weight: 600 !important;
  line-height: 1.5 !important;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  border: none !important; color: #1a1a1a !important;
  background: none !important;
}
.hd-result-sub {
  font-size: 13px; color: #888;
  line-height: 1.7 !important;
  margin: 0 0 1.5rem !important;
  padding: 0 !important;
}
.hd-result-main {
  border: 2px solid #1a1a1a;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  /* ③ 中央揃え */
  text-align: center;
}
.hd-result-badge {
  position: absolute; top: 14px; right: 14px;
  background: #1a1a1a; color: #fff;
  font-size: 11px; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 999px;
}
.hd-result-icon { font-size: 40px; margin-bottom: 0.75rem; }
.hd-result-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 21px !important; font-weight: 600 !important;
  line-height: 1.5 !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  border: none !important; color: #1a1a1a !important;
  background: none !important;
}
.hd-result-desc {
  font-size: 14px; line-height: 2.0 !important; color: #555;
  margin: 0 0 1.25rem !important;
  padding: 0 !important;
  text-align: left;
}
/* ③ タグを中央揃え */
.hd-result-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
}
.hd-result-tag {
  background: #f0f0ee; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: #666;
}
/* ③ 特徴セクションの背景色を変更（ライトグリーン系で視認性UP） */
.hd-trait-section {
  background: #eef4ee;
  border-radius: 16px; padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.hd-trait-title {
  font-size: 12px; letter-spacing: 0.1em;
  color: #5a7a5a; margin-bottom: 0.875rem !important;
  font-weight: 500;
}
/* ③ 特徴タグを中央揃え */
.hd-traits {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
}
.hd-trait {
  background: #fff;
  border: 1px solid #b8d4b8;
  border-radius: 999px; padding: 5px 14px;
  font-size: 13px; color: #3a5a3a;
}
.hd-others-title {
  font-size: 13px; letter-spacing: 0.08em;
  color: #888; margin-bottom: 0.75rem !important;
}
.hd-others {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 1.5rem;
}
/* ④ othersカードを縦並びレイアウトに整理 */
.hd-other-card {
  background: #f7f7f5;
  border-radius: 14px; padding: 1rem;
  display: flex; flex-direction: column;
}
.hd-other-icon { font-size: 24px; margin-bottom: 0.5rem; }
.hd-other-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 14px; font-weight: 600;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
  line-height: 1.5;
}
.hd-other-desc {
  font-size: 12px; color: #666; line-height: 1.6;
  flex: 1;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .hd-others { grid-template-columns: 1fr; }
  .hd-top-title { font-size: 24px !important; }
  .hd-result-title { font-size: 24px !important; }
  .hd-q-text { font-size: 17px !important; }
  .hd-result-main { padding: 1.5rem 1rem; }
}

