/* =====================================================
   envision ブランディング診断 v2
   Concept C トーン（envision INSIGHTS 準拠）
   #FF3641 / #A75AF0 / #EDE7E1 / Noto Sans JP + Archivo
   ===================================================== */
:root {
  --red: #FF3641;
  --purple: #A75AF0;
  --greige: #EDE7E1;
  --panel: #FBF8F5;        /* カード面（グレージュより明るい） */
  --panel-2: #DAD1CD;      /* 沈めた面 */
  --ink: #17140F;
  --soft: #5d564d;
  --line: rgba(23,20,15,0.14);
  --grad: linear-gradient(100deg, #FF3641 0%, #A75AF0 100%);
  --radius: 18px;
  --shadow: 0 14px 40px -22px rgba(23,20,15,0.30);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--ink);
  background: var(--greige);
  line-height: 1.85;
  font-size: 16px;
  position: relative;
  overflow-x: hidden;
}
.app-main, .site-footer { position: relative; z-index: 1; }

.container { max-width: 700px; margin: 0 auto; padding: 0 20px; }
.archivo { font-family: "Archivo", sans-serif; }

/* ===== ウェーブ・マストヘッド（LPと地続きの世界観） =====
   wave(高さ453px)・objects(高さ547px=y68〜615)の両方をこの背の高い要素に貼り、
   min-height で画像下端まで確保＝オーブ/ウェーブの切れを防ぐ */
