/* =========================================================
   ビッグファイブ性格診断
   結果画像がゲームの画面のような見た目なので、
   ページ全体も暗色でそろえている。
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", YuGothic,
               "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", Arial,
               "メイリオ", Meiryo, sans-serif;
  color: #e8ecf8;
  background: #0d1030;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button, input { font-family: inherit; }
.is_hidden { display: none !important; }

/* ---------------- ヒーロー ---------------- */

.hero {
  position: relative;
  text-align: center;
  padding: 34px 16px 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(120,150,255,0.28), transparent 62%),
    linear-gradient(160deg, #141845 0%, #0d1030 100%);
  border-bottom: 1px solid rgba(140,170,255,0.22);
}

.hero_badge {
  display: inline-block;
  padding: 2px 14px;
  border: 1px solid rgba(160,190,255,0.55);
  border-radius: 30px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: #b9caff;
}

.hero_title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.hero_title_em {
  display: block;
  font-size: 2rem;
  background: linear-gradient(90deg, #8fd3ff, #ffffff, #c9a7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero_copy {
  font-size: 0.8rem;
  line-height: 1.9;
  margin-top: 10px;
  color: rgba(200,214,255,0.8);
}

/* ---------------- 器 ---------------- */

.wrap { max-width: 640px; margin: 0 auto; padding: 18px 12px 0; }

.card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(140,170,255,0.2);
  border-radius: 16px;
  padding: 24px 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(2px);
}

/* ---------------- スタート ---------------- */

.lead {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #ffffff;
}

.rules { list-style: none; }

.rules li {
  position: relative;
  padding-left: 34px;
  font-size: 0.86rem;
  line-height: 1.7;
  margin-bottom: 10px;
  color: rgba(220,230,255,0.85);
}

.rule_no {
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4dabff, #8b6cff);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lead_sub {
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.9;
  color: rgba(200,214,255,0.75);
  margin-bottom: 20px;
}

/* 何にもとづく診断なのかを示す枠 */
.basis {
  border: 1px solid rgba(140,170,255,0.22);
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.03);
}

.basis_row {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(140,170,255,0.12);
}

.basis_row:last-child { border-bottom: none; }

.basis_key {
  flex: none;
  width: 3em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8fd3ff;
  padding-top: 1px;
}

.basis_val {
  font-size: 0.76rem;
  line-height: 1.85;
  color: rgba(205,218,252,0.82);
}

.basis_val b { color: #ffffff; }

.note_small {
  margin-top: 16px;
  font-size: 0.7rem;
  line-height: 1.8;
  color: rgba(180,195,235,0.6);
  text-align: center;
}

/* ---------------- ボタン ---------------- */

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  margin-top: 18px;
}