.wave-hero {
  position: relative; min-height: 620px; overflow: hidden;
  background:
    url(../assets/objects.webp) no-repeat center 68px/2090px,
    var(--greige) url(../assets/wave.webp) no-repeat right top/1622px auto;
}
/* ヘッダーは元サイト #gHeader と同一：全幅・padding:45px 30px 30px・ロゴ高さ24px */
.masthead {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 45px 30px 30px;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.logo img { height: 24px; width: auto; display: block; }
.logo .logo-sub {
  font-weight: 700; font-size: 13px; color: var(--ink);
  padding-left: 11px; border-left: 1.5px solid var(--line);
}
.header-note {
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 0.18em; color: var(--ink);   /* 可読性確保：黒 */
}
.hero-inner { position: relative; z-index: 2; }
.hero-title { text-align: center; padding: 18px 20px 0; }
.hero-title .eyebrow {
  display: inline-flex; align-items: center; gap: 13px;
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: 11.5px; letter-spacing: 0.28em;
  color: var(--ink); margin-bottom: 14px;   /* 可読性確保：黒 */
}
.hero-title .eyebrow::before, .hero-title .eyebrow::after { content: ""; width: 30px; height: 2px; background: var(--grad); }
.hero-title h1 { font-family: "Archivo", sans-serif; font-weight: 900; font-size: clamp(46px,9vw,86px); letter-spacing: -0.01em; line-height: 1; }

/* ===== フローティングカード（ウェーブに被せて持ち上げる作業エリア） ===== */
.app-main { position: relative; z-index: 1; padding: 0 0 80px; }
.app-card {
  position: relative; z-index: 2; max-width: 720px; margin: -320px auto 0;
  background: var(--panel); border-radius: 26px;
  box-shadow: 0 44px 100px -46px rgba(23,20,15,0.48);
  padding: 40px clamp(20px,4vw,44px) 44px;
}

/* ===== 設問シェル（固定）＋ステージ（フェード差し替え） ===== */
.quiz { }
.quiz-head { margin: 4px 0 26px; }
.quiz-meta {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px;
}
.q-counter {
  font-family: "Archivo", sans-serif; font-weight: 900; font-size: 15px;
  letter-spacing: 0.06em; color: var(--ink);
}
.q-counter b {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.q-remain { font-size: 12px; color: var(--soft); }
.progress-bar { height: 6px; background: rgba(23,20,15,0.10); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.45s cubic-bezier(.16,1,.3,1); }

.quiz-stage { min-height: 360px; }

/* 設問カードのフェード（フワッと）
   入りはCSSアニメーション（JSのrAFに依存せず確実に再生）、抜けはトランジション */
.q-card { transition: opacity .24s ease, transform .24s cubic-bezier(.16,1,.3,1); }
.q-card.leave-fwd  { opacity: 0; transform: translateY(-16px); }
.q-card.leave-back { opacity: 0; transform: translateY(16px); }
.q-card.enter-fwd  { animation: qInFwd .46s cubic-bezier(.16,1,.3,1) both; }
.q-card.enter-back { animation: qInBack .46s cubic-bezier(.16,1,.3,1) both; }
@keyframes qInFwd  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes qInBack { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .q-card, .q-card.enter-fwd, .q-card.enter-back { animation: none !important; transition: none !important; }
}

/* 領域ラベル（envision .tag風ピル） */
.area-label {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 16px 4px;
  margin-bottom: 16px; line-height: 1.5;
}

.q-text {
  font-size: clamp(19px, 3.8vw, 25px); font-weight: 900; line-height: 1.62;
  letter-spacing: -0.01em; margin-bottom: 22px;
}

/* 選択肢 */
.options { display: grid; gap: 11px; }
.option {
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 15px 18px; cursor: pointer; text-align: left; font-family: inherit; font-size: 15px;
  line-height: 1.65; display: flex; gap: 13px; align-items: flex-start; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  transition: border-color .18s, background .18s, transform .12s, box-shadow .18s;
}
/* ホバーはマウス環境のみ＝タッチ端末で:hoverが残留して『前の選択が残る』のを防ぐ */
@media (hover: hover) {
  .option:hover { border-color: var(--purple); transform: translateY(-1px); box-shadow: var(--shadow); }
}
.option.selected { border-color: transparent; background: #fff; box-shadow: 0 0 0 2px var(--red), var(--shadow); }
.option .num {
  flex-shrink: 0; width: 27px; height: 27px; border-radius: 50%;
  background: var(--greige); font-weight: 900; font-size: 13px; color: var(--ink);
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.option.selected .num { background: var(--grad); color: #fff; }
.option .opt-text { flex: 1; }
.option.unknown { background: transparent; border: 1.5px dashed rgba(23,20,15,0.28); color: var(--soft); }
@media (hover: hover) {
  .option.unknown:hover { border-color: var(--soft); box-shadow: none; }
}

.nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }
.small-note { font-size: 12px; color: var(--soft); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none; text-align: center;
  font-family: inherit; font-weight: 700; border-radius: 999px; transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn-primary {
  background: var(--grad); color: #fff; font-size: 16px; padding: 16px 40px;
  box-shadow: 0 12px 34px -10px rgba(167,90,240,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -10px rgba(255,54,65,0.5); }
/* 役割の異なるCTA（詳細レポート受け取る）＝envisionの青×ライムで差別化 */
.btn-cta-alt { background: linear-gradient(100deg, #2D78D4 42%, #BEF000 118%); color: #fff; font-weight: 800; box-shadow: 0 12px 34px -10px rgba(45,120,212,0.55); }
.btn-cta-alt:hover { box-shadow: 0 18px 42px -10px rgba(45,120,212,0.6); }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--soft); font-size: 14px; padding: 10px 18px; }
.btn-ghost:hover { color: var(--ink); }
/* 戻る（控えめ） */
.btn-back {
  background: transparent; border: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--soft); padding: 8px 4px;
  transition: color .15s;
}
.btn-back:hover { color: var(--ink); }
.cta-center { text-align: center; padding: 14px 0 8px; }

/* ---------- フォーム ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.form-group label .req { color: var(--red); font-size: 11px; margin-left: 7px; font-weight: 700; }
.req-must { color: var(--red); font-weight: 700; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px;
  font-family: inherit; font-size: 16px; background: var(--panel); color: var(--ink);
}
.form-group select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--purple); }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--soft); margin: 18px 0; }
.checkbox-row input { margin-top: 6px; flex-shrink: 0; }
.checkbox-row a { color: var(--purple); }
.form-error { color: var(--red); font-size: 13px; margin-top: 4px; display: none; }
.about-issue-label { font-weight: 700; font-size: 14px; margin: 22px 0 10px; }

/* ---------- 結果 ---------- */
.result-hero { text-align: center; padding: 8px 0 6px; }
.result-hero .type-label {
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: 0.18em; color: var(--soft); text-transform: uppercase;
}
.result-hero .type-name {
  font-size: clamp(32px, 7vw, 48px); font-weight: 900; line-height: 1.25; letter-spacing: -0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 8px 0 6px;
}
.result-hero .score { font-size: 15px; color: var(--soft); }
.result-hero .score b {
  font-size: 30px; color: var(--ink); font-family: "Archivo", sans-serif;
}

.radar-wrap { display: flex; justify-content: center; margin: 10px 0 6px; }

.area-scores { display: grid; gap: 10px; margin: 18px 0; }
.area-score-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.area-score-row .name { flex: 0 0 6.8em; font-weight: 700; }
.area-score-row .bar { flex: 1; height: 8px; background: rgba(23,20,15,0.10); border-radius: 999px; overflow: hidden; }
.area-score-row .bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.area-score-row .val { flex: 0 0 3em; text-align: right; font-weight: 900; font-family: "Archivo", sans-serif; }

/* カード共通：白カード上に立つ白ブロック（やや浮かせる） */
.result-lead, .gate-box, .dir-card, .dir-closing, .detail-area {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.result-lead { padding: 22px; font-size: 14.5px; margin: 20px 0; }

.gate-box { padding: 28px 24px; margin: 26px 0; text-align: center; }
.gate-box h3 { font-size: 19px; font-weight: 900; margin-bottom: 10px; line-height: 1.5; }

.section-title { font-size: clamp(20px, 4.4vw, 26px); font-weight: 900; letter-spacing: -0.01em; margin: 28px 0 8px; }

.dir-teaser { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0 20px; }
.dir-chip { font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 5px 14px; }
.dir-chip.comp { background: #FFE4E6; color: var(--red); }
.dir-chip.amp  { background: #E6F6EC; color: #1E8E55; }
.dir-chip.disc { background: #F1E6FE; color: #7C3AC9; }
/* 『強みを伸ばす』の矢印だけ大きく（vertical-alignで中央寄せ＝行はずれない） */
.amp-ico { font-size: 1.4em; vertical-align: -0.1em; }
.dir-card.amplify .dir-icon { font-size: 28px; }

/* 3方向カード */
.dir-cards { display: grid; gap: 16px; margin: 10px 0 18px; }
.dir-card { padding: 22px; border-left: 6px solid var(--ink); }
.dir-card.complement { border-left-color: var(--red); }
.dir-card.amplify { border-left-color: #1E8E55; }
.dir-card.discovery { border-left-color: var(--purple); }
.dir-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.dir-icon { font-size: 22px; line-height: 1; }
.dir-card.complement .dir-icon { color: var(--red); }
.dir-card.amplify .dir-icon { color: #1E8E55; }
.dir-card.discovery .dir-icon { color: var(--purple); }
.dir-card-head h3 { font-size: 18px; font-weight: 900; }
.dir-lead { font-size: 14px; color: var(--soft); margin-bottom: 16px; }
.dir-items { display: grid; gap: 11px; }
.dir-item { background: var(--greige); border-radius: 12px; padding: 13px 15px; }
.dir-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.dir-item-name { font-weight: 700; font-size: 14px; }
.dir-item-action { font-size: 13.5px; color: var(--soft); margin: 0; }

.dir-closing { padding: 20px 22px; font-size: 14px; line-height: 1.9; margin: 6px 0 8px; }

/* バンド表示 */
.band { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 9px; }
.band.low  { background: #FFE4E6; color: var(--red); }
.band.mid  { background: #F1E6FE; color: #7C3AC9; }
.band.high { background: #E6F6EC; color: #1E8E55; }

/* 詳細（深掘り） */
.area-detail-toggle { margin: 18px 0; }
.area-detail-toggle summary {
  cursor: pointer; font-weight: 700; font-size: 14px; padding: 14px 18px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow); list-style: none;
}
.area-detail-toggle summary::-webkit-details-marker { display: none; }
.area-detail-toggle summary::before { content: "▸ "; color: var(--red); }
.area-detail-toggle[open] summary::before { content: "▾ "; }
.area-detail-toggle > div { margin-top: 14px; }
.detail-area { padding: 22px; margin-bottom: 16px; }
.detail-area h3 { font-size: 16px; margin-bottom: 6px; }
.detail-area .band { margin-bottom: 12px; }
.detail-area dl dt { font-weight: 700; font-size: 13px; margin-top: 12px; }
.detail-area dl dd { font-size: 13.5px; color: var(--soft); }
.unknown-note { font-size: 13px; background: var(--greige); border-radius: 10px; padding: 11px 13px; margin-top: 12px; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.7); padding: 30px 0; font-size: 12.5px;
  text-align: center; margin-top: 56px;
}

/* ---------- 進捗（about画面で使用するレガシー） ---------- */
.progress-wrap { margin: 6px 0 22px; }
.progress-label { font-size: 12.5px; color: var(--soft); display: flex; justify-content: space-between; margin-bottom: 7px; }

/* ---------- ユーティリティ ---------- */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s cubic-bezier(.16,1,.3,1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ===== SP：ウェーブ帯とカードをスマホ用に（画像も sp 版へ） ===== */
@media (max-width: 760px) {
  .wave-hero {
    min-height: 300px;
    background:
      url(../assets/objects_sp.webp) no-repeat center top 30px/480px,
      var(--greige) url(../assets/wave_sp.webp) no-repeat right top/335px auto;
  }
  .masthead { padding: 10px 13px; }      /* 元サイト #gHeader モバイルと同一 */
  .logo img { height: 40px; }            /* LPと同じくモバイルは emark を 40px */
  .hero-title { padding-top: 12px; }
  .hero-title h1 { font-size: clamp(34px, 10.5vw, 44px); }
  .app-card {
    margin: -120px 14px 0; max-width: none;
    border-radius: 22px; padding: 26px 18px 32px;
  }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
  .btn-primary { width: 100%; padding: 16px 20px; }
  .logo .logo-sub { display: none; }
  .quiz-stage { min-height: 320px; }
  .hero-title .eyebrow { display: none; }
  .hero-title { padding-top: 22px; }
}