.btn_primary {
  background: linear-gradient(135deg, #4dabff, #8b6cff);
  color: #fff;
  box-shadow: 0 6px 22px rgba(90,130,255,0.4);
}

.btn_primary:active { transform: translateY(2px); }

.btn_share { background: #0f1419; color: #fff; border: 1px solid rgba(255,255,255,0.3); }

.btn_ghost {
  background: transparent;
  color: rgba(200,214,255,0.85);
  border: 1px solid rgba(140,170,255,0.4);
}

.link_btn {
  display: block;
  margin: 16px auto 0;
  border: none;
  background: none;
  color: rgba(160,190,255,0.8);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

/* ---------------- 出題 ---------------- */

/* 進捗は上に貼り付けて、どこまで来たか常に見えるようにする */
.progress_bar_fixed {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -18px -12px 14px;
  padding: 10px 12px 12px;
  background: rgba(13,16,48,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(140,170,255,0.2);
}

.progress_inner { max-width: 640px; margin: 0 auto; }

.progress_text {
  font-size: 0.76rem;
  color: rgba(180,200,255,0.8);
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.progress_bar {
  height: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.progress_fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #4dabff, #c9a7ff);
  transition: width 0.3s ease;
}

.q_lead {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(180,200,255,0.65);
  margin-bottom: 12px;
}

.q_list { display: grid; gap: 14px; }

.q_item {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(140,170,255,0.18);
  border-radius: 16px;
  padding: 20px 14px 22px;
  transition: border-color 0.2s, background 0.2s;
}

/* 答えた問題は落ち着かせて、まだの問題が目立つようにする */
.q_item.is_done {
  background: rgba(255,255,255,0.02);
  border-color: rgba(140,170,255,0.1);
}

.q_num {
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(160,185,240,0.5);
}

.q_text {
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0 18px;
}

/* ---- 同意する〜同意しない のスケール ---- */

.scale {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.scale_label {
  flex: none;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;   /* 「同意する」を2行に折らない */
  text-align: center;
}

.scale_label.is_agree { color: #4ade9b; }
.scale_label.is_disagree { color: #b48bff; }

.scale_dots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  flex: 1 1 auto;
  max-width: 340px;
}

.dot {
  position: relative;
  flex: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s;
}

.dot:active { transform: scale(0.9); }

/* 端ほど大きく、真ん中ほど小さく。段階の強さが形で伝わる */
.d0, .d6 { width: 38px; height: 38px; border: 2.5px solid; }
.d1, .d5 { width: 31px; height: 31px; border: 2.5px solid; }
.d2, .d4 { width: 25px; height: 25px; border: 2px solid; }
.d3      { width: 21px; height: 21px; border: 2px solid; }

/* 左が「同意しない」で紫、右が「同意する」で緑 */
.d0 { border-color: #9a6bff; }
.d1 { border-color: #b48bff; }
.d2 { border-color: #c9a7ff; }
.d3 { border-color: rgba(200,210,235,0.5); }
.d4 { border-color: #7fe6bd; }
.d5 { border-color: #4ade9b; }
.d6 { border-color: #2ee08a; }

.dot.is_on { box-shadow: 0 0 0 4px rgba(255,255,255,0.08); }
.d0.is_on { background: #9a6bff; }
.d1.is_on { background: #b48bff; }
.d2.is_on { background: #c9a7ff; }
.d3.is_on { background: rgba(200,210,235,0.75); }
.d4.is_on { background: #7fe6bd; }
.d5.is_on { background: #4ade9b; }
.d6.is_on { background: #2ee08a; }

.submit_wrap {
  margin: 26px 0 10px;
  scroll-margin-top: 90px;
}

.btn:disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(200,214,255,0.45);
  box-shadow: none;
  cursor: default;
}

/* ---------------- 結果 ---------------- */

.card_wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(140,170,255,0.3);
  box-shadow: 0 10px 34px rgba(0,0,0,0.45);
}

.card_wrap img { display: block; width: 100%; height: auto; }

.save_hint {
  margin-top: 10px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(190,205,245,0.75);
}

.result_actions { margin-top: 6px; }

.sec_title {
  font-size: 1rem;
  font-weight: 700;
  margin: 30px 0 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(140,170,255,0.2);
  color: #ffffff;
}

.sample_note {
  font-size: 0.72rem;
  color: rgba(180,195,235,0.6);
  margin-bottom: 14px;
}

/* ---------------- 特性ごとの解説 ---------------- */

.traits { display: grid; gap: 14px; }

.trait {
  border: 1px solid rgba(140,170,255,0.18);
  border-left: 4px solid var(--c);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.035);
}

.trait_head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.trait_name { font-size: 1.05rem; font-weight: 700; color: var(--c); }
.trait_en { font-size: 0.68rem; color: rgba(180,195,235,0.55); }

.trait_t {
  margin-left: auto;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.trait_about { font-size: 0.74rem; color: rgba(190,205,245,0.7); margin-top: 2px; }

/* 目盛りつきの棒。真ん中の線が平均（偏差値50） */
.bar {
  position: relative;
  height: 9px;
  border-radius: 9px;
  background: rgba(255,255,255,0.09);
  margin: 10px 0 8px;
  overflow: hidden;
}

.bar_fill {
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), var(--c));
  transition: width 0.6s ease;
}

.bar_mid {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.45);
  z-index: 1;
}

.trait_lv {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 700;
}

.trait_lv.vhi, .trait_lv.hi { color: #7fc7ff; }
.trait_lv.mid { color: rgba(210,220,250,0.8); }
.trait_lv.lo, .trait_lv.vlo { color: #ffb3a7; }

.trait_diff { font-size: 0.72rem; font-weight: 400; color: rgba(180,195,235,0.65); }

.trait_text {
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.9;
  color: rgba(215,225,250,0.9);
}

/* ---------------- 広告・フッター ---------------- */

.ads_wrap { margin: 20px 0 8px; text-align: center; }

.back_to_menu { text-align: center; padding: 14px 12px 4px; }

.back_to_menu a {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid rgba(140,170,255,0.35);
  border-radius: 30px;
  color: rgba(200,214,255,0.85);
  font-size: 0.82rem;
}

.foot {
  margin-top: 18px;
  padding: 22px 16px 28px;
  background: rgba(0,0,0,0.28);
  border-top: 1px solid rgba(140,170,255,0.18);
  text-align: center;
}

.foot_title { font-size: 0.92rem; font-weight: 700; color: #fff; }

.foot_detail, .foot_note {
  font-size: 0.7rem;
  line-height: 1.8;
  margin-top: 6px;
  color: rgba(185,200,240,0.6);
}

.foot_note { color: rgba(185,200,240,0.42); }

/* ---------------- PC ---------------- */

@media screen and (min-width: 640px) {
  .hero { padding: 46px 16px 40px; }
  .hero_title { font-size: 2rem; }
  .hero_title_em { font-size: 2.6rem; }
  .hero_copy { font-size: 0.92rem; }

  .wrap { padding: 26px 20px 0; }
  .card { padding: 30px 32px; }

  .lead { font-size: 1.3rem; }
  .lead_sub { font-size: 0.88rem; }
  .basis_val { font-size: 0.82rem; }

  .q_item { padding: 26px 22px 28px; }
  .q_text { font-size: 1.2rem; }
  .scale_label { font-size: 0.74rem; }
  .scale { gap: 16px; }
  .d0, .d6 { width: 46px; height: 46px; }
  .d1, .d5 { width: 38px; height: 38px; }
  .d2, .d4 { width: 30px; height: 30px; }
  .d3      { width: 25px; height: 25px; }
  .progress_bar_fixed { margin: -26px -20px 18px; }

  .btn { width: auto; min-width: 300px; margin-left: auto; margin-right: auto; }
}
